зеркало из https://github.com/Azure/azure-umqtt-c.git
New dependencies
This commit is contained in:
Родитель
5a72376498
Коммит
ba391d4446
|
@ -1 +1 @@
|
|||
Subproject commit 17a6ad1df91e57d6981366710096798bcb5991a6
|
||||
Subproject commit 7523af934fc4d9423111e358f49b19314ec9c3e3
|
|
@ -1 +1 @@
|
|||
Subproject commit fc889478c18cccbcdc2458190a5f2de034b4b255
|
||||
Subproject commit 1a6cb28931fa47680ee3189c02abf0658a2bda30
|
|
@ -1 +1 @@
|
|||
Subproject commit b140d25eccd6f88247a4a2b73d26ca31455c4fc5
|
||||
Subproject commit 4c685d4c19ae5a1aa673acade2d23b9be915f099
|
|
@ -1 +1 @@
|
|||
Subproject commit cedb6b9fa386e4fe03cbf04876a0808b3cf03cf7
|
||||
Subproject commit 76b41bc656b4bec3c70a0b46a49d668ea0ba5265
|
|
@ -1 +1 @@
|
|||
Subproject commit 1b2b14e9f45536894fe516b6dbb380b0507d779a
|
||||
Subproject commit 87d2214384c886a1e2406ac0756a0b3786add8da
|
|
@ -17,32 +17,32 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
|
||||
#define CONTROL_PACKET_TYPE_VALUES \
|
||||
CONNECT_TYPE = 0x10, \
|
||||
CONNACK_TYPE = 0x20, \
|
||||
PUBLISH_TYPE = 0x30, \
|
||||
PUBACK_TYPE = 0x40, \
|
||||
PUBREC_TYPE = 0x50, \
|
||||
PUBREL_TYPE = 0x60, \
|
||||
PUBCOMP_TYPE = 0x70, \
|
||||
SUBSCRIBE_TYPE = 0x80, \
|
||||
SUBACK_TYPE = 0x90, \
|
||||
UNSUBSCRIBE_TYPE = 0xA0, \
|
||||
UNSUBACK_TYPE = 0xB0, \
|
||||
PINGREQ_TYPE = 0xC0, \
|
||||
PINGRESP_TYPE = 0xD0, \
|
||||
DISCONNECT_TYPE = 0xE0, \
|
||||
PACKET_TYPE_ERROR, \
|
||||
UNKNOWN_TYPE
|
||||
CONNECT_TYPE, 0x10, \
|
||||
CONNACK_TYPE, 0x20, \
|
||||
PUBLISH_TYPE, 0x30, \
|
||||
PUBACK_TYPE, 0x40, \
|
||||
PUBREC_TYPE, 0x50, \
|
||||
PUBREL_TYPE, 0x60, \
|
||||
PUBCOMP_TYPE, 0x70, \
|
||||
SUBSCRIBE_TYPE, 0x80, \
|
||||
SUBACK_TYPE, 0x90, \
|
||||
UNSUBSCRIBE_TYPE, 0xA0, \
|
||||
UNSUBACK_TYPE, 0xB0, \
|
||||
PINGREQ_TYPE, 0xC0, \
|
||||
PINGRESP_TYPE, 0xD0, \
|
||||
DISCONNECT_TYPE, 0xE0, \
|
||||
PACKET_TYPE_ERROR, 0xE1, /* 0xE1 was assigned because ENUM_2 needs it */ \
|
||||
UNKNOWN_TYPE, 0xE2 /* 0xE2 was assigned because ENUM_2 needs it */
|
||||
|
||||
MU_DEFINE_ENUM(CONTROL_PACKET_TYPE, CONTROL_PACKET_TYPE_VALUES)
|
||||
MU_DEFINE_ENUM_2(CONTROL_PACKET_TYPE, CONTROL_PACKET_TYPE_VALUES)
|
||||
|
||||
#define QOS_VALUE_VALUES \
|
||||
DELIVER_AT_MOST_ONCE = 0x00, \
|
||||
DELIVER_AT_LEAST_ONCE = 0x01, \
|
||||
DELIVER_EXACTLY_ONCE = 0x02, \
|
||||
DELIVER_FAILURE = 0x80
|
||||
DELIVER_AT_MOST_ONCE, 0x00, \
|
||||
DELIVER_AT_LEAST_ONCE, 0x01, \
|
||||
DELIVER_EXACTLY_ONCE, 0x02, \
|
||||
DELIVER_FAILURE, 0x80
|
||||
|
||||
MU_DEFINE_ENUM(QOS_VALUE, QOS_VALUE_VALUES)
|
||||
MU_DEFINE_ENUM_2(QOS_VALUE, QOS_VALUE_VALUES)
|
||||
|
||||
typedef struct APP_PAYLOAD_TAG
|
||||
{
|
||||
|
|
|
@ -25,16 +25,11 @@ static bool g_close_complete = true;
|
|||
|
||||
#define DEFAULT_MSG_TO_SEND 1
|
||||
|
||||
MU_DEFINE_ENUM_STRINGS_2(QOS_VALUE, QOS_VALUE_VALUES)
|
||||
|
||||
static const char* QosToString(QOS_VALUE qosValue)
|
||||
{
|
||||
switch (qosValue)
|
||||
{
|
||||
case DELIVER_AT_LEAST_ONCE: return "Deliver_At_Least_Once";
|
||||
case DELIVER_EXACTLY_ONCE: return "Deliver_Exactly_Once";
|
||||
case DELIVER_AT_MOST_ONCE: return "Deliver_At_Most_Once";
|
||||
case DELIVER_FAILURE: return "Deliver_Failure";
|
||||
}
|
||||
return "";
|
||||
return MU_ENUM_TO_STRING_2(QOS_VALUE, qosValue);
|
||||
}
|
||||
|
||||
static void OnRecvCallback(MQTT_MESSAGE_HANDLE msgHandle, void* context)
|
||||
|
@ -147,6 +142,7 @@ static void OnErrorComplete(MQTT_CLIENT_HANDLE handle, MQTT_CLIENT_EVENT_ERROR e
|
|||
(void)handle;
|
||||
switch (error)
|
||||
{
|
||||
default:
|
||||
case MQTT_CLIENT_CONNECTION_ERROR:
|
||||
case MQTT_CLIENT_PARSE_ERROR:
|
||||
case MQTT_CLIENT_MEMORY_ERROR:
|
||||
|
|
|
@ -72,8 +72,9 @@ extern "C"
|
|||
}
|
||||
#endif
|
||||
|
||||
TEST_DEFINE_ENUM_TYPE(QOS_VALUE, QOS_VALUE_VALUES);
|
||||
IMPLEMENT_UMOCK_C_ENUM_TYPE(QOS_VALUE, QOS_VALUE_VALUES);
|
||||
MU_DEFINE_ENUM_STRINGS_2(QOS_VALUE, QOS_VALUE_VALUES);
|
||||
TEST_DEFINE_ENUM_2_TYPE(QOS_VALUE, QOS_VALUE_VALUES);
|
||||
IMPLEMENT_UMOCK_C_ENUM_2_TYPE(QOS_VALUE, QOS_VALUE_VALUES);
|
||||
|
||||
static const char* TEST_USERNAME = "testuser";
|
||||
static const char* TEST_PASSWORD = "testpassword";
|
||||
|
|
|
@ -121,8 +121,9 @@ STRING_HANDLE STRING_construct_sprintf(const char* format, ...)
|
|||
}
|
||||
#endif
|
||||
|
||||
TEST_DEFINE_ENUM_TYPE(CONTROL_PACKET_TYPE, CONTROL_PACKET_TYPE_VALUES);
|
||||
IMPLEMENT_UMOCK_C_ENUM_TYPE(CONTROL_PACKET_TYPE, CONTROL_PACKET_TYPE_VALUES);
|
||||
MU_DEFINE_ENUM_STRINGS_2(CONTROL_PACKET_TYPE, CONTROL_PACKET_TYPE_VALUES);
|
||||
TEST_DEFINE_ENUM_2_TYPE(CONTROL_PACKET_TYPE, CONTROL_PACKET_TYPE_VALUES);
|
||||
IMPLEMENT_UMOCK_C_ENUM_2_TYPE(CONTROL_PACKET_TYPE, CONTROL_PACKET_TYPE_VALUES);
|
||||
|
||||
static void SetupMqttLibOptions(MQTT_CLIENT_OPTIONS* options, const char* clientId,
|
||||
const char* willMsg,
|
||||
|
|
|
@ -86,8 +86,9 @@ typedef struct TEST_COMPLETE_DATA_INSTANCE_TAG
|
|||
size_t Length;
|
||||
} TEST_COMPLETE_DATA_INSTANCE;
|
||||
|
||||
TEST_DEFINE_ENUM_TYPE(QOS_VALUE, QOS_VALUE_VALUES);
|
||||
IMPLEMENT_UMOCK_C_ENUM_TYPE(QOS_VALUE, QOS_VALUE_VALUES);
|
||||
MU_DEFINE_ENUM_STRINGS_2(QOS_VALUE, QOS_VALUE_VALUES);
|
||||
TEST_DEFINE_ENUM_2_TYPE(QOS_VALUE, QOS_VALUE_VALUES);
|
||||
IMPLEMENT_UMOCK_C_ENUM_2_TYPE(QOS_VALUE, QOS_VALUE_VALUES);
|
||||
|
||||
TEST_MUTEX_HANDLE test_serialize_mutex;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче