[453] | 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 | #ifndef IOTHUB_CLIENT_OPTIONS_H
|
---|
| 5 | #define IOTHUB_CLIENT_OPTIONS_H
|
---|
| 6 |
|
---|
| 7 | #include "azure_c_shared_utility/const_defines.h"
|
---|
| 8 |
|
---|
| 9 | #ifdef __cplusplus
|
---|
| 10 | extern "C"
|
---|
| 11 | {
|
---|
| 12 | #endif
|
---|
| 13 |
|
---|
| 14 | typedef struct IOTHUB_PROXY_OPTIONS_TAG
|
---|
| 15 | {
|
---|
| 16 | const char* host_address;
|
---|
| 17 | const char* username;
|
---|
| 18 | const char* password;
|
---|
| 19 | } IOTHUB_PROXY_OPTIONS;
|
---|
| 20 |
|
---|
| 21 | static STATIC_VAR_UNUSED const char* OPTION_RETRY_INTERVAL_SEC = "retry_interval_sec";
|
---|
| 22 | static STATIC_VAR_UNUSED const char* OPTION_RETRY_MAX_DELAY_SECS = "retry_max_delay_secs";
|
---|
| 23 |
|
---|
| 24 | static STATIC_VAR_UNUSED const char* OPTION_LOG_TRACE = "logtrace";
|
---|
| 25 | static STATIC_VAR_UNUSED const char* OPTION_X509_CERT = "x509certificate";
|
---|
| 26 | static STATIC_VAR_UNUSED const char* OPTION_X509_PRIVATE_KEY = "x509privatekey";
|
---|
| 27 | static STATIC_VAR_UNUSED const char* OPTION_KEEP_ALIVE = "keepalive";
|
---|
| 28 | static STATIC_VAR_UNUSED const char* OPTION_CONNECTION_TIMEOUT = "connect_timeout";
|
---|
| 29 |
|
---|
| 30 | static STATIC_VAR_UNUSED const char* OPTION_PROXY_HOST = "proxy_address";
|
---|
| 31 | static STATIC_VAR_UNUSED const char* OPTION_PROXY_USERNAME = "proxy_username";
|
---|
| 32 | static STATIC_VAR_UNUSED const char* OPTION_PROXY_PASSWORD = "proxy_password";
|
---|
| 33 |
|
---|
| 34 | static STATIC_VAR_UNUSED const char* OPTION_SAS_TOKEN_LIFETIME = "sas_token_lifetime";
|
---|
| 35 | static STATIC_VAR_UNUSED const char* OPTION_SAS_TOKEN_REFRESH_TIME = "sas_token_refresh_time";
|
---|
| 36 | static STATIC_VAR_UNUSED const char* OPTION_CBS_REQUEST_TIMEOUT = "cbs_request_timeout";
|
---|
| 37 |
|
---|
| 38 | static STATIC_VAR_UNUSED const char* OPTION_MIN_POLLING_TIME = "MinimumPollingTime";
|
---|
| 39 | static STATIC_VAR_UNUSED const char* OPTION_BATCHING = "Batching";
|
---|
| 40 |
|
---|
| 41 | /* DEPRECATED:: OPTION_MESSAGE_TIMEOUT is DEPRECATED! Use OPTION_SERVICE_SIDE_KEEP_ALIVE_FREQ_SECS for AMQP; MQTT has no option available. OPTION_MESSAGE_TIMEOUT legacy variable will be kept for back-compat. */
|
---|
| 42 | static STATIC_VAR_UNUSED const char* OPTION_MESSAGE_TIMEOUT = "messageTimeout";
|
---|
| 43 | static STATIC_VAR_UNUSED const char* OPTION_BLOB_UPLOAD_TIMEOUT_SECS = "blob_upload_timeout_secs";
|
---|
| 44 | static STATIC_VAR_UNUSED const char* OPTION_PRODUCT_INFO = "product_info";
|
---|
| 45 |
|
---|
| 46 | /*
|
---|
| 47 | * @brief Specifies the Digital Twin Model Id of the connection. Only valid for use with MQTT Transport
|
---|
| 48 | */
|
---|
| 49 | static STATIC_VAR_UNUSED const char* OPTION_MODEL_ID = "model_id";
|
---|
| 50 |
|
---|
| 51 | /*
|
---|
| 52 | * @brief Turns on automatic URL encoding of message properties + system properties. Only valid for use with MQTT Transport
|
---|
| 53 | */
|
---|
| 54 | static STATIC_VAR_UNUSED const char* OPTION_AUTO_URL_ENCODE_DECODE = "auto_url_encode_decode";
|
---|
| 55 |
|
---|
| 56 | /*
|
---|
| 57 | * @brief Informs the service of what is the maximum period the client will wait for a keep-alive message from the service.
|
---|
| 58 | * The service must send keep-alives before this timeout is reached, otherwise the client will trigger its re-connection logic.
|
---|
| 59 | * Setting this option to a low value results in more aggressive/responsive re-connection by the client.
|
---|
| 60 | * The default value for this option is 240 seconds, and the minimum allowed is usually 5 seconds.
|
---|
| 61 | * To virtually disable the keep-alives from the service (and consequently the keep-alive timeout control on the client-side), set this option to a high value (e.g., UINT_MAX).
|
---|
| 62 | */
|
---|
| 63 | static STATIC_VAR_UNUSED const char* OPTION_SERVICE_SIDE_KEEP_ALIVE_FREQ_SECS = "svc2cl_keep_alive_timeout_secs";
|
---|
| 64 |
|
---|
| 65 | /* DEPRECATED:: OPTION_C2D_KEEP_ALIVE_FREQ_SECS is DEPRECATED! Use OPTION_SERVICE_SIDE_KEEP_ALIVE_FREQ_SECS, but OPTION_C2D_KEEP_ALIVE_FREQ_SECS legacy variable kept for back-compat. */
|
---|
| 66 | static STATIC_VAR_UNUSED const char* OPTION_C2D_KEEP_ALIVE_FREQ_SECS = "c2d_keep_alive_freq_secs";
|
---|
| 67 |
|
---|
| 68 | /*
|
---|
| 69 | * @brief Ratio to be used for client side pings in AMQP protocol.
|
---|
| 70 | * The client must use this ratio to send keep-alives before service side remote idle timeout is reached, otherwise the service will disconnect the client.
|
---|
| 71 | * The default value for this option is 1/2 of the remote idle value sent by the service.
|
---|
| 72 | * For AMQP remote idle set to 4 minutes, default client ping will be 2 minutes. For AMQP remote idle set to 25 minutes configured via per Hub basis, the default ping will be 12.5 minutes.
|
---|
| 73 | */
|
---|
| 74 | static STATIC_VAR_UNUSED const char* OPTION_REMOTE_IDLE_TIMEOUT_RATIO = "cl2svc_keep_alive_send_ratio";
|
---|
| 75 |
|
---|
| 76 | /*
|
---|
| 77 | * @brief This option should be used instead of OPTION_MESSAGE_TIMEOUT if using AMQP protocol.
|
---|
| 78 | * It defines the maximum ammount of time, in seconds, the client will wait for a telemetry message to complete sending before returning it with a IOTHUB_CLIENT_CONFIRMATION_MESSAGE_TIMEOUT error.
|
---|
| 79 | * The default value 5 (five) minutes.
|
---|
| 80 | * This option is applicable only to AMQP protocol.
|
---|
| 81 | */
|
---|
| 82 | static STATIC_VAR_UNUSED const char* OPTION_EVENT_SEND_TIMEOUT_SECS = "event_send_timeout_secs";
|
---|
| 83 |
|
---|
| 84 | //diagnostic sampling percentage value, [0-100]
|
---|
| 85 | static STATIC_VAR_UNUSED const char* OPTION_DIAGNOSTIC_SAMPLING_PERCENTAGE = "diag_sampling_percentage";
|
---|
| 86 |
|
---|
| 87 | static STATIC_VAR_UNUSED const char* OPTION_DO_WORK_FREQUENCY_IN_MS = "do_work_freq_ms";
|
---|
| 88 |
|
---|
| 89 | #ifdef __cplusplus
|
---|
| 90 | }
|
---|
| 91 | #endif
|
---|
| 92 |
|
---|
| 93 | #endif /* IOTHUB_CLIENT_OPTIONS_H */
|
---|