Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: sht15_remote_monitoring RobotArmDemo iothub_client_sample_amqp f767zi_mqtt ... more
iothub_client_authorization.h@71:0d498da5ece1, 2017-07-14 (annotated)
- Committer:
- AzureIoTClient
- Date:
- Fri Jul 14 16:37:50 2017 -0700
- Revision:
- 71:0d498da5ece1
- Parent:
- 63:1bf1c2d60aab
- Child:
- 75:86205ca63a59
1.1.19
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| AzureIoTClient | 62:5a4cdacf5090 | 1 | // Copyright (c) Microsoft. All rights reserved. |
| AzureIoTClient | 62:5a4cdacf5090 | 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. |
| AzureIoTClient | 62:5a4cdacf5090 | 3 | |
| AzureIoTClient | 62:5a4cdacf5090 | 4 | #ifndef IOTHUB_CLIENT_AUTHORIZATION_H |
| AzureIoTClient | 62:5a4cdacf5090 | 5 | #define IOTHUB_CLIENT_AUTHORIZATION_H |
| AzureIoTClient | 62:5a4cdacf5090 | 6 | |
| AzureIoTClient | 62:5a4cdacf5090 | 7 | #ifdef __cplusplus |
| AzureIoTClient | 62:5a4cdacf5090 | 8 | extern "C" { |
| AzureIoTClient | 62:5a4cdacf5090 | 9 | #else |
| AzureIoTClient | 62:5a4cdacf5090 | 10 | #include <stdbool.h> |
| AzureIoTClient | 62:5a4cdacf5090 | 11 | #endif /* __cplusplus */ |
| AzureIoTClient | 62:5a4cdacf5090 | 12 | |
| AzureIoTClient | 62:5a4cdacf5090 | 13 | #include "azure_c_shared_utility/macro_utils.h" |
| AzureIoTClient | 62:5a4cdacf5090 | 14 | #include "azure_c_shared_utility/umock_c_prod.h" |
| AzureIoTClient | 62:5a4cdacf5090 | 15 | |
| AzureIoTClient | 62:5a4cdacf5090 | 16 | typedef struct IOTHUB_AUTHORIZATION_DATA_TAG* IOTHUB_AUTHORIZATION_HANDLE; |
| AzureIoTClient | 62:5a4cdacf5090 | 17 | |
| AzureIoTClient | 62:5a4cdacf5090 | 18 | #define IOTHUB_CREDENTIAL_TYPE_VALUES \ |
| AzureIoTClient | 62:5a4cdacf5090 | 19 | IOTHUB_CREDENTIAL_TYPE_UNKNOWN, \ |
| AzureIoTClient | 62:5a4cdacf5090 | 20 | IOTHUB_CREDENTIAL_TYPE_DEVICE_KEY, \ |
| AzureIoTClient | 62:5a4cdacf5090 | 21 | IOTHUB_CREDENTIAL_TYPE_X509, \ |
| AzureIoTClient | 62:5a4cdacf5090 | 22 | IOTHUB_CREDENTIAL_TYPE_SAS_TOKEN |
| AzureIoTClient | 62:5a4cdacf5090 | 23 | |
| AzureIoTClient | 62:5a4cdacf5090 | 24 | DEFINE_ENUM(IOTHUB_CREDENTIAL_TYPE, IOTHUB_CREDENTIAL_TYPE_VALUES); |
| AzureIoTClient | 62:5a4cdacf5090 | 25 | |
| AzureIoTClient | 63:1bf1c2d60aab | 26 | #define SAS_TOKEN_STATUS_VALUES \ |
| AzureIoTClient | 63:1bf1c2d60aab | 27 | SAS_TOKEN_STATUS_FAILED, \ |
| AzureIoTClient | 63:1bf1c2d60aab | 28 | SAS_TOKEN_STATUS_VALID, \ |
| AzureIoTClient | 63:1bf1c2d60aab | 29 | SAS_TOKEN_STATUS_INVALID |
| AzureIoTClient | 63:1bf1c2d60aab | 30 | |
| AzureIoTClient | 63:1bf1c2d60aab | 31 | DEFINE_ENUM(SAS_TOKEN_STATUS, SAS_TOKEN_STATUS_VALUES); |
| AzureIoTClient | 63:1bf1c2d60aab | 32 | |
| AzureIoTClient | 62:5a4cdacf5090 | 33 | MOCKABLE_FUNCTION(, IOTHUB_AUTHORIZATION_HANDLE, IoTHubClient_Auth_Create, const char*, device_key, const char*, device_id, const char*, device_sas_token); |
| AzureIoTClient | 62:5a4cdacf5090 | 34 | MOCKABLE_FUNCTION(, void, IoTHubClient_Auth_Destroy, IOTHUB_AUTHORIZATION_HANDLE, handle); |
| AzureIoTClient | 63:1bf1c2d60aab | 35 | MOCKABLE_FUNCTION(, IOTHUB_CREDENTIAL_TYPE, IoTHubClient_Auth_Set_x509_Type, IOTHUB_AUTHORIZATION_HANDLE, handle, bool, enable_x509); |
| AzureIoTClient | 62:5a4cdacf5090 | 36 | MOCKABLE_FUNCTION(, IOTHUB_CREDENTIAL_TYPE, IoTHubClient_Auth_Get_Credential_Type, IOTHUB_AUTHORIZATION_HANDLE, handle); |
| AzureIoTClient | 62:5a4cdacf5090 | 37 | MOCKABLE_FUNCTION(, char*, IoTHubClient_Auth_Get_SasToken, IOTHUB_AUTHORIZATION_HANDLE, handle, const char*, scope, size_t, expire_time); |
| AzureIoTClient | 62:5a4cdacf5090 | 38 | MOCKABLE_FUNCTION(, const char*, IoTHubClient_Auth_Get_DeviceId, IOTHUB_AUTHORIZATION_HANDLE, handle); |
| AzureIoTClient | 63:1bf1c2d60aab | 39 | MOCKABLE_FUNCTION(, const char*, IoTHubClient_Auth_Get_DeviceKey, IOTHUB_AUTHORIZATION_HANDLE, handle); |
| AzureIoTClient | 63:1bf1c2d60aab | 40 | MOCKABLE_FUNCTION(, SAS_TOKEN_STATUS, IoTHubClient_Auth_Is_SasToken_Valid, IOTHUB_AUTHORIZATION_HANDLE, handle); |
| AzureIoTClient | 62:5a4cdacf5090 | 41 | |
| AzureIoTClient | 62:5a4cdacf5090 | 42 | #ifdef __cplusplus |
| AzureIoTClient | 62:5a4cdacf5090 | 43 | } |
| AzureIoTClient | 62:5a4cdacf5090 | 44 | #endif |
| AzureIoTClient | 62:5a4cdacf5090 | 45 | |
| AzureIoTClient | 62:5a4cdacf5090 | 46 | #endif /* IOTHUB_CLIENT_AUTHORIZATION_H */ |
