Microsoft Azure IoTHub client libraries

Dependents:   sht15_remote_monitoring RobotArmDemo iothub_client_sample_amqp f767zi_mqtt ... more

This library implements the Microsoft Azure IoTHub client library. The code is replicated from https://github.com/Azure/azure-iot-sdks

Committer:
AzureIoTClient
Date:
Tue Sep 15 21:47:12 2015 -0700
Revision:
0:e393db310d89
Child:
10:38383e246675
Automatic build commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AzureIoTClient 0:e393db310d89 1 // Copyright (c) Microsoft. All rights reserved.
AzureIoTClient 0:e393db310d89 2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
AzureIoTClient 0:e393db310d89 3
AzureIoTClient 0:e393db310d89 4 #ifndef IOTHUB_MESSAGE_H
AzureIoTClient 0:e393db310d89 5 #define IOTHUB_MESSAGE_H
AzureIoTClient 0:e393db310d89 6
AzureIoTClient 0:e393db310d89 7 #include "macro_utils.h"
AzureIoTClient 0:e393db310d89 8 #include "map.h"
AzureIoTClient 0:e393db310d89 9
AzureIoTClient 0:e393db310d89 10 #ifdef __cplusplus
AzureIoTClient 0:e393db310d89 11 #include <cstddef>
AzureIoTClient 0:e393db310d89 12 extern "C"
AzureIoTClient 0:e393db310d89 13 {
AzureIoTClient 0:e393db310d89 14 #else
AzureIoTClient 0:e393db310d89 15 #include <stddef.h>
AzureIoTClient 0:e393db310d89 16 #endif
AzureIoTClient 0:e393db310d89 17
AzureIoTClient 0:e393db310d89 18 #define IOTHUB_MESSAGE_RESULT_VALUES \
AzureIoTClient 0:e393db310d89 19 IOTHUB_MESSAGE_OK, \
AzureIoTClient 0:e393db310d89 20 IOTHUB_MESSAGE_INVALID_ARG, \
AzureIoTClient 0:e393db310d89 21 IOTHUB_MESSAGE_INVALID_TYPE, \
AzureIoTClient 0:e393db310d89 22 IOTHUB_MESSAGE_ERROR \
AzureIoTClient 0:e393db310d89 23
AzureIoTClient 0:e393db310d89 24 DEFINE_ENUM(IOTHUB_MESSAGE_RESULT, IOTHUB_MESSAGE_RESULT_VALUES);
AzureIoTClient 0:e393db310d89 25
AzureIoTClient 0:e393db310d89 26 #define IOTHUBMESSAGE_CONTENT_TYPE_VALUES \
AzureIoTClient 0:e393db310d89 27 IOTHUBMESSAGE_BYTEARRAY, \
AzureIoTClient 0:e393db310d89 28 IOTHUBMESSAGE_STRING, \
AzureIoTClient 0:e393db310d89 29 IOTHUBMESSAGE_UNKNOWN \
AzureIoTClient 0:e393db310d89 30
AzureIoTClient 0:e393db310d89 31 DEFINE_ENUM(IOTHUBMESSAGE_CONTENT_TYPE, IOTHUBMESSAGE_CONTENT_TYPE_VALUES);
AzureIoTClient 0:e393db310d89 32
AzureIoTClient 0:e393db310d89 33 typedef void* IOTHUB_MESSAGE_HANDLE;
AzureIoTClient 0:e393db310d89 34
AzureIoTClient 0:e393db310d89 35 extern IOTHUB_MESSAGE_HANDLE IoTHubMessage_CreateFromByteArray(const unsigned char* byteArray, size_t size);
AzureIoTClient 0:e393db310d89 36 extern IOTHUB_MESSAGE_HANDLE IoTHubMessage_CreateFromString(const char* source);
AzureIoTClient 0:e393db310d89 37
AzureIoTClient 0:e393db310d89 38 extern IOTHUB_MESSAGE_HANDLE IoTHubMessage_Clone(IOTHUB_MESSAGE_HANDLE iotHubMessageHandle);
AzureIoTClient 0:e393db310d89 39
AzureIoTClient 0:e393db310d89 40 extern IOTHUB_MESSAGE_RESULT IoTHubMessage_GetByteArray(IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const unsigned char** buffer, size_t* size);
AzureIoTClient 0:e393db310d89 41 extern const char* IoTHubMessage_GetString(IOTHUB_MESSAGE_HANDLE iotHubMessageHandle);
AzureIoTClient 0:e393db310d89 42 extern IOTHUBMESSAGE_CONTENT_TYPE IoTHubMessage_GetContentType(IOTHUB_MESSAGE_HANDLE iotHubMessageHandle);
AzureIoTClient 0:e393db310d89 43 extern MAP_HANDLE IoTHubMessage_Properties(IOTHUB_MESSAGE_HANDLE iotHubMessageHandle);
AzureIoTClient 0:e393db310d89 44
AzureIoTClient 0:e393db310d89 45 extern void IoTHubMessage_Destroy(IOTHUB_MESSAGE_HANDLE iotHubMessageHandle);
AzureIoTClient 0:e393db310d89 46
AzureIoTClient 0:e393db310d89 47 #ifdef __cplusplus
AzureIoTClient 0:e393db310d89 48 }
AzureIoTClient 0:e393db310d89 49 #endif
AzureIoTClient 0:e393db310d89 50
AzureIoTClient 0:e393db310d89 51 #endif /* IOTHUB_MESSAGE_H */