Virgil IoT KIT
fldt-client.h
Go to the documentation of this file.
1 // Copyright (C) 2015-2020 Virgil Security, Inc.
2 //
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // (1) Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 //
12 // (2) Redistributions in binary form must reproduce the above copyright
13 // notice, this list of conditions and the following disclaimer in
14 // the documentation and/or other materials provided with the
15 // distribution.
16 //
17 // (3) Neither the name of the copyright holder nor the names of its
18 // contributors may be used to endorse or promote products derived from
19 // this software without specific prior written permission.
20 //
21 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR
22 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 // DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
25 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
30 // IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 // POSSIBILITY OF SUCH DAMAGE.
32 //
33 // Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com>
34 
90 #ifndef VS_SECURITY_SDK_SNAP_SERVICES_FLDT_CLIENT_H
91 #define VS_SECURITY_SDK_SNAP_SERVICES_FLDT_CLIENT_H
92 
93 #if FLDT_CLIENT
94 
98 
99 #ifdef __cplusplus
100 namespace VirgilIoTKit {
101 extern "C" {
102 #endif
103 
117 typedef void (*vs_fldt_got_file)(vs_update_file_type_t *file_type,
118  const vs_file_version_t *prev_file_ver,
119  const vs_file_version_t *new_file_ver,
120  vs_update_interface_t *update_interface,
121  const vs_mac_addr_t *gateway,
122  bool successfully_updated);
123 
132 const vs_snap_service_t *
133 vs_snap_fldt_client(vs_fldt_got_file got_file_callback);
134 
147 
157 
158 #ifdef __cplusplus
159 } // extern "C"
160 } // namespace VirgilIoTKit
161 #endif
162 
163 #endif // FLDT_CLIENT
164 
165 #endif // VS_SECURITY_SDK_SNAP_SERVICES_FLDT_CLIENT_H
vs_update_file_type_t
File type information.
Definition: update.h:70
vs_status_e
vs_status_e
Status code.
Definition: status_code.h:77
vs_mac_addr_t
MAC address.
Definition: snap-structs.h:252
vs_fldt_got_file
void(* vs_fldt_got_file)(vs_update_file_type_t *file_type, const vs_file_version_t *prev_file_ver, const vs_file_version_t *new_file_ver, vs_update_interface_t *update_interface, const vs_mac_addr_t *gateway, bool successfully_updated)
Got new file callback.
Definition: fldt-client.h:117
update.h
Update interface for files downloading.
vs_file_version_t
File version information.
Definition: provision-structs.h:216
status_code.h
Status codes and macroses.
vs_fldt_client_add_file_type
vs_status_e vs_fldt_client_add_file_type(const vs_update_file_type_t *file_type, vs_update_interface_t *update_interface)
Add file type.
snap-structs.h
SNAP structures.
vs_snap_service_t
SNAP service descriptor.
Definition: snap-structs.h:312
vs_snap_fldt_client
const vs_snap_service_t * vs_snap_fldt_client(vs_fldt_got_file got_file_callback)
FLDT Client SNAP Service implementation.
vs_update_interface_t
Update interface context.
Definition: update.h:284
vs_fldt_client_request_all_files
vs_status_e vs_fldt_client_request_all_files(void)
Request all files data.