source: azure_iot_hub_f767zi/trunk/azure_iot_sdk/provisioning_client/inc/azure_prov_client/prov_device_client.h@ 464

Last change on this file since 464 was 464, checked in by coas-nagasima, 3 years ago

WolfSSLとAzure IoT SDKを更新

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr;charset=UTF-8
File size: 2.8 KB
Line 
1// Copyright (c) Microsoft. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
4/** @file prov_device_client.h
5* @brief Extends the Prov_Device_LL module with additional features.
6*
7* @details Prov_Device is a module that extends the Prov_Device_LL
8* module with 2 features:
9* - scheduling the work for the IoTHubCLient from a
10* thread, so that the user does not need to create their
11* own thread
12* - thread-safe APIs
13*/
14
15#ifndef PROV_DEVICE_CLIENT_H
16#define PROV_DEVICE_CLIENT_H
17
18#ifndef PROV_DEVICE_CLIENT_INSTANCE_TYPE
19typedef struct PROV_DEVICE_INSTANCE_TAG* PROV_DEVICE_HANDLE;
20#define PROV_DEVICE_CLIENT_INSTANCE_TYPE
21#endif // PROV_DEVICE_CLIENT_INSTANCE_TYPE
22
23#include <stddef.h>
24#include <stdint.h>
25#include "prov_device_ll_client.h"
26#include "umock_c/umock_c_prod.h"
27#include "azure_macro_utils/macro_utils.h"
28#include "azure_c_shared_utility/const_defines.h"
29#include "azure_prov_client/prov_transport.h"
30
31#ifdef __cplusplus
32extern "C"
33{
34#endif
35
36static STATIC_VAR_UNUSED const char* const PROV_OPTION_DO_WORK_FREQUENCY_IN_MS = "do_work_freq_ms";
37
38MOCKABLE_FUNCTION(, PROV_DEVICE_HANDLE, Prov_Device_Create, const char*, uri, const char*, scope_id, PROV_DEVICE_TRANSPORT_PROVIDER_FUNCTION, protocol);
39MOCKABLE_FUNCTION(, void, Prov_Device_Destroy, PROV_DEVICE_HANDLE, prov_device_handle);
40MOCKABLE_FUNCTION(, PROV_DEVICE_RESULT, Prov_Device_Register_Device, PROV_DEVICE_HANDLE, prov_device_handle, PROV_DEVICE_CLIENT_REGISTER_DEVICE_CALLBACK, register_callback, void*, user_context, PROV_DEVICE_CLIENT_REGISTER_STATUS_CALLBACK, register_status_callback, void*, status_user_context);
41MOCKABLE_FUNCTION(, PROV_DEVICE_RESULT, Prov_Device_SetOption, PROV_DEVICE_HANDLE, prov_device_handle, const char*, optionName, const void*, value);
42MOCKABLE_FUNCTION(, const char*, Prov_Device_GetVersionString);
43
44/**
45* @brief Sets the Provisioning Data that is sent to the Provisioning service
46*
47* @param handle The handle created by a call to the create function.
48* @param json The json payload field that is sent to the service. Setting json to NULL will unset the value previously set
49*
50* @return PROV_DEVICE_RESULT_OK upon success or an error code upon failure
51*/
52MOCKABLE_FUNCTION(, PROV_DEVICE_RESULT, Prov_Device_Set_Provisioning_Payload, PROV_DEVICE_HANDLE, handle, const char*, json);
53
54/**
55* @brief Retrieves the Provisioning Data that is sent from the Provisioning service
56*
57* @param handle The handle created by a call to the create function.
58*
59* @return The data that was specified by the service
60*/
61MOCKABLE_FUNCTION(, const char*, Prov_Device_Get_Provisioning_Payload, PROV_DEVICE_HANDLE, handle);
62
63#ifdef __cplusplus
64}
65#endif /* __cplusplus */
66
67#endif // PROV_DEVICE_CLIENT_H
Note: See TracBrowser for help on using the repository browser.