Ignore:
Timestamp:
Jun 22, 2021, 9:00:19 PM (3 years ago)
Author:
coas-nagasima
Message:

WolfSSLとAzure IoT SDKを更新

Location:
azure_iot_hub_f767zi/trunk/azure_iot_sdk/iothub_client/inc
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • azure_iot_hub_f767zi/trunk/azure_iot_sdk/iothub_client/inc/internal/iothub_client_authorization.h

    r457 r464  
    4242MOCKABLE_FUNCTION(, IOTHUB_CREDENTIAL_TYPE, IoTHubClient_Auth_Set_x509_Type, IOTHUB_AUTHORIZATION_HANDLE, handle, bool, enable_x509);
    4343MOCKABLE_FUNCTION(, IOTHUB_CREDENTIAL_TYPE, IoTHubClient_Auth_Get_Credential_Type, IOTHUB_AUTHORIZATION_HANDLE, handle);
    44 MOCKABLE_FUNCTION(, char*, IoTHubClient_Auth_Get_SasToken, IOTHUB_AUTHORIZATION_HANDLE, handle, const char*, scope, size_t, expiry_time_relative_seconds, const char*, key_name);
     44MOCKABLE_FUNCTION(, char*, IoTHubClient_Auth_Get_SasToken, IOTHUB_AUTHORIZATION_HANDLE, handle, const char*, scope, uint64_t, expiry_time_relative_seconds, const char*, key_name);
    4545MOCKABLE_FUNCTION(, int, IoTHubClient_Auth_Set_xio_Certificate, IOTHUB_AUTHORIZATION_HANDLE, handle, XIO_HANDLE, xio);
    4646MOCKABLE_FUNCTION(, const char*, IoTHubClient_Auth_Get_DeviceId, IOTHUB_AUTHORIZATION_HANDLE, handle);
     
    4949MOCKABLE_FUNCTION(, SAS_TOKEN_STATUS, IoTHubClient_Auth_Is_SasToken_Valid, IOTHUB_AUTHORIZATION_HANDLE, handle);
    5050MOCKABLE_FUNCTION(, int, IoTHubClient_Auth_Get_x509_info, IOTHUB_AUTHORIZATION_HANDLE, handle, char**, x509_cert, char**, x509_key);
    51 MOCKABLE_FUNCTION(, int, IoTHubClient_Auth_Set_SasToken_Expiry, IOTHUB_AUTHORIZATION_HANDLE, handle, size_t, expiry_time_seconds);
    52 MOCKABLE_FUNCTION(, size_t, IoTHubClient_Auth_Get_SasToken_Expiry, IOTHUB_AUTHORIZATION_HANDLE, handle);
     51MOCKABLE_FUNCTION(, int, IoTHubClient_Auth_Set_SasToken_Expiry, IOTHUB_AUTHORIZATION_HANDLE, handle, uint64_t, expiry_time_seconds);
     52MOCKABLE_FUNCTION(, uint64_t, IoTHubClient_Auth_Get_SasToken_Expiry, IOTHUB_AUTHORIZATION_HANDLE, handle);
    5353
    5454
  • azure_iot_hub_f767zi/trunk/azure_iot_sdk/iothub_client/inc/internal/iothub_internal_consts.h

    r457 r464  
    1010#endif
    1111
    12     static const char* IOTHUB_API_VERSION = "2019-10-01";
    13     // TODO: https://github.com/Azure/azure-iot-sdk-c/issues/1547 tracks removing this preview
    14     // variable once the underlying logic is enabled on all IoTHubs.
    15     static const char* IOTHUB_API_PREVIEW_VERSION = "2020-05-31-preview";
    16 
     12    static const char* IOTHUB_API_VERSION = "2020-09-30";
    1713    static const char* SECURITY_INTERFACE_INTERNAL_ID = "iothub-interface-internal-id";
    1814    static const char* SECURITY_INTERFACE_INTERNAL_ID_VALUE = "security*azureiot*com^SecurityAgent^1*0*0";
  • azure_iot_hub_f767zi/trunk/azure_iot_sdk/iothub_client/inc/iothub_client.h

    r457 r464  
    22// Licensed under the MIT license. See LICENSE file in the project root for full license information.
    33
     4//**********************************************************************
     5// NOTE: THIS HEADER IS DEPRECATED
     6//
     7// Functions in this header will be maintained for backward compatability.
     8// New applications should use iothub_device_client.h.
     9//
     10//**********************************************************************
     11
    412/** @file iothub_client.h
    5 *    @brief Extends the IoTHubCLient_LL module with additional features.
     13*    @brief Extends the IoTHubClient_LL with additional features.
    614*
    715*    @note  DEPRECATED. New users use iothub_device_client.h for IoTHubClient APIs.
     
    3846
    3947    /**
    40     * @brief    Creates a IoT Hub client for communication with an existing
    41     *             IoT Hub using the specified connection string parameter.
    42     *
    43     * @param    connectionString    Pointer to a character string
    44     * @param    protocol            Function pointer for protocol implementation
    45     *
    46     *            Sample connection string:
    47     *                <blockquote>
    48     *                    <pre>HostName=[IoT Hub name goes here].[IoT Hub suffix goes here, e.g., private.azure-devices-int.net];DeviceId=[Device ID goes here];SharedAccessKey=[Device key goes here];</pre>
    49     *                   <pre>HostName=[IoT Hub name goes here].[IoT Hub suffix goes here, e.g., private.azure-devices-int.net];DeviceId=[Device ID goes here];SharedAccessSignature=SharedAccessSignature sr=[IoT Hub name goes here].[IoT Hub suffix goes here, e.g., private.azure-devices-int.net]/devices/[Device ID goes here]&sig=[SAS Token goes here]&se=[Expiry Time goes here];</pre>
    50     *                </blockquote>
    51     *
    52     * @return    A non-NULL @c IOTHUB_CLIENT_HANDLE value that is used when
    53     *             invoking other functions for IoT Hub client and @c NULL on failure.
     48    * @deprecated IoTHubClient_CreateFromConnectionString is deprecated.  Use IoTHubDeviceClient_CreateFromConnectionString instead.
    5449    */
    5550    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_HANDLE, IoTHubClient_CreateFromConnectionString, const char*, connectionString, IOTHUB_CLIENT_TRANSPORT_PROVIDER, protocol);
    5651
    5752    /**
    58     * @brief    Creates a IoT Hub client for communication with an existing IoT
    59     *             Hub using the specified parameters.
    60     *
    61     * @param    config    Pointer to an @c IOTHUB_CLIENT_CONFIG structure
    62     *
    63     *            The API does not allow sharing of a connection across multiple
    64     *            devices. This is a blocking call.
    65     *
    66     * @return    A non-NULL @c IOTHUB_CLIENT_HANDLE value that is used when
    67     *             invoking other functions for IoT Hub client and @c NULL on failure.
     53    * @deprecated IoTHubClient_Create is deprecated.  Use IoTHubDeviceClient_Create instead.
    6854    */
    6955    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_HANDLE, IoTHubClient_Create, const IOTHUB_CLIENT_CONFIG*, config);
    7056
    7157    /**
    72     * @brief    Creates a IoT Hub client for communication with an existing IoT
    73     *             Hub using the specified parameters.
    74     *
    75     * @param    transportHandle    TRANSPORT_HANDLE which represents a connection.
    76     * @param    config    Pointer to an @c IOTHUB_CLIENT_CONFIG structure
    77     *
    78     *            The API allows sharing of a connection across multiple
    79     *            devices. This is a blocking call.
    80     *
    81     * @return    A non-NULL @c IOTHUB_CLIENT_HANDLE value that is used when
    82     *             invoking other functions for IoT Hub client and @c NULL on failure.
     58    * @deprecated IoTHubClient_CreateWithTransport is deprecated.  Use IoTHubDeviceClient_CreateWithTransport instead.
    8359    */
    8460    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_HANDLE, IoTHubClient_CreateWithTransport, TRANSPORT_HANDLE, transportHandle, const IOTHUB_CLIENT_CONFIG*, config);
    8561
    8662    /**
    87     * @brief    Creates a IoT Hub client for communication with an existing IoT
    88     *             Hub using the device auth module.
    89     *
    90     * @param    iothub_uri    Pointer to an ioThub hostname received in the registration process
    91     * @param    device_id    Pointer to the device Id of the device
    92     * @param    protocol    Function pointer for protocol implementation
    93     *
    94     * @return    A non-NULL @c IOTHUB_CLIENT_LL_HANDLE value that is used when
    95     *             invoking other functions for IoT Hub client and @c NULL on failure.
     63    * @deprecated IoTHubClient_CreateFromDeviceAuth is deprecated.  Use IoTHubDeviceClient_CreateFromDeviceAuth instead.
    9664    */
    9765    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_HANDLE, IoTHubClient_CreateFromDeviceAuth, const char*, iothub_uri, const char*, device_id, IOTHUB_CLIENT_TRANSPORT_PROVIDER, protocol);
    9866
    9967    /**
    100     * @brief    Disposes of resources allocated by the IoT Hub client. This is a
    101     *             blocking call.
    102     *
    103     * @param    iotHubClientHandle    The handle created by a call to the create function.
     68    * @deprecated IoTHubClient_Destroy is deprecated.  Use IoTHubDeviceClient_Destroy instead.
    10469    */
    10570    MOCKABLE_FUNCTION(, void, IoTHubClient_Destroy, IOTHUB_CLIENT_HANDLE, iotHubClientHandle);
    10671
    10772    /**
    108     * @brief    Asynchronous call to send the message specified by @p eventMessageHandle.
    109     *
    110     * @param    iotHubClientHandle               The handle created by a call to the create function.
    111     * @param    eventMessageHandle               The handle to an IoT Hub message.
    112     * @param    eventConfirmationCallback      The callback specified by the device for receiving
    113     *                                         confirmation of the delivery of the IoT Hub message.
    114     *                                         This callback can be expected to invoke the
    115     *                                         ::IoTHubClient_SendEventAsync function for the
    116     *                                         same message in an attempt to retry sending a failing
    117     *                                         message. The user can specify a @c NULL value here to
    118     *                                         indicate that no callback is required.
    119     * @param    userContextCallback            User specified context that will be provided to the
    120     *                                         callback. This can be @c NULL.
    121     *
    122     *            @b NOTE: The application behavior is undefined if the user calls
    123     *            the ::IoTHubClient_Destroy function from within any callback.
    124     * @remarks
    125     *            The IOTHUB_MESSAGE_HANDLE instance provided as argument is copied by the function,
    126     *            so this argument can be destroyed by the calling application right after IoTHubClient_SendEventAsync returns.
    127     *            The copy of @c eventMessageHandle is later destroyed by the iothub client when the message is effectively sent, if a failure sending it occurs, or if the client is destroyed.
    128     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     73    * @deprecated IoTHubClient_SendEventAsync is deprecated.  Use IoTHubDeviceClient_SendEventAsync instead.
    12974    */
    13075    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_SendEventAsync, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, IOTHUB_MESSAGE_HANDLE, eventMessageHandle, IOTHUB_CLIENT_EVENT_CONFIRMATION_CALLBACK, eventConfirmationCallback, void*, userContextCallback);
    13176
    13277    /**
    133     * @brief    This function returns the current sending status for IoTHubClient.
    134     *
    135     * @param    iotHubClientHandle        The handle created by a call to the create function.
    136     * @param    iotHubClientStatus        The sending state is populated at the address pointed
    137     *                                     at by this parameter. The value will be set to
    138     *                                     @c IOTHUBCLIENT_SENDSTATUS_IDLE if there is currently
    139     *                                     no item to be sent and @c IOTHUBCLIENT_SENDSTATUS_BUSY
    140     *                                     if there are.
    141     *
    142     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     78    * @deprecated IoTHubClient_GetSendStatus is deprecated.  Use IoTHubDeviceClient_GetSendStatus instead.
    14379    */
    14480    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_GetSendStatus, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_STATUS*, iotHubClientStatus);
    14581
    14682    /**
    147     * @brief    Sets up the message callback to be invoked when IoT Hub issues a
    148     *             message to the device. This is a blocking call.
    149     *
    150     * @param    iotHubClientHandle               The handle created by a call to the create function.
    151     * @param    messageCallback                The callback specified by the device for receiving
    152     *                                         messages from IoT Hub.
    153     * @param    userContextCallback            User specified context that will be provided to the
    154     *                                         callback. This can be @c NULL.
    155     *
    156     *            @b NOTE: The application behavior is undefined if the user calls
    157     *            the ::IoTHubClient_Destroy function from within any callback.
    158     *
    159     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     83    * @deprecated IoTHubClient_SetMessageCallback is deprecated.  Use IoTHubDeviceClient_SetMessageCallback instead.
    16084    */
    16185    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_SetMessageCallback, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_MESSAGE_CALLBACK_ASYNC, messageCallback, void*, userContextCallback);
    16286
    16387    /**
    164     * @brief    Sets up the connection status callback to be invoked representing the status of
    165     * the connection to IOT Hub. This is a blocking call.
    166     *
    167     * @param    iotHubClientHandle                       The handle created by a call to the create function.
    168     * @param    connectionStatusCallback                The callback specified by the device for receiving
    169     *                                                 updates about the status of the connection to IoT Hub.
    170     * @param    userContextCallback                    User specified context that will be provided to the
    171     *                                                 callback. This can be @c NULL.
    172     *
    173     *            @b NOTE: The application behavior is undefined if the user calls
    174     *            the ::IoTHubClient_LL_Destroy function from within any callback.
    175     *
    176     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     88    * @deprecated IoTHubClient_SetConnectionStatusCallback is deprecated.  Use IoTHubDeviceClient_SetConnectionStatusCallback instead.
    17789    */
    17890    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_SetConnectionStatusCallback, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_CONNECTION_STATUS_CALLBACK, connectionStatusCallback, void*, userContextCallback);
    17991
    18092    /**
    181     * @brief    Sets up the connection status callback to be invoked representing the status of
    182     * the connection to IOT Hub. This is a blocking call.
    183     *
    184     * @param    iotHubClientHandle                       The handle created by a call to the create function.
    185     * @param    retryPolicy                             The policy to use to reconnect to IoT Hub when a
    186     *                                               connection drops.
    187     * @param    retryTimeoutLimitInSeconds            Maximum amount of time(seconds) to attempt reconnection when a
    188     *                                               connection drops to IOT Hub.
    189     *
    190     *            @b NOTE: The application behavior is undefined if the user calls
    191     *            the ::IoTHubClient_LL_Destroy function from within any callback.
    192     *
    193     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     93    * @deprecated IoTHubClient_SetRetryPolicy is deprecated.  Use IoTHubDeviceClient_SetRetryPolicy instead.
    19494    */
    19595    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_SetRetryPolicy, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_RETRY_POLICY, retryPolicy, size_t, retryTimeoutLimitInSeconds);
    19696
    19797    /**
    198     * @brief    Sets up the connection status callback to be invoked representing the status of
    199     * the connection to IOT Hub. This is a blocking call.
    200     *
    201     * @param    iotHubClientHandle                       The handle created by a call to the create function.
    202     * @param    retryPolicy                             Out parameter containing the policy to use to reconnect to IoT Hub.
    203     * @param    retryTimeoutLimitInSeconds            Out parameter containing maximum amount of time in seconds to attempt reconnection
    204     to IOT Hub.
    205     *
    206     *            @b NOTE: The application behavior is undefined if the user calls
    207     *            the ::IoTHubClient_LL_Destroy function from within any callback.
    208     *
    209     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     98    * @deprecated IoTHubClient_GetRetryPolicy is deprecated.  Use IoTHubDeviceClient_GetRetryPolicy instead.
    21099    */
    211100    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_GetRetryPolicy, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_RETRY_POLICY*, retryPolicy, size_t*, retryTimeoutLimitInSeconds);
    212101
    213102    /**
    214     * @brief    This function returns in the out parameter @p lastMessageReceiveTime
    215     *             what was the value of the @c time function when the last message was
    216     *             received at the client.
    217     *
    218     * @param    iotHubClientHandle                The handle created by a call to the create function.
    219     * @param    lastMessageReceiveTime          Out parameter containing the value of @c time function
    220     *                                             when the last message was received.
    221     *
    222     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     103    * @deprecated IoTHubClient_GetLastMessageReceiveTime is deprecated.  Use IoTHubDeviceClient_GetLastMessageReceiveTime instead.
    223104    */
    224105    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_GetLastMessageReceiveTime, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, time_t*, lastMessageReceiveTime);
    225106
    226107    /**
    227     * @brief    This API sets a runtime option identified by parameter @p optionName
    228     *             to a value pointed to by @p value. @p optionName and the data type
    229     *             @p value is pointing to are specific for every option.
    230     *
    231     * @param    iotHubClientHandle    The handle created by a call to the create function.
    232     * @param    optionName              Name of the option.
    233     * @param    value                  The value.
    234     *
    235     *            The options that can be set via this API are:
    236     *                - @b timeout - the maximum time in milliseconds a communication is
    237     *                  allowed to use. @p value is a pointer to an @c unsigned @c int with
    238     *                  the timeout value in milliseconds. This is only supported for the HTTP
    239     *                  protocol as of now. When the HTTP protocol uses CURL, the meaning of
    240     *                  the parameter is <em>total request time</em>. When the HTTP protocol uses
    241     *                  winhttp, the meaning is the same as the @c dwSendTimeout and
    242     *                  @c dwReceiveTimeout parameters of the
    243     *                  <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa384116(v=vs.85).aspx">
    244     *                  WinHttpSetTimeouts</a> API.
    245     *                - @b CURLOPT_LOW_SPEED_LIMIT - only available for HTTP protocol and only
    246     *                  when CURL is used. It has the same meaning as CURL's option with the same
    247     *                  name. @p value is pointer to a long.
    248     *                - @b CURLOPT_LOW_SPEED_TIME - only available for HTTP protocol and only
    249     *                  when CURL is used. It has the same meaning as CURL's option with the same
    250     *                  name. @p value is pointer to a long.
    251     *                - @b CURLOPT_FORBID_REUSE - only available for HTTP protocol and only
    252     *                  when CURL is used. It has the same meaning as CURL's option with the same
    253     *                  name. @p value is pointer to a long.
    254     *                - @b CURLOPT_FRESH_CONNECT - only available for HTTP protocol and only
    255     *                  when CURL is used. It has the same meaning as CURL's option with the same
    256     *                  name. @p value is pointer to a long.
    257     *                - @b CURLOPT_VERBOSE - only available for HTTP protocol and only
    258     *                  when CURL is used. It has the same meaning as CURL's option with the same
    259     *                  name. @p value is pointer to a long.
    260     *                - @b messageTimeout - the maximum time in milliseconds until a message
    261     *                 is timeouted. The time starts at IoTHubClient_SendEventAsync. By default,
    262     *                 messages do not expire. @p is a pointer to a uint64_t
    263     *                - @b svc2cl_keep_alive_timeout_secs - the AMQP service side keep alive interval in seconds.
    264     *                 After the connection established the client requests the server to set the
    265     *                 keep alive interval for given time.
    266     *                 If it is not set then the default 240 sec applies.
    267     *                 If it is set to zero the server will not send keep alive messages to the client.
    268     *                - @b cl2svc_keep_alive_send_ratio - the AMQP client side keep alive interval in seconds.
    269     *                 After the connection established the server requests the client to set the
    270     *                 keep alive interval for given time.
    271     *                 If it is not set then the default ratio of 1/2 is applied.
    272     *                 The ratio has to be greater than 0.0 and equal to or less than 0.9
    273 
    274     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
    275     */
     108    * @deprecated IoTHubClient_SetOption is deprecated.  Use IoTHubDeviceClient_SetOption instead.
     109    */   
    276110    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_SetOption, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, const char*, optionName, const void*, value);
    277111
    278112    /**
    279     * @brief    This API specifies a call back to be used when the device receives a state update.
    280     *
    281     * @param    iotHubClientHandle        The handle created by a call to the create function.
    282     * @param    deviceTwinCallback        The callback specified by the device client to be used for updating
    283     *                                    the desired state. The callback will be called in response to a
    284     *                                    request send by the IoTHub services. The payload will be passed to the
    285     *                                    callback, along with two version numbers:
    286     *                                        - Desired:
    287     *                                        - LastSeenReported:
    288     * @param    userContextCallback        User specified context that will be provided to the
    289     *                                     callback. This can be @c NULL.
    290     *
    291     *            @b NOTE: The application behavior is undefined if the user calls
    292     *            the ::IoTHubClient_Destroy function from within any callback.
    293     *
    294     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     113    * @deprecated IoTHubClient_SetDeviceTwinCallback is deprecated.  Use IoTHubDeviceClient_SetDeviceTwinCallback instead.
    295114    */
    296115    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_SetDeviceTwinCallback, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_DEVICE_TWIN_CALLBACK, deviceTwinCallback, void*, userContextCallback);
    297116
    298117    /**
    299     * @brief    This API sends a report of the device's properties and their current values.
    300     *
    301     * @param    iotHubClientHandle        The handle created by a call to the create function.
    302     * @param    reportedState            The current device property values to be 'reported' to the IoTHub.
    303     * @param    reportedStateCallback    The callback specified by the device client to be called with the
    304     *                                    result of the transaction.
    305     * @param    userContextCallback        User specified context that will be provided to the
    306     *                                     callback. This can be @c NULL.
    307     *
    308     *            @b NOTE: The application behavior is undefined if the user calls
    309     *            the ::IoTHubClient_Destroy function from within any callback.
    310     *
    311     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     118    * @deprecated IoTHubClient_SendReportedState is deprecated.  Use IoTHubDeviceClient_SendReportedState instead.
    312119    */
    313120    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_SendReportedState, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, const unsigned char*, reportedState, size_t, size, IOTHUB_CLIENT_REPORTED_STATE_CALLBACK, reportedStateCallback, void*, userContextCallback);
    314121
    315122    /**
    316     * @brief    This API sets callback for cloud to device method call.
    317     *
    318     * @param    iotHubClientHandle        The handle created by a call to the create function.
    319     * @param    deviceMethodCallback    The callback which will be called by IoTHub.
    320     * @param    userContextCallback        User specified context that will be provided to the
    321     *                                     callback. This can be @c NULL.
    322     *
    323     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     123    * @deprecated IoTHubClient_SetDeviceMethodCallback is deprecated.  Use IoTHubDeviceClient_SetDeviceMethodCallback instead.
    324124    */
    325125    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_SetDeviceMethodCallback, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_DEVICE_METHOD_CALLBACK_ASYNC, deviceMethodCallback, void*, userContextCallback);
    326126
    327127    /**
    328     * @brief    This API sets callback for async cloud to device method call.
    329     *
    330     * @param    iotHubClientHandle                The handle created by a call to the create function.
    331     * @param    inboundDeviceMethodCallback     The callback which will be called by IoTHub.
    332     * @param    userContextCallback                User specified context that will be provided to the
    333     *                                             callback. This can be @c NULL.
    334     *
    335     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     128    * @deprecated IoTHubClient_SetDeviceMethodCallback_Ex is deprecated.  Use IoTHubDeviceClient_SetDeviceMethodCallback instead.
    336129    */
    337130    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_SetDeviceMethodCallback_Ex, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_INBOUND_DEVICE_METHOD_CALLBACK, inboundDeviceMethodCallback, void*, userContextCallback);
    338131
    339132    /**
    340     * @brief    This API responses to a asnyc method callback identified the methodId.
    341     *
    342     * @param    iotHubClientHandle      The handle created by a call to the create function.
    343     * @param    methodId                The methodId of the Device Method callback.
    344     * @param    response                The response data for the method callback.
    345     * @param    response_size           The size of the response data buffer.
    346     * @param    status_response         The status response of the method callback.
    347     *
    348     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     133    * @deprecated IoTHubClient_DeviceMethodResponse is deprecated.  Use IoTHubDeviceClient_SetDeviceMethodCallback instead.
    349134    */
    350135    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_DeviceMethodResponse, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, METHOD_HANDLE, methodId, const unsigned char*, response, size_t, response_size, int, statusCode);
     
    352137#ifndef DONT_USE_UPLOADTOBLOB
    353138    /**
    354     * @brief    IoTHubClient_UploadToBlobAsync uploads data from memory to a file in Azure Blob Storage.
    355     *
    356     * @param    iotHubClientHandle                    The handle created by a call to the IoTHubClient_Create function.
    357     * @param    destinationFileName                    The name of the file to be created in Azure Blob Storage.
    358     * @param    source                              The source of data.
    359     * @param    size                                The size of data.
    360     * @param    iotHubClientFileUploadCallback      A callback to be invoked when the file upload operation has finished.
    361     * @param    context                             A user-provided context to be passed to the file upload callback.
    362     *
    363     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     139    * @deprecated IoTHubClient_UploadToBlobAsync is deprecated.  Use IoTHubDeviceClient_UploadToBlobAsync instead.
    364140    */
    365141    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_UploadToBlobAsync, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, const char*, destinationFileName, const unsigned char*, source, size_t, size, IOTHUB_CLIENT_FILE_UPLOAD_CALLBACK, iotHubClientFileUploadCallback, void*, context);
    366142
    367143    /**
    368     ** DEPRECATED: Use IoTHubClient_UploadMultipleBlocksToBlobAsyncEx instead **
    369     * @brief                          Uploads a file to a Blob storage in chunks, fed through the callback function provided by the user.
    370     * @remarks                        This function allows users to upload large files in chunks, not requiring the whole file content to be passed in memory.
    371     * @param iotHubClientHandle       The handle created by a call to the IoTHubClient_Create function.
    372     * @param destinationFileName      The name of the file to be created in Azure Blob Storage.
    373     * @param getDataCallback          A callback to be invoked to acquire the file chunks to be uploaded, as well as to indicate the status of the upload of the previous block.
    374     * @param context                  Any data provided by the user to serve as context on getDataCallback.
    375     * @returns                        An IOTHUB_CLIENT_RESULT value indicating the success or failure of the API call.
    376     ** DEPRECATED: Use IoTHubClient_UploadMultipleBlocksToBlobAsyncEx instead **
     144    * @deprecated IoTHubClient_UploadMultipleBlocksToBlobAsync is deprecated.  Use IoTHubDeviceClient_UploadMultipleBlocksToBlobAsync instead.
    377145    */
    378146    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_UploadMultipleBlocksToBlobAsync, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, const char*, destinationFileName, IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_CALLBACK, getDataCallback, void*, context);
    379147
    380148    /**
    381     * @brief                          Uploads a file to a Blob storage in chunks, fed through the callback function provided by the user.
    382     * @remarks                        This function allows users to upload large files in chunks, not requiring the whole file content to be passed in memory.
    383     * @param iotHubClientHandle       The handle created by a call to the IoTHubClient_Create function.
    384     * @param destinationFileName      The name of the file to be created in Azure Blob Storage.
    385     * @param getDataCallbackEx        A callback to be invoked to acquire the file chunks to be uploaded, as well as to indicate the status of the upload of the previous block.
    386     * @param context                  Any data provided by the user to serve as context on getDataCallback.
    387     * @returns                        An IOTHUB_CLIENT_RESULT value indicating the success or failure of the API call.*/
     149    * @deprecated IoTHubClient_UploadMultipleBlocksToBlobAsyncEx is deprecated.  Use IoTHubDeviceClient_UploadMultipleBlocksToBlobAsync instead.
     150    */
    388151    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_UploadMultipleBlocksToBlobAsyncEx, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, const char*, destinationFileName, IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_CALLBACK_EX, getDataCallbackEx, void*, context);
    389152
  • azure_iot_hub_f767zi/trunk/azure_iot_sdk/iothub_client/inc/iothub_client_core.h

    r457 r464  
    22// Licensed under the MIT license. See LICENSE file in the project root for full license information.
    33
    4 /** @file iothub_client_core.h
    5 *    @brief Extends the IoTHubClientCore_LL module with additional features.
    6 *
    7 *    @details IoTHubClientCore is a module that extends the IoTHubClientCore_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 */
     4//**********************************************************************
     5// NOTE: THIS HEADER IS FOR INTERNAL USE ONLY
     6//
     7// Applications should use iothub_device_client.h or iothub_module_client.h
     8// instead for the official API.
     9//
     10//**********************************************************************
    1411
    1512#ifndef IOTHUB_CLIENT_CORE_H
  • azure_iot_hub_f767zi/trunk/azure_iot_sdk/iothub_client/inc/iothub_client_core_ll.h

    r457 r464  
    22// Licensed under the MIT license. See LICENSE file in the project root for full license information.
    33
    4 /** @file iothub_client_core_ll.h
    5 *    @brief     APIs that allow a user (usually a device) to communicate
    6 *             with an Azure IoTHub.
    7 *
    8 *    @details IoTHubClientCore_LL is a module that allows a user (usually a
    9 *             device) to communicate with an Azure IoTHub. It can send events
    10 *             and receive messages. At any given moment in time there can only
    11 *             be at most 1 message callback function.
    12 *
    13 *             This API surface contains a set of APIs that allows the user to
    14 *             interact with the lower layer portion of the IoTHubClient. These APIs
    15 *             contain @c _LL_ in their name, but retain the same functionality like the
    16 *             @c IoTHubClient_... APIs, with one difference. If the @c _LL_ APIs are
    17 *             used then the user is responsible for scheduling when the actual work done
    18 *             by the IoTHubClient happens (when the data is sent/received on/from the wire).
    19 *             This is useful for constrained devices where spinning a separate thread is
    20 *             often not desired.
    21 */
     4//**********************************************************************
     5// NOTE: THIS HEADER IS FOR INTERNAL USE ONLY
     6//
     7// Applications should use iothub_device_client_ll.h or iothub_module_client_ll.h
     8// instead for the official API.
     9//
     10//**********************************************************************
    2211
    2312#ifndef IOTHUB_CLIENT_CORE_LL_H
  • azure_iot_hub_f767zi/trunk/azure_iot_sdk/iothub_client/inc/iothub_client_ll.h

    r457 r464  
    11// Copyright (c) Microsoft. All rights reserved.
    22// Licensed under the MIT license. See LICENSE file in the project root for full license information.
     3
     4//**********************************************************************
     5// NOTE: THIS HEADER IS DEPRECATED
     6//
     7// Functions in this header will be maintained for backward compatability.
     8// New applications should use iothub_device_client_ll.h.
     9//
     10//**********************************************************************
     11
    312
    413/** @file iothub_client_ll.h
     
    615*             with an Azure IoTHub.
    716*
    8 *    @details IoTHubClient_LL is a module that allows a user (usually a
     17*    @details IoTHubClient_LL allows a user (usually a
    918*             device) to communicate with an Azure IoTHub. It can send events
    1019*             and receive messages. At any given moment in time there can only
     
    3847typedef struct IOTHUB_CLIENT_CORE_LL_HANDLE_DATA_TAG* IOTHUB_CLIENT_LL_HANDLE;
    3948
     49    /**
     50    * @deprecated IoTHubClient_LL_CreateFromConnectionString is deprecated.  Use IoTHubDeviceClient_LL_CreateFromConnectionString instead.
     51    */
     52    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_LL_HANDLE, IoTHubClient_LL_CreateFromConnectionString, const char*, connectionString, IOTHUB_CLIENT_TRANSPORT_PROVIDER, protocol);
    4053
    4154    /**
    42     * @brief    Creates a IoT Hub client for communication with an existing
    43     *             IoT Hub using the specified connection string parameter.
    44     *
    45     * @param    connectionString    Pointer to a character string
    46     * @param    protocol            Function pointer for protocol implementation
    47     *
    48     *            Sample connection string:
    49     *                <blockquote>
    50     *                    <pre>HostName=[IoT Hub name goes here].[IoT Hub suffix goes here, e.g., private.azure-devices-int.net];DeviceId=[Device ID goes here];SharedAccessKey=[Device key goes here];</pre>
    51     *                </blockquote>
    52     *
    53     * @return    A non-NULL @c IOTHUB_CLIENT_LL_HANDLE value that is used when
    54     *             invoking other functions for IoT Hub client and @c NULL on failure.
     55    * @deprecated IoTHubClient_LL_Create is deprecated.  Use IoTHubDeviceClient_LL_Create instead.
    5556    */
    56      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_LL_HANDLE, IoTHubClient_LL_CreateFromConnectionString, const char*, connectionString, IOTHUB_CLIENT_TRANSPORT_PROVIDER, protocol);
     57    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_LL_HANDLE, IoTHubClient_LL_Create, const IOTHUB_CLIENT_CONFIG*, config);
    5758
    5859    /**
    59     * @brief    Creates a IoT Hub client for communication with an existing IoT
    60     *             Hub using the specified parameters.
    61     *
    62     * @param    config    Pointer to an @c IOTHUB_CLIENT_CONFIG structure
    63     *
    64     *            The API does not allow sharing of a connection across multiple
    65     *            devices. This is a blocking call.
    66     *
    67     * @return    A non-NULL @c IOTHUB_CLIENT_LL_HANDLE value that is used when
    68     *             invoking other functions for IoT Hub client and @c NULL on failure.
     60    * @deprecated IoTHubClient_LL_CreateWithTransport is deprecated.  Use IoTHubDeviceClient_LL_CreateWithTransport instead.
    6961    */
    70      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_LL_HANDLE, IoTHubClient_LL_Create, const IOTHUB_CLIENT_CONFIG*, config);
     62    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_LL_HANDLE, IoTHubClient_LL_CreateWithTransport, const IOTHUB_CLIENT_DEVICE_CONFIG*, config);
    7163
    7264    /**
    73     * @brief    Creates a IoT Hub client for communication with an existing IoT
    74     *             Hub using an existing transport.
    75     *
    76     * @param    config    Pointer to an @c IOTHUB_CLIENT_DEVICE_CONFIG structure
    77     *
    78     *            The API *allows* sharing of a connection across multiple
    79     *            devices. This is a blocking call.
    80     *
    81     * @return    A non-NULL @c IOTHUB_CLIENT_LL_HANDLE value that is used when
    82     *             invoking other functions for IoT Hub client and @c NULL on failure.
     65    * @deprecated IoTHubClient_LL_CreateFromDeviceAuth is deprecated.  Use IoTHubDeviceClient_LL_CreateFromDeviceAuth instead.
    8366    */
    84      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_LL_HANDLE, IoTHubClient_LL_CreateWithTransport, const IOTHUB_CLIENT_DEVICE_CONFIG*, config);
    85 
    86      /**
    87      * @brief    Creates a IoT Hub client for communication with an existing IoT
    88      *             Hub using the device auth module.
    89      *
    90      * @param    iothub_uri    Pointer to an ioThub hostname received in the registration process
    91      * @param    device_id    Pointer to the device Id of the device
    92      * @param    device_auth_handle    a device auth handle used to generate the connection string
    93      * @param    protocol            Function pointer for protocol implementation
    94      *
    95      * @return    A non-NULL @c IOTHUB_CLIENT_LL_HANDLE value that is used when
    96      *             invoking other functions for IoT Hub client and @c NULL on failure.
    97      */
    98      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_LL_HANDLE, IoTHubClient_LL_CreateFromDeviceAuth, const char*, iothub_uri, const char*, device_id, IOTHUB_CLIENT_TRANSPORT_PROVIDER, protocol);
     67    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_LL_HANDLE, IoTHubClient_LL_CreateFromDeviceAuth, const char*, iothub_uri, const char*, device_id, IOTHUB_CLIENT_TRANSPORT_PROVIDER, protocol);
    9968
    10069    /**
    101     * @brief    Disposes of resources allocated by the IoT Hub client. This is a
    102     *             blocking call.
    103     *
    104     * @param    iotHubClientHandle    The handle created by a call to the create function.
     70    * @deprecated IoTHubClient_LL_Destroy is deprecatedDevice.  Use IoTHubClient_LL_Destroy instead.
    10571    */
    106      MOCKABLE_FUNCTION(, void, IoTHubClient_LL_Destroy, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle);
     72    MOCKABLE_FUNCTION(, void, IoTHubClient_LL_Destroy, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle);
    10773
    10874    /**
    109     * @brief    Asynchronous call to send the message specified by @p eventMessageHandle.
    110     *
    111     * @param    iotHubClientHandle               The handle created by a call to the create function.
    112     * @param    eventMessageHandle               The handle to an IoT Hub message.
    113     * @param    eventConfirmationCallback      The callback specified by the device for receiving
    114     *                                         confirmation of the delivery of the IoT Hub message.
    115     *                                         This callback can be expected to invoke the
    116     *                                         ::IoTHubClient_LL_SendEventAsync function for the
    117     *                                         same message in an attempt to retry sending a failing
    118     *                                         message. The user can specify a @c NULL value here to
    119     *                                         indicate that no callback is required.
    120     * @param    userContextCallback            User specified context that will be provided to the
    121     *                                         callback. This can be @c NULL.
    122     *
    123     *            @b NOTE: The application behavior is undefined if the user calls
    124     *            the ::IoTHubClient_LL_Destroy function from within any callback.
    125     * @remarks
    126     *            The IOTHUB_MESSAGE_HANDLE instance provided as argument is copied by the function,
    127     *            so this argument can be destroyed by the calling application right after IoTHubClient_LL_SendEventAsync returns.
    128     *            The copy of @c eventMessageHandle is later destroyed by the iothub client when the message is effectively sent, if a failure sending it occurs, or if the client is destroyed.
    129     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     75    * @deprecated IoTHubClient_LL_SendEventAsync is deprecated.  Use IoTHubDeviceClient_LL_SendEventAsync instead.
    13076    */
    131      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SendEventAsync, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_MESSAGE_HANDLE, eventMessageHandle, IOTHUB_CLIENT_EVENT_CONFIRMATION_CALLBACK, eventConfirmationCallback, void*, userContextCallback);
     77    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SendEventAsync, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_MESSAGE_HANDLE, eventMessageHandle, IOTHUB_CLIENT_EVENT_CONFIRMATION_CALLBACK, eventConfirmationCallback, void*, userContextCallback);
    13278
    13379    /**
    134     * @brief    This function returns the current sending status for IoTHubClient.
    135     *
    136     * @param    iotHubClientHandle        The handle created by a call to the create function.
    137     * @param    iotHubClientStatus        The sending state is populated at the address pointed
    138     *                                     at by this parameter. The value will be set to
    139     *                                     @c IOTHUBCLIENT_SENDSTATUS_IDLE if there is currently
    140     *                                     no item to be sent and @c IOTHUBCLIENT_SENDSTATUS_BUSY
    141     *                                     if there are.
    142     *
    143     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     80    * @deprecated IoTHubClient_LL_GetSendStatus is deprecated.  UseDevice IoTHubClient_LL_GetSendStatus instead.
    14481    */
    145      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_GetSendStatus, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_STATUS*, iotHubClientStatus);
     82    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_GetSendStatus, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_STATUS*, iotHubClientStatus);
    14683
    14784    /**
    148     * @brief    Sets up the message callback to be invoked when IoT Hub issues a
    149     *             message to the device. This is a blocking call.
    150     *
    151     * @param    iotHubClientHandle               The handle created by a call to the create function.
    152     * @param    messageCallback                The callback specified by the device for receiving
    153     *                                         messages from IoT Hub.
    154     * @param    userContextCallback            User specified context that will be provided to the
    155     *                                         callback. This can be @c NULL.
    156     *
    157     *            @b NOTE: The application behavior is undefined if the user calls
    158     *            the ::IoTHubClient_LL_Destroy function from within any callback.
    159     *
    160     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     85    * @deprecated IoTHubClient_LL_SetMessageCallback is deprecated.  Use IoTHubDeviceClient_LL_SetMessageCallback instead.
    16186    */
    162      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SetMessageCallback, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_MESSAGE_CALLBACK_ASYNC, messageCallback, void*, userContextCallback);
     87    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SetMessageCallback, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_MESSAGE_CALLBACK_ASYNC, messageCallback, void*, userContextCallback);
    16388
    16489    /**
    165     * @brief    Sets up the connection status callback to be invoked representing the status of
    166     * the connection to IOT Hub. This is a blocking call.
    167     *
    168     * @param    iotHubClientHandle                       The handle created by a call to the create function.
    169     * @param    connectionStatusCallback                The callback specified by the device for receiving
    170     *                                                 updates about the status of the connection to IoT Hub.
    171     * @param    userContextCallback                    User specified context that will be provided to the
    172     *                                                 callback. This can be @c NULL.
    173     *
    174     *            @b NOTE: The application behavior is undefined if the user calls
    175     *            the ::IoTHubClient_LL_Destroy function from within any callback.
    176     *
    177     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     90    * @deprecated IoTHubClient_LL_SetConnectionStatusCallback is deprecated.  Use IoTHubDeviceClient_LL_SetConnectionStatusCallback instead.
    17891    */
    179      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SetConnectionStatusCallback, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_CONNECTION_STATUS_CALLBACK, connectionStatusCallback, void*, userContextCallback);
     92    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SetConnectionStatusCallback, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_CONNECTION_STATUS_CALLBACK, connectionStatusCallback, void*, userContextCallback);
    18093
    18194    /**
    182     * @brief    Sets up the connection status callback to be invoked representing the status of
    183     * the connection to IOT Hub. This is a blocking call.
    184     *
    185     * @param    iotHubClientHandle                       The handle created by a call to the create function.
    186     * @param    retryPolicy                             The policy to use to reconnect to IoT Hub when a
    187     *                                               connection drops.
    188     * @param    retryTimeoutLimitInSeconds            Maximum amount of time(seconds) to attempt reconnection when a
    189     *                                               connection drops to IOT Hub.
    190     *
    191     *            @b NOTE: The application behavior is undefined if the user calls
    192     *            the ::IoTHubClient_LL_Destroy function from within any callback.
    193     *
    194     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     95    * @deprecated IoTHubClient_LL_SetRetryPolicy is deprecated.  Use IoTHubDeviceClient_LL_SetRetryPolicy instead.
    19596    */
    196      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SetRetryPolicy, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_RETRY_POLICY, retryPolicy, size_t, retryTimeoutLimitInSeconds);
    197 
     97    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SetRetryPolicy, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_RETRY_POLICY, retryPolicy, size_t, retryTimeoutLimitInSeconds);
    19898
    19999    /**
    200     * @brief    Sets up the connection status callback to be invoked representing the status of
    201     * the connection to IOT Hub. This is a blocking call.
    202     *
    203     * @param    iotHubClientHandle                       The handle created by a call to the create function.
    204     * @param    retryPolicy                             Out parameter containing the policy to use to reconnect to IoT Hub.
    205     * @param    retryTimeoutLimitInSeconds            Out parameter containing maximum amount of time in seconds to attempt reconnection
    206                                                     to IOT Hub.
    207     *
    208     *            @b NOTE: The application behavior is undefined if the user calls
    209     *            the ::IoTHubClient_LL_Destroy function from within any callback.
    210     *
    211     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     100    * @deprecated IoTHubClient_LL_GetRetryPolicy is deprecated.  Use IoTHubDeviceClient_LL_GetRetryPolicy instead.
    212101    */
    213      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_GetRetryPolicy, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_RETRY_POLICY*, retryPolicy, size_t*, retryTimeoutLimitInSeconds);
     102    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_GetRetryPolicy, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_RETRY_POLICY*, retryPolicy, size_t*, retryTimeoutLimitInSeconds);
    214103
    215104    /**
    216     * @brief    This function returns in the out parameter @p lastMessageReceiveTime
    217     *             what was the value of the @c time function when the last message was
    218     *             received at the client.
    219     *
    220     * @param    iotHubClientHandle                The handle created by a call to the create function.
    221     * @param    lastMessageReceiveTime          Out parameter containing the value of @c time function
    222     *                                             when the last message was received.
    223     *
    224     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     105    * @deprecated IoTHubClient_LL_GetLastMessageReceiveTime is deprecated.  Use IoTHubDeviceClient_LL_GetLastMessageReceiveTime instead.
    225106    */
    226      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_GetLastMessageReceiveTime, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, time_t*, lastMessageReceiveTime);
     107    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_GetLastMessageReceiveTime, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, time_t*, lastMessageReceiveTime);
    227108
    228109    /**
    229     * @brief    This function is meant to be called by the user when work
    230     *             (sending/receiving) can be done by the IoTHubClient.
    231     *
    232     * @param    iotHubClientHandle    The handle created by a call to the create function.
    233     *
    234     *            All IoTHubClient interactions (in regards to network traffic
    235     *            and/or user level callbacks) are the effect of calling this
    236     *            function and they take place synchronously inside _DoWork.
     110    * @deprecated IoTHubClient_LL_DoWork is deprecateDeviced.  Use IoTHubDeviceClient_LL_DoWork instead.
    237111    */
    238      MOCKABLE_FUNCTION(, void, IoTHubClient_LL_DoWork, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle);
     112    MOCKABLE_FUNCTION(, void, IoTHubClient_LL_DoWork, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle);
    239113
    240114    /**
    241     * @brief    This API sets a runtime option identified by parameter @p optionName
    242     *             to a value pointed to by @p value. @p optionName and the data type
    243     *             @p value is pointing to are specific for every option.
    244     *
    245     * @param    iotHubClientHandle    The handle created by a call to the create function.
    246     * @param    optionName              Name of the option.
    247     * @param    value                  The value.
    248     *
    249     *            The options that can be set via this API are:
    250     *                - @b timeout - the maximum time in milliseconds a communication is
    251     *                  allowed to use. @p value is a pointer to an @c unsigned @c int with
    252     *                  the timeout value in milliseconds. This is only supported for the HTTP
    253     *                  protocol as of now. When the HTTP protocol uses CURL, the meaning of
    254     *                  the parameter is <em>total request time</em>. When the HTTP protocol uses
    255     *                  winhttp, the meaning is the same as the @c dwSendTimeout and
    256     *                  @c dwReceiveTimeout parameters of the
    257     *                  <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa384116(v=vs.85).aspx">
    258     *                  WinHttpSetTimeouts</a> API.
    259     *                - @b CURLOPT_LOW_SPEED_LIMIT - only available for HTTP protocol and only
    260     *                  when CURL is used. It has the same meaning as CURL's option with the same
    261     *                  name. @p value is pointer to a long.
    262     *                - @b CURLOPT_LOW_SPEED_TIME - only available for HTTP protocol and only
    263     *                  when CURL is used. It has the same meaning as CURL's option with the same
    264     *                  name. @p value is pointer to a long.
    265     *                - @b CURLOPT_FORBID_REUSE - only available for HTTP protocol and only
    266     *                  when CURL is used. It has the same meaning as CURL's option with the same
    267     *                  name. @p value is pointer to a long.
    268     *                - @b CURLOPT_FRESH_CONNECT - only available for HTTP protocol and only
    269     *                  when CURL is used. It has the same meaning as CURL's option with the same
    270     *                  name. @p value is pointer to a long.
    271     *                - @b CURLOPT_VERBOSE - only available for HTTP protocol and only
    272     *                  when CURL is used. It has the same meaning as CURL's option with the same
    273     *                  name. @p value is pointer to a long.
    274     *              - @b keepalive - available for MQTT protocol.  Integer value that sets the
    275     *                interval in seconds when pings are sent to the server.
    276     *              - @b logtrace - available for MQTT protocol.  Boolean value that turns on and
    277     *                off the diagnostic logging.
    278     *              - @b sas_token_lifetime - available for MQTT & AMQP protocol.  size_t value that that determines the
    279     *                sas token timeout length.
    280     *
    281     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     115    * @deprecated IoTHubClient_LL_SetOption is deprecated. Device Use IoTHubDeviceClient_LL_SetOption instead.
    282116    */
    283      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SetOption, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, const char*, optionName, const void*, value);
     117    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SetOption, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, const char*, optionName, const void*, value);
    284118
    285119    /**
    286     * @brief    This API specifies a call back to be used when the device receives a desired state update.
    287     *
    288     * @param    iotHubClientHandle        The handle created by a call to the create function.
    289     * @param    deviceTwinCallback        The callback specified by the device client to be used for updating
    290     *                                    the desired state. The callback will be called in response to patch
    291     *                                    request send by the IoTHub services. The payload will be passed to the
    292     *                                    callback, along with two version numbers:
    293     *                                        - Desired:
    294     *                                        - LastSeenReported:
    295     * @param    userContextCallback        User specified context that will be provided to the
    296     *                                     callback. This can be @c NULL.
    297     *
    298     *            @b NOTE: The application behavior is undefined if the user calls
    299     *            the ::IoTHubClient_LL_Destroy function from within any callback.
    300     *
    301     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     120    * @deprecated IoTHubClient_LL_SetDeviceTwinCallback is deprecated.  Use IoTHubDeviceClient_LL_SetDeviceTwinCallback instead.
    302121    */
    303      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SetDeviceTwinCallback, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_DEVICE_TWIN_CALLBACK, deviceTwinCallback, void*, userContextCallback);
     122    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SetDeviceTwinCallback, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_DEVICE_TWIN_CALLBACK, deviceTwinCallback, void*, userContextCallback);
    304123
    305124    /**
    306     * @brief    This API sneds a report of the device's properties and their current values.
    307     *
    308     * @param    iotHubClientHandle        The handle created by a call to the create function.
    309     * @param    reportedState            The current device property values to be 'reported' to the IoTHub.
    310     * @param    reportedStateCallback    The callback specified by the device client to be called with the
    311     *                                    result of the transaction.
    312     * @param    userContextCallback        User specified context that will be provided to the
    313     *                                     callback. This can be @c NULL.
    314     *
    315     *            @b NOTE: The application behavior is undefined if the user calls
    316     *            the ::IoTHubClient_LL_Destroy function from within any callback.
    317     *
    318     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     125    * @deprecated IoTHubClient_LL_SendReportedState is deprecated.  Use IoTHubDeviceClient_LL_SendReportedState instead.
    319126    */
    320      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SendReportedState, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, const unsigned char*, reportedState, size_t, size, IOTHUB_CLIENT_REPORTED_STATE_CALLBACK, reportedStateCallback, void*, userContextCallback);
     127    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SendReportedState, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, const unsigned char*, reportedState, size_t, size, IOTHUB_CLIENT_REPORTED_STATE_CALLBACK, reportedStateCallback, void*, userContextCallback);
    321128
    322      /**
    323      * @brief    This API sets callback for cloud to device method call.
    324      *
    325      * @param    iotHubClientHandle        The handle created by a call to the create function.
    326      * @param    deviceMethodCallback    The callback which will be called by IoTHub.
    327      * @param    userContextCallback        User specified context that will be provided to the
    328      *                                     callback. This can be @c NULL.
    329      *
    330      * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
    331      */
    332      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SetDeviceMethodCallback, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_DEVICE_METHOD_CALLBACK_ASYNC, deviceMethodCallback, void*, userContextCallback);
     129    /**
     130    * @deprecated IoTHubClient_LL_SetDeviceMethodCallback is deprecated.  Use IoTHubDeviceClient_LL_SetDeviceMethodCallback instead.
     131    */
     132    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SetDeviceMethodCallback, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_DEVICE_METHOD_CALLBACK_ASYNC, deviceMethodCallback, void*, userContextCallback);
    333133
    334      /**
    335      * @brief    This API sets callback for async cloud to device method call.
    336      *
    337      * @param    iotHubClientHandle                The handle created by a call to the create function.
    338      * @param    inboundDeviceMethodCallback     The callback which will be called by IoTHub.
    339      * @param    userContextCallback                User specified context that will be provided to the
    340      *                                             callback. This can be @c NULL.
    341      *
    342      * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
    343      */
    344      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SetDeviceMethodCallback_Ex, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_INBOUND_DEVICE_METHOD_CALLBACK, inboundDeviceMethodCallback, void*, userContextCallback);
     134    /**
     135    * @deprecated IoTHubClient_LL_SetDeviceMethodCallback_Ex is deprecated.  Use IoTHubDeviceClient_LL_SetDeviceMethodCallback instead.
     136    */
     137    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_SetDeviceMethodCallback_Ex, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_INBOUND_DEVICE_METHOD_CALLBACK, inboundDeviceMethodCallback, void*, userContextCallback);
    345138
    346      /**
    347      * @brief    This API responses to a asnyc method callback identified the methodId.
    348      *
    349      * @param    iotHubClientHandle      The handle created by a call to the create function.
    350      * @param    methodId                The methodId of the Device Method callback.
    351      * @param    response                The response data for the method callback.
    352      * @param    response_size           The size of the response data buffer.
    353      * @param    status_response         The status response of the method callback.
    354      *
    355      * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
    356      */
    357      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_DeviceMethodResponse, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, METHOD_HANDLE, methodId, const unsigned char*, response, size_t, respSize, int, statusCode);
     139    /**
     140    * @deprecated IoTHubClient_LL_DeviceMethodResponse is deprecated.  Use IoTHubDeviceClient_LL_SetDeviceMethodCallback instead.
     141    */
     142    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_DeviceMethodResponse, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, METHOD_HANDLE, methodId, const unsigned char*, response, size_t, respSize, int, statusCode);
    358143
    359144#ifndef DONT_USE_UPLOADTOBLOB
    360145    /**
    361     * @brief    This API uploads to Azure Storage the content pointed to by @p source having the size @p size
    362     *           under the blob name devicename/@pdestinationFileName
    363     *
    364     * @param    iotHubClientHandle        The handle created by a call to the create function.
    365     * @param    destinationFileName     name of the file.
    366     * @param    source                  pointer to the source for file content (can be NULL)
    367     * @param    size                    the size of the source in memory (if @p source is NULL then size needs to be 0).
    368     *
    369     * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     146    * @deprecated IoTHubClient_LL_UploadToBlob is deprecated.  UsDevicee IoTHubDeviceClient_LL_UploadToBlob instead.
    370147    */
    371      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_UploadToBlob, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, const char*, destinationFileName, const unsigned char*, source, size_t, size);
     148    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_UploadToBlob, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, const char*, destinationFileName, const unsigned char*, source, size_t, size);
    372149
    373      /**
    374      ** DEPRECATED: Use IoTHubClient_LL_UploadMultipleBlocksToBlobAsyncEx instead **
    375      * @brief    This API uploads to Azure Storage the content provided block by block by @p getDataCallback
    376      *           under the blob name devicename/@pdestinationFileName
    377      *
    378      * @param    iotHubClientHandle      The handle created by a call to the create function.
    379      * @param    destinationFileName     name of the file.
    380      * @param    getDataCallback         A callback to be invoked to acquire the file chunks to be uploaded, as well as to indicate the status of the upload of the previous block.
    381      * @param    context                 Any data provided by the user to serve as context on getDataCallback.
    382      *
    383      * @return   IOTHUB_CLIENT_OK upon success or an error code upon failure.
    384      ** DEPRECATED: Use IoTHubClient_LL_UploadMultipleBlocksToBlobAsyncEx instead **
    385      */
    386      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_UploadMultipleBlocksToBlob, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, const char*, destinationFileName, IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_CALLBACK, getDataCallback, void*, context);
     150    /**
     151    * @deprecated IoTHubClient_LL_UploadMultipleBlocksToBlob is deprecated.  Use IoTHubDeviceClient_LL_UploadMultipleBlocksToBlob instead.
     152    */
     153    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_UploadMultipleBlocksToBlob, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, const char*, destinationFileName, IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_CALLBACK, getDataCallback, void*, context);
    387154
    388      /**
    389      * @brief    This API uploads to Azure Storage the content provided block by block by @p getDataCallback
    390      *           under the blob name devicename/@pdestinationFileName
    391      *
    392      * @param    iotHubClientHandle      The handle created by a call to the create function.
    393      * @param    destinationFileName     name of the file.
    394      * @param    getDataCallbackEx       A callback to be invoked to acquire the file chunks to be uploaded, as well as to indicate the status of the upload of the previous block.
    395      * @param    context                 Any data provided by the user to serve as context on getDataCallback.
    396      *
    397      * @return   IOTHUB_CLIENT_OK upon success or an error code upon failure.
    398      */
    399      MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_UploadMultipleBlocksToBlobEx, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, const char*, destinationFileName, IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_CALLBACK_EX, getDataCallbackEx, void*, context);
     155    /**
     156    * @deprecated IoTHubClient_LL_UploadMultipleBlocksToBlobEx is deprecated.  Use IoTHubDeviceClient_LL_UploadMultipleBlocksToBlob instead.
     157    */
     158    MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_UploadMultipleBlocksToBlobEx, IOTHUB_CLIENT_LL_HANDLE, iotHubClientHandle, const char*, destinationFileName, IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_CALLBACK_EX, getDataCallbackEx, void*, context);
    400159
    401160#endif /*DONT_USE_UPLOADTOBLOB*/
  • azure_iot_hub_f767zi/trunk/azure_iot_sdk/iothub_client/inc/iothub_client_options.h

    r457 r464  
    2828    static STATIC_VAR_UNUSED const char* OPTION_CONNECTION_TIMEOUT = "connect_timeout";
    2929
     30    /* None of the OPTION_PROXY_* options below are implemented.  Use OPTION_HTTP_PROXY
     31    from shared_util_options.h in https://github.com/Azure/azure-c-shared-utility/ repo instead */
    3032    static STATIC_VAR_UNUSED const char* OPTION_PROXY_HOST = "proxy_address";
    3133    static STATIC_VAR_UNUSED const char* OPTION_PROXY_USERNAME = "proxy_username";
     
    8789    static STATIC_VAR_UNUSED const char* OPTION_DO_WORK_FREQUENCY_IN_MS = "do_work_freq_ms";
    8890
     91// Minimum percentage (in the 0 to 1 range) of multiplexed registered devices that must be failing for a transport-wide reconnection to be triggered.
     92// A value of zero results in a single registered device to be able to cause a general transport reconnection
     93// (thus causing all other multiplexed registered devices to be also reconnected, meaning an agressive reconnection strategy).
     94// Setting this parameter to one indicates that 100% of the multiplexed registered devices must be failing in parallel for a
     95// transport-wide reconnection to be triggered (resulting in a very lenient reconnection strategy). 
     96#define DEVICE_MULTIPLEXING_FAULTY_DEVICE_RATIO_RECONNECTION_THRESHOLD 0
     97
     98// Minimum number of consecutive failures an individual registered device must have to be considered a faulty device.
     99// This is used along with DEVICE_MULTIPLEXING_FAULTY_DEVICE_RATIO_RECONNECTION_THRESHOLD to trigger transport-wide reconnections.
     100// The device may fail to authenticate, timeout establishing the connection, get disconnected by the service for some reason or fail sending messages.
     101// In all these cases the failures are cummulatively counted; if the count is equal to or greater than DEVICE_FAILURE_COUNT_RECONNECTION_THRESHOLD
     102// the device is considered to be in a faulty state.   
     103#define DEVICE_FAILURE_COUNT_RECONNECTION_THRESHOLD 5
     104
    89105#ifdef __cplusplus
    90106}
  • azure_iot_hub_f767zi/trunk/azure_iot_sdk/iothub_client/inc/iothub_client_version.h

    r457 r464  
    99#define IOTHUB_CLIENT_VERSION_H
    1010
    11 #define IOTHUB_SDK_VERSION "1.3.8"
     11#define IOTHUB_SDK_VERSION "1.6.0"
    1212
    1313#include "umock_c/umock_c_prod.h"
  • azure_iot_hub_f767zi/trunk/azure_iot_sdk/iothub_client/inc/iothub_device_client_ll.h

    r457 r464  
    66*             with an Azure IoTHub.
    77*
    8 *    @details IoTHubDeviceClient_LL is a module that allows a user (usually a
     8*    @details IoTHubDeviceClient_LL allows a user (usually a
    99*             device) to communicate with an Azure IoTHub. It can send events
    1010*             and receive messages. At any given moment in time there can only
     
    1616*             @c IoTHubDeviceClient_... APIs, with one difference. If the @c _LL_ APIs are
    1717*             used then the user is responsible for scheduling when the actual work done
    18 *             by the IoTHubClient happens (when the data is sent/received on/from the wire).
     18*             by the IoTHubClient happens (when the data is sent/received on/from the network).
    1919*             This is useful for constrained devices where spinning a separate thread is
    2020*             often not desired.
     
    8888     /**
    8989     * @brief    Creates a IoT Hub client for communication with an existing IoT
    90      *           Hub using the device auth module.
     90     *           Hub using the device auth.
    9191     *
    9292     * @param    iothub_uri             Pointer to an ioThub hostname received in the registration process
     
    116116    *                                           confirmation of the delivery of the IoT Hub message.
    117117    *                                           This callback can be expected to invoke the
    118     *                                           ::IoTHubDeviceClient_LL_SendEventAsync function for the
     118    *                                           IoTHubDeviceClient_LL_SendEventAsync function for the
    119119    *                                           same message in an attempt to retry sending a failing
    120120    *                                           message. The user can specify a @c NULL value here to
     
    124124    *
    125125    *           @b NOTE: The application behavior is undefined if the user calls
    126     *           the ::IoTHubDeviceClient_LL_Destroy function from within any callback.
     126    *           the IoTHubDeviceClient_LL_Destroy function from within any callback.
    127127    * @remarks
    128128    *           The IOTHUB_MESSAGE_HANDLE instance provided as argument is copied by the function,
     
    139139    * @param    iotHubClientStatus        The sending state is populated at the address pointed
    140140    *                                     at by this parameter. The value will be set to
    141     *                                     @c IOTHUBCLIENT_SENDSTATUS_IDLE if there is currently
    142     *                                     no item to be sent and @c IOTHUBCLIENT_SENDSTATUS_BUSY
     141    *                                     @c IOTHUB_CLIENT_SEND_STATUS_IDLE if there is currently
     142    *                                     no item to be sent and @c IOTHUB_CLIENT_SEND_STATUS_BUSY
    143143    *                                     if there are.
     144    *
     145    * @remark    Does not return information related to uploads initiated by IoTHubDeviceClient_LL_UploadToBlob or IoTHubDeviceClient_LL_UploadMultipleBlocksToBlob.
    144146    *
    145147    * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     
    158160    *
    159161    *           @b NOTE: The application behavior is undefined if the user calls
    160     *           the ::IoTHubDeviceClient_LL_Destroy function from within any callback.
     162    *           the IoTHubDeviceClient_LL_Destroy function from within any callback.
    161163    *
    162164    * @return   IOTHUB_CLIENT_OK upon success or an error code upon failure.
     
    175177    *
    176178    *           @b NOTE: The application behavior is undefined if the user calls
    177     *           the ::IoTHubDeviceClient_LL_Destroy function from within any callback.
     179    *           the IoTHubDeviceClient_LL_Destroy function from within any callback.
     180    *
     181    * @remark   Callback specified will not receive connection status change notifications for upload connections created with IoTHubDeviceClient_LL_UploadToBlob or IoTHubDeviceClient_LL_UploadMultipleBlocksToBlob.
    178182    *
    179183    * @return   IOTHUB_CLIENT_OK upon success or an error code upon failure.
     
    192196    *
    193197    *           @b NOTE: The application behavior is undefined if the user calls
    194     *           the ::IoTHubDeviceClient_LL_Destroy function from within any callback.
     198    *           the IoTHubDeviceClient_LL_Destroy function from within any callback.
     199    *
     200    * @remark   Uploads initiated by IoTHubDeviceClient_LL_UploadToBlob or IoTHubDeviceClient_LL_UploadMultipleBlocksToBlob do not have automatic retries and do not honor the retryPolicy settings.
    195201    *
    196202    * @return   IOTHUB_CLIENT_OK upon success or an error code upon failure.
     
    209215    *
    210216    *           @b NOTE: The application behavior is undefined if the user calls
    211     *           the ::IoTHubDeviceClient_LL_Destroy function from within any callback.
     217    *           the IoTHubDeviceClient_LL_Destroy function from within any callback.
    212218    *
    213219    * @return   IOTHUB_CLIENT_OK upon success or an error code upon failure.
     
    229235
    230236    /**
    231     * @brief    This function MUST be called by the user so work (sending/receiving data on the wire,
     237    * @brief    This function MUST be called by the user so work (sending/receiving data on the network,
    232238    *           computing and enforcing timeout controls, managing the connection to the IoT Hub) can
    233239    *           be done by the IoTHubClient.
     
    251257    * @param    value                   The value.
    252258    *
    253     *           The options that can be set via this API are:
    254     *                - @b timeout - the maximum time in milliseconds a communication is
    255     *                  allowed to use. @p value is a pointer to an @c unsigned @c int with
    256     *                  the timeout value in milliseconds. This is only supported for the HTTP
    257     *                  protocol as of now. When the HTTP protocol uses CURL, the meaning of
    258     *                  the parameter is <em>total request time</em>. When the HTTP protocol uses
    259     *                  winhttp, the meaning is the same as the @c dwSendTimeout and
    260     *                  @c dwReceiveTimeout parameters of the
    261     *                  <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa384116(v=vs.85).aspx">
    262     *                  WinHttpSetTimeouts</a> API.
    263     *                - @b CURLOPT_LOW_SPEED_LIMIT - only available for HTTP protocol and only
    264     *                  when CURL is used. It has the same meaning as CURL's option with the same
    265     *                  name. @p value is pointer to a long.
    266     *                - @b CURLOPT_LOW_SPEED_TIME - only available for HTTP protocol and only
    267     *                  when CURL is used. It has the same meaning as CURL's option with the same
    268     *                  name. @p value is pointer to a long.
    269     *                - @b CURLOPT_FORBID_REUSE - only available for HTTP protocol and only
    270     *                  when CURL is used. It has the same meaning as CURL's option with the same
    271     *                  name. @p value is pointer to a long.
    272     *                - @b CURLOPT_FRESH_CONNECT - only available for HTTP protocol and only
    273     *                  when CURL is used. It has the same meaning as CURL's option with the same
    274     *                  name. @p value is pointer to a long.
    275     *                - @b CURLOPT_VERBOSE - only available for HTTP protocol and only
    276     *                  when CURL is used. It has the same meaning as CURL's option with the same
    277     *                  name. @p value is pointer to a long.
    278     *                - @b keepalive - available for MQTT protocol.  Integer value that sets the
    279     *                  interval in seconds when pings are sent to the server.
    280     *                - @b logtrace - available for MQTT protocol.  Boolean value that turns on and
    281     *                  off the diagnostic logging.
    282     *                - @b sas_token_lifetime - available for MQTT & AMQP protocol.  size_t value that that determines the
    283     *                  sas token timeout length.
    284     *                - @b OPTION_TRUSTED_CERT - Azure Server certificate used to validate TLS connection to iothub.
     259    * @remarks  Documentation for configuration options is available at https://github.com/Azure/azure-iot-sdk-c/blob/master/doc/Iothub_sdk_options.md.
    285260    *
    286261    * @return   IOTHUB_CLIENT_OK upon success or an error code upon failure.
     
    302277    *
    303278    *           @b NOTE: The application behavior is undefined if the user calls
    304     *           the ::IoTHubDeviceClient_LL_Destroy function from within any callback.
     279    *           the IoTHubDeviceClient_LL_Destroy function from within any callback.
    305280    *
    306281    * @return   IOTHUB_CLIENT_OK upon success or an error code upon failure.
     
    319294    *
    320295    *            @b NOTE: The application behavior is undefined if the user calls
    321     *            the ::IoTHubDeviceClient_LL_Destroy function from within any callback.
     296    *            the IoTHubDeviceClient_LL_Destroy function from within any callback.
    322297    *
    323298    * @return    IOTHUB_CLIENT_OK upon success or an error code upon failure.
     
    334309     *
    335310     *                  @b NOTE: The application behavior is undefined if the user calls
    336      *                  the ::IoTHubClient_LL_Destroy function from within any callback.
     311     *                  the IoTHubClient_LL_Destroy function from within any callback.
    337312     *
    338313     * @return  IOTHUB_CLIENT_OK upon success or an error code upon failure.
     
    374349    * @param    source                  pointer to the source for file content (can be NULL)
    375350    * @param    size                    the size of the source in memory (if @p source is NULL then size needs to be 0).
     351    *
     352    * @warning  Other _LL_ functions such as IoTHubDeviceClient_LL_SendEventAsync queue work to be performed later and do not block.  IoTHubDeviceClient_LL_UploadToBlob
     353    *           will block however until the upload is completed or fails, which may take a while.
    376354    *
    377355    * @return   IOTHUB_CLIENT_OK upon success or an error code upon failure.
     
    388366     * @param    context                 Any data provided by the user to serve as context on getDataCallback.
    389367     *
     368     * @warning  Other _LL_ functions such as IoTHubDeviceClient_LL_SendEventAsync queue work to be performed later and do not block.  IoTHubDeviceClient_LL_UploadMultipleBlocksToBlob
     369     *           will block however until the upload is completed or fails, which may take a while.
     370     *
    390371     * @return   IOTHUB_CLIENT_OK upon success or an error code upon failure.
    391372     */
  • azure_iot_hub_f767zi/trunk/azure_iot_sdk/iothub_client/inc/iothub_message.h

    r457 r464  
    192192* @param   iotHubMessageHandle Handle to the message.
    193193*
    194 * @param   key name of the property to set.  Note that when sending messages via the HTTP transport, this value must not contain spaces.
    195 *
    196 * @param   value of the property to set.
     194* @param   key name of the property to set. Note that when sending messages via the HTTP transport, this value must not contain spaces.
     195*
     196* @param   value of the property to set.
     197*
     198*            @b NOTE: The accepted character sets for the key name and value parameters are dependent on different factors, such as the protocol
     199*            being used. For more information on the character sets accepted by Azure IoT Hub, see
     200*            <a href="https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messages-construct">Create and read IoT Hub messages</a>.
    197201*
    198202* @return  An @c IOTHUB_MESSAGE_RESULT value indicating the result of setting the property.
     
    252256* @param   correlationId Pointer to the memory location of the messageId
    253257*
    254 * @return  Returns IOTHUB_MESSAGE_OK if the messageId was set successfully
     258* @return  Returns IOTHUB_MESSAGE_OK if the CorrelationId was set successfully
    255259*          or an error code otherwise.
    256260*/
     
    295299* @param   outputName Pointer to the queue to output message to
    296300*
    297 * @return  Returns IOTHUB_MESSAGE_OK if the DiagnosticData was set successfully
     301* @return  Returns IOTHUB_MESSAGE_OK if the outputName was set successfully
    298302*          or an error code otherwise.
    299303*/
     
    318322* @param   inputName Pointer to the queue to input message to
    319323*
    320 * @return  Returns IOTHUB_MESSAGE_OK if the DiagnosticData was set successfully
     324* @return  Returns IOTHUB_MESSAGE_OK if the inputName was set successfully
    321325*          or an error code otherwise.
    322326*/
     
    340344* @param   connectionModuleId Pointer to the module ID of connector
    341345*
    342 * @return  Returns IOTHUB_MESSAGE_OK if the DiagnosticData was set successfully
     346* @return  Returns IOTHUB_MESSAGE_OK if the connectionModuleId was set successfully
    343347*          or an error code otherwise.
    344348*/
    345349MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetConnectionModuleId, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle, const char*, connectionModuleId);
    346350
    347 
    348351/**
    349352* @brief   Gets the connection device ID from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated,
     
    356359*/
    357360MOCKABLE_FUNCTION(, const char*, IoTHubMessage_GetConnectionDeviceId, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle);
     361
     362/**
     363* @brief   Sets the message creation time in UTC.
     364*
     365* @param   iotHubMessageHandle Handle to the message.
     366* @param   messageCreationTimeUtc Pointer to the message creation time as null-terminated string
     367*
     368* @return  Returns IOTHUB_MESSAGE_OK if the messageCreationTimeUtc was set successfully
     369*          or an error code otherwise.
     370*/
     371MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetMessageCreationTimeUtcSystemProperty, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle, const char*, messageCreationTimeUtc);
     372
     373/**
     374* @brief   Gets the message creation time in UTC from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated,
     375*          the caller is not responsible for freeing the memory. The memory
     376*          is valid until IoTHubMessage_Destroy is called on the message.
     377*
     378* @param   iotHubMessageHandle Handle to the message.
     379*
     380* @return  A const char* pointing to the message creation time in UTC.
     381*/
     382MOCKABLE_FUNCTION(, const char*, IoTHubMessage_GetMessageCreationTimeUtcSystemProperty, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle);
     383
     384/**
     385* @brief   Sets the message user id. CAUTION: SDK user should not call it directly, it is for internal use only.
     386*
     387* @param   iotHubMessageHandle Handle to the message.
     388* @param   userId Pointer to the message user id as null-terminated string
     389*
     390* @return  Returns IOTHUB_MESSAGE_OK if the userId was set successfully or an error code otherwise.
     391*/
     392MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetMessageUserIdSystemProperty, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle, const char*, userId);
     393
     394/**
     395* @brief   Gets the message user id from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated,
     396*          the caller is not responsible for freeing the memory. The memory
     397*          is valid until IoTHubMessage_Destroy is called on the message.
     398*
     399* @param   iotHubMessageHandle Handle to the message.
     400*
     401* @return  A const char* pointing to the message user id.
     402*/
     403MOCKABLE_FUNCTION(, const char*, IoTHubMessage_GetMessageUserIdSystemProperty, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle);
    358404
    359405/**
Note: See TracChangeset for help on using the changeset viewer.