1 // Copyright 2015 The Weave Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "src/macaroon_context.h" 6 uw_macaroon_context_create_(uint32_t current_time,const uint8_t * ble_session_id,size_t ble_session_id_len,UwMacaroonContext * new_context)7bool uw_macaroon_context_create_(uint32_t current_time, 8 const uint8_t* ble_session_id, 9 size_t ble_session_id_len, 10 UwMacaroonContext* new_context) { 11 if (ble_session_id == NULL && ble_session_id_len != 0) { 12 return false; 13 } 14 if (new_context == NULL) { 15 return false; 16 } 17 18 new_context->current_time = current_time; 19 new_context->ble_session_id = ble_session_id; 20 new_context->ble_session_id_len = ble_session_id_len; 21 return true; 22 } 23