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 #ifndef LIBUWEAVE_SRC_MACAROON_CONTEXT_ 6 #define LIBUWEAVE_SRC_MACAROON_CONTEXT_ 7 8 #include <stdbool.h> 9 #include <stddef.h> 10 #include <stdint.h> 11 12 #include "src/macaroon_caveat.h" 13 14 typedef struct { 15 uint32_t current_time; // In number of seconds since Jan 1st 2000 00:00:00 16 const uint8_t* ble_session_id; // Only for BLE 17 size_t ble_session_id_len; 18 } UwMacaroonContext; 19 20 bool uw_macaroon_context_create_(uint32_t current_time, 21 const uint8_t* ble_session_id, 22 size_t ble_session_id_len, 23 UwMacaroonContext* new_context); 24 25 #endif // LIBUWEAVE_SRC_MACAROON_CONTEXT_ 26