aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikram Adiga2015-10-06 17:45:30 -0500
committerVikram Adiga2015-10-06 17:45:53 -0500
commit71cdfe0780e20c0cc0eb4c7e88d96dc92a7f5103 (patch)
treeb78842b8db58dc357eaf08bcf389ed35ba8cb331
downloadawsiot-71cdfe0780e20c0cc0eb4c7e88d96dc92a7f5103.tar.gz
awsiot-71cdfe0780e20c0cc0eb4c7e88d96dc92a7f5103.tar.xz
awsiot-71cdfe0780e20c0cc0eb4c7e88d96dc92a7f5103.zip
initial AWS SDK commit
-rw-r--r--CHANGELOG.md48
-rw-r--r--LICENSE.txt120
-rw-r--r--NOTICE.txt17
-rw-r--r--README.md6
-rw-r--r--aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/aws_iot_mqtt_embedded_client_wrapper.c253
-rw-r--r--aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/network_interface.h124
-rw-r--r--aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/common/timer.c56
-rw-r--r--aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/common/timer_linux.h29
-rw-r--r--aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/mbedtls/network_mbedtls_wrapper.c273
-rw-r--r--aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/hostname_compare.c73
-rw-r--r--aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/hostname_compare.h24
-rw-r--r--aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/network_openssl_wrapper.c379
-rw-r--r--aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/openssl_hostname_validation.c154
-rw-r--r--aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/openssl_hostname_validation.h45
-rw-r--r--aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/rawstr.c139
-rw-r--r--aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/rawstr.h46
-rw-r--r--aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/timer_interface.h92
-rw-r--r--aws_iot_src/protocol/mqtt/aws_iot_mqtt_interface.h287
-rw-r--r--aws_iot_src/shadow/aws_iot_shadow.c169
-rw-r--r--aws_iot_src/shadow/aws_iot_shadow_actions.c65
-rw-r--r--aws_iot_src/shadow/aws_iot_shadow_actions.h25
-rw-r--r--aws_iot_src/shadow/aws_iot_shadow_interface.h242
-rw-r--r--aws_iot_src/shadow/aws_iot_shadow_json.c452
-rw-r--r--aws_iot_src/shadow/aws_iot_shadow_json.h39
-rw-r--r--aws_iot_src/shadow/aws_iot_shadow_json_data.h132
-rw-r--r--aws_iot_src/shadow/aws_iot_shadow_key.h22
-rw-r--r--aws_iot_src/shadow/aws_iot_shadow_records.c481
-rw-r--r--aws_iot_src/shadow/aws_iot_shadow_records.h42
-rw-r--r--aws_iot_src/utils/aws_iot_error.h56
-rw-r--r--aws_iot_src/utils/aws_iot_json_utils.c185
-rw-r--r--aws_iot_src/utils/aws_iot_json_utils.h189
-rw-r--r--aws_iot_src/utils/aws_iot_log.h82
-rw-r--r--aws_iot_src/utils/aws_iot_version.h48
-rw-r--r--aws_iot_src/utils/jsmn.c342
-rw-r--r--aws_iot_src/utils/jsmn.h101
-rw-r--r--aws_mqtt_embedded_client_lib/CONTRIBUTING.md47
-rw-r--r--aws_mqtt_embedded_client_lib/CopySrc.mk5
-rw-r--r--aws_mqtt_embedded_client_lib/Debug/makefile45
-rw-r--r--aws_mqtt_embedded_client_lib/Debug/objects.mk8
-rw-r--r--aws_mqtt_embedded_client_lib/Debug/sources.mk18
-rw-r--r--aws_mqtt_embedded_client_lib/Debug/src/MQTTDeserializeConnect.d4
-rw-r--r--aws_mqtt_embedded_client_lib/Debug/src/subdir.mk48
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient-C/samples/linux/build.sh3
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient-C/samples/linux/stdoutsub.c253
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient-C/src/MQTTClient.c568
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient-C/src/MQTTClient.h103
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient-C/src/cc3200/MQTTCC3200.c196
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient-C/src/cc3200/MQTTCC3200.h58
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient-C/src/linux/MQTTLinux.c167
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient-C/src/linux/MQTTLinux.h68
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient/samples/arduino/Hello/Hello.ino131
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/build.sh3
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/hellobin0 -> 35175 bytes
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/hello.cpp102
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/main.cpp291
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/stdoutsubbin0 -> 88729 bytes
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/stdoutsub.cpp267
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient/src/FP.h208
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient/src/MQTTClient.h913
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient/src/MQTTLogging.h55
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient/src/arduino/Countdown.h57
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient/src/arduino/IPStack.h79
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient/src/arduino/WifiIPStack.h69
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient/src/linux/linux.cpp223
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient/src/mbed/MQTTEthernet.h40
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTClient/src/mbed/MQTTSocket.h57
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/samples/build6
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/samples/null.c4
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/samples/pub0sub1.c153
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/samples/pub0sub1_nb.c158
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/samples/qos0pub.c76
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/samples/transport.c205
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/samples/transport.h22
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTConnect.h136
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTConnectClient.c214
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTConnectServer.c148
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTDeserializePublish.c107
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTFormat.c258
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTFormat.h37
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTPacket.c410
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTPacket.h133
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTPublish.h38
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTSerializePublish.c169
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTSubscribe.h39
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTSubscribeClient.c137
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTSubscribeServer.c112
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTUnsubscribe.h38
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTUnsubscribeClient.c106
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTUnsubscribeServer.c102
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/src/StackTrace.h78
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/test/build_test1
-rw-r--r--aws_mqtt_embedded_client_lib/MQTTPacket/test/test1.c635
-rw-r--r--aws_mqtt_embedded_client_lib/Makefile219
-rw-r--r--aws_mqtt_embedded_client_lib/README.md37
-rw-r--r--aws_mqtt_embedded_client_lib/about.html28
-rw-r--r--aws_mqtt_embedded_client_lib/edl-v1015
-rw-r--r--aws_mqtt_embedded_client_lib/epl-v1070
-rw-r--r--aws_mqtt_embedded_client_lib/notice.html108
-rw-r--r--docs/html/MQTTSubPub.html79
-rw-r--r--docs/html/annotated.html93
-rw-r--r--docs/html/aws__iot__config_8h.html142
-rw-r--r--docs/html/aws__iot__config_8h__dep__incl.dot10
-rw-r--r--docs/html/aws__iot__config_8h__dep__incl.md51
-rw-r--r--docs/html/aws__iot__config_8h_source.html121
-rw-r--r--docs/html/aws__iot__error_8h_source.html119
-rw-r--r--docs/html/aws__iot__json__utils_8h_source.html121
-rw-r--r--docs/html/aws__iot__log_8h_source.html124
-rw-r--r--docs/html/aws__iot__mqtt__interface_8h_source.html206
-rw-r--r--docs/html/aws__iot__shadow__actions_8h_source.html98
-rw-r--r--docs/html/aws__iot__shadow__interface_8h.html622
-rw-r--r--docs/html/aws__iot__shadow__interface_8h__dep__incl.dot12
-rw-r--r--docs/html/aws__iot__shadow__interface_8h__dep__incl.md51
-rw-r--r--docs/html/aws__iot__shadow__interface_8h__incl.dot19
-rw-r--r--docs/html/aws__iot__shadow__interface_8h__incl.md51
-rw-r--r--docs/html/aws__iot__shadow__interface_8h_source.html140
-rw-r--r--docs/html/aws__iot__shadow__json_8h_source.html112
-rw-r--r--docs/html/aws__iot__shadow__json__data_8h_source.html128
-rw-r--r--docs/html/aws__iot__shadow__key_8h_source.html95
-rw-r--r--docs/html/aws__iot__shadow__records_8h_source.html115
-rw-r--r--docs/html/aws__iot__version_8h_source.html100
-rw-r--r--docs/html/bc_s.pngbin0 -> 677 bytes
-rw-r--r--docs/html/classes.html82
-rw-r--r--docs/html/closed.pngbin0 -> 126 bytes
-rw-r--r--docs/html/docs__main_8h.html79
-rw-r--r--docs/html/docs__main_8h_source.html74
-rw-r--r--docs/html/docs__related__page_8h_source.html74
-rw-r--r--docs/html/docs__shadow__module_8h_source.html74
-rw-r--r--docs/html/doxygen.css686
-rw-r--r--docs/html/doxygen.pngbin0 -> 3942 bytes
-rw-r--r--docs/html/files.html100
-rw-r--r--docs/html/functions.html301
-rw-r--r--docs/html/functions_vars.html301
-rw-r--r--docs/html/globals.html264
-rw-r--r--docs/html/globals_defs.html107
-rw-r--r--docs/html/globals_enum.html89
-rw-r--r--docs/html/globals_func.html194
-rw-r--r--docs/html/globals_type.html89
-rw-r--r--docs/html/graph_legend.dot22
-rw-r--r--docs/html/graph_legend.html131
-rw-r--r--docs/html/graph_legend.md51
-rw-r--r--docs/html/group__shadow__module.html70
-rw-r--r--docs/html/hostname__compare_8h_source.html97
-rw-r--r--docs/html/index.html122
-rw-r--r--docs/html/installdox117
-rw-r--r--docs/html/jsmn_8c.html161
-rw-r--r--docs/html/jsmn_8c__incl.dot12
-rw-r--r--docs/html/jsmn_8c__incl.md51
-rw-r--r--docs/html/jsmn_8h.html204
-rw-r--r--docs/html/jsmn_8h__dep__incl.dot10
-rw-r--r--docs/html/jsmn_8h__dep__incl.md51
-rw-r--r--docs/html/jsmn_8h__incl.dot8
-rw-r--r--docs/html/jsmn_8h__incl.md51
-rw-r--r--docs/html/jsmn_8h_source.html142
-rw-r--r--docs/html/modules.html70
-rw-r--r--docs/html/nav_f.pngbin0 -> 159 bytes
-rw-r--r--docs/html/nav_h.pngbin0 -> 97 bytes
-rw-r--r--docs/html/network__interface_8h.html333
-rw-r--r--docs/html/network__interface_8h_source.html123
-rw-r--r--docs/html/open.pngbin0 -> 118 bytes
-rw-r--r--docs/html/openssl__hostname__validation_8h_source.html107
-rw-r--r--docs/html/pages.html71
-rw-r--r--docs/html/rawstr_8h_source.html119
-rw-r--r--docs/html/search/all_61.html150
-rw-r--r--docs/html/search/all_63.html44
-rw-r--r--docs/html/search/all_64.html46
-rw-r--r--docs/html/search/all_65.html29
-rw-r--r--docs/html/search/all_66.html26
-rw-r--r--docs/html/search/all_69.html110
-rw-r--r--docs/html/search/all_6a.html74
-rw-r--r--docs/html/search/all_6b.html26
-rw-r--r--docs/html/search/all_6c.html29
-rw-r--r--docs/html/search/all_6d.html100
-rw-r--r--docs/html/search/all_6e.html34
-rw-r--r--docs/html/search/all_70.html164
-rw-r--r--docs/html/search/all_71.html30
-rw-r--r--docs/html/search/all_72.html26
-rw-r--r--docs/html/search/all_73.html65
-rw-r--r--docs/html/search/all_74.html67
-rw-r--r--docs/html/search/all_75.html26
-rw-r--r--docs/html/search/all_77.html26
-rw-r--r--docs/html/search/all_79.html26
-rw-r--r--docs/html/search/classes_6a.html40
-rw-r--r--docs/html/search/classes_6d.html55
-rw-r--r--docs/html/search/classes_6e.html25
-rw-r--r--docs/html/search/classes_73.html30
-rw-r--r--docs/html/search/classes_74.html35
-rw-r--r--docs/html/search/close.pngbin0 -> 273 bytes
-rw-r--r--docs/html/search/defines_61.html68
-rw-r--r--docs/html/search/defines_72.html26
-rw-r--r--docs/html/search/enums_6a.html26
-rw-r--r--docs/html/search/enums_73.html32
-rw-r--r--docs/html/search/files_61.html30
-rw-r--r--docs/html/search/files_64.html25
-rw-r--r--docs/html/search/files_6a.html30
-rw-r--r--docs/html/search/files_6e.html25
-rw-r--r--docs/html/search/files_73.html25
-rw-r--r--docs/html/search/files_74.html30
-rw-r--r--docs/html/search/functions_61.html92
-rw-r--r--docs/html/search/functions_63.html38
-rw-r--r--docs/html/search/functions_65.html29
-rw-r--r--docs/html/search/functions_69.html65
-rw-r--r--docs/html/search/functions_6a.html38
-rw-r--r--docs/html/search/functions_6c.html29
-rw-r--r--docs/html/search/mag_sel.pngbin0 -> 563 bytes
-rw-r--r--docs/html/search/nomatches.html12
-rw-r--r--docs/html/search/search.css240
-rw-r--r--docs/html/search/search.js740
-rw-r--r--docs/html/search/search_l.pngbin0 -> 604 bytes
-rw-r--r--docs/html/search/search_m.pngbin0 -> 158 bytes
-rw-r--r--docs/html/search/search_r.pngbin0 -> 612 bytes
-rw-r--r--docs/html/search/typedefs_66.html26
-rw-r--r--docs/html/search/typedefs_6e.html26
-rw-r--r--docs/html/search/typedefs_74.html26
-rw-r--r--docs/html/search/variables_63.html26
-rw-r--r--docs/html/search/variables_64.html41
-rw-r--r--docs/html/search/variables_69.html65
-rw-r--r--docs/html/search/variables_6b.html26
-rw-r--r--docs/html/search/variables_6d.html65
-rw-r--r--docs/html/search/variables_70.html164
-rw-r--r--docs/html/search/variables_71.html30
-rw-r--r--docs/html/search/variables_73.html38
-rw-r--r--docs/html/search/variables_74.html38
-rw-r--r--docs/html/search/variables_75.html26
-rw-r--r--docs/html/search/variables_77.html26
-rw-r--r--docs/html/search/variables_79.html26
-rw-r--r--docs/html/shadow__sample_8c.html149
-rw-r--r--docs/html/shadow__sample_8c__incl.dot47
-rw-r--r--docs/html/shadow__sample_8c__incl.md51
-rw-r--r--docs/html/structJsonTokenTable__t.html88
-rw-r--r--docs/html/structMQTTCallbackParams.html103
-rw-r--r--docs/html/structMQTTCallbackParams__coll__graph.dot8
-rw-r--r--docs/html/structMQTTCallbackParams__coll__graph.md51
-rw-r--r--docs/html/structMQTTClient__t.html108
-rw-r--r--docs/html/structMQTTConnectParams.html145
-rw-r--r--docs/html/structMQTTConnectParams__coll__graph.dot8
-rw-r--r--docs/html/structMQTTConnectParams__coll__graph.md51
-rw-r--r--docs/html/structMQTTMessageParams.html105
-rw-r--r--docs/html/structMQTTPublishParams.html100
-rw-r--r--docs/html/structMQTTPublishParams__coll__graph.dot8
-rw-r--r--docs/html/structMQTTPublishParams__coll__graph.md51
-rw-r--r--docs/html/structMQTTSubscribeParams.html96
-rw-r--r--docs/html/structMQTTwillOptions.html100
-rw-r--r--docs/html/structNetwork.html99
-rw-r--r--docs/html/structShadowParameters__t.html124
-rw-r--r--docs/html/structShadowParameters__t__coll__graph.dot7
-rw-r--r--docs/html/structShadowParameters__t__coll__graph.md51
-rw-r--r--docs/html/structSubscriptionRecord__t.html88
-rw-r--r--docs/html/structTLSConnectParams.html108
-rw-r--r--docs/html/structTimer.html82
-rw-r--r--docs/html/structToBeReceivedAckRecord__t.html101
-rw-r--r--docs/html/structToBeReceivedAckRecord__t__coll__graph.dot8
-rw-r--r--docs/html/structToBeReceivedAckRecord__t__coll__graph.md51
-rw-r--r--docs/html/structjsmn__parser.html90
-rw-r--r--docs/html/structjsmntok__t.html100
-rw-r--r--docs/html/structjsonStruct.html88
-rw-r--r--docs/html/tab_a.pngbin0 -> 140 bytes
-rw-r--r--docs/html/tab_b.pngbin0 -> 178 bytes
-rw-r--r--docs/html/tab_h.pngbin0 -> 192 bytes
-rw-r--r--docs/html/tab_s.pngbin0 -> 189 bytes
-rw-r--r--docs/html/tabs.css59
-rw-r--r--docs/html/timer_8c.html248
-rw-r--r--docs/html/timer_8c__incl.dot19
-rw-r--r--docs/html/timer_8c__incl.md51
-rw-r--r--docs/html/timer__interface_8h.html276
-rw-r--r--docs/html/timer__interface_8h__dep__incl.dot11
-rw-r--r--docs/html/timer__interface_8h__dep__incl.md51
-rw-r--r--docs/html/timer__interface_8h__incl.dot13
-rw-r--r--docs/html/timer__interface_8h__incl.md51
-rw-r--r--docs/html/timer__interface_8h_source.html108
-rw-r--r--docs/html/timer__linux_8h_source.html102
-rw-r--r--sample_apps/shadow_sample/Makefile80
-rw-r--r--sample_apps/shadow_sample/aws_iot_config.h53
-rw-r--r--sample_apps/shadow_sample/shadow_sample.c248
-rw-r--r--sample_apps/shadow_sample_console_echo/Makefile80
-rw-r--r--sample_apps/shadow_sample_console_echo/aws_iot_config.h53
-rw-r--r--sample_apps/shadow_sample_console_echo/shadow_console_echo.c223
-rw-r--r--sample_apps/subscribe_publish_sample/Makefile73
-rw-r--r--sample_apps/subscribe_publish_sample/aws_iot_config.h53
-rw-r--r--sample_apps/subscribe_publish_sample/subscribe_publish_sample.c189
279 files changed, 27207 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..87b0dc0
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,48 @@
1## 0.4.0 (October 5, 2015)
2
3Features:
4
5 - Thing Shadow Actions - Update, Delete, Get for any Thing Name
6 - aws_iot_config.h file for easy configuration of parameters
7 - Sample app for talking with console's Interactive guide
8 - disconnect handler for the MQTT client library
9
10Bugfixes/Improvements:
11
12 - mbedTLS read times out every 10 ms instead of hanging for ever
13 - mbedTLS handshake failure handled
14
15## 0.3.0 (September 14, 2015)
16
17Features:
18
19 - Testing with mbedTLS, prepping for relase
20
21Bugfixes/Improvements:
22
23 - Refactored to break out timer and network interfaces
24
25## 0.2.0 (September 2, 2015)
26
27Features:
28
29 - Added initial Shadow implementation + example
30 - Added hostname verification to OpenSSL example
31 - Added iot_log interface
32 - Initial API Docs (Doxygen)
33
34Bugfixes/Improvements:
35
36 - Fixed yield timeout
37 - Refactored APIs to pass by reference vs value
38
39## 0.1.0 (August 12, 2015)
40
41Features:
42
43 - Initial beta release
44 - MQTT Publish and Subscribe
45 - TLS mutual auth on linux with OpenSSL
46
47Bugfixes/Improvements:
48 - N/A
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..1b6cbea
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,120 @@
1#############################################################################################################################
2
3
4Apache License
5Version 2.0, January 2004
6
7TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
91. Definitions.
10"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
11"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
13"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
14"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
15"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
16"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
17"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
18"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
19"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
202. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
213. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
224. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
23 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
24 2. You must cause any modified files to carry prominent notices stating that You changed the files; and
25 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
26 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
27You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
285. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
296. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
307. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
318. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
329. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
33
34END OF TERMS AND CONDITIONS
35
36
37#############################################################################################################################
38
39
40Components are made available under the terms of the Eclipse Public License v1.0
41and Eclipse Distribution License v1.0 which accompany this distribution.
42
43The Eclipse Public License is available at
44 http://www.eclipse.org/legal/epl-v10.html
45and the Eclipse Distribution License is available at
46 http://www.eclipse.org/org/documents/edl-v10.php.
47
48
49#############################################################################################################################
50
51
52Copyright (C) 2012, iSEC Partners.
53
54Permission is hereby granted, free of charge, to any person obtaining a copy of
55this software and associated documentation files (the "Software"), to deal in
56the Software without restriction, including without limitation the rights to
57use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
58of the Software, and to permit persons to whom the Software is furnished to do
59so, subject to the following conditions:
60
61The above copyright notice and this permission notice shall be included in all
62copies or substantial portions of the Software.
63
64THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
65IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
66FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
67AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
68LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
69OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
70SOFTWARE.
71
72
73#############################################################################################################################
74
75 _ _ ____ _
76 Project ___| | | | _ \| |
77 / __| | | | |_) | |
78 | (__| |_| | _ <| |___
79 \___|\___/|_| \_\_____|
80
81Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
82
83This software is licensed as described in the file COPYING, which
84you should have received as part of this distribution. The terms
85are also available at http://curl.haxx.se/docs/copyright.html.
86
87You may opt to use, copy, modify, merge, publish, distribute and/or sell
88copies of the Software, and permit persons to whom the Software is
89furnished to do so, under the terms of the COPYING file.
90
91This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
92KIND, either express or implied.
93
94
95#############################################################################################################################
96
97
98Copyright (c) 2010 Serge A. Zaitsev
99
100Permission is hereby granted, free of charge, to any person obtaining a copy
101of this software and associated documentation files (the "Software"), to deal
102in the Software without restriction, including without limitation the rights
103to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
104copies of the Software, and to permit persons to whom the Software is
105furnished to do so, subject to the following conditions:
106
107The above copyright notice and this permission notice shall be included in
108all copies or substantial portions of the Software.
109
110THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
111IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
112FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
113AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
114LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
115OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
116THE SOFTWARE.
117
118
119#############################################################################################################################
120
diff --git a/NOTICE.txt b/NOTICE.txt
new file mode 100644
index 0000000..070b5a4
--- /dev/null
+++ b/NOTICE.txt
@@ -0,0 +1,17 @@
1AWS C SDK for Internet of Things Service
2Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
4This product includes software developed by
5Amazon Inc (http://www.amazon.com/).
6
7**********************
8THIRD PARTY COMPONENTS
9**********************
10This software includes third party software subject to the following copyrights:
11- Embedded C MQTT Client - From the Eclipse Paho Project - EPL v1.0
12- mbedTLS
13- jsmn (JSON Parsing)
14- cURL (hostname verification)
15- SSL Conservatory (hostname verification)
16
17The licenses for these third party components are included in LICENSE.txt
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..42ea93e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,6 @@
1# IotSdkC
2This is the primary repository of C Sdk for IoT service.
3
4## src
5All the source code of C SDK will reside here. This will include all the flavors and platforms.
6
diff --git a/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/aws_iot_mqtt_embedded_client_wrapper.c b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/aws_iot_mqtt_embedded_client_wrapper.c
new file mode 100644
index 0000000..8cf9a96
--- /dev/null
+++ b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/aws_iot_mqtt_embedded_client_wrapper.c
@@ -0,0 +1,253 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16#include "aws_iot_mqtt_interface.h"
17#include "MQTTClient.h"
18#include "aws_iot_config.h"
19
20static Network n;
21static Client c;
22static iot_disconnect_handler clientDisconnectHandler;
23
24static unsigned char writebuf[AWS_IOT_MQTT_TX_BUF_LEN];
25static unsigned char readbuf[AWS_IOT_MQTT_RX_BUF_LEN];
26
27
28
29const MQTTConnectParams MQTTConnectParamsDefault = {
30 .pHostURL = AWS_IOT_MQTT_HOST,
31 .port = AWS_IOT_MQTT_PORT,
32 .pRootCALocation = NULL,
33 .pDeviceCertLocation = NULL,
34 .pDevicePrivateKeyLocation = NULL,
35 .pClientID = NULL,
36 .pUserName = NULL,
37 .pPassword = NULL,
38 .MQTTVersion = MQTT_3_1_1,
39 .KeepAliveInterval_sec = 10,
40 .isCleansession = true,
41 .isWillMsgPresent = false,
42 .will={.pTopicName = NULL, .pMessage = NULL, .isRetained = false, .qos = QOS_0},
43 .mqttCommandTimeout_ms = 1000,
44 .tlsHandshakeTimeout_ms = 2000,
45 .isSSLHostnameVerify = true,
46 .disconnectHandler = NULL
47};
48
49const MQTTPublishParams MQTTPublishParamsDefault={
50 .pTopic = NULL,
51 .MessageParams = {.qos = QOS_0, .isRetained=false, .isDuplicate = false, .id = 0, .pPayload = NULL, .PayloadLen = 0}
52};
53const MQTTSubscribeParams MQTTSubscribeParamsDefault={
54 .pTopic = NULL,
55 .qos = QOS_0,
56 .mHandler = NULL
57};
58const MQTTCallbackParams MQTTCallbackParamsDefault={
59 .pTopicName = NULL,
60 .TopicNameLen = 0,
61 .MessageParams = {.qos = QOS_0, .isRetained=false, .isDuplicate = false, .id = 0, .pPayload = NULL, .PayloadLen = 0}
62};
63const MQTTMessageParams MQTTMessageParamsDefault={
64 .qos = QOS_0,
65 .isRetained=false,
66 .isDuplicate = false,
67 .id = 0,
68 .pPayload = NULL,
69 .PayloadLen = 0
70};
71const MQTTwillOptions MQTTwillOptionsDefault={
72 .pTopicName = NULL,
73 .pMessage = NULL,
74 .isRetained = false,
75 .qos = QOS_0
76};
77
78#define GETLOWER4BYTES 0x0FFFFFFFF
79void pahoMessageCallback(MessageData* md) {
80 MQTTMessage* message = md->message;
81 MQTTCallbackParams params;
82
83 // early exit if we do not have a valid callback pointer
84 if (md->applicationHandler == NULL) {
85 return;
86 }
87
88 if (NULL != md->topicName->lenstring.data) {
89 params.pTopicName = md->topicName->lenstring.data;
90 params.TopicNameLen = (uint16_t)(md->topicName->lenstring.len);
91 }
92 if (NULL != message) {
93 params.MessageParams.PayloadLen = message->payloadlen & GETLOWER4BYTES;
94 params.MessageParams.pPayload = (char*) message->payload;
95 params.MessageParams.isDuplicate = message->dup;
96 params.MessageParams.qos = (QoSLevel)message->qos;
97 params.MessageParams.isRetained = message->retained;
98 params.MessageParams.id = message->id;
99 }
100
101 ((iot_message_handler)(md->applicationHandler))(params);
102}
103
104void pahoDisconnectHandler(void) {
105 if (clientDisconnectHandler != NULL) {
106 clientDisconnectHandler();
107 }
108}
109
110static IoT_Error_t parseConnectParamsForError(MQTTConnectParams *pParams) {
111 IoT_Error_t rc = NONE_ERROR;
112 if (
113 NULL == pParams->pClientID ||
114 NULL == pParams->pHostURL) {
115 rc = NULL_VALUE_ERROR;
116 }
117 return rc;
118}
119
120static bool isPowerCycle = true;
121
122IoT_Error_t aws_iot_mqtt_connect(MQTTConnectParams *pParams) {
123 IoT_Error_t rc = NONE_ERROR;
124
125 rc = parseConnectParamsForError(pParams);
126
127 if (NONE_ERROR == rc) {
128
129 iot_tls_init(&n);
130 TLSConnectParams TLSParams;
131 TLSParams.DestinationPort = pParams->port;
132 TLSParams.pDestinationURL = pParams->pHostURL;
133 TLSParams.pDeviceCertLocation = pParams->pDeviceCertLocation;
134 TLSParams.pDevicePrivateKeyLocation = pParams->pDevicePrivateKeyLocation;
135 TLSParams.pRootCALocation = pParams->pRootCALocation;
136 TLSParams.timeout_ms = pParams->tlsHandshakeTimeout_ms;
137 TLSParams.ServerVerificationFlag = pParams->isSSLHostnameVerify;
138
139 rc = iot_tls_connect(&n, TLSParams);
140
141 if (NONE_ERROR == rc) {
142 // This implementation assumes you are not going to switch between cleansession 1 to 0
143 // As we don't have a default subscription handler support in the MQTT client every time a device power cycles it has to re-subscribe to let the MQTT client to pass the message up to the application callback.
144 // The default message handler will be implemented in the future revisions.
145 if(pParams->isCleansession || isPowerCycle){
146 MQTTClient(&c, &n, (unsigned int)(pParams->mqttCommandTimeout_ms), writebuf, AWS_IOT_MQTT_TX_BUF_LEN, readbuf, AWS_IOT_MQTT_RX_BUF_LEN);
147 isPowerCycle = false;
148 }
149
150 MQTTPacket_connectData data = MQTTPacket_connectData_initializer;
151
152 data.willFlag = pParams->isWillMsgPresent;
153 // compatible type for MQTT_Ver_t
154 switch (pParams->MQTTVersion) {
155 case MQTT_3_1:
156 data.MQTTVersion = (unsigned char) (3);
157 break;
158 case MQTT_3_1_1:
159 data.MQTTVersion = (unsigned char) (4);
160 break;
161 default:
162 data.MQTTVersion = (unsigned char) (4); // default MQTT version = 3.1.1
163 }
164
165 // register our disconnect handler, save customer's handler
166 setDisconnectHandler(&c, pahoDisconnectHandler);
167 clientDisconnectHandler = pParams->disconnectHandler;
168
169 data.clientID.cstring = pParams->pClientID;
170 data.username.cstring = pParams->pUserName;
171 data.password.cstring = pParams->pPassword;
172 data.will.topicName.cstring = (char*)pParams->will.pTopicName;
173 data.will.message.cstring = (char*)pParams->will.pMessage;
174 data.will.qos = pParams->will.qos;
175 data.will.retained = pParams->will.isRetained;
176 data.keepAliveInterval = pParams->KeepAliveInterval_sec;
177 data.cleansession = pParams->isCleansession;
178 if (0 != MQTTConnect(&c, &data)) {
179 rc = CONNECTION_ERROR;
180 }
181 }
182 }
183
184 return rc;
185}
186
187IoT_Error_t aws_iot_mqtt_subscribe(MQTTSubscribeParams *pParams) {
188 IoT_Error_t rc = NONE_ERROR;
189
190 if (0 != MQTTSubscribe(&c, pParams->pTopic, (enum QoS)pParams->qos, pahoMessageCallback, (void (*)(void))(pParams->mHandler))) {
191 rc = SUBSCRIBE_ERROR;
192 }
193 return rc;
194}
195
196IoT_Error_t aws_iot_mqtt_publish(MQTTPublishParams *pParams) {
197 IoT_Error_t rc = NONE_ERROR;
198
199 MQTTMessage Message;
200 Message.dup = pParams->MessageParams.isDuplicate;
201 Message.id = pParams->MessageParams.id;
202 Message.payload = pParams->MessageParams.pPayload;
203 Message.payloadlen = pParams->MessageParams.PayloadLen;
204 Message.qos = (enum QoS)pParams->MessageParams.qos;
205 Message.retained = pParams->MessageParams.isRetained;
206
207 if(0 != MQTTPublish(&c, pParams->pTopic, &Message)){
208 rc = PUBLISH_ERROR;
209 }
210
211 return rc;
212}
213
214IoT_Error_t aws_iot_mqtt_unsubscribe(char *pTopic) {
215 IoT_Error_t rc = NONE_ERROR;
216
217 if(0 != MQTTUnsubscribe(&c, pTopic)){
218 rc = UNSUBSCRIBE_ERROR;
219 }
220 return rc;
221}
222
223IoT_Error_t aws_iot_mqtt_disconnect() {
224 IoT_Error_t rc = NONE_ERROR;
225
226 if(0 != MQTTDisconnect(&c)){
227 rc = DISCONNECT_ERROR;
228 }
229 iot_tls_disconnect(&n);
230 return rc;
231}
232
233IoT_Error_t aws_iot_mqtt_yield(int timeout) {
234 IoT_Error_t rc = NONE_ERROR;
235 if(0 != MQTTYield(&c, timeout)){
236 rc = YIELD_ERROR;
237 }
238 return rc;
239}
240
241bool aws_iot_is_mqtt_connected(void) {
242 return c.isconnected;
243}
244
245void aws_iot_mqtt_init(MQTTClient_t *pClient){
246 pClient->connect = aws_iot_mqtt_connect;
247 pClient->disconnect = aws_iot_mqtt_disconnect;
248 pClient->isConnected = aws_iot_is_mqtt_connected;
249 pClient->publish = aws_iot_mqtt_publish;
250 pClient->subscribe = aws_iot_mqtt_subscribe;
251 pClient->unsubscribe = aws_iot_mqtt_unsubscribe;
252 pClient->yield = aws_iot_mqtt_yield;
253}
diff --git a/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/network_interface.h b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/network_interface.h
new file mode 100644
index 0000000..86dfd9b
--- /dev/null
+++ b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/network_interface.h
@@ -0,0 +1,124 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16/**
17 * @file network_interface.h
18 * @brief Network interface definition for MQTT client.
19 *
20 * Defines an interface to the TLS layer to be used by the MQTT client.
21 * Starting point for porting the SDK to the networking layer of a new platform.
22 */
23
24#ifndef __NETWORK_INTERFACE_H_
25#define __NETWORK_INTERFACE_H_
26
27/**
28 * @brief Network Type
29 *
30 * Defines a type for the network struct. See structure definition below.
31 */
32typedef struct Network Network;
33
34/**
35 * @brief TLS Connection Parameters
36 *
37 * Defines a type containing TLS specific parameters to be passed down to the
38 * TLS networking layer to create a TLS secured socket.
39 */
40typedef struct{
41 char* pRootCALocation; ///< Pointer to string containing the filename (including path) of the root CA file.
42 char* pDeviceCertLocation; ///< Pointer to string containing the filename (including path) of the device certificate.
43 char* pDevicePrivateKeyLocation; ///< Pointer to string containing the filename (including path) of the device private key file.
44 char* pDestinationURL; ///< Pointer to string containing the endpoint of the MQTT service.
45 int DestinationPort; ///< Integer defining the connection port of the MQTT service.
46 unsigned int timeout_ms; ///< Unsigned integer defining the TLS handshake timeout value in milliseconds.
47 unsigned char ServerVerificationFlag; ///< Boolean. True = perform server certificate hostname validation. False = skip validation \b NOT recommended.
48}TLSConnectParams;
49
50/**
51 * @brief Network Structure
52 *
53 * Structure for defining a network connection.
54 */
55struct Network{
56 int my_socket; ///< Integer holding the socket file descriptor
57 int (*mqttread) (Network*, unsigned char*, int, int); ///< Function pointer pointing to the network function to read from the network
58 int (*mqttwrite) (Network*, unsigned char*, int, int); ///< Function pointer pointing to the network function to write to the network
59 void (*disconnect) (Network*); ///< Function pointer pointing to the network function to disconnect from the network
60};
61
62/**
63 * @brief Initialize the TLS implementation
64 *
65 * Perform any initialization required by the TLS layer.
66 * Connects the interface to implementation by setting up
67 * the network layer function pointers to platform implementations.
68 *
69 * @param pNetwork - Pointer to a Network struct defining the network interface.
70 * @return integer defining successful initialization or TLS error
71 */
72int iot_tls_init(Network *pNetwork);
73
74/**
75 * @brief Create a TLS socket and open the connection
76 *
77 * Creates an open socket connection including TLS handshake.
78 *
79 * @param pNetwork - Pointer to a Network struct defining the network interface.
80 * @param TLSParams - TLSConnectParams defines the properties of the TLS connection.
81 * @return integer - successful connection or TLS error
82 */
83int iot_tls_connect(Network *pNetwork, TLSConnectParams TLSParams);
84
85/**
86 * @brief Write bytes to the network socket
87 *
88 * @param Network - Pointer to a Network struct defining the network interface.
89 * @param unsigned char pointer - buffer to write to socket
90 * @param integer - number of bytes to write
91 * @param integer - write timeout value in milliseconds
92 * @return integer - number of bytes written or TLS error
93 */
94int iot_tls_write(Network*, unsigned char*, int, int);
95
96/**
97 * @brief Read bytes from the network socket
98 *
99 * @param Network - Pointer to a Network struct defining the network interface.
100 * @param unsigned char pointer - pointer to buffer where read bytes should be copied
101 * @param integer - number of bytes to read
102 * @param integer - read timeout value in milliseconds
103 * @return integer - number of bytes read or TLS error
104 */
105int iot_tls_read(Network*, unsigned char*, int, int);
106
107/**
108 * @brief Disconnect from network socket
109 *
110 * @param Network - Pointer to a Network struct defining the network interface.
111 */
112void iot_tls_disconnect(Network *pNetwork);
113
114/**
115 * @brief Perform any tear-down or cleanup of TLS layer
116 *
117 * Called to cleanup any resources required for the TLS layer.
118 *
119 * @param Network - Pointer to a Network struct defining the network interface.
120 * @return integer - successful cleanup or TLS error
121 */
122int iot_tls_destroy(Network *pNetwork);
123
124#endif //__NETWORK_INTERFACE_H_
diff --git a/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/common/timer.c b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/common/timer.c
new file mode 100644
index 0000000..96d1954
--- /dev/null
+++ b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/common/timer.c
@@ -0,0 +1,56 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16/**
17 * @file timer.c
18 * @brief Linux implementation of the timer interface.
19 */
20
21#include <stddef.h>
22#include <sys/types.h>
23
24#include "timer_linux.h"
25
26char expired(Timer* timer) {
27 struct timeval now, res;
28 gettimeofday(&now, NULL);
29 timersub(&timer->end_time, &now, &res);
30 return res.tv_sec < 0 || (res.tv_sec == 0 && res.tv_usec <= 0);
31}
32
33void countdown_ms(Timer* timer, unsigned int timeout) {
34 struct timeval now;
35 gettimeofday(&now, NULL);
36 struct timeval interval = { timeout / 1000, (timeout % 1000) * 1000 };
37 timeradd(&now, &interval, &timer->end_time);
38}
39
40void countdown(Timer* timer, unsigned int timeout) {
41 struct timeval now;
42 gettimeofday(&now, NULL);
43 struct timeval interval = { timeout, 0 };
44 timeradd(&now, &interval, &timer->end_time);
45}
46
47int left_ms(Timer* timer) {
48 struct timeval now, res;
49 gettimeofday(&now, NULL);
50 timersub(&timer->end_time, &now, &res);
51 return (res.tv_sec < 0) ? 0 : res.tv_sec * 1000 + res.tv_usec / 1000;
52}
53
54void InitTimer(Timer* timer) {
55 timer->end_time = (struct timeval ) { 0, 0 };
56}
diff --git a/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/common/timer_linux.h b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/common/timer_linux.h
new file mode 100644
index 0000000..186b58c
--- /dev/null
+++ b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/common/timer_linux.h
@@ -0,0 +1,29 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16#ifndef SRC_PROTOCOL_MQTT_AWS_IOT_EMBEDDED_CLIENT_WRAPPER_PLATFORM_LINUX_COMMON_TIMER_LINUX_H_
17#define SRC_PROTOCOL_MQTT_AWS_IOT_EMBEDDED_CLIENT_WRAPPER_PLATFORM_LINUX_COMMON_TIMER_LINUX_H_
18
19#include <sys/time.h>
20#include <sys/select.h>
21#include "timer_interface.h"
22
23
24struct Timer{
25 struct timeval end_time;
26};
27
28
29#endif /* SRC_PROTOCOL_MQTT_AWS_IOT_EMBEDDED_CLIENT_WRAPPER_PLATFORM_LINUX_COMMON_TIMER_LINUX_H_ */
diff --git a/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/mbedtls/network_mbedtls_wrapper.c b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/mbedtls/network_mbedtls_wrapper.c
new file mode 100644
index 0000000..c413939
--- /dev/null
+++ b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/mbedtls/network_mbedtls_wrapper.c
@@ -0,0 +1,273 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16#include <stdbool.h>
17#include <string.h>
18
19#include "aws_iot_error.h"
20#include "aws_iot_log.h"
21#include "network_interface.h"
22#include "mbedtls/config.h"
23
24#include "mbedtls/net.h"
25#include "mbedtls/ssl.h"
26#include "mbedtls/entropy.h"
27#include "mbedtls/ctr_drbg.h"
28#include "mbedtls/certs.h"
29#include "mbedtls/x509.h"
30#include "mbedtls/error.h"
31#include "mbedtls/debug.h"
32#include "mbedtls/timing.h"
33
34/*
35 * This is a function to do further verification if needed on the cert received
36 */
37
38static int myCertVerify(void *data, mbedtls_x509_crt *crt, int depth, uint32_t *flags) {
39 char buf[1024];
40 ((void) data);
41
42 DEBUG("\nVerify requested for (Depth %d):\n", depth);
43 mbedtls_x509_crt_info(buf, sizeof(buf) - 1, "", crt);
44 DEBUG("%s", buf);
45
46 if ((*flags) == 0) {
47 DEBUG(" This certificate has no flags\n");
48 } else {
49 DEBUG(buf, sizeof(buf), " ! ", *flags); DEBUG("%s\n", buf);
50 }
51
52 return (0);
53}
54
55static int ret = 0, i;
56static mbedtls_entropy_context entropy;
57static mbedtls_ctr_drbg_context ctr_drbg;
58static mbedtls_ssl_context ssl;
59static mbedtls_ssl_config conf;
60static uint32_t flags;
61static mbedtls_x509_crt cacert;
62static mbedtls_x509_crt clicert;
63static mbedtls_pk_context pkey;
64static mbedtls_net_context server_fd;
65
66int iot_tls_init(Network *pNetwork) {
67 IoT_Error_t ret_val = NONE_ERROR;
68 const char *pers = "aws_iot_tls_wrapper";
69 unsigned char buf[MBEDTLS_SSL_MAX_CONTENT_LEN + 1];
70
71 mbedtls_net_init(&server_fd);
72 mbedtls_ssl_init(&ssl);
73 mbedtls_ssl_config_init(&conf);
74 mbedtls_ctr_drbg_init(&ctr_drbg);
75 mbedtls_x509_crt_init(&cacert);
76 mbedtls_x509_crt_init(&clicert);
77 mbedtls_pk_init(&pkey);
78
79 DEBUG("\n . Seeding the random number generator...");
80 mbedtls_entropy_init(&entropy);
81 if ((ret_val = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, (const unsigned char *) pers,
82 strlen(pers))) != 0) {
83 ERROR(" failed\n ! mbedtls_ctr_drbg_seed returned -0x%x\n", -ret);
84 return ret;
85 } DEBUG("ok\n");
86
87 pNetwork->my_socket = 0;
88 pNetwork->mqttread = iot_tls_read;
89 pNetwork->mqttwrite = iot_tls_write;
90 pNetwork->disconnect = iot_tls_disconnect;
91
92 return ret_val;
93}
94
95int iot_tls_connect(Network *pNetwork, TLSConnectParams params) {
96 const char *pers = "aws_iot_tls_wrapper";
97 unsigned char buf[MBEDTLS_SSL_MAX_CONTENT_LEN + 1];
98
99 DEBUG(" . Loading the CA root certificate ...");
100 ret = mbedtls_x509_crt_parse_file(&cacert, params.pRootCALocation);
101 if (ret < 0) {
102 ERROR(" failed\n ! mbedtls_x509_crt_parse returned -0x%x\n\n", -ret);
103 return ret;
104 } DEBUG(" ok (%d skipped)\n", ret);
105
106 DEBUG(" . Loading the client cert. and key...");
107 ret = mbedtls_x509_crt_parse_file(&clicert, params.pDeviceCertLocation);
108 if (ret != 0) {
109 ERROR(" failed\n ! mbedtls_x509_crt_parse returned -0x%x\n\n", -ret);
110 return ret;
111 }
112
113 ret = mbedtls_pk_parse_keyfile(&pkey, params.pDevicePrivateKeyLocation, "");
114 if (ret != 0) {
115 ERROR(" failed\n ! mbedtls_pk_parse_key returned -0x%x\n\n", -ret);
116 return ret;
117 } DEBUG(" ok\n");
118 char portBuffer[6];
119 sprintf(portBuffer, "%d", params.DestinationPort); DEBUG(" . Connecting to %s/%s...", params.pDestinationURL, portBuffer);
120 if ((ret = mbedtls_net_connect(&server_fd, params.pDestinationURL, portBuffer, MBEDTLS_NET_PROTO_TCP)) != 0) {
121 ERROR(" failed\n ! mbedtls_net_connect returned -0x%x\n\n", -ret);
122 return ret;
123 }
124
125 ret = mbedtls_net_set_block(&server_fd);
126 if (ret != 0) {
127 ERROR(" failed\n ! net_set_(non)block() returned -0x%x\n\n", -ret);
128 return ret;
129 } DEBUG(" ok\n");
130
131 DEBUG(" . Setting up the SSL/TLS structure...");
132 if ((ret = mbedtls_ssl_config_defaults(&conf, MBEDTLS_SSL_IS_CLIENT, MBEDTLS_SSL_TRANSPORT_STREAM,
133 MBEDTLS_SSL_PRESET_DEFAULT)) != 0) {
134 ERROR(" failed\n ! mbedtls_ssl_config_defaults returned -0x%x\n\n", -ret);
135 return ret;
136 }
137
138 mbedtls_ssl_conf_verify(&conf, myCertVerify, NULL);
139 if (params.ServerVerificationFlag == true) {
140 mbedtls_ssl_conf_authmode(&conf, MBEDTLS_SSL_VERIFY_REQUIRED);
141 } else {
142 mbedtls_ssl_conf_authmode(&conf, MBEDTLS_SSL_VERIFY_OPTIONAL);
143 }
144 mbedtls_ssl_conf_rng(&conf, mbedtls_ctr_drbg_random, &ctr_drbg);
145
146 mbedtls_ssl_conf_ca_chain(&conf, &cacert, NULL);
147 if ((ret = mbedtls_ssl_conf_own_cert(&conf, &clicert, &pkey)) != 0) {
148 ERROR(" failed\n ! mbedtls_ssl_conf_own_cert returned %d\n\n", ret);
149 return ret;
150 }
151
152 mbedtls_ssl_conf_read_timeout(&conf, params.timeout_ms);
153
154 if ((ret = mbedtls_ssl_setup(&ssl, &conf)) != 0) {
155 ERROR(" failed\n ! mbedtls_ssl_setup returned -0x%x\n\n", -ret);
156 return ret;
157 }
158 if ((ret = mbedtls_ssl_set_hostname(&ssl, params.pDestinationURL)) != 0) {
159 ERROR(" failed\n ! mbedtls_ssl_set_hostname returned %d\n\n", ret);
160 return ret;
161 }
162 mbedtls_ssl_set_bio(&ssl, &server_fd, mbedtls_net_send, NULL, mbedtls_net_recv_timeout);
163 DEBUG(" ok\n");
164
165 DEBUG(" . Performing the SSL/TLS handshake...");
166 while ((ret = mbedtls_ssl_handshake(&ssl)) != 0) {
167 if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
168 ERROR(" failed\n ! mbedtls_ssl_handshake returned -0x%x\n", -ret);
169 if (ret == MBEDTLS_ERR_X509_CERT_VERIFY_FAILED) {
170 ERROR(" Unable to verify the server's certificate. "
171 "Either it is invalid,\n"
172 " or you didn't set ca_file or ca_path "
173 "to an appropriate value.\n"
174 " Alternatively, you may want to use "
175 "auth_mode=optional for testing purposes.\n");
176 }
177 return ret;
178 }
179 }
180
181 DEBUG(" ok\n [ Protocol is %s ]\n [ Ciphersuite is %s ]\n", mbedtls_ssl_get_version(&ssl), mbedtls_ssl_get_ciphersuite(&ssl));
182 if ((ret = mbedtls_ssl_get_record_expansion(&ssl)) >= 0) {
183 DEBUG(" [ Record expansion is %d ]\n", ret);
184 } else {
185 DEBUG(" [ Record expansion is unknown (compression) ]\n");
186 }
187
188 DEBUG(" . Verifying peer X.509 certificate...");
189
190 if (params.ServerVerificationFlag == true) {
191 if ((flags = mbedtls_ssl_get_verify_result(&ssl)) != 0) {
192 char vrfy_buf[512];
193 ERROR(" failed\n");
194 mbedtls_x509_crt_verify_info(vrfy_buf, sizeof(vrfy_buf), " ! ", flags);
195 ERROR("%s\n", vrfy_buf);
196 } else {
197 DEBUG(" ok\n");
198 ret = NONE_ERROR;
199 }
200 } else {
201 DEBUG(" Server Verification skipped\n");
202 ret = NONE_ERROR;
203 }
204
205 if (mbedtls_ssl_get_peer_cert(&ssl) != NULL) {
206 DEBUG(" . Peer certificate information ...\n");
207 mbedtls_x509_crt_info((char *) buf, sizeof(buf) - 1, " ", mbedtls_ssl_get_peer_cert(&ssl));
208 DEBUG("%s\n", buf);
209 }
210
211 mbedtls_ssl_conf_read_timeout(&conf, 10);
212
213 return ret;
214}
215
216int iot_tls_write(Network *pNetwork, unsigned char *pMsg, int len, int timeout_ms) {
217
218 int written;
219 int frags;
220
221 for (written = 0, frags = 0; written < len; written += ret, frags++) {
222 while ((ret = mbedtls_ssl_write(&ssl, pMsg + written, len - written)) <= 0) {
223 if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
224 ERROR(" failed\n ! mbedtls_ssl_write returned -0x%x\n\n", -ret);
225 return ret;
226 }
227 }
228 }
229 return written;
230}
231
232int iot_tls_read(Network *pNetwork, unsigned char *pMsg, int len, int timeout_ms) {
233 int rxLen = 0;
234 bool isErrorFlag = false;
235 bool isCompleteFlag = false;
236
237// mbedtls_ssl_conf_read_timeout(&conf, timeout_ms);
238
239 do {
240 ret = mbedtls_ssl_read(&ssl, pMsg, len);
241 if (ret > 0) {
242 rxLen += ret;
243 } else if (ret != MBEDTLS_ERR_SSL_WANT_READ) {
244 isErrorFlag = true;
245 }
246 if (rxLen >= len) {
247 isCompleteFlag = true;
248 }
249 } while (!isErrorFlag && !isCompleteFlag);
250
251 return ret;
252}
253
254void iot_tls_disconnect(Network *pNetwork) {
255 do {
256 ret = mbedtls_ssl_close_notify(&ssl);
257 } while (ret == MBEDTLS_ERR_SSL_WANT_WRITE);
258}
259
260int iot_tls_destroy(Network *pNetwork) {
261
262 mbedtls_net_free(&server_fd);
263
264 mbedtls_x509_crt_free(&clicert);
265 mbedtls_x509_crt_free(&cacert);
266 mbedtls_pk_free(&pkey);
267 mbedtls_ssl_free(&ssl);
268 mbedtls_ssl_config_free(&conf);
269 mbedtls_ctr_drbg_free(&ctr_drbg);
270 mbedtls_entropy_free(&entropy);
271
272 return 0;
273}
diff --git a/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/hostname_compare.c b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/hostname_compare.c
new file mode 100644
index 0000000..ec21937
--- /dev/null
+++ b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/hostname_compare.c
@@ -0,0 +1,73 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16#include "hostname_compare.h"
17
18#include <string.h>
19#include "rawstr.h"
20
21// https://github.com/bagder/curl/blob/master/lib/hostcheck.c
22
23int hostmatch(const char *hostname, const char *pattern) {
24 const char *pattern_label_end, *pattern_wildcard, *hostname_label_end;
25 int wildcard_enabled;
26 size_t prefixlen, suffixlen;
27
28 /* normalize pattern and hostname by stripping off trailing dots */
29// size_t len = strlen(hostname);
30// if (hostname[len - 1] == '.')
31// hostname[len - 1] = 0;
32// len = strlen(pattern);
33// if (pattern[len - 1] == '.')
34// pattern[len - 1] = 0;
35
36 pattern_wildcard = strchr(pattern, '*');
37 if (pattern_wildcard == NULL)
38 return Curl_raw_equal(pattern, hostname) ?
39 CURL_HOST_MATCH : CURL_HOST_NOMATCH;
40
41 /* We require at least 2 dots in pattern to avoid too wide wildcard
42 match. */
43 wildcard_enabled = 1;
44 pattern_label_end = strchr(pattern, '.');
45 if (pattern_label_end == NULL || strchr(pattern_label_end + 1, '.') == NULL
46 || pattern_wildcard > pattern_label_end
47 || Curl_raw_nequal(pattern, "xn--", 4)) {
48 wildcard_enabled = 0;
49 }
50 if (!wildcard_enabled)
51 return Curl_raw_equal(pattern, hostname) ?
52 CURL_HOST_MATCH :
53 CURL_HOST_NOMATCH;
54
55 hostname_label_end = strchr(hostname, '.');
56 if (hostname_label_end == NULL
57 || !Curl_raw_equal(pattern_label_end, hostname_label_end))
58 return CURL_HOST_NOMATCH;
59
60 /* The wildcard must match at least one character, so the left-most
61 label of the hostname is at least as large as the left-most label
62 of the pattern. */
63 if (hostname_label_end - hostname < pattern_label_end - pattern)
64 return CURL_HOST_NOMATCH;
65
66 prefixlen = pattern_wildcard - pattern;
67 suffixlen = pattern_label_end - (pattern_wildcard + 1);
68 return Curl_raw_nequal(pattern, hostname, prefixlen)
69 && Curl_raw_nequal(pattern_wildcard + 1,
70 hostname_label_end - suffixlen, suffixlen) ?
71 CURL_HOST_MATCH : CURL_HOST_NOMATCH;
72}
73
diff --git a/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/hostname_compare.h b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/hostname_compare.h
new file mode 100644
index 0000000..1a6dbdc
--- /dev/null
+++ b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/hostname_compare.h
@@ -0,0 +1,24 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16#ifndef SRC_PROTOCOL_MQTT_PAHO_EMBEDDEDC_PLATFORM_LINUX_HOSTNAME_COMPARE_H_
17#define SRC_PROTOCOL_MQTT_PAHO_EMBEDDEDC_PLATFORM_LINUX_HOSTNAME_COMPARE_H_
18
19#define CURL_HOST_MATCH 1
20#define CURL_HOST_NOMATCH 0
21
22int hostmatch(const char *hostname, const char *pattern);
23
24#endif /* SRC_PROTOCOL_MQTT_PAHO_EMBEDDEDC_PLATFORM_LINUX_HOSTNAME_COMPARE_H_ */
diff --git a/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/network_openssl_wrapper.c b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/network_openssl_wrapper.c
new file mode 100644
index 0000000..e3b86c2
--- /dev/null
+++ b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/network_openssl_wrapper.c
@@ -0,0 +1,379 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16#include <openssl/ssl.h>
17#include <openssl/err.h>
18#include <openssl/pem.h>
19#include <openssl/x509.h>
20#include <openssl/x509_vfy.h>
21#include <sys/socket.h>
22#include <fcntl.h>
23#include <sys/select.h>
24#include <arpa/inet.h>
25#include <netinet/in.h>
26#include <netdb.h>
27
28#include "aws_iot_error.h"
29#include "network_interface.h"
30#include "openssl_hostname_validation.h"
31
32static SSL_CTX *pSSLContext;
33static SSL *pSSLHandle;
34static int server_TCPSocket;
35static char* pDestinationURL;
36
37static int Create_TCPSocket(void);
38static IoT_Error_t Connect_TCPSocket(int socket_fd, char *pURLString, int port);
39static IoT_Error_t setSocketToNonBlocking(int server_fd);
40static IoT_Error_t ConnectOrTimeoutOrExitOnError(SSL *pSSL, int timeout_ms);
41static IoT_Error_t ReadOrTimeoutOrExitOnError(SSL *pSSL, unsigned char *msg, int totalLen, int timeout_ms);
42
43int iot_tls_init(Network *pNetwork) {
44
45 IoT_Error_t ret_val = NONE_ERROR;
46 const SSL_METHOD *method;
47
48 OpenSSL_add_all_algorithms();
49 ERR_load_BIO_strings();
50 ERR_load_crypto_strings();
51 SSL_load_error_strings();
52
53 if (SSL_library_init() < 0) {
54 ret_val = SSL_INIT_ERROR;
55 }
56
57 method = TLSv1_2_method();
58
59 if ((pSSLContext = SSL_CTX_new(method)) == NULL) {
60 ret_val = SSL_INIT_ERROR;
61 }
62
63 pNetwork->my_socket = 0;
64 pNetwork->mqttread = iot_tls_read;
65 pNetwork->mqttwrite = iot_tls_write;
66 pNetwork->disconnect = iot_tls_disconnect;
67
68 return ret_val;
69}
70
71int tls_server_certificate_verify(int preverify_ok, X509_STORE_CTX *pX509CTX){
72 // preverify_ok
73 // 0 ==> Fail
74 // 1 ==> Pass
75 int verification_return = 0;
76
77 //last certificate(depth = 0) is the one provided by the Server
78 if((X509_STORE_CTX_get_error_depth(pX509CTX) == 0) && (preverify_ok == 1)){
79 X509 *pX509Cert;
80 HostnameValidationResult result;
81 pX509Cert = X509_STORE_CTX_get_current_cert(pX509CTX);
82 result = validate_hostname(pDestinationURL, pX509Cert);
83 if(MatchFound == result){
84 verification_return = 1;
85 }
86 }
87 else{
88 verification_return = preverify_ok;
89 }
90
91 return verification_return;
92}
93
94int iot_tls_connect(Network *pNetwork, TLSConnectParams params) {
95
96 IoT_Error_t ret_val = NONE_ERROR;
97 int connect_status = 0;
98
99 server_TCPSocket = Create_TCPSocket();
100 if(-1 == server_TCPSocket){
101 ret_val = TCP_SETUP_ERROR;
102 return ret_val;
103 }
104
105 if (!SSL_CTX_load_verify_locations(pSSLContext, params.pRootCALocation, NULL)) {
106 ret_val = SSL_CERT_ERROR;
107 }
108
109 if (!SSL_CTX_use_certificate_file(pSSLContext, params.pDeviceCertLocation, SSL_FILETYPE_PEM)) {
110 ret_val = SSL_CERT_ERROR;
111 }
112
113 if(1 != SSL_CTX_use_PrivateKey_file(pSSLContext, params.pDevicePrivateKeyLocation, SSL_FILETYPE_PEM)){
114 ret_val = SSL_CERT_ERROR;
115 }
116 if(params.ServerVerificationFlag){
117 SSL_CTX_set_verify(pSSLContext, SSL_VERIFY_PEER, tls_server_certificate_verify);
118 }
119 else{
120 SSL_CTX_set_verify(pSSLContext, SSL_VERIFY_PEER, NULL);
121 }
122
123 pSSLHandle = SSL_new(pSSLContext);
124
125 pDestinationURL = params.pDestinationURL;
126 ret_val = Connect_TCPSocket(server_TCPSocket, params.pDestinationURL, params.DestinationPort);
127 if(NONE_ERROR != ret_val){
128 return ret_val;
129 }
130
131 SSL_set_fd(pSSLHandle, server_TCPSocket);
132
133 if(NONE_ERROR == ret_val){
134 ret_val = setSocketToNonBlocking(server_TCPSocket);
135 }
136
137 if(NONE_ERROR == ret_val){
138 ret_val = ConnectOrTimeoutOrExitOnError(pSSLHandle, params.timeout_ms);
139 if(X509_V_OK != SSL_get_verify_result(pSSLHandle)){
140 ret_val = SSL_CONNECT_ERROR;
141 }
142 else{
143 // ensure you have a valid certificate returned, otherwise no certificate exchange happened
144 if(NULL == SSL_get_peer_certificate(pSSLHandle)){
145 ret_val = SSL_CONNECT_ERROR;
146 }
147 }
148 }
149 return ret_val;
150}
151
152int iot_tls_write(Network *pNetwork, unsigned char *pMsg, int len, int timeout_ms){
153
154 return WriteOrTimeoutOrExitOnError(pSSLHandle, pMsg, len, timeout_ms);
155}
156
157int iot_tls_read(Network *pNetwork, unsigned char *pMsg, int len, int timeout_ms) {
158 return ReadOrTimeoutOrExitOnError(pSSLHandle, pMsg, len, timeout_ms);
159}
160
161void iot_tls_disconnect(Network *pNetwork){
162 close(server_TCPSocket);
163}
164
165int iot_tls_destroy(Network *pNetwork) {
166 SSL_free(pSSLHandle);
167 SSL_CTX_free(pSSLContext);
168 return 0;
169}
170
171int Create_TCPSocket(void) {
172 int sockfd;
173 sockfd = socket(AF_INET, SOCK_STREAM, 0);
174 return sockfd;
175}
176
177IoT_Error_t Connect_TCPSocket(int socket_fd, char *pURLString, int port) {
178 IoT_Error_t ret_val = TCP_CONNECT_ERROR;
179 int connect_status = -1;
180 struct hostent *host;
181 struct sockaddr_in dest_addr;
182
183 host = gethostbyname(pURLString);
184
185 if (NULL != host) {
186 dest_addr.sin_family = AF_INET;
187 dest_addr.sin_port = htons(port);
188 dest_addr.sin_addr.s_addr = *(long*) (host->h_addr);
189 memset(&(dest_addr.sin_zero), '\0', 8);
190
191 connect_status = connect(socket_fd, (struct sockaddr *) &dest_addr,
192 sizeof(struct sockaddr));
193 if (-1 != connect_status) {
194 ret_val = NONE_ERROR;
195 }
196 }
197 return ret_val;
198}
199
200IoT_Error_t setSocketToNonBlocking( server_fd) {
201
202 int flags, status;
203 IoT_Error_t ret_val = NONE_ERROR;
204
205 flags = fcntl(server_TCPSocket, F_GETFL, 0);
206 // set underlying socket to non blocking
207 if (flags < 0) {
208 ret_val = TCP_CONNECT_ERROR;
209 }
210
211 status = fcntl(server_TCPSocket, F_SETFL, flags | O_NONBLOCK);
212 if (status < 0) {
213 ret_val = TCP_CONNECT_ERROR;
214 }
215
216 return ret_val;
217}
218
219IoT_Error_t ConnectOrTimeoutOrExitOnError(SSL *pSSL, int timeout_ms){
220
221 enum{
222 SSL_CONNECTED = 1,
223 SELECT_TIMEOUT = 0,
224 SELECT_ERROR = -1
225 };
226
227 IoT_Error_t ret_val = NONE_ERROR;
228 int rc = 0;
229 fd_set readFds;
230 fd_set writeFds;
231 struct timeval timeout = {0, timeout_ms*1000};
232 int errorCode = 0;
233 int select_retCode = SELECT_TIMEOUT;
234
235 do{
236 rc = SSL_connect(pSSL);
237
238 if(SSL_CONNECTED == rc){
239 ret_val = NONE_ERROR;
240 break;
241 }
242
243 errorCode = SSL_get_error(pSSL, rc);
244
245 if(errorCode == SSL_ERROR_WANT_READ){
246 FD_ZERO(&readFds);
247 FD_SET(server_TCPSocket, &readFds);
248 select_retCode = select(server_TCPSocket + 1, (void *) &readFds, NULL, NULL, &timeout);
249 if (SELECT_TIMEOUT == select_retCode) {
250 ret_val = SSL_CONNECT_TIMEOUT_ERROR;
251 } else if (SELECT_ERROR == select_retCode) {
252 ret_val = SSL_CONNECT_ERROR;
253 }
254 }
255
256 else if(errorCode == SSL_ERROR_WANT_WRITE){
257 FD_ZERO(&writeFds);
258 FD_SET(server_TCPSocket, &writeFds);
259 select_retCode = select(server_TCPSocket + 1, NULL, (void *) &writeFds, NULL, &timeout);
260 if (SELECT_TIMEOUT == select_retCode) {
261 ret_val = SSL_CONNECT_TIMEOUT_ERROR;
262 } else if (SELECT_ERROR == select_retCode) {
263 ret_val = SSL_CONNECT_ERROR;
264 }
265 }
266
267 else{
268 ret_val = SSL_CONNECT_ERROR;
269 }
270
271 }while(SSL_CONNECT_ERROR != ret_val && SSL_CONNECT_TIMEOUT_ERROR != ret_val);
272
273 return ret_val;
274}
275
276IoT_Error_t WriteOrTimeoutOrExitOnError(SSL *pSSL, unsigned char *msg, int totalLen, int timeout_ms){
277
278
279 IoT_Error_t errorStatus = NONE_ERROR;
280
281 fd_set writeFds;
282 enum{
283 SELECT_TIMEOUT = 0,
284 SELECT_ERROR = -1
285 };
286 int errorCode = 0;
287 int select_retCode;
288 int writtenLength = 0;
289 int rc = 0;
290 int returnCode = 0;
291 struct timeval timeout = {0, timeout_ms*1000};
292
293 do{
294 rc = SSL_write(pSSL, msg, totalLen);
295
296 errorCode = SSL_get_error(pSSL, rc);
297
298 if(0 < rc){
299 writtenLength += rc;
300 }
301
302 else if (errorCode == SSL_ERROR_WANT_WRITE) {
303 FD_ZERO(&writeFds);
304 FD_SET(server_TCPSocket, &writeFds);
305 select_retCode = select(server_TCPSocket + 1, NULL, (void *) &writeFds, NULL, &timeout);
306 if (SELECT_TIMEOUT == select_retCode) {
307 errorStatus = SSL_WRITE_TIMEOUT_ERROR;
308 } else if (SELECT_ERROR == select_retCode) {
309 errorStatus = SSL_WRITE_ERROR;
310 }
311 }
312
313 else{
314 errorStatus = SSL_WRITE_ERROR;
315 }
316
317 }while(SSL_WRITE_ERROR != errorStatus && SSL_WRITE_TIMEOUT_ERROR != errorStatus && writtenLength < totalLen);
318
319 if(NONE_ERROR == errorStatus){
320 returnCode = writtenLength;
321 }
322 else{
323 returnCode = errorStatus;
324 }
325
326 return returnCode;
327}
328
329IoT_Error_t ReadOrTimeoutOrExitOnError(SSL *pSSL, unsigned char *msg, int totalLen, int timeout_ms){
330
331
332 IoT_Error_t errorStatus = NONE_ERROR;
333
334 fd_set readFds;
335 enum{
336 SELECT_TIMEOUT = 0,
337 SELECT_ERROR = -1
338 };
339 int errorCode = 0;
340 int select_retCode;
341 int readLength = 0;
342 int rc = 0;
343 int returnCode = 0;
344 struct timeval timeout = {0, timeout_ms*1000};
345
346 do{
347 rc = SSL_read(pSSL, msg, totalLen);
348 errorCode = SSL_get_error(pSSL, rc);
349
350 if(0 < rc){
351 readLength += rc;
352 }
353
354 else if (errorCode == SSL_ERROR_WANT_READ) {
355 FD_ZERO(&readFds);
356 FD_SET(server_TCPSocket, &readFds);
357 select_retCode = select(server_TCPSocket + 1, (void *) &readFds, NULL, NULL, &timeout);
358 if (SELECT_TIMEOUT == select_retCode) {
359 errorStatus = SSL_READ_TIMEOUT_ERROR;
360 } else if (SELECT_ERROR == select_retCode) {
361 errorStatus = SSL_READ_ERROR;
362 }
363 }
364
365 else{
366 errorStatus = SSL_READ_ERROR;
367 }
368
369 }while(SSL_READ_ERROR != errorStatus && SSL_READ_TIMEOUT_ERROR != errorStatus && readLength < totalLen);
370
371 if(NONE_ERROR == errorStatus){
372 returnCode = readLength;
373 }
374 else{
375 returnCode = errorStatus;
376 }
377
378 return returnCode;
379}
diff --git a/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/openssl_hostname_validation.c b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/openssl_hostname_validation.c
new file mode 100644
index 0000000..f5fc8f6
--- /dev/null
+++ b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/openssl_hostname_validation.c
@@ -0,0 +1,154 @@
1/*Copyright (C) 2012, iSEC Partners.
2 *
3 *Permission is hereby granted, free of charge, to any person obtaining a copy of
4 *this software and associated documentation files (the "Software"), to deal in
5 *the Software without restriction, including without limitation the rights to
6 *use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 *of the Software, and to permit persons to whom the Software is furnished to do
8 *so, subject to the following conditions:
9 *
10 *The above copyright notice and this permission notice shall be included in all
11 *copies or substantial portions of the Software.
12 *
13 *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 *SOFTWARE.
20 *
21 */
22
23#include "openssl_hostname_validation.h"
24
25#include <strings.h>
26
27
28#include "hostname_compare.h"
29
30#define HOSTNAME_MAX_SIZE 255
31
32/**
33 * Tries to find a match for hostname in the certificate's Common Name field.
34 *
35 * Returns MatchFound if a match was found.
36 * Returns MatchNotFound if no matches were found.
37 * Returns MalformedCertificate if the Common Name had a NUL character embedded in it.
38 * Returns Error if the Common Name could not be extracted.
39 */
40static HostnameValidationResult matches_common_name(const char *hostname,
41 const X509 *server_cert) {
42 int common_name_loc = -1;
43 X509_NAME_ENTRY *common_name_entry = NULL;
44 ASN1_STRING *common_name_asn1 = NULL;
45 char *common_name_str = NULL;
46
47 // Find the position of the CN field in the Subject field of the certificate
48 common_name_loc = X509_NAME_get_index_by_NID(
49 X509_get_subject_name((X509 *) server_cert), NID_commonName, -1);
50 if (common_name_loc < 0) {
51 return Error;
52 }
53
54 // Extract the CN field
55 common_name_entry = X509_NAME_get_entry(
56 X509_get_subject_name((X509 *) server_cert), common_name_loc);
57 if (common_name_entry == NULL) {
58 return Error;
59 }
60
61 // Convert the CN field to a C string
62 common_name_asn1 = X509_NAME_ENTRY_get_data(common_name_entry);
63 if (common_name_asn1 == NULL) {
64 return Error;
65 }
66 common_name_str = (char *) ASN1_STRING_data(common_name_asn1);
67
68 // Make sure there isn't an embedded NUL character in the CN
69 if (ASN1_STRING_length(common_name_asn1) != strlen(common_name_str)) {
70 return MalformedCertificate;
71 }
72
73 // Compare expected hostname with the CN
74 if (hostmatch(hostname, common_name_str) == CURL_HOST_MATCH) {
75 return MatchFound;
76 } else {
77 return MatchNotFound;
78 }
79}
80
81/**
82 * Tries to find a match for hostname in the certificate's Subject Alternative Name extension.
83 *
84 * Returns MatchFound if a match was found.
85 * Returns MatchNotFound if no matches were found.
86 * Returns MalformedCertificate if any of the hostnames had a NUL character embedded in it.
87 * Returns NoSANPresent if the SAN extension was not present in the certificate.
88 */
89static HostnameValidationResult matches_subject_alternative_name(
90 const char *hostname, const X509 *server_cert) {
91 HostnameValidationResult result = MatchNotFound;
92 int i;
93 int san_names_nb = -1;
94 STACK_OF(GENERAL_NAME) *san_names = NULL;
95
96 // Try to extract the names within the SAN extension from the certificate
97 san_names = X509_get_ext_d2i((X509 *) server_cert, NID_subject_alt_name,
98 NULL, NULL);
99 if (san_names == NULL) {
100 return NoSANPresent;
101 }
102
103 san_names_nb = sk_GENERAL_NAME_num(san_names);
104 // Check each name within the extension
105 for (i = 0; i < san_names_nb; i++) {
106 const GENERAL_NAME *current_name = sk_GENERAL_NAME_value(san_names, i);
107
108 if (current_name->type == GEN_DNS) {
109 // Current name is a DNS name, let's check it
110 char *dns_name = (char *) ASN1_STRING_data(current_name->d.dNSName);
111
112 // Make sure there isn't an embedded NUL character in the DNS name
113 if (ASN1_STRING_length(current_name->d.dNSName)
114 != strlen(dns_name)) {
115 result = MalformedCertificate;
116 break;
117 } else { // Compare expected hostname with the DNS name
118 if (hostmatch(hostname, dns_name) == CURL_HOST_MATCH) {
119 result = MatchFound;
120 break;
121 }
122 }
123 }
124 }
125 sk_GENERAL_NAME_pop_free(san_names, GENERAL_NAME_free);
126
127 return result;
128}
129
130/**
131 * Validates the server's identity by looking for the expected hostname in the
132 * server's certificate. As described in RFC 6125, it first tries to find a match
133 * in the Subject Alternative Name extension. If the extension is not present in
134 * the certificate, it checks the Common Name instead.
135 *
136 * Returns MatchFound if a match was found.
137 * Returns MatchNotFound if no matches were found.
138 * Returns MalformedCertificate if any of the hostnames had a NUL character embedded in it.
139 * Returns Error if there was an error.
140 */
141HostnameValidationResult validate_hostname(const char *hostname, const X509 *server_cert) {
142 HostnameValidationResult result;
143
144 if ((hostname == NULL) || (server_cert == NULL))
145 return Error;
146 // First try the Subject Alternative Names extension
147 result = matches_subject_alternative_name(hostname, server_cert);
148 if (result == NoSANPresent) {
149 // Extension was not found: try the Common Name
150 result = matches_common_name(hostname, server_cert);
151 }
152
153 return result;
154}
diff --git a/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/openssl_hostname_validation.h b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/openssl_hostname_validation.h
new file mode 100644
index 0000000..cb1c18f
--- /dev/null
+++ b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/openssl_hostname_validation.h
@@ -0,0 +1,45 @@
1/*Copyright (C) 2012, iSEC Partners.
2 *
3 *Permission is hereby granted, free of charge, to any person obtaining a copy of
4 *this software and associated documentation files (the "Software"), to deal in
5 *the Software without restriction, including without limitation the rights to
6 *use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 *of the Software, and to permit persons to whom the Software is furnished to do
8 *so, subject to the following conditions:
9 *
10 *The above copyright notice and this permission notice shall be included in all
11 *copies or substantial portions of the Software.
12 *
13 *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 *SOFTWARE.
20 *
21 */
22
23#include <openssl/x509v3.h>
24#include <openssl/ssl.h>
25
26typedef enum {
27 MatchFound,
28 MatchNotFound,
29 NoSANPresent,
30 MalformedCertificate,
31 Error
32} HostnameValidationResult;
33
34/**
35* Validates the server's identity by looking for the expected hostname in the
36* server's certificate. As described in RFC 6125, it first tries to find a match
37* in the Subject Alternative Name extension. If the extension is not present in
38* the certificate, it checks the Common Name instead.
39*
40* Returns MatchFound if a match was found.
41* Returns MatchNotFound if no matches were found.
42* Returns MalformedCertificate if any of the hostnames had a NUL character embedded in it.
43* Returns Error if there was an error.
44*/
45HostnameValidationResult validate_hostname(const char *hostname, const X509 *server_cert);
diff --git a/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/rawstr.c b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/rawstr.c
new file mode 100644
index 0000000..d95cc5b
--- /dev/null
+++ b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/rawstr.c
@@ -0,0 +1,139 @@
1/***************************************************************************
2 * _ _ ____ _
3 * Project ___| | | | _ \| |
4 * / __| | | | |_) | |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
7 *
8 * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
9 *
10 * This software is licensed as described in the file COPYING, which
11 * you should have received as part of this distribution. The terms
12 * are also available at http://curl.haxx.se/docs/copyright.html.
13 *
14 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 * copies of the Software, and permit persons to whom the Software is
16 * furnished to do so, under the terms of the COPYING file.
17 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 ***************************************************************************/
22#include "rawstr.h"
23
24/* Portable, consistent toupper (remember EBCDIC). Do not use toupper() because
25 its behavior is altered by the current locale. */
26char Curl_raw_toupper(char in)
27{
28 switch (in) {
29 case 'a':
30 return 'A';
31 case 'b':
32 return 'B';
33 case 'c':
34 return 'C';
35 case 'd':
36 return 'D';
37 case 'e':
38 return 'E';
39 case 'f':
40 return 'F';
41 case 'g':
42 return 'G';
43 case 'h':
44 return 'H';
45 case 'i':
46 return 'I';
47 case 'j':
48 return 'J';
49 case 'k':
50 return 'K';
51 case 'l':
52 return 'L';
53 case 'm':
54 return 'M';
55 case 'n':
56 return 'N';
57 case 'o':
58 return 'O';
59 case 'p':
60 return 'P';
61 case 'q':
62 return 'Q';
63 case 'r':
64 return 'R';
65 case 's':
66 return 'S';
67 case 't':
68 return 'T';
69 case 'u':
70 return 'U';
71 case 'v':
72 return 'V';
73 case 'w':
74 return 'W';
75 case 'x':
76 return 'X';
77 case 'y':
78 return 'Y';
79 case 'z':
80 return 'Z';
81 }
82 return in;
83}
84
85/*
86 * Curl_raw_equal() is for doing "raw" case insensitive strings. This is meant
87 * to be locale independent and only compare strings we know are safe for
88 * this. See http://daniel.haxx.se/blog/2008/10/15/strcasecmp-in-turkish/ for
89 * some further explanation to why this function is necessary.
90 *
91 * The function is capable of comparing a-z case insensitively even for
92 * non-ascii.
93 */
94
95int Curl_raw_equal(const char *first, const char *second)
96{
97 while(*first && *second) {
98 if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
99 /* get out of the loop as soon as they don't match */
100 break;
101 first++;
102 second++;
103 }
104 /* we do the comparison here (possibly again), just to make sure that if the
105 loop above is skipped because one of the strings reached zero, we must not
106 return this as a successful match */
107 return (Curl_raw_toupper(*first) == Curl_raw_toupper(*second));
108}
109
110int Curl_raw_nequal(const char *first, const char *second, size_t max)
111{
112 while(*first && *second && max) {
113 if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second)) {
114 break;
115 }
116 max--;
117 first++;
118 second++;
119 }
120 if(0 == max)
121 return 1; /* they are equal this far */
122
123 return Curl_raw_toupper(*first) == Curl_raw_toupper(*second);
124}
125
126/* Copy an upper case version of the string from src to dest. The
127 * strings may overlap. No more than n characters of the string are copied
128 * (including any NUL) and the destination string will NOT be
129 * NUL-terminated if that limit is reached.
130 */
131void Curl_strntoupper(char *dest, const char *src, size_t n)
132{
133 if(n < 1)
134 return;
135
136 do {
137 *dest++ = Curl_raw_toupper(*src);
138 } while(*src++ && --n);
139}
diff --git a/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/rawstr.h b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/rawstr.h
new file mode 100644
index 0000000..81087b7
--- /dev/null
+++ b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl/rawstr.h
@@ -0,0 +1,46 @@
1#ifndef HEADER_CURL_RAWSTR_H
2#define HEADER_CURL_RAWSTR_H
3/***************************************************************************
4 * _ _ ____ _
5 * Project ___| | | | _ \| |
6 * / __| | | | |_) | |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
9 *
10 * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
11 *
12 * This software is licensed as described in the file COPYING, which
13 * you should have received as part of this distribution. The terms
14 * are also available at http://curl.haxx.se/docs/copyright.html.
15 *
16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 * copies of the Software, and permit persons to whom the Software is
18 * furnished to do so, under the terms of the COPYING file.
19 *
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
22 *
23 ***************************************************************************/
24
25#include "stddef.h"
26/*
27 * Curl_raw_equal() is for doing "raw" case insensitive strings. This is meant
28 * to be locale independent and only compare strings we know are safe for
29 * this.
30 *
31 * The function is capable of comparing a-z case insensitively even for
32 * non-ascii.
33 */
34int Curl_raw_equal(const char *first, const char *second);
35int Curl_raw_nequal(const char *first, const char *second, size_t max);
36
37char Curl_raw_toupper(char in);
38
39/* checkprefix() is a shorter version of the above, used when the first
40 argument is zero-byte terminated */
41#define checkprefix(a,b) Curl_raw_nequal(a,b,strlen(a))
42
43void Curl_strntoupper(char *dest, const char *src, size_t n);
44
45#endif /* HEADER_CURL_RAWSTR_H */
46
diff --git a/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/timer_interface.h b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/timer_interface.h
new file mode 100644
index 0000000..cec73f0
--- /dev/null
+++ b/aws_iot_src/protocol/mqtt/aws_iot_embedded_client_wrapper/timer_interface.h
@@ -0,0 +1,92 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Allan Stockdill-Mander - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17/**
18 * @file timer_interface.h
19 * @brief Timer interface definition for MQTT client.
20 *
21 * Defines an interface to timers that can be used by other system
22 * components. MQTT client requires timers to handle timeouts and
23 * MQTT keep alive.
24 * Starting point for porting the SDK to the timer hardware layer of a new platform.
25 */
26
27#ifndef __TIMER_INTERFACE_H_
28#define __TIMER_INTERFACE_H_
29
30// Add the platform specific timer includes to define the Timer struct
31#include "timer_linux.h"
32
33/**
34 * @brief Timer Type
35 *
36 * Forward declaration of a timer struct. The definition of this struct is
37 * platform dependent. When porting to a new platform add this definition
38 * in "timer_<platform>.h" and include that file above.
39 *
40 */
41typedef struct Timer Timer;
42
43/**
44 * @brief Check if a timer is expired
45 *
46 * Call this function passing in a timer to check if that timer has expired.
47 *
48 * @param Timer - pointer to the timer to be checked for expiration
49 * @return character - 1 = timer expired, 0 = timer not expired
50 */
51char expired(Timer*);
52
53/**
54 * @brief Create a timer (milliseconds)
55 *
56 * Sets the timer to expire in a specified number of milliseconds.
57 *
58 * @param Timer - pointer to the timer to be set to expire in milliseconds
59 * @param unsigned int - set the timer to expire in this number of milliseconds
60 */
61void countdown_ms(Timer*, unsigned int);
62
63/**
64 * @brief Create a timer (seconds)
65 *
66 * Sets the timer to expire in a specified number of seconds.
67 *
68 * @param Timer - pointer to the timer to be set to expire in seconds
69 * @param unsigned int - set the timer to expire in this number of seconds
70 */
71void countdown(Timer*, unsigned int);
72
73/**
74 * @brief Check the time remaining on a give timer
75 *
76 * Checks the input timer and returns the number of milliseconds remaining on the timer.
77 *
78 * @param Timer - pointer to the timer to be set to checked
79 * @return int - milliseconds left on the countdown timer
80 */
81int left_ms(Timer*);
82
83/**
84 * @brief Initialize a timer
85 *
86 * Performs any initialization required to the timer passed in.
87 *
88 * @param Timer - pointer to the timer to be initialized
89 */
90void InitTimer(Timer*);
91
92#endif //__TIMER_INTERFACE_H_
diff --git a/aws_iot_src/protocol/mqtt/aws_iot_mqtt_interface.h b/aws_iot_src/protocol/mqtt/aws_iot_mqtt_interface.h
new file mode 100644
index 0000000..d2f3345
--- /dev/null
+++ b/aws_iot_src/protocol/mqtt/aws_iot_mqtt_interface.h
@@ -0,0 +1,287 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16/**
17 * @file mqtt_interface.h
18 * @brief Interface definition for MQTT client.
19 */
20
21#ifndef AWS_IOT_SDK_SRC_IOT_MQTT_INTERFACE_H_
22#define AWS_IOT_SDK_SRC_IOT_MQTT_INTERFACE_H_
23
24#include "stddef.h"
25#include "stdbool.h"
26#include "stdint.h"
27#include "aws_iot_error.h"
28
29/**
30 * @brief MQTT Version Type
31 *
32 * Defining an MQTT version type.
33 *
34 */
35typedef enum {
36 MQTT_3_1 = 3, ///< MQTT 3.1 (protocol message byte = 3)
37 MQTT_3_1_1 = 4 ///< MQTT 3.1.1 (protocol message byte = 4)
38} MQTT_Ver_t;
39
40/**
41 * @brief Quality of Service Type
42 *
43 * Defining a QoS type.
44 * @note QoS 2 is \b NOT supported by the AWS IoT Service at the time of this SDK release.
45 *
46 */
47typedef enum {
48 QOS_0, ///< QoS 0 = at most once delivery
49 QOS_1, ///< QoS 1 = at least once delivery
50 QOS_2 ///< QoS 2 is NOT supported
51} QoSLevel;
52
53/**
54 * @brief Last Will and Testament Definition
55 *
56 * Defining a type for LWT parameters.
57 * @note Retained messages are \b NOT supported by the AWS IoT Service at the time of this SDK release.
58 *
59 */
60typedef struct {
61 const char *pTopicName; ///< LWT Topic
62 const char *pMessage; ///< Message to be delivered as LWT
63 bool isRetained; ///< NOT supported
64 QoSLevel qos; ///< QoS of LWT message
65} MQTTwillOptions;
66extern const MQTTwillOptions MQTTwillOptionsDefault;
67
68/**
69 * @brief Disconnect Callback Handler Type
70 *
71 * Defining a TYPE for definition of disconnect callback function pointers.
72 *
73 */
74typedef void (*iot_disconnect_handler)(void);
75
76/**
77 * @brief MQTT Connection Parameters
78 *
79 * Defining a type for MQTT connection parameters. Passed into client when establishing a connection.
80 *
81 */
82typedef struct {
83 char *pHostURL; ///< Pointer to a string defining the endpoint for the MQTT service
84 uint16_t port; ///< MQTT service listening port
85 char *pRootCALocation; ///< Pointer to a string defining the Root CA file (full file, not path)
86 char *pDeviceCertLocation; ///< Pointer to a string defining the device identity certificate file (full file, not path)
87 char *pDevicePrivateKeyLocation; ///< Pointer to a string defining the device private key file (full file, not path)
88 char *pClientID; ///< Pointer to a string defining the MQTT client ID (this needs to be unique \b per \b device across your AWS account)
89 char *pUserName; ///< Not used in the AWS IoT Service
90 char *pPassword; ///< Not used in the AWS IoT Service
91 MQTT_Ver_t MQTTVersion; ///< Desired MQTT version used during connection
92 uint16_t KeepAliveInterval_sec; ///< MQTT keep alive interval in seconds. Defines inactivity time allowed before determining the connection has been lost.
93 bool isCleansession; ///< MQTT clean session. True = this session is to be treated as clean. Previous server state is cleared and no stated is retained from this connection.
94 bool isWillMsgPresent; ///< Is there a LWT associated with this connection?
95 MQTTwillOptions will; ///< MQTT LWT parameters.
96 uint32_t mqttCommandTimeout_ms; ///< Timeout for MQTT blocking calls. In milliseconds.
97 uint32_t tlsHandshakeTimeout_ms; ///< TLS handshake timeout. In milliseconds.
98 bool isSSLHostnameVerify; ///< Client should perform server certificate hostname validation.
99 iot_disconnect_handler disconnectHandler; ///< Callback to be invoked upon connection loss.
100} MQTTConnectParams;
101extern const MQTTConnectParams MQTTConnectParamsDefault;
102
103/**
104 * @brief MQTT Message Parameters
105 *
106 * Defines a type for properties of MQTT messages including topic, payload an QoS.
107 *
108 */
109typedef struct {
110 QoSLevel qos; ///< Message Quality of Service
111 bool isRetained; ///< Retained messages are \b NOT supported by the AWS IoT Service at the time of this SDK release.
112 bool isDuplicate; ///< Is this message a duplicate QoS > 0 message? Handled automatically by the MQTT client.
113 uint16_t id; ///< Message sequence identifier. Handled automatically by the MQTT client.
114 void *pPayload; ///< Pointer to MQTT message payload (bytes).
115 uint32_t PayloadLen; ///< Length of MQTT payload.
116} MQTTMessageParams;
117extern const MQTTMessageParams MQTTMessageParamsDefault;
118/**
119 * @brief MQTT Callback Function Parameters
120 *
121 * Defines a type for parameters returned to the user upon receipt of a publish message on a subscribed topic.
122 *
123 */
124typedef struct {
125 char *pTopicName; ///< Pointer to the topic string on which the message was delivered. In the case of a wildcard subscription this is the actual topic, not the wildcard filter.
126 uint16_t TopicNameLen; ///< Length of the topic string.
127 MQTTMessageParams MessageParams; ///< Message parameters structure.
128} MQTTCallbackParams;
129extern const MQTTCallbackParams MQTTCallbackParamsDefault;
130
131/**
132 * @brief MQTT Callback Function
133 *
134 * Defines a type for the function pointer which stores the message callback function.
135 * A pointer to the desired callback function to be invoked upon receipt of a message on a subscribed toipc.
136 * Supplied upon subscribing to a topic.
137 *
138 */
139typedef int32_t (*iot_message_handler)(MQTTCallbackParams params);
140
141/**
142 * @brief MQTT Subscription Parameters
143 *
144 * Defines the parameters needed when subscribing to an MQTT topic.
145 *
146 */
147typedef struct {
148 char *pTopic; ///< Pointer to the string defining the desired subscription topic.
149 QoSLevel qos; ///< Quality of service of the subscription.
150 iot_message_handler mHandler; ///< Callback to be invoked upon receipt of a message on the subscribed topic.
151} MQTTSubscribeParams;
152extern const MQTTSubscribeParams MQTTSubscribeParamsDefault;
153
154/**
155 * @brief MQTT Publish Parameters
156 *
157 * Defines a type for parameters supplied when publishing an MQTT message.
158 *
159 */
160typedef struct {
161 char *pTopic; ///< Pointer to the string defining the desired publishing topic.
162 MQTTMessageParams MessageParams; ///< Parameters defining the message to be published.
163} MQTTPublishParams;
164extern const MQTTPublishParams MQTTPublishParamsDefault;
165
166/**
167 * @brief MQTT Connection Function
168 *
169 * Called to establish an MQTT connection with the AWS IoT Service
170 *
171 * @param pParams Pointer to MQTT connection parameters
172 * @return An IoT Error Type defining successful/failed connection
173 */
174IoT_Error_t aws_iot_mqtt_connect(MQTTConnectParams *pParams);
175
176/**
177 * @brief Publish an MQTT message on a topic
178 *
179 * Called to publish an MQTT message on a topic.
180 * @note Call is blocking. In the case of a QoS 0 message the function returns
181 * after the message was successfully passed to the TLS layer. In the case of QoS 1
182 * the function returns after the receipt of the PUBACK control packet.
183 *
184 * @param pParams Pointer to MQTT publish parameters
185 * @return An IoT Error Type defining successful/failed publish
186 */
187IoT_Error_t aws_iot_mqtt_publish(MQTTPublishParams *pParams);
188
189/**
190 * @brief Subscribe to an MQTT topic.
191 *
192 * Called to send a subscribe message to the broker requesting a subscription
193 * to an MQTT topic.
194 * @note Call is blocking. The call returns after the receipt of the SUBACK control packet.
195 *
196 * @param pParams Pointer to MQTT subscribe parameters
197 * @return An IoT Error Type defining successful/failed subscription
198 */
199IoT_Error_t aws_iot_mqtt_subscribe(MQTTSubscribeParams *pParams);
200
201/**
202 * @brief Unsubscribe to an MQTT topic.
203 *
204 * Called to send an usubscribe message to the broker requesting removal of a subscription
205 * to an MQTT topic.
206 * @note Call is blocking. The call returns after the receipt of the UNSUBACK control packet.
207 *
208 * @param pTopic Pointer to the requested topic string. Ensure the string is null terminated
209 * @return An IoT Error Type defining successful/failed unsubscription
210 */
211IoT_Error_t aws_iot_mqtt_unsubscribe(char *pTopic);
212
213/**
214 * @brief Disconnect an MQTT Connection
215 *
216 * Called to send a disconnect message to the broker.
217 *
218 * @return An IoT Error Type defining successful/failed send of the disconnect control packet.
219 */
220IoT_Error_t aws_iot_mqtt_disconnect(void);
221
222/**
223 * @brief Yield to the MQTT client
224 *
225 * Called to yield the current thread to the underlying MQTT client. This time is used by
226 * the MQTT client to manage PING requests to monitor the health of the TCP connection as
227 * well as periodically check the socket receive buffer for subscribe messages. Yield()
228 * must be called at a rate faster than the keepalive interval. It must also be called
229 * at a rate faster than the incoming message rate as this is the only way the client receives
230 * processing time to manage incoming messages.
231 *
232 * @param timeout Maximum number of milliseconds to pass thread execution to the client.
233 * @return An IoT Error Type defining successful/failed client processing.
234 * If this call results in an error it is likely the MQTT connection has dropped.
235 * iot_is_mqtt_connected can be called to confirm.
236 */
237IoT_Error_t aws_iot_mqtt_yield(int timeout);
238
239/**
240 * @brief Is the MQTT client currently connected?
241 *
242 * Called to determine if the MQTT client is currently connected. Used to support logic
243 * in the device application around reconnecting and managing offline state.
244 *
245 * @return true = connected, false = not currently connected
246 */
247bool aws_iot_is_mqtt_connected(void);
248
249typedef IoT_Error_t (*pConnectFunc_t)(MQTTConnectParams *pParams);
250typedef IoT_Error_t (*pPublishFunc_t)(MQTTPublishParams *pParams);
251typedef IoT_Error_t (*pSubscribeFunc_t)(MQTTSubscribeParams *pParams);
252typedef IoT_Error_t (*pUnsubscribeFunc_t)(char *pTopic);
253typedef IoT_Error_t (*pDisconnectFunc_t)(void);
254typedef IoT_Error_t (*pYieldFunc_t)(int timeout);
255typedef bool (*pIsConnectedFunc_t)(void);
256
257/**
258 * @brief MQTT Client Type Definition
259 *
260 * Defines a structure of function pointers, each implementing a corresponding iot_mqtt_*
261 * function. In this way any MQTT client which implements the iot_mqtt_* interface
262 * can be swapped in under the MQTT/Shadow layer.
263 *
264 */
265typedef struct{
266 pConnectFunc_t connect; ///< function implementing the iot_mqtt_connect function
267 pPublishFunc_t publish; ///< function implementing the iot_mqtt_publish function
268 pSubscribeFunc_t subscribe; ///< function implementing the iot_mqtt_subscribe function
269 pUnsubscribeFunc_t unsubscribe; ///< function implementing the iot_mqtt_unsubscribe function
270 pDisconnectFunc_t disconnect; ///< function implementing the iot_mqtt_disconnect function
271 pYieldFunc_t yield; ///< function implementing the iot_mqtt_yield function
272 pIsConnectedFunc_t isConnected; ///< function implementing the iot_is_mqtt_connected function
273}MQTTClient_t;
274
275
276/**
277 * @brief Set the MQTT client
278 *
279 * This function provides a way to pass in an MQTT client implementation to the
280 * AWS IoT MQTT wrapper layer. This is done through function pointers to the
281 * interface functions.
282 *
283 */
284void aws_iot_mqtt_init(MQTTClient_t *pClient);
285
286
287#endif /* AWS_IOT_SDK_SRC_IOT_MQTT_INTERFACE_H_ */
diff --git a/aws_iot_src/shadow/aws_iot_shadow.c b/aws_iot_src/shadow/aws_iot_shadow.c
new file mode 100644
index 0000000..08d4fcd
--- /dev/null
+++ b/aws_iot_src/shadow/aws_iot_shadow.c
@@ -0,0 +1,169 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16#include "aws_iot_error.h"
17#include "aws_iot_log.h"
18#include "aws_iot_shadow_actions.h"
19#include "aws_iot_shadow_json.h"
20#include "aws_iot_shadow_key.h"
21#include "aws_iot_shadow_records.h"
22
23const ShadowParameters_t ShadowParametersDefault = {
24 .pMyThingName = AWS_IOT_MY_THING_NAME,
25 .pMqttClientId = AWS_IOT_MQTT_CLIENT_ID,
26 .pHost = AWS_IOT_MQTT_HOST,
27 .port = AWS_IOT_MQTT_PORT,
28 .pRootCA = NULL,
29 .pClientCRT = NULL,
30 .pClientKey = NULL
31};
32
33void aws_iot_shadow_reset_last_received_version(void) {
34 shadowJsonVersionNum = 0;
35}
36
37uint32_t aws_iot_shadow_get_last_received_version(void) {
38 return shadowJsonVersionNum;
39}
40
41void aws_iot_shadow_enable_discard_old_delta_msgs(void) {
42 shadowDiscardOldDeltaFlag = true;
43}
44
45void aws_iot_shadow_disable_discard_old_delta_msgs(void) {
46 shadowDiscardOldDeltaFlag = false;
47}
48
49IoT_Error_t aws_iot_shadow_init(MQTTClient_t *pClient) {
50
51 IoT_Error_t rc = NONE_ERROR;
52
53 if (pClient == NULL) {
54 return NULL_VALUE_ERROR;
55 }
56
57 resetClientTokenSequenceNum();
58 aws_iot_shadow_reset_last_received_version();
59 initDeltaTokens();
60 return NONE_ERROR;
61}
62
63IoT_Error_t aws_iot_shadow_connect(MQTTClient_t *pClient, ShadowParameters_t *pParams) {
64 IoT_Error_t rc = NONE_ERROR;
65 MQTTConnectParams ConnectParams = MQTTConnectParamsDefault;
66 if (pClient == NULL) {
67 return NULL_VALUE_ERROR;
68 }
69
70 if (pClient->connect == NULL) {
71 return NULL_VALUE_ERROR;
72 }
73
74 ConnectParams.KeepAliveInterval_sec = 10;
75 ConnectParams.MQTTVersion = MQTT_3_1_1;
76 ConnectParams.mqttCommandTimeout_ms = 2000;
77 ConnectParams.tlsHandshakeTimeout_ms = 10000;
78 ConnectParams.isCleansession = true;
79 ConnectParams.isSSLHostnameVerify = true;
80 ConnectParams.isWillMsgPresent = false;
81 ConnectParams.pClientID = pParams->pMqttClientId;
82 ConnectParams.pDeviceCertLocation = pParams->pClientCRT;
83 ConnectParams.pDevicePrivateKeyLocation = pParams->pClientKey;
84 ConnectParams.pRootCALocation = pParams->pRootCA;
85 ConnectParams.pPassword = NULL;
86 ConnectParams.pUserName = NULL;
87 ConnectParams.pHostURL = pParams->pHost;
88 ConnectParams.port = pParams->port;
89 ConnectParams.disconnectHandler = NULL;
90
91 rc = pClient->connect(&ConnectParams);
92
93 if(rc == NONE_ERROR){
94 initializeRecords(pClient);
95 }
96
97 return rc;
98}
99
100IoT_Error_t aws_iot_shadow_register_delta(MQTTClient_t *pClient, jsonStruct_t *pStruct) {
101 IoT_Error_t rc = NONE_ERROR;
102
103 if (!(pClient->isConnected())) {
104 return CONNECTION_ERROR;
105 }
106
107 rc = registerJsonTokenOnDelta(pStruct);
108
109 return rc;
110}
111
112IoT_Error_t aws_iot_shadow_yield(MQTTClient_t *pClient, int timeout) {
113 HandleExpiredResponseCallbacks();
114 return pClient->yield(timeout);
115}
116
117IoT_Error_t aws_iot_shadow_disconnect(MQTTClient_t *pClient) {
118 return pClient->disconnect();
119}
120
121IoT_Error_t aws_iot_shadow_update(MQTTClient_t *pClient, const char *pThingName, char *pJsonString,
122 fpActionCallback_t callback, void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscribe) {
123
124 IoT_Error_t ret_val = NONE_ERROR;
125
126 if (!(pClient->isConnected())) {
127 return CONNECTION_ERROR;
128 }
129
130 ret_val = iot_shadow_action(pClient, pThingName, SHADOW_UPDATE, pJsonString, callback, pContextData,
131 timeout_seconds, isPersistentSubscribe);
132
133 return ret_val;
134}
135
136IoT_Error_t aws_iot_shadow_delete(MQTTClient_t *pClient, const char *pThingName, fpActionCallback_t callback,
137 void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscribe) {
138 IoT_Error_t ret_val = NONE_ERROR;
139
140 if (!(pClient->isConnected())) {
141 return CONNECTION_ERROR;
142 }
143
144 char deleteRequestJsonBuf[MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE];
145 iot_shadow_delete_request_json(deleteRequestJsonBuf);
146 ret_val = iot_shadow_action(pClient, pThingName, SHADOW_GET, deleteRequestJsonBuf, callback, pContextData,
147 timeout_seconds, isPersistentSubscribe);
148
149 return ret_val;
150}
151
152IoT_Error_t aws_iot_shadow_get(MQTTClient_t *pClient, const char *pThingName, fpActionCallback_t callback,
153 void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscribe) {
154
155 IoT_Error_t ret_val = NONE_ERROR;
156
157 if (!(pClient->isConnected())) {
158 return CONNECTION_ERROR;
159 }
160
161 char getRequestJsonBuf[MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE];
162
163 iot_shadow_get_request_json(getRequestJsonBuf);
164
165 ret_val = iot_shadow_action(pClient, pThingName, SHADOW_GET, getRequestJsonBuf, callback, pContextData,
166 timeout_seconds, isPersistentSubscribe);
167
168 return ret_val;
169}
diff --git a/aws_iot_src/shadow/aws_iot_shadow_actions.c b/aws_iot_src/shadow/aws_iot_shadow_actions.c
new file mode 100644
index 0000000..b73b2b9
--- /dev/null
+++ b/aws_iot_src/shadow/aws_iot_shadow_actions.c
@@ -0,0 +1,65 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16#include "aws_iot_shadow_actions.h"
17
18#include "aws_iot_log.h"
19#include "aws_iot_shadow_json.h"
20#include "aws_iot_shadow_records.h"
21#include "aws_iot_config.h"
22
23IoT_Error_t iot_shadow_action(MQTTClient_t *pClient, const char *pThingName, ShadowActions_t action,
24 const char *pJsonDocumentToBeSent, fpActionCallback_t callback, void *pCallbackContext,
25 uint32_t timeout_seconds, bool isSticky) {
26
27 IoT_Error_t ret_val = NONE_ERROR;
28 bool isCallbackPresent = false;
29 bool isClientTokenPresent = false;
30 bool isAckWaitListFree = false;
31 uint8_t indexAckWaitList;
32
33 if(pClient == NULL || pThingName == NULL || pJsonDocumentToBeSent == NULL){
34 return NULL_VALUE_ERROR;
35 }
36
37 if (getNextFreeIndexOfAckWaitList(&indexAckWaitList)) {
38 isAckWaitListFree = true;
39 }
40 if (callback != NULL) {
41 isCallbackPresent = true;
42 }
43
44 char extractedClientToken[MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE];
45 isClientTokenPresent = extractClientToken(pJsonDocumentToBeSent, extractedClientToken);
46
47 if (isClientTokenPresent && isCallbackPresent && isAckWaitListFree) {
48 if (!isSubscriptionPresent(pThingName, action)) {
49 ret_val = subscribeToShadowActionAcks(pThingName, action, isSticky);
50 } else {
51 incrementSubscriptionCnt(pThingName, action, isSticky);
52 }
53 }
54
55
56 if (ret_val == NONE_ERROR) {
57 ret_val = publishToShadowAction(pThingName, action, pJsonDocumentToBeSent);
58 }
59
60 if (isClientTokenPresent && isCallbackPresent && ret_val == NONE_ERROR && isAckWaitListFree) {
61 addToAckWaitList(indexAckWaitList, pThingName, action, extractedClientToken, callback, pCallbackContext,
62 timeout_seconds);
63 }
64 return ret_val;
65}
diff --git a/aws_iot_src/shadow/aws_iot_shadow_actions.h b/aws_iot_src/shadow/aws_iot_shadow_actions.h
new file mode 100644
index 0000000..c50b867
--- /dev/null
+++ b/aws_iot_src/shadow/aws_iot_shadow_actions.h
@@ -0,0 +1,25 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16#ifndef SRC_SHADOW_AWS_IOT_SHADOW_ACTIONS_H_
17#define SRC_SHADOW_AWS_IOT_SHADOW_ACTIONS_H_
18
19#include "aws_iot_shadow_interface.h"
20
21IoT_Error_t iot_shadow_action(MQTTClient_t *pClient, const char *pThingName, ShadowActions_t action,
22 const char *pJsonDocumentToBeSent, fpActionCallback_t callback, void *pCallbackContext,
23 uint32_t timeout_seconds, bool isSticky);
24
25#endif /* SRC_SHADOW_AWS_IOT_SHADOW_ACTIONS_H_ */
diff --git a/aws_iot_src/shadow/aws_iot_shadow_interface.h b/aws_iot_src/shadow/aws_iot_shadow_interface.h
new file mode 100644
index 0000000..1a0b1ac
--- /dev/null
+++ b/aws_iot_src/shadow/aws_iot_shadow_interface.h
@@ -0,0 +1,242 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15#ifndef AWS_IOT_SDK_SRC_IOT_SHADOW_H_
16#define AWS_IOT_SDK_SRC_IOT_SHADOW_H_
17
18
19/**
20 * @file aws_iot_shadow_interface.h
21 * @brief Interface for thing shadow
22 *
23 * These are the functions and structs to manage/interact the Thing Shadow(in the cloud).
24 * This SDK will let you interact with your own thing shadow or any other shadow using its Thing Name.
25 * There are totally 3 actions a device can perform on the shadow - Get, Update and Delete.
26 *
27 * Currently the device should use MQTT/S underneath. In the future this will also support other protocols. As it supports MQTT, the shadow needs to connect and disconnect.
28 * It will also work on the pub/sub model. On performing any action, the acknowledgment will be received in either accepted or rejected. For Example:
29 * If we want to perform a GET on the thing shadow the following messages will be sent and received:
30 * 1. A MQTT Publish on the topic - $aws/things/{thingName}/shadow/get
31 * 2. Subscribe to MQTT topics - $aws/things/{thingName}/shadow/get/accepted and $aws/things/{thingName}/shadow/get/rejected.
32 * If the request was successful we will receive the things json document in the accepted topic.
33 *
34 *
35 */
36#include "aws_iot_mqtt_interface.h"
37#include "aws_iot_shadow_json_data.h"
38
39/*!
40 * @brief Shadow Connect parameters
41 *
42 * As the Shadow SDK uses MQTT underneath, it could be connected and disconnected on events to save some battery.
43 * @note Always use the \c ShadowParametersDefault to initialize this struct
44 *
45 *
46 *
47 */
48typedef struct {
49 char *pMyThingName; ///< Every device has a Thing Shadow and this is the placeholder for name
50 char *pMqttClientId; ///< Currently the Shadow uses MQTT to connect and it is important to ensure we have unique client id
51 char *pHost; ///< This will be unique to a customer and can be retrieved from the console
52 int port; ///< By default the port is 8883
53 char *pRootCA; ///< Location with the Filename of the Root CA
54 char *pClientCRT; ///< Location of Device certs signed by AWS IoT service
55 char *pClientKey; ///< Location of Device private key
56} ShadowParameters_t;
57
58/*!
59 * @brief This is set to defaults from the configuration file
60 * The certs are set to NULL because they need the path to the file. shadow_sample.c file demonstrates on how to get the relative path
61 *
62 * \relates ShadowParameters_t
63 */
64extern const ShadowParameters_t ShadowParametersDefault;
65
66
67/**
68 * @brief Initialize the Thing Shadow before use
69 *
70 * This function takes care of initializing the internal book-keeping data structures
71 *
72 * @param pClient MQTT Client used as the protocol layer
73 * @return An IoT Error Type defining successful/failed Initialization
74 */
75IoT_Error_t aws_iot_shadow_init(MQTTClient_t *pClient);
76/**
77 * @brief Connect to the AWS IoT Thing Shadow service over MQTT
78 *
79 * This function does the TLSv1.2 handshake and establishes the MQTT connection
80 *
81 * @param pClient MQTT Client used as the protocol layer
82 * @param pParams Shadow Conenction parameters like TLS cert location
83 * @return An IoT Error Type defining successful/failed Connection
84 */
85IoT_Error_t aws_iot_shadow_connect(MQTTClient_t *pClient, ShadowParameters_t *pParams);
86/**
87 * @brief Yield function to let the background tasks of MQTT and Shadow
88 *
89 * This function could be use in a separate thread waiting for the incoming messages, ensuring the connection is kept alive with the AWS Service.
90 * It also ensures the expired requests of Shadow actions are cleared and Timeout callback is executed.
91 * @note All callbacks ever used in the SDK will be executed in the context of this function.
92 *
93 * @param pClient MQTT Client used as the protocol layer
94 * @param timeout in milliseconds, This is the maximum time the yield function will wait for a message and/or read the messages from the TLS buffer
95 * @return An IoT Error Type defining successful/failed Yield
96 */
97IoT_Error_t aws_iot_shadow_yield(MQTTClient_t *pClient, int timeout);
98/**
99 * @brief Disconnect from the AWS IoT Thing Shadow service over MQTT
100 *
101 * This will close the underlying TCP connection, MQTT connection will also be closed
102 *
103 * @param pClient MQTT Client used as the protocol layer
104 * @return An IoT Error Type defining successful/failed disconnect status
105 */
106IoT_Error_t aws_iot_shadow_disconnect(MQTTClient_t *pClient);
107
108/**
109 * @brief Thing Shadow Acknowledgment enum
110 *
111 * This enum type is use in the callback for the action response
112 *
113 */
114typedef enum {
115 SHADOW_ACK_TIMEOUT, SHADOW_ACK_REJECTED, SHADOW_ACK_ACCEPTED
116} Shadow_Ack_Status_t;
117
118/**
119 * @brief Thing Shadow Action type enum
120 *
121 * This enum type is use in the callback for the action response
122 *
123 */
124typedef enum {
125 SHADOW_GET, SHADOW_UPDATE, SHADOW_DELETE
126} ShadowActions_t;
127
128
129/**
130 * @brief Function Pointer typedef used as the callback for every action
131 *
132 * This function will be called from the context of \c aws_iot_shadow_yield() context
133 *
134 * @param pThingName Thing Name of the response received
135 * @param action The response of the action
136 * @param status Informs if the action was Accepted/Rejected or Timed out
137 * @param pReceivedJsonDocument Received JSON document
138 * @param pContextData the void* data passed in during the action call(update, get or delete)
139 *
140 */
141typedef void (*fpActionCallback_t)(const char *pThingName, ShadowActions_t action, Shadow_Ack_Status_t status,
142 const char *pReceivedJsonDocument, void *pContextData);
143
144/**
145 * @brief This function is the one used to perform an Update action to a Thing Name's Shadow.
146 *
147 * update is one of the most frequently used functionality by a device. In most cases the device may be just reporting few params to update the thing shadow in the cloud
148 * Update Action if no callback or if the JSON document does not have a client token then will just publish the update and not track it.
149 *
150 * @note The update has to subscribe to two topics update/accepted and update/rejected. This function waits 2 seconds to ensure the subscriptions are registered before publishing the update message.
151 * The following steps are performed on using this function:
152 * 1. Subscribe to Shadow topics - $aws/things/{thingName}/shadow/update/accepted and $aws/things/{thingName}/shadow/update/rejected
153 * 2. wait for 2 seconds for the subscription to take effect
154 * 3. Publish on the update topic - $aws/things/{thingName}/shadow/update
155 * 4. In the \c aws_iot_shadow_yield() function the response will be handled. In case of timeout or if the response is received, the subscription to shadow response topics are un-subscribed from.
156 * On the contrary if the persistent subscription is set to true then the un-subscribe will not be done. The topics will always be listened to
157 *
158 * @param pClient MQTT Client used as the protocol layer
159 * @param pThingName Thing Name of the shadow that needs to be Updated
160 * @param pJsonString The update action expects a JSON document to sent. This JSON document should adhere to the AWS IoT Thing Shadow specification. To help in the process of creating this document- SDK provides apis in \c aws_iot_shadow_json_data.h
161 * @param callback This is the callback that will be used to inform the caller of the response from the AWS IoT Shadow service.Callback could be set to NULL if response is not important
162 * @param pContextData This is an extra parameter that could be passed along with the callback. It should be set to NULL if not used
163 * @param timeout_seconds It is the time the SDK will wait for the response on either accepted/rejected before declaring timeout on the action
164 * @param isPersistentSubscribe As mentioned above, every time if a device updates the same shadow then this should be set to true to avoid repeated subscription and unsubscription. If the Thing Name is one off update then this should be set to false
165 * @return An IoT Error Type defining successful/failed update action
166 */
167IoT_Error_t aws_iot_shadow_update(MQTTClient_t *pClient, const char *pThingName, char *pJsonString,
168 fpActionCallback_t callback, void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscribe);
169
170/**
171 * @brief This function is the one used to perform an Get action to a Thing Name's Shadow.
172 *
173 * One use of this function is usually to get the config of a device at boot up.
174 * It is similar to the Update function internally except it does not take a JSON document as the input. The entire JSON document will be sent over the accepted topic
175 *
176 * @param pClient MQTT Client used as the protocol layer
177 * @param pThingName Thing Name of the JSON document that is needed
178 * @param callback This is the callback that will be used to inform the caller of the response from the AWS IoT Shadow service.Callback could be set to NULL if response is not important
179 * @param pContextData This is an extra parameter that could be passed along with the callback. It should be set to NULL if not used
180 * @param timeout_seconds It is the time the SDK will wait for the response on either accepted/rejected before declaring timeout on the action
181 * @param isPersistentSubscribe As mentioned above, every time if a device gets the same Sahdow (JSON document) then this should be set to true to avoid repeated subscription and un-subscription. If the Thing Name is one off get then this should be set to false
182 * @return An IoT Error Type defining successful/failed get action
183 */
184IoT_Error_t aws_iot_shadow_get(MQTTClient_t *pClient, const char *pThingName, fpActionCallback_t callback,
185 void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscribe);
186/**
187 * @brief This function is the one used to perform an Delete action to a Thing Name's Shadow.
188 *
189 * This is not a very common use case for device. It is generally the responsibility of the accompanying app to do the delete.
190 * It is similar to the Update function internally except it does not take a JSON document as the input. The Thing Shadow referred by the ThingName will be deleted.
191 *
192 * @param pClient MQTT Client used as the protocol layer
193 * @param pThingName Thing Name of the Shadow that should be deleted
194 * @param callback This is the callback that will be used to inform the caller of the response from the AWS IoT Shadow service.Callback could be set to NULL if response is not important
195 * @param pContextData This is an extra parameter that could be passed along with the callback. It should be set to NULL if not used
196 * @param timeout_seconds It is the time the SDK will wait for the response on either accepted/rejected before declaring timeout on the action
197 * @param isPersistentSubscribe As mentioned above, every time if a device deletes the same Sahdow (JSON document) then this should be set to true to avoid repeated subscription and un-subscription. If the Thing Name is one off delete then this should be set to false
198 * @return An IoT Error Type defining successful/failed delete action
199 */
200IoT_Error_t aws_iot_shadow_delete(MQTTClient_t *pClient, const char *pThingName, fpActionCallback_t callback,
201 void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscriptions);
202
203/**
204 * @brief This function is used to listen on the delta topic of #AWS_IOT_MY_THING_NAME mentioned in the aws_iot_config.h file.
205 *
206 * Any time a delta is published the Json document will be delivered to the pStruct->cb. If you don't want the parsing done by the SDK then use the jsonStruct_t key set to "state". A good example of this is displayed in the sample_apps/shadow_console_echo.c
207 *
208 * @param pClient MQTT Client used as the protocol layer
209 * @param pStruct The struct used to parse JSON value
210 * @return An IoT Error Type defining successful/failed delta registering
211 */
212IoT_Error_t aws_iot_shadow_register_delta(MQTTClient_t *pClient, jsonStruct_t *pStruct);
213
214/**
215 * @brief Reset the last received version number to zero.
216 * This will be useful if the Thing Shadow is deleted and would like to to reset the local version
217 * @return no return values
218 *
219 */
220void aws_iot_shadow_reset_last_received_version(void);
221/**
222 * @brief Version of a document is received with every accepted/rejected and the SDK keeps track of the last received version of the JSON document of #AWS_IOT_MY_THING_NAME shadow
223 *
224 * One exception to this version tracking is that, the SDK will ignore the version from update/accepted topic. Rest of the responses will be scanned to update the version number.
225 * Accepting version change for update/accepted may cause version conflicts for delta message if the update message is received before the delta.
226 *
227 * @return version number of the last received response
228 *
229 */
230uint32_t aws_iot_shadow_get_last_received_version(void);
231/**
232 * @brief Enable the ignoring of delta messages with old version number
233 *
234 * As we use MQTT underneath, there could be more than 1 of the same message if we use QoS 0. To avoid getting called for the same message, this functionality should be enabled. All the old message will be ignored
235 */
236void aws_iot_shadow_enable_discard_old_delta_msgs(void);
237/**
238 * @brief Disable the ignoring of delta messages with old version number
239 */
240void aws_iot_shadow_disable_discard_old_delta_msgs(void);
241
242#endif //AWS_IOT_SDK_SRC_IOT_SHADOW_H_
diff --git a/aws_iot_src/shadow/aws_iot_shadow_json.c b/aws_iot_src/shadow/aws_iot_shadow_json.c
new file mode 100644
index 0000000..87fc7c0
--- /dev/null
+++ b/aws_iot_src/shadow/aws_iot_shadow_json.c
@@ -0,0 +1,452 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16#include "aws_iot_shadow_json.h"
17
18#include <string.h>
19#include <stdbool.h>
20#include <inttypes.h>
21#include "aws_iot_json_utils.h"
22#include "aws_iot_log.h"
23#include "aws_iot_shadow_key.h"
24#include "aws_iot_config.h"
25
26static uint32_t clientTokenNum = 0;
27
28//helper functions
29static IoT_Error_t convertDataToString(char *pStringBuffer, size_t maxSizoStringBuffer, JsonPrimitiveType type,
30 void *pData);
31
32void resetClientTokenSequenceNum(void) {
33 clientTokenNum = 0;
34}
35
36static void emptyJsonWithClientToken(char *pJsonDocument) {
37 sprintf(pJsonDocument, "{\"clientToken\":\"");
38 FillWithClientToken(pJsonDocument + strlen(pJsonDocument));
39 sprintf(pJsonDocument + strlen(pJsonDocument), "\"}");
40}
41
42void iot_shadow_get_request_json(char *pJsonDocument) {
43 emptyJsonWithClientToken(pJsonDocument);
44}
45
46void iot_shadow_delete_request_json(char *pJsonDocument) {
47 emptyJsonWithClientToken(pJsonDocument);
48}
49
50static inline IoT_Error_t checkReturnValueOfSnPrintf(int32_t snPrintfReturn, size_t maxSizeOfJsonDocument) {
51
52 if (snPrintfReturn >= maxSizeOfJsonDocument) {
53 return SHADOW_JSON_BUFFER_TRUNCATED;
54 } else if (snPrintfReturn < 0) {
55 return SHADOW_JSON_ERROR;
56 }
57 return NONE_ERROR;
58}
59
60IoT_Error_t aws_iot_shadow_init_json_document(char *pJsonDocument, size_t maxSizeOfJsonDocument) {
61
62 IoT_Error_t ret_val = NONE_ERROR;
63 int32_t snPrintfReturn = 0;
64
65 if (pJsonDocument == NULL) {
66 return NULL_VALUE_ERROR;
67 }
68 snPrintfReturn = snprintf(pJsonDocument, maxSizeOfJsonDocument, "{\"state\":{");
69
70 ret_val = checkReturnValueOfSnPrintf(snPrintfReturn, maxSizeOfJsonDocument);
71
72 return ret_val;
73
74}
75
76IoT_Error_t aws_iot_shadow_add_desired(char *pJsonDocument, size_t maxSizeOfJsonDocument, uint8_t count, ...) {
77 IoT_Error_t ret_val = NONE_ERROR;
78 int32_t tempSize = 0;
79 int8_t i;
80 size_t remSizeOfJsonBuffer = maxSizeOfJsonDocument;
81 int32_t snPrintfReturn = 0;
82 va_list pArgs;
83 va_start(pArgs, count);
84 jsonStruct_t *pTemporary;
85
86 if (pJsonDocument == NULL) {
87 return NULL_VALUE_ERROR;
88 }
89
90 tempSize = maxSizeOfJsonDocument - strlen(pJsonDocument);
91 if(tempSize <= 1){
92 return SHADOW_JSON_ERROR;
93 }
94 remSizeOfJsonBuffer = tempSize;
95
96 snPrintfReturn = snprintf(pJsonDocument + strlen(pJsonDocument), remSizeOfJsonBuffer, "\"desired\":{");
97 ret_val = checkReturnValueOfSnPrintf(snPrintfReturn, remSizeOfJsonBuffer);
98
99 if (ret_val != NONE_ERROR) {
100 return ret_val;
101 }
102
103 for (i = 0; i < count; i++) {
104 tempSize = maxSizeOfJsonDocument - strlen(pJsonDocument);
105 if(tempSize <= 1){
106 return SHADOW_JSON_ERROR;
107 }
108 remSizeOfJsonBuffer = tempSize;
109 pTemporary = va_arg (pArgs, jsonStruct_t *);
110 if (pTemporary != NULL) {
111 snPrintfReturn = snprintf(pJsonDocument + strlen(pJsonDocument), remSizeOfJsonBuffer, "\"%s\":",
112 pTemporary->pKey);
113 ret_val = checkReturnValueOfSnPrintf(snPrintfReturn, remSizeOfJsonBuffer);
114 if (ret_val != NONE_ERROR) {
115 return ret_val;
116 }
117 if (pTemporary->pKey != NULL && pTemporary->pData != NULL) {
118 ret_val = convertDataToString(pJsonDocument + strlen(pJsonDocument), remSizeOfJsonBuffer,
119 pTemporary->type, pTemporary->pData);
120 } else {
121 return NULL_VALUE_ERROR;
122 }
123 if (ret_val != NONE_ERROR) {
124 return ret_val;
125 }
126 } else {
127 return NULL_VALUE_ERROR;
128 }
129 }
130
131 va_end(pArgs);
132 snPrintfReturn = snprintf(pJsonDocument + strlen(pJsonDocument) - 1, remSizeOfJsonBuffer, "},");
133 ret_val = checkReturnValueOfSnPrintf(snPrintfReturn, remSizeOfJsonBuffer);
134 return ret_val;
135}
136
137IoT_Error_t aws_iot_shadow_add_reported(char *pJsonDocument, size_t maxSizeOfJsonDocument, uint8_t count, ...) {
138 IoT_Error_t ret_val = NONE_ERROR;
139
140 int8_t i;
141 size_t remSizeOfJsonBuffer = maxSizeOfJsonDocument;
142 int32_t snPrintfReturn = 0;
143 int32_t tempSize = 0;
144 va_list pArgs;
145 va_start(pArgs, count);
146 jsonStruct_t *pTemporary;
147
148 if (pJsonDocument == NULL) {
149 return NULL_VALUE_ERROR;
150 }
151
152
153 tempSize = maxSizeOfJsonDocument - strlen(pJsonDocument);
154 if(tempSize <= 1){
155 return SHADOW_JSON_ERROR;
156 }
157 remSizeOfJsonBuffer = tempSize;
158
159 snPrintfReturn = snprintf(pJsonDocument + strlen(pJsonDocument), remSizeOfJsonBuffer, "\"reported\":{");
160 ret_val = checkReturnValueOfSnPrintf(snPrintfReturn, remSizeOfJsonBuffer);
161
162 if (ret_val != NONE_ERROR) {
163 return ret_val;
164 }
165
166 for (i = 0; i < count; i++) {
167 tempSize = maxSizeOfJsonDocument - strlen(pJsonDocument);
168 if(tempSize <= 1){
169 return SHADOW_JSON_ERROR;
170 }
171 remSizeOfJsonBuffer = tempSize;
172
173 pTemporary = va_arg (pArgs, jsonStruct_t *);
174 if (pTemporary != NULL) {
175 snPrintfReturn = snprintf(pJsonDocument + strlen(pJsonDocument), remSizeOfJsonBuffer, "\"%s\":",
176 pTemporary->pKey);
177 ret_val = checkReturnValueOfSnPrintf(snPrintfReturn, remSizeOfJsonBuffer);
178 if (ret_val != NONE_ERROR) {
179 return ret_val;
180 }
181 if (pTemporary->pKey != NULL && pTemporary->pData != NULL) {
182 ret_val = convertDataToString(pJsonDocument + strlen(pJsonDocument), remSizeOfJsonBuffer,
183 pTemporary->type, pTemporary->pData);
184 } else {
185 return NULL_VALUE_ERROR;
186 }
187 if (ret_val != NONE_ERROR) {
188 return ret_val;
189 }
190 } else {
191 return NULL_VALUE_ERROR;
192 }
193 }
194
195 va_end(pArgs);
196 snPrintfReturn = snprintf(pJsonDocument + strlen(pJsonDocument) - 1, remSizeOfJsonBuffer, "},");
197 ret_val = checkReturnValueOfSnPrintf(snPrintfReturn, remSizeOfJsonBuffer);
198 return ret_val;
199}
200
201
202int32_t FillWithClientTokenSize(char *pBufferToBeUpdatedWithClientToken, size_t maxSizeOfJsonDocument) {
203 int32_t snPrintfReturn;
204 snPrintfReturn = snprintf(pBufferToBeUpdatedWithClientToken, maxSizeOfJsonDocument, "%s-%d", AWS_IOT_MQTT_CLIENT_ID,
205 clientTokenNum++);
206
207 return snPrintfReturn;
208}
209
210IoT_Error_t aws_iot_fill_with_client_token(char *pBufferToBeUpdatedWithClientToken, size_t maxSizeOfJsonDocument){
211
212 int32_t snPrintfRet = 0;
213 snPrintfRet = FillWithClientTokenSize(pBufferToBeUpdatedWithClientToken, maxSizeOfJsonDocument);
214 return checkReturnValueOfSnPrintf(snPrintfRet, maxSizeOfJsonDocument);
215
216}
217
218IoT_Error_t aws_iot_finalize_json_document(char *pJsonDocument, size_t maxSizeOfJsonDocument) {
219 size_t remSizeOfJsonBuffer = maxSizeOfJsonDocument;
220 int32_t snPrintfReturn = 0;
221 int32_t tempSize = 0;
222 IoT_Error_t ret_val = NONE_ERROR;
223
224 if (pJsonDocument == NULL) {
225 return NULL_VALUE_ERROR;
226 }
227
228 tempSize = maxSizeOfJsonDocument - strlen(pJsonDocument);
229 if(tempSize <= 1){
230 return SHADOW_JSON_ERROR;
231 }
232 remSizeOfJsonBuffer = tempSize;
233
234 // strlen(ShadowTxBuffer) - 1 is to ensure we remove the last ,(comma) that was added
235 snPrintfReturn = snprintf(pJsonDocument + strlen(pJsonDocument) - 1, remSizeOfJsonBuffer, "}, \"%s\":\"",
236 SHADOW_CLIENT_TOKEN_STRING);
237 ret_val = checkReturnValueOfSnPrintf(snPrintfReturn, remSizeOfJsonBuffer);
238
239 if (ret_val != NONE_ERROR) {
240 return ret_val;
241 }
242 // refactor this XXX repeated code
243 tempSize = maxSizeOfJsonDocument - strlen(pJsonDocument);
244 if(tempSize <= 1){
245 return SHADOW_JSON_ERROR;
246 }
247 remSizeOfJsonBuffer = tempSize;
248
249
250 snPrintfReturn = FillWithClientTokenSize(pJsonDocument + strlen(pJsonDocument), remSizeOfJsonBuffer);
251 ret_val = checkReturnValueOfSnPrintf(snPrintfReturn, remSizeOfJsonBuffer);
252
253 if (ret_val != NONE_ERROR) {
254 return ret_val;
255 }
256 tempSize = maxSizeOfJsonDocument - strlen(pJsonDocument);
257 if(tempSize <= 1){
258 return SHADOW_JSON_ERROR;
259 }
260 remSizeOfJsonBuffer = tempSize;
261
262
263 snPrintfReturn = snprintf(pJsonDocument + strlen(pJsonDocument), remSizeOfJsonBuffer, "\"}");
264 ret_val = checkReturnValueOfSnPrintf(snPrintfReturn, remSizeOfJsonBuffer);
265
266 return ret_val;
267}
268
269void FillWithClientToken(char *pBufferToBeUpdatedWithClientToken) {
270 sprintf(pBufferToBeUpdatedWithClientToken, "%s-%d", AWS_IOT_MQTT_CLIENT_ID, clientTokenNum++);
271}
272
273static IoT_Error_t convertDataToString(char *pStringBuffer, size_t maxSizoStringBuffer, JsonPrimitiveType type,
274 void *pData) {
275 int32_t snPrintfReturn = 0;
276 IoT_Error_t ret_val = NONE_ERROR;
277
278 if (maxSizoStringBuffer == 0) {
279 return SHADOW_JSON_ERROR;
280 }
281
282 if (type == SHADOW_JSON_INT32) {
283 snPrintfReturn = snprintf(pStringBuffer, maxSizoStringBuffer, "%"PRIi32",", *(int32_t * )(pData));
284 } else if (type == SHADOW_JSON_INT16) {
285 snPrintfReturn = snprintf(pStringBuffer, maxSizoStringBuffer, "%"PRIi16",", *(int16_t * )(pData));
286 } else if (type == SHADOW_JSON_INT8) {
287 snPrintfReturn = snprintf(pStringBuffer, maxSizoStringBuffer, "%"PRIi8",", *(int8_t * )(pData));
288 } else if (type == SHADOW_JSON_UINT32) {
289 snPrintfReturn = snprintf(pStringBuffer, maxSizoStringBuffer, "%"PRIu32",", *(uint32_t * )(pData));
290 } else if (type == SHADOW_JSON_UINT16) {
291 snPrintfReturn = snprintf(pStringBuffer, maxSizoStringBuffer, "%"PRIu16",", *(uint16_t * )(pData));
292 } else if (type == SHADOW_JSON_UINT8) {
293 snPrintfReturn = snprintf(pStringBuffer, maxSizoStringBuffer, "%"PRIu8",", *(uint8_t * )(pData));
294 } else if (type == SHADOW_JSON_DOUBLE) {
295 snPrintfReturn = snprintf(pStringBuffer, maxSizoStringBuffer, "%f,", *(double * )(pData));
296 } else if (type == SHADOW_JSON_FLOAT) {
297 snPrintfReturn = snprintf(pStringBuffer, maxSizoStringBuffer, "%f,", *(float * )(pData));
298 } else if (type == SHADOW_JSON_BOOL) {
299 snPrintfReturn = snprintf(pStringBuffer, maxSizoStringBuffer, "%s,", *(bool *)(pData)?"true":"false");
300 } else if (type == SHADOW_JSON_STRING) {
301 snPrintfReturn = snprintf(pStringBuffer, maxSizoStringBuffer, "\"%s\",", (char * )(pData));
302 }
303
304 ret_val = checkReturnValueOfSnPrintf(snPrintfReturn, maxSizoStringBuffer);
305
306 return ret_val;
307}
308static jsmn_parser shadowJsonParser;
309static jsmntok_t jsonTokenStruct[MAX_JSON_TOKEN_EXPECTED];
310
311bool isJsonValidAndParse(const char *pJsonDocument, void *pJsonHandler, int32_t *pTokenCount) {
312 int32_t tokenCount;
313
314 jsmn_init(&shadowJsonParser);
315
316 tokenCount = jsmn_parse(&shadowJsonParser, pJsonDocument, strlen(pJsonDocument), jsonTokenStruct,
317 sizeof(jsonTokenStruct) / sizeof(jsonTokenStruct[0]));
318
319 if (tokenCount < 0) {
320 WARN("Failed to parse JSON: %d\n", tokenCount);
321 return false;
322 }
323
324 /* Assume the top-level element is an object */
325 if (tokenCount < 1 || jsonTokenStruct[0].type != JSMN_OBJECT) {
326 WARN("Top Level is not an object\n");
327 return false;
328 }
329
330 pJsonHandler = (void *) jsonTokenStruct;
331 *pTokenCount = tokenCount;
332
333 return true;
334}
335
336static IoT_Error_t UpdateValueIfNoObject(const char *pJsonString, jsonStruct_t *pDataStruct, jsmntok_t token) {
337 IoT_Error_t ret_val = NONE_ERROR;
338 if (pDataStruct->type == SHADOW_JSON_BOOL) {
339 ret_val = parseBooleanValue(pDataStruct->pData, pJsonString, &token);
340 } else if (pDataStruct->type == SHADOW_JSON_INT32) {
341 ret_val = parseInteger32Value(pDataStruct->pData, pJsonString, &token);
342 } else if (pDataStruct->type == SHADOW_JSON_INT16) {
343 ret_val = parseInteger16Value(pDataStruct->pData, pJsonString, &token);
344 } else if (pDataStruct->type == SHADOW_JSON_INT8) {
345 ret_val = parseInteger8Value(pDataStruct->pData, pJsonString, &token);
346 } else if (pDataStruct->type == SHADOW_JSON_UINT32) {
347 ret_val = parseUnsignedInteger32Value(pDataStruct->pData, pJsonString, &token);
348 } else if (pDataStruct->type == SHADOW_JSON_UINT16) {
349 ret_val = parseUnsignedInteger16Value(pDataStruct->pData, pJsonString, &token);
350 } else if (pDataStruct->type == SHADOW_JSON_UINT8) {
351 ret_val = parseUnsignedInteger8Value(pDataStruct->pData, pJsonString, &token);
352 } else if (pDataStruct->type == SHADOW_JSON_FLOAT) {
353 ret_val = parseFloatValue(pDataStruct->pData, pJsonString, &token);
354 } else if (pDataStruct->type == SHADOW_JSON_DOUBLE) {
355 ret_val = parseDoubleValue(pDataStruct->pData, pJsonString, &token);
356 }
357
358 return ret_val;
359}
360
361bool isJsonKeyMatchingAndUpdateValue(const char *pJsonDocument, void *pJsonHandler, int32_t tokenCount,
362 jsonStruct_t *pDataStruct, uint32_t *pDataLength, int32_t *pDataPosition) {
363 int32_t i;
364
365 jsmntok_t *pJsonTokenStruct;
366
367 pJsonTokenStruct = (jsmntok_t *) pJsonHandler;
368 for (i = 1; i < tokenCount; i++) {
369 if (jsoneq(pJsonDocument, &(jsonTokenStruct[i]), pDataStruct->pKey) == 0) {
370 jsmntok_t dataToken = jsonTokenStruct[i + 1];
371 uint32_t dataLength = dataToken.end - dataToken.start;
372 UpdateValueIfNoObject(pJsonDocument, pDataStruct, dataToken);
373 *pDataPosition = dataToken.start;
374 *pDataLength = dataLength;
375 return true;
376 }
377 }
378 return false;
379}
380
381bool isReceivedJsonValid(const char *pJsonDocument) {
382 int32_t tokenCount;
383
384 jsmn_init(&shadowJsonParser);
385
386 tokenCount = jsmn_parse(&shadowJsonParser, pJsonDocument, strlen(pJsonDocument), jsonTokenStruct,
387 sizeof(jsonTokenStruct) / sizeof(jsonTokenStruct[0]));
388
389 if (tokenCount < 0) {
390 WARN("Failed to parse JSON: %d\n", tokenCount);
391 return false;
392 }
393
394 /* Assume the top-level element is an object */
395 if (tokenCount < 1 || jsonTokenStruct[0].type != JSMN_OBJECT) {
396 return false;
397 }
398
399 return true;
400}
401
402bool extractClientToken(const char *pJsonDocument, char *pExtractedClientToken) {
403 bool ret_val = false;
404 jsmn_init(&shadowJsonParser);
405 int32_t tokenCount, i;
406 jsmntok_t ClientJsonToken;
407
408 tokenCount = jsmn_parse(&shadowJsonParser, pJsonDocument, strlen(pJsonDocument), jsonTokenStruct,
409 sizeof(jsonTokenStruct) / sizeof(jsonTokenStruct[0]));
410
411 if (tokenCount < 0) {
412 WARN("Failed to parse JSON: %d\n", tokenCount);
413 return false;
414 }
415
416 /* Assume the top-level element is an object */
417 if (tokenCount < 1 || jsonTokenStruct[0].type != JSMN_OBJECT) {
418 return false;
419 }
420
421 for (i = 1; i < tokenCount; i++) {
422 if (jsoneq(pJsonDocument, &jsonTokenStruct[i], SHADOW_CLIENT_TOKEN_STRING) == 0) {
423 ClientJsonToken = jsonTokenStruct[i + 1];
424 uint8_t length = ClientJsonToken.end - ClientJsonToken.start;
425 strncpy(pExtractedClientToken, pJsonDocument + ClientJsonToken.start, length);
426 pExtractedClientToken[length] = '\0';
427 return true;
428 }
429 }
430
431 return false;
432}
433
434bool extractVersionNumber(const char *pJsonDocument, void *pJsonHandler, int32_t tokenCount, uint32_t *pVersionNumber) {
435 int32_t i;
436 jsmntok_t *pJsonTokenStruct;
437 IoT_Error_t ret_val = NONE_ERROR;
438
439 pJsonTokenStruct = (jsmntok_t *) pJsonHandler;
440 for (i = 1; i < tokenCount; i++) {
441 if (jsoneq(pJsonDocument, &(jsonTokenStruct[i]), SHADOW_VERSION_STRING) == 0) {
442 jsmntok_t dataToken = jsonTokenStruct[i + 1];
443 uint32_t dataLength = dataToken.end - dataToken.start;
444 ret_val = parseUnsignedInteger32Value(pVersionNumber, pJsonDocument, &dataToken);
445 if (ret_val == NONE_ERROR) {
446 return true;
447 }
448 }
449 }
450 return false;
451}
452
diff --git a/aws_iot_src/shadow/aws_iot_shadow_json.h b/aws_iot_src/shadow/aws_iot_shadow_json.h
new file mode 100644
index 0000000..9810981
--- /dev/null
+++ b/aws_iot_src/shadow/aws_iot_shadow_json.h
@@ -0,0 +1,39 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15#ifndef AWS_IOT_SDK_SRC_IOT_SHADOW_JSON_H_
16#define AWS_IOT_SDK_SRC_IOT_SHADOW_JSON_H_
17
18#include <stdint.h>
19#include <stdbool.h>
20#include <stdarg.h>
21
22#include "aws_iot_error.h"
23#include "aws_iot_shadow_json_data.h"
24
25
26bool isJsonValidAndParse(const char *pJsonDocument, void *pJsonHandler, int32_t *pTokenCount);
27bool isJsonKeyMatchingAndUpdateValue(const char *pJsonDocument, void *pJsonHandler, int32_t tokenCount,
28 jsonStruct_t *pDataStruct, uint32_t *pDataLength, int32_t *pDataPosition);
29
30void iot_shadow_get_request_json(char *pJsonDocument);
31void iot_shadow_delete_request_json(char *pJsonDocument);
32void resetClientTokenSequenceNum(void);
33
34
35bool isReceivedJsonValid(const char *pJsonDocument);
36void FillWithClientToken(char *pStringToUpdateClientToken);
37bool extractClientToken(const char *pJsonDocumentToBeSent, char *pExtractedClientToken);
38bool extractVersionNumber(const char *pJsonDocument, void *pJsonHandler, int32_t tokenCount, uint32_t *pVersionNumber);
39#endif // AWS_IOT_SDK_SRC_IOT_SHADOW_JSON_H_
diff --git a/aws_iot_src/shadow/aws_iot_shadow_json_data.h b/aws_iot_src/shadow/aws_iot_shadow_json_data.h
new file mode 100644
index 0000000..0e8f92a
--- /dev/null
+++ b/aws_iot_src/shadow/aws_iot_shadow_json_data.h
@@ -0,0 +1,132 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16#ifndef SRC_SHADOW_AWS_IOT_SHADOW_JSON_DATA_H_
17#define SRC_SHADOW_AWS_IOT_SHADOW_JSON_DATA_H_
18
19#include <stddef.h>
20
21/**
22 * @brief This is a static JSON object that could be used in code
23 *
24 */
25typedef struct jsonStruct jsonStruct_t;
26/**
27 * @brief Every JSON name value can have a callback. The callback should follow this signature
28 */
29typedef void (*jsonStructCallback_t)(const char *pJsonValueBuffer, uint32_t valueLength, jsonStruct_t *pJsonStruct_t);
30
31/**
32 * @brief All the JSON object types enum
33 *
34 * JSON number types need to be split into proper integer / floating point data types and sizes on embedded platforms.
35 */
36typedef enum {
37 SHADOW_JSON_INT32,
38 SHADOW_JSON_INT16,
39 SHADOW_JSON_INT8,
40 SHADOW_JSON_UINT32,
41 SHADOW_JSON_UINT16,
42 SHADOW_JSON_UINT8,
43 SHADOW_JSON_FLOAT,
44 SHADOW_JSON_DOUBLE,
45 SHADOW_JSON_BOOL,
46 SHADOW_JSON_STRING,
47 SHADOW_JSON_OBJECT
48} JsonPrimitiveType;
49
50struct jsonStruct {
51 const char *pKey;
52 void *pData;
53 JsonPrimitiveType type;
54 jsonStructCallback_t cb;
55};
56
57/**
58 * @brief Initialize the JSON document with Shadow expected name/value
59 *
60 * This Function will fill the JSON Buffer with a null terminated string. Internally it uses snprintf
61 * This function should always be used First, followed by iot_shadow_add_reported and/or iot_shadow_add_desired.
62 * Always finish the call sequence with iot_finalize_json_document
63 *
64 * @note Ensure the size of the Buffer is enough to hold the entire JSON Document.
65 *
66 *
67 * @param pJsonDocument The JSON Document filled in this char buffer
68 * @param maxSizeOfJsonDocument maximum size of the pJsonDocument that can be used to fill the JSON document
69 * @return An IoT Error Type defining if the buffer was null or the entire string was not filled up
70 */
71IoT_Error_t aws_iot_shadow_init_json_document(char *pJsonDocument, size_t maxSizeOfJsonDocument);
72
73/**
74 * @brief Add the reported section of the JSON document of jsonStruct_t
75 *
76 * This is a variadic function and please be careful with the usage. count is the number of jsonStruct_t types that you would like to add in the reported section
77 * This function will add "reported":{<all the values that needs to be added>}
78 *
79 * @note Ensure the size of the Buffer is enough to hold the reported section + the init section. Always use the same JSON document buffer used in the iot_shadow_init_json_document function. This function will accommodate the size of previous null terminated string, so pass teh max size of the buffer
80 *
81 *
82 * @param pJsonDocument The JSON Document filled in this char buffer
83 * @param maxSizeOfJsonDocument maximum size of the pJsonDocument that can be used to fill the JSON document
84 * @param count total number of arguments(jsonStruct_t object) passed in the arguments
85 * @return An IoT Error Type defining if the buffer was null or the entire string was not filled up
86 */
87IoT_Error_t aws_iot_shadow_add_reported(char *pJsonDocument, size_t maxSizeOfJsonDocument, uint8_t count, ...);
88
89/**
90 * @brief Add the desired section of the JSON document of jsonStruct_t
91 *
92 * This is a variadic function and please be careful with the usage. count is the number of jsonStruct_t types that you would like to add in the reported section
93 * This function will add "desired":{<all the values that needs to be added>}
94 *
95 * @note Ensure the size of the Buffer is enough to hold the reported section + the init section. Always use the same JSON document buffer used in the iot_shadow_init_json_document function. This function will accommodate the size of previous null terminated string, so pass the max size of the buffer
96 *
97 *
98 * @param pJsonDocument The JSON Document filled in this char buffer
99 * @param maxSizeOfJsonDocument maximum size of the pJsonDocument that can be used to fill the JSON document
100 * @param count total number of arguments(jsonStruct_t object) passed in the arguments
101 * @return An IoT Error Type defining if the buffer was null or the entire string was not filled up
102 */
103IoT_Error_t aws_iot_shadow_add_desired(char *pJsonDocument, size_t maxSizeOfJsonDocument, uint8_t count, ...);
104
105/**
106 * @brief Finalize the JSON document with Shadow expected client Token.
107 *
108 * This function will automatically increment the client token every time this function is called.
109 *
110 * @note Ensure the size of the Buffer is enough to hold the entire JSON Document. If the finalized section is not invoked then the JSON doucment will not be valid
111 *
112 *
113 * @param pJsonDocument The JSON Document filled in this char buffer
114 * @param maxSizeOfJsonDocument maximum size of the pJsonDocument that can be used to fill the JSON document
115 * @return An IoT Error Type defining if the buffer was null or the entire string was not filled up
116 */
117IoT_Error_t aws_iot_finalize_json_document(char *pJsonDocument, size_t maxSizeOfJsonDocument);
118
119/**
120 * @brief Fill the given buffer with client token for tracking the Repsonse.
121 *
122 * This function will add the AWS_IOT_MQTT_CLIENT_ID with a sequence number. Every time this function is used the sequence number gets incremented
123 *
124 *
125 * @param pBufferToBeUpdatedWithClientToken buffer to be updated with the client token string
126 * @param maxSizeOfJsonDocument maximum size of the pBufferToBeUpdatedWithClientToken that can be used
127 * @return An IoT Error Type defining if the buffer was null or the entire string was not filled up
128 */
129
130IoT_Error_t aws_iot_fill_with_client_token(char *pBufferToBeUpdatedWithClientToken, size_t maxSizeOfJsonDocument);
131
132#endif /* SRC_SHADOW_AWS_IOT_SHADOW_JSON_DATA_H_ */
diff --git a/aws_iot_src/shadow/aws_iot_shadow_key.h b/aws_iot_src/shadow/aws_iot_shadow_key.h
new file mode 100644
index 0000000..075a726
--- /dev/null
+++ b/aws_iot_src/shadow/aws_iot_shadow_key.h
@@ -0,0 +1,22 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16#ifndef SRC_SHADOW_AWS_IOT_SHADOW_KEY_H_
17#define SRC_SHADOW_AWS_IOT_SHADOW_KEY_H_
18
19#define SHADOW_CLIENT_TOKEN_STRING "clientToken"
20#define SHADOW_VERSION_STRING "version"
21
22#endif /* SRC_SHADOW_AWS_IOT_SHADOW_KEY_H_ */
diff --git a/aws_iot_src/shadow/aws_iot_shadow_records.c b/aws_iot_src/shadow/aws_iot_shadow_records.c
new file mode 100644
index 0000000..f397880
--- /dev/null
+++ b/aws_iot_src/shadow/aws_iot_shadow_records.c
@@ -0,0 +1,481 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16#include "aws_iot_shadow_records.h"
17
18#include <string.h>
19#include <stdio.h>
20
21#include "timer_interface.h"
22#include "aws_iot_json_utils.h"
23#include "aws_iot_log.h"
24#include "aws_iot_shadow_json.h"
25#include "aws_iot_config.h"
26
27typedef struct {
28 char clientTokenID[MAX_SIZE_CLIENT_ID_WITH_SEQUENCE];
29 char thingName[MAX_SIZE_OF_THINGNAME];
30 ShadowActions_t action;
31 fpActionCallback_t callback;
32 void *pCallbackContext;
33 bool isFree;
34 Timer timer;
35} ToBeReceivedAckRecord_t;
36
37typedef struct {
38 const char *pKey;
39 void *pStruct;
40 jsonStructCallback_t callback;
41 bool isFree;
42} JsonTokenTable_t;
43
44typedef struct {
45 char Topic[MAX_SHADOW_TOPIC_LENGTH_BYTES];
46 uint8_t count;
47 bool isFree;
48 bool isSticky;
49} SubscriptionRecord_t;
50
51typedef enum {
52 SHADOW_ACCEPTED, SHADOW_REJECTED, SHADOW_ACTION
53} ShadowAckTopicTypes_t;
54
55ToBeReceivedAckRecord_t AckWaitList[MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME];
56
57MQTTClient_t *pMqttClient;
58
59#define SHADOW_DELTA_TOPIC_WITH_THING_NAME "$aws/things/" AWS_IOT_MY_THING_NAME "/shadow/update/delta"
60
61#define MAX_TOPICS_AT_ANY_GIVEN_TIME 2*MAX_THINGNAME_HANDLED_AT_ANY_GIVEN_TIME
62SubscriptionRecord_t SubscriptionList[MAX_TOPICS_AT_ANY_GIVEN_TIME];
63
64#define SUBSCRIBE_SETTLING_TIME 2
65char shadowRxBuf[SHADOW_MAX_SIZE_OF_RX_BUFFER];
66
67static JsonTokenTable_t tokenTable[MAX_JSON_TOKEN_EXPECTED];
68static uint32_t tokenTableIndex = 0;
69static bool deltaTopicSubscribedFlag = false;
70uint32_t shadowJsonVersionNum = 0;
71bool shadowDiscardOldDeltaFlag = true;
72
73// local helper functions
74static int AckStatusCallback(MQTTCallbackParams params);
75static int shadow_delta_callback(MQTTCallbackParams params);
76static void topicNameFromThingAndAction(char *pTopic, const char *pThingName, ShadowActions_t action,
77 ShadowAckTopicTypes_t ackType);
78static int16_t getNextFreeIndexOfSubscriptionList(void);
79static void unsubscribeFromAcceptedAndRejected(uint8_t index);
80
81void initDeltaTokens(void) {
82 uint32_t i;
83 for (i = 0; i < MAX_JSON_TOKEN_EXPECTED; i++) {
84 tokenTable[i].isFree = true;
85 }
86 tokenTableIndex = 0;
87 deltaTopicSubscribedFlag = false;
88}
89
90IoT_Error_t registerJsonTokenOnDelta(jsonStruct_t *pStruct) {
91
92 IoT_Error_t rc = NONE_ERROR;
93
94 if (!deltaTopicSubscribedFlag) {
95 MQTTSubscribeParams subParams;
96 subParams.mHandler = shadow_delta_callback;
97 subParams.pTopic = SHADOW_DELTA_TOPIC_WITH_THING_NAME;
98 subParams.qos = QOS_0;
99 rc = pMqttClient->subscribe(&subParams);
100 DEBUG("delta topic %s", SHADOW_DELTA_TOPIC_WITH_THING_NAME);
101 deltaTopicSubscribedFlag = true;
102 }
103
104 if (tokenTableIndex >= MAX_JSON_TOKEN_EXPECTED) {
105 return GENERIC_ERROR;
106 }
107
108 tokenTable[tokenTableIndex].pKey = pStruct->pKey;
109 tokenTable[tokenTableIndex].callback = pStruct->cb;
110 tokenTable[tokenTableIndex].pStruct = pStruct;
111 tokenTable[tokenTableIndex].isFree = false;
112 tokenTableIndex++;
113
114 return rc;
115}
116
117static int16_t getNextFreeIndexOfSubscriptionList(void) {
118 uint8_t i;
119 for (i = 0; i < MAX_TOPICS_AT_ANY_GIVEN_TIME; i++) {
120 if (SubscriptionList[i].isFree) {
121 SubscriptionList[i].isFree = false;
122 return i;
123 }
124 }
125 return -1;
126}
127
128static void topicNameFromThingAndAction(char *pTopic, const char *pThingName, ShadowActions_t action,
129 ShadowAckTopicTypes_t ackType) {
130
131 char actionBuf[10];
132 char ackTypeBuf[10];
133
134 if (action == SHADOW_GET) {
135 strcpy(actionBuf, "get");
136 } else if (action == SHADOW_UPDATE) {
137 strcpy(actionBuf, "update");
138 } else if (action == SHADOW_DELETE) {
139 strcpy(actionBuf, "delete");
140 }
141
142 if (ackType == SHADOW_ACCEPTED) {
143 strcpy(ackTypeBuf, "accepted");
144 } else if (ackType == SHADOW_REJECTED) {
145 strcpy(ackTypeBuf, "rejected");
146 }
147
148 if (ackType == SHADOW_ACTION) {
149 sprintf(pTopic, "$aws/things/%s/shadow/%s", pThingName, actionBuf);
150 } else {
151 sprintf(pTopic, "$aws/things/%s/shadow/%s/%s", pThingName, actionBuf, ackTypeBuf);
152 }
153}
154
155static bool isAckForMyThingName(const char *pTopicName) {
156 if (strstr(pTopicName, AWS_IOT_MY_THING_NAME) != NULL && ((strstr(pTopicName, "get/accepted") != NULL) || (strstr(pTopicName, "delta") != NULL))) {
157 return true;
158 }
159 return false;
160}
161
162static int AckStatusCallback(MQTTCallbackParams params) {
163 int32_t tokenCount;
164 int32_t i;
165 void *pJsonHandler;
166 char temporaryClientToken[MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE];
167
168 if (params.MessageParams.PayloadLen > SHADOW_MAX_SIZE_OF_RX_BUFFER) {
169 return GENERIC_ERROR;
170 }
171
172 memcpy(shadowRxBuf, params.MessageParams.pPayload, params.MessageParams.PayloadLen);
173 shadowRxBuf[params.MessageParams.PayloadLen] = '\0'; // jsmn_parse relies on a string
174
175 if (!isJsonValidAndParse(shadowRxBuf, pJsonHandler, &tokenCount)) {
176 WARN("Received JSON is not valid");
177 return GENERIC_ERROR;
178 }
179
180 if (isAckForMyThingName(params.pTopicName)) {
181 uint32_t tempVersionNumber = 0;
182 if (extractVersionNumber(shadowRxBuf, pJsonHandler, tokenCount, &tempVersionNumber)) {
183 if (tempVersionNumber > shadowJsonVersionNum) {
184 shadowJsonVersionNum = tempVersionNumber;
185 }
186 }
187 }
188
189 if (extractClientToken(shadowRxBuf, temporaryClientToken)) {
190 for (i = 0; i < MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME; i++) {
191 if (!AckWaitList[i].isFree) {
192 if (strcmp(AckWaitList[i].clientTokenID, temporaryClientToken) == 0) {
193 Shadow_Ack_Status_t status;
194 if (strstr(params.pTopicName, "accepted") != NULL) {
195 status = SHADOW_ACK_ACCEPTED;
196 } else if (strstr(params.pTopicName, "rejected") != NULL) {
197 status = SHADOW_ACK_REJECTED;
198 }
199 if (status == SHADOW_ACK_ACCEPTED || status == SHADOW_ACK_REJECTED) {
200 if (AckWaitList[i].callback != NULL) {
201 AckWaitList[i].callback(AckWaitList[i].thingName, AckWaitList[i].action, status,
202 shadowRxBuf, AckWaitList[i].pCallbackContext);
203 }
204 unsubscribeFromAcceptedAndRejected(i);
205 AckWaitList[i].isFree = true;
206 return NONE_ERROR;
207 }
208 }
209 }
210 }
211 }
212
213 return GENERIC_ERROR;
214}
215
216static int16_t findIndexOfSubscriptionList(const char *pTopic) {
217 uint8_t i;
218 for (i = 0; i < MAX_TOPICS_AT_ANY_GIVEN_TIME; i++) {
219 if (!SubscriptionList[i].isFree) {
220 if ((strcmp(pTopic, SubscriptionList[i].Topic) == 0)) {
221 return i;
222 }
223 }
224 }
225 return -1;
226}
227
228static void unsubscribeFromAcceptedAndRejected(uint8_t index) {
229
230 char TemporaryTopicNameAccepted[MAX_SHADOW_TOPIC_LENGTH_BYTES];
231 char TemporaryTopicNameRejected[MAX_SHADOW_TOPIC_LENGTH_BYTES];
232 IoT_Error_t ret_val = NONE_ERROR;
233
234 topicNameFromThingAndAction(TemporaryTopicNameAccepted, AckWaitList[index].thingName, AckWaitList[index].action,
235 SHADOW_ACCEPTED);
236 topicNameFromThingAndAction(TemporaryTopicNameRejected, AckWaitList[index].thingName, AckWaitList[index].action,
237 SHADOW_REJECTED);
238
239 int16_t indexSubList;
240
241 indexSubList = findIndexOfSubscriptionList(TemporaryTopicNameAccepted);
242 if ((indexSubList >= 0)) {
243 if (!SubscriptionList[indexSubList].isSticky && (SubscriptionList[indexSubList].count == 1)) {
244 ret_val = pMqttClient->unsubscribe(TemporaryTopicNameAccepted);
245 if (ret_val == NONE_ERROR) {
246 SubscriptionList[indexSubList].isFree = true;
247 }
248 } else if (SubscriptionList[indexSubList].count > 1) {
249 SubscriptionList[indexSubList].count--;
250 }
251 }
252
253 indexSubList = findIndexOfSubscriptionList(TemporaryTopicNameRejected);
254 if ((indexSubList >= 0)) {
255 if (!SubscriptionList[indexSubList].isSticky && (SubscriptionList[indexSubList].count == 1)) {
256 ret_val = pMqttClient->unsubscribe(TemporaryTopicNameRejected);
257 if (ret_val == NONE_ERROR) {
258 SubscriptionList[indexSubList].isFree = true;
259 }
260 } else if (SubscriptionList[indexSubList].count > 1) {
261 SubscriptionList[indexSubList].count--;
262 }
263 }
264}
265
266void initializeRecords(MQTTClient_t *pClient) {
267 uint8_t i;
268 for (i = 0; i < MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME; i++) {
269 AckWaitList[i].isFree = true;
270 }
271 for (i = 0; i < MAX_TOPICS_AT_ANY_GIVEN_TIME; i++) {
272 SubscriptionList[i].isFree = true;
273 SubscriptionList[i].count = 0;
274 SubscriptionList[i].isSticky = false;
275 }
276 pMqttClient = pClient;
277}
278
279bool isSubscriptionPresent(const char *pThingName, ShadowActions_t action) {
280
281 uint8_t i = 0;
282 bool isAcceptedPresent = false;
283 bool isRejectedPresent = false;
284 char TemporaryTopicNameAccepted[MAX_SHADOW_TOPIC_LENGTH_BYTES];
285 char TemporaryTopicNameRejected[MAX_SHADOW_TOPIC_LENGTH_BYTES];
286
287 topicNameFromThingAndAction(TemporaryTopicNameAccepted, pThingName, action, SHADOW_ACCEPTED);
288 topicNameFromThingAndAction(TemporaryTopicNameRejected, pThingName, action, SHADOW_REJECTED);
289
290 for (i = 0; i < MAX_TOPICS_AT_ANY_GIVEN_TIME; i++) {
291 if (!SubscriptionList[i].isFree) {
292 if ((strcmp(TemporaryTopicNameAccepted, SubscriptionList[i].Topic) == 0)) {
293 isAcceptedPresent = true;
294 } else if ((strcmp(TemporaryTopicNameRejected, SubscriptionList[i].Topic) == 0)) {
295 isRejectedPresent = true;
296 }
297 }
298 }
299
300 if (isRejectedPresent && isAcceptedPresent) {
301 return true;
302 }
303
304 return false;
305}
306
307IoT_Error_t subscribeToShadowActionAcks(const char *pThingName, ShadowActions_t action, bool isSticky) {
308 IoT_Error_t ret_val = NONE_ERROR;
309 MQTTSubscribeParams subParams = MQTTSubscribeParamsDefault;
310
311 bool clearBothEntriesFromList = true;
312 int16_t indexAcceptedSubList = 0;
313 int16_t indexRejectedSubList = 0;
314 indexAcceptedSubList = getNextFreeIndexOfSubscriptionList();
315 indexRejectedSubList = getNextFreeIndexOfSubscriptionList();
316
317 if (indexAcceptedSubList >= 0 && indexRejectedSubList >= 0) {
318 topicNameFromThingAndAction(SubscriptionList[indexAcceptedSubList].Topic, pThingName, action, SHADOW_ACCEPTED);
319 subParams.mHandler = AckStatusCallback;
320 subParams.qos = QOS_0;
321 subParams.pTopic = SubscriptionList[indexAcceptedSubList].Topic;
322 ret_val = pMqttClient->subscribe(&subParams);
323 if (ret_val == NONE_ERROR) {
324 SubscriptionList[indexAcceptedSubList].count = 1;
325 SubscriptionList[indexAcceptedSubList].isSticky = isSticky;
326 topicNameFromThingAndAction(SubscriptionList[indexRejectedSubList].Topic, pThingName, action,
327 SHADOW_REJECTED);
328 subParams.pTopic = SubscriptionList[indexRejectedSubList].Topic;
329 ret_val = pMqttClient->subscribe(&subParams);
330 if (ret_val == NONE_ERROR) {
331 SubscriptionList[indexRejectedSubList].count = 1;
332 SubscriptionList[indexRejectedSubList].isSticky = isSticky;
333 clearBothEntriesFromList = false;
334
335 // wait for SUBSCRIBE_SETTLING_TIME seconds to let the subscription take effect
336 Timer subSettlingtimer;
337 InitTimer(&subSettlingtimer);
338 countdown(&subSettlingtimer, SUBSCRIBE_SETTLING_TIME);
339 while(!expired(&subSettlingtimer));
340
341 }
342 }
343 }
344
345 if (clearBothEntriesFromList) {
346 if (indexAcceptedSubList >= 0) {
347 SubscriptionList[indexAcceptedSubList].isFree = true;
348 } else if (indexRejectedSubList >= 0) {
349 SubscriptionList[indexRejectedSubList].isFree = true;
350 }
351 if (SubscriptionList[indexAcceptedSubList].count == 1) {
352 ret_val = pMqttClient->unsubscribe(SubscriptionList[indexAcceptedSubList].Topic);
353 }
354 }
355
356 return ret_val;
357}
358
359void incrementSubscriptionCnt(const char *pThingName, ShadowActions_t action, bool isSticky) {
360 char TemporaryTopicNameAccepted[MAX_SHADOW_TOPIC_LENGTH_BYTES];
361 char TemporaryTopicNameRejected[MAX_SHADOW_TOPIC_LENGTH_BYTES];
362 uint8_t i;
363 topicNameFromThingAndAction(TemporaryTopicNameAccepted, pThingName, action, SHADOW_ACCEPTED);
364 topicNameFromThingAndAction(TemporaryTopicNameRejected, pThingName, action, SHADOW_REJECTED);
365
366 for (i = 0; i < MAX_TOPICS_AT_ANY_GIVEN_TIME; i++) {
367 if (!SubscriptionList[i].isFree) {
368 if ((strcmp(TemporaryTopicNameAccepted, SubscriptionList[i].Topic) == 0)
369 || (strcmp(TemporaryTopicNameRejected, SubscriptionList[i].Topic) == 0)) {
370 SubscriptionList[i].count++;
371 SubscriptionList[i].isSticky = isSticky;
372 }
373 }
374 }
375}
376
377IoT_Error_t publishToShadowAction(const char * pThingName, ShadowActions_t action, const char *pJsonDocumentToBeSent) {
378 IoT_Error_t ret_val = NONE_ERROR;
379 char TemporaryTopicName[MAX_SHADOW_TOPIC_LENGTH_BYTES];
380 topicNameFromThingAndAction(TemporaryTopicName, pThingName, action, SHADOW_ACTION);
381
382 MQTTPublishParams pubParams = MQTTPublishParamsDefault;
383 pubParams.pTopic = TemporaryTopicName;
384 MQTTMessageParams msgParams = MQTTMessageParamsDefault;
385 msgParams.qos = QOS_0;
386 msgParams.PayloadLen = strlen(pJsonDocumentToBeSent) + 1;
387 msgParams.pPayload = (char *) pJsonDocumentToBeSent;
388 pubParams.MessageParams = msgParams;
389 ret_val = pMqttClient->publish(&pubParams);
390
391 return ret_val;
392}
393
394bool getNextFreeIndexOfAckWaitList(uint8_t *pIndex) {
395 uint8_t i;
396 if (pIndex != NULL) {
397 for (i = 0; i < MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME; i++) {
398 if (AckWaitList[i].isFree) {
399 *pIndex = i;
400 return true;
401 }
402 }
403 }
404 return false;
405}
406
407void addToAckWaitList(uint8_t indexAckWaitList, const char *pThingName, ShadowActions_t action,
408 const char *pExtractedClientToken, fpActionCallback_t callback, void *pCallbackContext,
409 uint32_t timeout_seconds) {
410 AckWaitList[indexAckWaitList].callback = callback;
411 strncpy(AckWaitList[indexAckWaitList].clientTokenID, pExtractedClientToken, MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE);
412 strncpy(AckWaitList[indexAckWaitList].thingName, pThingName, MAX_SIZE_OF_THINGNAME);
413 AckWaitList[indexAckWaitList].pCallbackContext = pCallbackContext;
414 AckWaitList[indexAckWaitList].action = action;
415 InitTimer(&(AckWaitList[indexAckWaitList].timer));
416 countdown(&(AckWaitList[indexAckWaitList].timer), timeout_seconds);
417 AckWaitList[indexAckWaitList].isFree = false;
418}
419
420void HandleExpiredResponseCallbacks(void) {
421 uint8_t i;
422 for (i = 0; i < MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME; i++) {
423 if (!AckWaitList[i].isFree) {
424 if (expired(&(AckWaitList[i].timer))) {
425 if (AckWaitList[i].callback != NULL) {
426 AckWaitList[i].callback(AckWaitList[i].thingName, AckWaitList[i].action, SHADOW_ACK_TIMEOUT,
427 shadowRxBuf, AckWaitList[i].pCallbackContext);
428 }
429 AckWaitList[i].isFree = true;
430 unsubscribeFromAcceptedAndRejected(i);
431 }
432 }
433 }
434}
435
436static int shadow_delta_callback(MQTTCallbackParams params) {
437
438 int32_t tokenCount;
439 uint32_t i = 0;
440 void *pJsonHandler;
441 int32_t DataPosition;
442 uint32_t dataLength;
443
444 if (params.MessageParams.PayloadLen > SHADOW_MAX_SIZE_OF_RX_BUFFER) {
445 return GENERIC_ERROR;
446 }
447
448 memcpy(shadowRxBuf, params.MessageParams.pPayload, params.MessageParams.PayloadLen);
449 shadowRxBuf[params.MessageParams.PayloadLen] = '\0'; // jsmn_parse relies on a string
450
451 if (!isJsonValidAndParse(shadowRxBuf, pJsonHandler, &tokenCount)) {
452 WARN("Received JSON is not valid");
453 return GENERIC_ERROR;
454 }
455
456 if (shadowDiscardOldDeltaFlag) {
457 uint32_t tempVersionNumber = 0;
458 if (extractVersionNumber(shadowRxBuf, pJsonHandler, tokenCount, &tempVersionNumber)) {
459 if (tempVersionNumber > shadowJsonVersionNum) {
460 shadowJsonVersionNum = tempVersionNumber;
461 DEBUG("New Version number: %d", shadowJsonVersionNum);
462 } else {
463 WARN("Old Delta Message received - Ignoring rx: %d local: %d", tempVersionNumber, shadowJsonVersionNum);
464 return GENERIC_ERROR;
465 }
466 }
467 }
468
469 for (i = 0; i < tokenTableIndex; i++) {
470 if (!tokenTable[i].isFree) {
471 if (isJsonKeyMatchingAndUpdateValue(shadowRxBuf, pJsonHandler, tokenCount, tokenTable[i].pStruct,
472 &dataLength, &DataPosition)) {
473 if (tokenTable[i].callback != NULL) {
474 tokenTable[i].callback(shadowRxBuf + DataPosition, dataLength, tokenTable[i].pStruct);
475 }
476 }
477 }
478 }
479
480 return NONE_ERROR;
481}
diff --git a/aws_iot_src/shadow/aws_iot_shadow_records.h b/aws_iot_src/shadow/aws_iot_shadow_records.h
new file mode 100644
index 0000000..898a526
--- /dev/null
+++ b/aws_iot_src/shadow/aws_iot_shadow_records.h
@@ -0,0 +1,42 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16#ifndef SRC_SHADOW_AWS_IOT_SHADOW_RECORDS_H_
17#define SRC_SHADOW_AWS_IOT_SHADOW_RECORDS_H_
18
19#include <stdbool.h>
20
21#include "aws_iot_shadow_interface.h"
22#include "aws_iot_config.h"
23
24
25extern uint32_t shadowJsonVersionNum;
26extern bool shadowDiscardOldDeltaFlag;
27
28void initializeRecords(MQTTClient_t *pClient);
29bool isSubscriptionPresent(const char *pThingName, ShadowActions_t action);
30IoT_Error_t subscribeToShadowActionAcks(const char *pThingName, ShadowActions_t action, bool isSticky);
31void incrementSubscriptionCnt(const char *pThingName, ShadowActions_t action, bool isSticky);
32
33IoT_Error_t publishToShadowAction(const char * pThingName, ShadowActions_t action, const char *pJsonDocumentToBeSent);
34void addToAckWaitList(uint8_t indexAckWaitList, const char *pThingName, ShadowActions_t action,
35 const char *pExtractedClientToken, fpActionCallback_t callback, void *pCallbackContext,
36 uint32_t timeout_seconds);
37bool getNextFreeIndexOfAckWaitList(uint8_t *pIndex);
38void HandleExpiredResponseCallbacks(void);
39void initDeltaTokens(void);
40IoT_Error_t registerJsonTokenOnDelta(jsonStruct_t *pStruct);
41
42#endif /* SRC_SHADOW_AWS_IOT_SHADOW_RECORDS_H_ */
diff --git a/aws_iot_src/utils/aws_iot_error.h b/aws_iot_src/utils/aws_iot_error.h
new file mode 100644
index 0000000..c72fd0b
--- /dev/null
+++ b/aws_iot_src/utils/aws_iot_error.h
@@ -0,0 +1,56 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16/**
17 * @file iot_error.h
18 * @brief Definition of error types for the SDK.
19 */
20
21#ifndef AWS_IOT_SDK_SRC_IOT_ERROR_H_
22#define AWS_IOT_SDK_SRC_IOT_ERROR_H_
23
24
25/**
26 * @brief IoT Error enum
27 *
28 * Enumeration of return values from the IoT_* functions within the SDK.
29 */
30typedef enum {
31 NONE_ERROR = 0, /** Success return value - no error occurred. */
32 GENERIC_ERROR = -1, /** A generic error. A placeholder for a more specific error. */
33 NULL_VALUE_ERROR = -2, /** A required parameter was passed as null. */
34 CONNECTION_ERROR = -3, /** A connection could not be established. */
35 SUBSCRIBE_ERROR = -4, /** The subscribe failed. A SUBACK was not returned from the service. */
36 PUBLISH_ERROR = -5, /** The publish failed. In the case of a QoS 1 message a PUBACK was not received. */
37 DISCONNECT_ERROR = -6, /** The disconnect failed. The disconnect control packet could not be sent. */
38 YIELD_ERROR = -7, /** An error occurred when yielding to the IoT MQTT client. A possible cause is an unexpected TCP socket disconnect. */
39 TCP_CONNECT_ERROR = -8, /** The TCP socket could not be established. */
40 SSL_CONNECT_ERROR = -9, /** The TLS handshake failed. */
41 TCP_SETUP_ERROR =-10, /** ? */
42 SSL_CONNECT_TIMEOUT_ERROR = -11, /** A timeout occurred while waiting for the TLS handshake to complete. */
43 SSL_WRITE_ERROR = -12, /** A Generic error based on the platform used */
44 SSL_INIT_ERROR = -13, /** ? */
45 SSL_CERT_ERROR= -14, /** An error occurred when loading the certificates. The certificates could not be located or are incorrectly formatted. */
46 UNSUBSCRIBE_ERROR = -15, /** The unsubscribe failed. The unsubscribe control packet could not be sent. */
47 JSON_PARSE_ERROR = -16, /** An error occurred while parsing the JSON string. Usually malformed JSON. */
48 WAIT_FOR_PUBLISH = -17, /** Shadow: The response Ack table is currently full waiting for previously published updates */
49 SSL_WRITE_TIMEOUT_ERROR = -18, /** SSL Write times out */
50 SSL_READ_TIMEOUT_ERROR = -19, /** SSL Read times out */
51 SSL_READ_ERROR = -20, /** A Generic error based on the platform used */
52 SHADOW_JSON_BUFFER_TRUNCATED = -21, /** Any time an snprintf writes more than size value, this error will be returned */
53 SHADOW_JSON_ERROR = -22 /** Any time an snprintf encounters an encoding error or not enough space in the given buffer */
54}IoT_Error_t;
55
56#endif /* AWS_IOT_SDK_SRC_IOT_ERROR_H_ */
diff --git a/aws_iot_src/utils/aws_iot_json_utils.c b/aws_iot_src/utils/aws_iot_json_utils.c
new file mode 100644
index 0000000..359360d
--- /dev/null
+++ b/aws_iot_src/utils/aws_iot_json_utils.c
@@ -0,0 +1,185 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16/**
17 * @file json_utils.c
18 * @brief Utilities for manipulating JSON
19 *
20 * json_utils provides JSON parsing utilities for use with the IoT SDK.
21 * Underlying JSON parsing relies on the Jasmine JSON parser.
22 *
23 */
24
25#include "aws_iot_json_utils.h"
26
27#include <stdio.h>
28#include <stdint.h>
29#include <inttypes.h>
30#include <string.h>
31#include "aws_iot_log.h"
32
33int8_t jsoneq(const char *json, jsmntok_t *tok, const char *s) {
34 if (tok->type == JSMN_STRING) {
35 if ((int) strlen(s) == tok->end - tok->start) {
36 if (strncmp(json + tok->start, s, tok->end - tok->start) == 0) {
37 return 0;
38 }
39 }
40 }
41 return -1;
42}
43
44IoT_Error_t parseUnsignedInteger32Value(uint32_t *i, const char *jsonString, jsmntok_t *token) {
45 if (token->type != JSMN_PRIMITIVE) {
46 WARN("Token was not an integer");
47 return JSON_PARSE_ERROR;
48 }
49
50 if (1 != sscanf(jsonString + token->start, "%"PRIu32, i)) {
51 WARN("Token was not an integer.");
52 return JSON_PARSE_ERROR;
53 }
54
55 return NONE_ERROR;
56}
57
58IoT_Error_t parseUnsignedInteger16Value(uint16_t *i, const char *jsonString, jsmntok_t *token) {
59 if (token->type != JSMN_PRIMITIVE) {
60 WARN("Token was not an integer");
61 return JSON_PARSE_ERROR;
62 }
63
64 if (1 != sscanf(jsonString + token->start, "%"PRIu16, i)) {
65 WARN("Token was not an integer.");
66 return JSON_PARSE_ERROR;
67 }
68
69 return NONE_ERROR;
70}
71
72IoT_Error_t parseUnsignedInteger8Value(uint8_t *i, const char *jsonString, jsmntok_t *token) {
73 if (token->type != JSMN_PRIMITIVE) {
74 WARN("Token was not an integer");
75 return JSON_PARSE_ERROR;
76 }
77
78 if (1 != sscanf(jsonString + token->start, "%"PRIu8, i)) {
79 WARN("Token was not an integer.");
80 return JSON_PARSE_ERROR;
81 }
82
83 return NONE_ERROR;
84}
85
86IoT_Error_t parseInteger32Value(int32_t *i, const char *jsonString, jsmntok_t *token) {
87 if (token->type != JSMN_PRIMITIVE) {
88 WARN("Token was not an integer");
89 return JSON_PARSE_ERROR;
90 }
91
92 if (1 != sscanf(jsonString + token->start, "%"PRIi32, i)) {
93 WARN("Token was not an integer.");
94 return JSON_PARSE_ERROR;
95 }
96
97 return NONE_ERROR;
98}
99
100IoT_Error_t parseInteger16Value(int16_t *i, const char *jsonString, jsmntok_t *token) {
101 if (token->type != JSMN_PRIMITIVE) {
102 WARN("Token was not an integer");
103 return JSON_PARSE_ERROR;
104 }
105
106 if (1 != sscanf(jsonString + token->start, "%"PRIi16, i)) {
107 WARN("Token was not an integer.");
108 return JSON_PARSE_ERROR;
109 }
110
111 return NONE_ERROR;
112}
113
114IoT_Error_t parseInteger8Value(int8_t *i, const char *jsonString, jsmntok_t *token) {
115 if (token->type != JSMN_PRIMITIVE) {
116 WARN("Token was not an integer");
117 return JSON_PARSE_ERROR;
118 }
119
120 if (1 != sscanf(jsonString + token->start, "%"PRIi8, i)) {
121 WARN("Token was not an integer.");
122 return JSON_PARSE_ERROR;
123 }
124
125 return NONE_ERROR;
126}
127
128IoT_Error_t parseFloatValue(float *f, const char *jsonString, jsmntok_t *token) {
129 if (token->type != JSMN_PRIMITIVE) {
130 WARN("Token was not a float.");
131 return JSON_PARSE_ERROR;
132 }
133
134 if (1 != sscanf(jsonString + token->start, "%f", f)) {
135 WARN("Token was not a float.");
136 return JSON_PARSE_ERROR;
137 }
138
139 return NONE_ERROR;
140}
141
142IoT_Error_t parseDoubleValue(double *d, const char *jsonString, jsmntok_t *token) {
143 if (token->type != JSMN_PRIMITIVE) {
144 WARN("Token was not a double.");
145 return JSON_PARSE_ERROR;
146 }
147
148 if (1 != sscanf(jsonString + token->start, "%lf", d)) {
149 WARN("Token was not a double.");
150 return JSON_PARSE_ERROR;
151 }
152
153 return NONE_ERROR;
154}
155
156IoT_Error_t parseBooleanValue(bool *b, const char *jsonString, jsmntok_t *token) {
157 if (token->type != JSMN_PRIMITIVE) {
158 WARN("Token was not a primitive.");
159 return JSON_PARSE_ERROR;
160 }
161 if (jsonString[token->start] == 't' && jsonString[token->start + 1] == 'r' && jsonString[token->start + 2] == 'u'
162 && jsonString[token->start + 3] == 'e') {
163 *b = true;
164 } else if (jsonString[token->start] == 'f' && jsonString[token->start + 1] == 'a'
165 && jsonString[token->start + 2] == 'l' && jsonString[token->start + 3] == 's'
166 && jsonString[token->start + 4] == 'e') {
167 *b = false;
168 } else {
169 WARN("Token was not a bool.");
170 return JSON_PARSE_ERROR;
171 }
172 return NONE_ERROR;
173}
174
175IoT_Error_t parseStringValue(char *buf, const char *jsonString, jsmntok_t *token) {
176 uint16_t size = 0;
177 if (token->type != JSMN_STRING) {
178 WARN("Token was not a string.");
179 return JSON_PARSE_ERROR;
180 }
181 size = token->end - token->start;
182 memcpy(buf, jsonString + token->start, size);
183 buf[size] = '\0';
184 return NONE_ERROR;
185}
diff --git a/aws_iot_src/utils/aws_iot_json_utils.h b/aws_iot_src/utils/aws_iot_json_utils.h
new file mode 100644
index 0000000..7cc08a2
--- /dev/null
+++ b/aws_iot_src/utils/aws_iot_json_utils.h
@@ -0,0 +1,189 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16/**
17 * @file json_utils.h
18 * @brief Utilities for manipulating JSON
19 *
20 * json_utils provides JSON parsing utilities for use with the IoT SDK.
21 * Underlying JSON parsing relies on the Jasmine JSON parser.
22 *
23 */
24
25#ifndef AWS_IOT_SDK_SRC_JSON_UTILS_H_
26#define AWS_IOT_SDK_SRC_JSON_UTILS_H_
27
28#include <stdbool.h>
29#include <stdint.h>
30
31#include "aws_iot_error.h"
32#include "jsmn.h"
33
34// utility functions
35/**
36 * @brief JSON Equality Check
37 *
38 * Given a token pointing to a particular JSON node and an
39 * input string, check to see if the key is equal to the string.
40 *
41 * @param json json string
42 * @param tok json token - pointer to key to test for equality
43 * @param s input string for key to test equality
44 *
45 * @return 0 if equal, 1 otherwise
46 */
47int8_t jsoneq(const char *json, jsmntok_t *tok, const char *s);
48
49/**
50 * @brief Parse a signed 32-bit integer value from a JSON node.
51 *
52 * Given a JSON node parse the integer value from the value.
53 *
54 * @param jsonString json string
55 * @param tok json token - pointer to JSON node
56 * @param i address of int32_t to be updated
57 *
58 * @return NONE_ERROR - success
59 * @return JSON_PARSE_ERROR - error parsing value
60 */
61IoT_Error_t parseInteger32Value(int32_t *i, const char *jsonString, jsmntok_t *token);
62
63/**
64 * @brief Parse a signed 16-bit integer value from a JSON node.
65 *
66 * Given a JSON node parse the integer value from the value.
67 *
68 * @param jsonString json string
69 * @param tok json token - pointer to JSON node
70 * @param i address of int16_t to be updated
71 *
72 * @return NONE_ERROR - success
73 * @return JSON_PARSE_ERROR - error parsing value
74 */
75IoT_Error_t parseInteger16Value(int16_t *i, const char *jsonString, jsmntok_t *token);
76
77/**
78 * @brief Parse a signed 8-bit integer value from a JSON node.
79 *
80 * Given a JSON node parse the integer value from the value.
81 *
82 * @param jsonString json string
83 * @param tok json token - pointer to JSON node
84 * @param i address of int8_t to be updated
85 *
86 * @return NONE_ERROR - success
87 * @return JSON_PARSE_ERROR - error parsing value
88 */
89IoT_Error_t parseInteger8Value(int8_t *i, const char *jsonString, jsmntok_t *token);
90
91/**
92 * @brief Parse an unsigned 32-bit integer value from a JSON node.
93 *
94 * Given a JSON node parse the integer value from the value.
95 *
96 * @param jsonString json string
97 * @param tok json token - pointer to JSON node
98 * @param i address of uint32_t to be updated
99 *
100 * @return NONE_ERROR - success
101 * @return JSON_PARSE_ERROR - error parsing value
102 */
103IoT_Error_t parseUnsignedInteger32Value(uint32_t *i, const char *jsonString, jsmntok_t *token);
104
105/**
106 * @brief Parse an unsigned 16-bit integer value from a JSON node.
107 *
108 * Given a JSON node parse the integer value from the value.
109 *
110 * @param jsonString json string
111 * @param tok json token - pointer to JSON node
112 * @param i address of uint16_t to be updated
113 *
114 * @return NONE_ERROR - success
115 * @return JSON_PARSE_ERROR - error parsing value
116 */
117IoT_Error_t parseUnsignedInteger16Value(uint16_t *i, const char *jsonString, jsmntok_t *token);
118
119/**
120 * @brief Parse an unsigned 8-bit integer value from a JSON node.
121 *
122 * Given a JSON node parse the integer value from the value.
123 *
124 * @param jsonString json string
125 * @param tok json token - pointer to JSON node
126 * @param i address of uint8_t to be updated
127 *
128 * @return NONE_ERROR - success
129 * @return JSON_PARSE_ERROR - error parsing value
130 */
131IoT_Error_t parseUnsignedInteger8Value(uint8_t *i, const char *jsonString, jsmntok_t *token);
132
133/**
134 * @brief Parse a float value from a JSON node.
135 *
136 * Given a JSON node parse the float value from the value.
137 *
138 * @param jsonString json string
139 * @param tok json token - pointer to JSON node
140 * @param f address of float to be updated
141 *
142 * @return NONE_ERROR - success
143 * @return JSON_PARSE_ERROR - error parsing value
144 */
145IoT_Error_t parseFloatValue(float *f, const char *jsonString, jsmntok_t *token);
146
147/**
148 * @brief Parse a double value from a JSON node.
149 *
150 * Given a JSON node parse the double value from the value.
151 *
152 * @param jsonString json string
153 * @param tok json token - pointer to JSON node
154 * @param d address of double to be updated
155 *
156 * @return NONE_ERROR - success
157 * @return JSON_PARSE_ERROR - error parsing value
158 */
159IoT_Error_t parseDoubleValue(double *d, const char *jsonString, jsmntok_t *token);
160
161/**
162 * @brief Parse a boolean value from a JSON node.
163 *
164 * Given a JSON node parse the boolean value from the value.
165 *
166 * @param jsonString json string
167 * @param tok json token - pointer to JSON node
168 * @param b address of boolean to be updated
169 *
170 * @return NONE_ERROR - success
171 * @return JSON_PARSE_ERROR - error parsing value
172 */
173IoT_Error_t parseBooleanValue(bool *b, const char *jsonString, jsmntok_t *token);
174
175/**
176 * @brief Parse a string value from a JSON node.
177 *
178 * Given a JSON node parse the string value from the value.
179 *
180 * @param jsonString json string
181 * @param tok json token - pointer to JSON node
182 * @param s address of string to be updated
183 *
184 * @return NONE_ERROR - success
185 * @return JSON_PARSE_ERROR - error parsing value
186 */
187IoT_Error_t parseStringValue(char *buf, const char *jsonString, jsmntok_t *token);
188
189#endif /* AWS_IOT_SDK_SRC_JSON_UTILS_H_ */
diff --git a/aws_iot_src/utils/aws_iot_log.h b/aws_iot_src/utils/aws_iot_log.h
new file mode 100644
index 0000000..4250f88
--- /dev/null
+++ b/aws_iot_src/utils/aws_iot_log.h
@@ -0,0 +1,82 @@
1/**
2 * @file iot_log.h
3 * @brief Logging macros for the SDK.
4 * This file defines common logging macros with log levels to be used within the SDK.
5 * These macros can also be used in the IoT application code as a common way to output
6 * logs. The log levels can be tuned by modifying the makefile. Removing (commenting
7 * out) the IOT_* statement in the makefile disables that log level.
8 *
9 * It is expected that the macros below will be modified or replaced when porting to
10 * specific hardware platforms as printf may not be the desired behavior.
11 */
12
13#ifndef _IOT_LOG_H
14#define _IOT_LOG_H
15
16#include <stdio.h>
17#include <stdlib.h>
18
19/**
20 * @brief Debug level logging macro.
21 *
22 * Macro to expose function, line number as well as desired log message.
23 */
24#ifdef IOT_DEBUG
25#define DEBUG(...) \
26 {\
27 printf("DEBUG: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \
28 printf(__VA_ARGS__); \
29 printf("\n"); \
30 }
31#else
32#define DEBUG(...)
33#endif
34
35/**
36 * @brief Info level logging macro.
37 *
38 * Macro to expose desired log message. Info messages do not include automatic function names and line numbers.
39 */
40#ifdef IOT_INFO
41#define INFO(...) \
42 {\
43 printf(__VA_ARGS__); \
44 printf("\n"); \
45 }
46#else
47#define INFO(...)
48#endif
49
50/**
51 * @brief Warn level logging macro.
52 *
53 * Macro to expose function, line number as well as desired log message.
54 */
55#ifdef IOT_WARN
56#define WARN(...) \
57 { \
58 printf("WARN: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \
59 printf(__VA_ARGS__); \
60 printf("\n"); \
61 }
62#else
63#define WARN(...)
64#endif
65
66/**
67 * @brief Error level logging macro.
68 *
69 * Macro to expose function, line number as well as desired log message.
70 */
71#ifdef IOT_ERROR
72#define ERROR(...) \
73 { \
74 printf("ERROR: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \
75 printf(__VA_ARGS__); \
76 printf("\n"); \
77 }
78#else
79#define ERROR(...)
80#endif
81
82#endif // _IOT_LOG_H
diff --git a/aws_iot_src/utils/aws_iot_version.h b/aws_iot_src/utils/aws_iot_version.h
new file mode 100644
index 0000000..e24348e
--- /dev/null
+++ b/aws_iot_src/utils/aws_iot_version.h
@@ -0,0 +1,48 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16/**
17 * @file iot_version.h
18 * @brief Constants defining the release version of the SDK.
19 *
20 * This file contains constants defining the release version of the SDK.
21 * This file is modified by AWS upon release of the SDK and should not be
22 * modified by the consumer of the SDK. The provided samples show example
23 * usage of these constants.
24 *
25 * Versioning of the SDK follows the MAJOR.MINOR.PATCH Semantic Versioning guidelines.
26 * @see http://semver.org/
27 */
28#ifndef SRC_UTILS_AWS_IOT_VERSION_H_
29#define SRC_UTILS_AWS_IOT_VERSION_H_
30
31/**
32 * @brief MAJOR version, incremented when incompatible API changes are made.
33 */
34#define VERSION_MAJOR 0
35/**
36 * @brief MINOR version when functionality is added in a backwards-compatible manner.
37 */
38#define VERSION_MINOR 4
39/**
40 * @brief PATCH version when backwards-compatible bug fixes are made.
41 */
42#define VERSION_PATCH 0
43/**
44 * @brief TAG is an (optional) tag appended to the version if a more descriptive verion is needed.
45 */
46#define VERSION_TAG "BETA"
47
48#endif /* SRC_UTILS_AWS_IOT_VERSION_H_ */
diff --git a/aws_iot_src/utils/jsmn.c b/aws_iot_src/utils/jsmn.c
new file mode 100644
index 0000000..838a94a
--- /dev/null
+++ b/aws_iot_src/utils/jsmn.c
@@ -0,0 +1,342 @@
1/*
2 * Copyright (c) 2010 Serge A. Zaitsev
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
22
23/**
24 * @file jsmn.c
25 * @brief Implementation of the JSMN (Jasmine) JSON parser.
26 *
27 * For more information on JSMN:
28 * @see http://zserge.com/jsmn.html
29 */
30
31#include <stdlib.h>
32
33#include "jsmn.h"
34
35/**
36 * Allocates a fresh unused token from the token pull.
37 */
38static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser, jsmntok_t *tokens,
39 size_t num_tokens) {
40 jsmntok_t *tok;
41 if (parser->toknext >= num_tokens) {
42 return NULL;
43 }
44 tok = &tokens[parser->toknext++];
45 tok->start = tok->end = -1;
46 tok->size = 0;
47#ifdef JSMN_PARENT_LINKS
48 tok->parent = -1;
49#endif
50 return tok;
51}
52
53/**
54 * Fills token type and boundaries.
55 */
56static void jsmn_fill_token(jsmntok_t *token, jsmntype_t type, int start,
57 int end) {
58 token->type = type;
59 token->start = start;
60 token->end = end;
61 token->size = 0;
62}
63
64/**
65 * Fills next available token with JSON primitive.
66 */
67static jsmnerr_t jsmn_parse_primitive(jsmn_parser *parser, const char *js,
68 size_t len, jsmntok_t *tokens, size_t num_tokens) {
69 jsmntok_t *token;
70 int start;
71
72 start = parser->pos;
73
74 for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) {
75 switch (js[parser->pos]) {
76#ifndef JSMN_STRICT
77 /* In strict mode primitive must be followed by "," or "}" or "]" */
78 case ':':
79#endif
80 case '\t':
81 case '\r':
82 case '\n':
83 case ' ':
84 case ',':
85 case ']':
86 case '}':
87 goto found;
88 }
89 if (js[parser->pos] < 32 || js[parser->pos] >= 127) {
90 parser->pos = start;
91 return JSMN_ERROR_INVAL;
92 }
93 }
94#ifdef JSMN_STRICT
95 /* In strict mode primitive must be followed by a comma/object/array */
96 parser->pos = start;
97 return JSMN_ERROR_PART;
98#endif
99
100 found: if (tokens == NULL) {
101 parser->pos--;
102 return (jsmnerr_t) 0;
103 }
104 token = jsmn_alloc_token(parser, tokens, num_tokens);
105 if (token == NULL) {
106 parser->pos = start;
107 return JSMN_ERROR_NOMEM;
108 }
109 jsmn_fill_token(token, JSMN_PRIMITIVE, start, parser->pos);
110#ifdef JSMN_PARENT_LINKS
111 token->parent = parser->toksuper;
112#endif
113 parser->pos--;
114 return (jsmnerr_t) 0;
115}
116
117/**
118 * Filsl next token with JSON string.
119 */
120static jsmnerr_t jsmn_parse_string(jsmn_parser *parser, const char *js,
121 size_t len, jsmntok_t *tokens, size_t num_tokens) {
122 jsmntok_t *token;
123
124 int start = parser->pos;
125
126 parser->pos++;
127
128 /* Skip starting quote */
129 for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) {
130 char c = js[parser->pos];
131
132 /* Quote: end of string */
133 if (c == '\"') {
134 if (tokens == NULL) {
135 return (jsmnerr_t) 0;
136 }
137 token = jsmn_alloc_token(parser, tokens, num_tokens);
138 if (token == NULL) {
139 parser->pos = start;
140 return JSMN_ERROR_NOMEM;
141 }
142 jsmn_fill_token(token, JSMN_STRING, start + 1, parser->pos);
143#ifdef JSMN_PARENT_LINKS
144 token->parent = parser->toksuper;
145#endif
146 return (jsmnerr_t) 0;
147 }
148
149 /* Backslash: Quoted symbol expected */
150 if (c == '\\') {
151 parser->pos++;
152 switch (js[parser->pos]) {
153 /* Allowed escaped symbols */
154 case '\"':
155 case '/':
156 case '\\':
157 case 'b':
158 case 'f':
159 case 'r':
160 case 'n':
161 case 't':
162 break;
163 /* Allows escaped symbol \uXXXX */
164 case 'u':
165 parser->pos++;
166 int i;
167 for (i = 0; i < 4 && js[parser->pos] != '\0'; i++) {
168 /* If it isn't a hex character we have an error */
169 if (!((js[parser->pos] >= 48 && js[parser->pos] <= 57) || /* 0-9 */
170 (js[parser->pos] >= 65 && js[parser->pos] <= 70) || /* A-F */
171 (js[parser->pos] >= 97 && js[parser->pos] <= 102))) { /* a-f */
172 parser->pos = start;
173 return JSMN_ERROR_INVAL;
174 }
175 parser->pos++;
176 }
177 parser->pos--;
178 break;
179 /* Unexpected symbol */
180 default:
181 parser->pos = start;
182 return JSMN_ERROR_INVAL;
183 }
184 }
185 }
186 parser->pos = start;
187 return JSMN_ERROR_PART;
188}
189
190/**
191 * Parse JSON string and fill tokens.
192 */
193jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, size_t len,
194 jsmntok_t *tokens, unsigned int num_tokens) {
195 jsmnerr_t r;
196 int i;
197 jsmntok_t *token;
198 int count = 0;
199
200 for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) {
201 char c;
202 jsmntype_t type;
203
204 c = js[parser->pos];
205 switch (c) {
206 case '{':
207 case '[':
208 count++;
209 if (tokens == NULL) {
210 break;
211 }
212 token = jsmn_alloc_token(parser, tokens, num_tokens);
213 if (token == NULL)
214 return JSMN_ERROR_NOMEM;
215 if (parser->toksuper != -1) {
216 tokens[parser->toksuper].size++;
217#ifdef JSMN_PARENT_LINKS
218 token->parent = parser->toksuper;
219#endif
220 }
221 token->type = (c == '{' ? JSMN_OBJECT : JSMN_ARRAY);
222 token->start = parser->pos;
223 parser->toksuper = parser->toknext - 1;
224 break;
225 case '}':
226 case ']':
227 if (tokens == NULL)
228 break;
229 type = (c == '}' ? JSMN_OBJECT : JSMN_ARRAY);
230#ifdef JSMN_PARENT_LINKS
231 if (parser->toknext < 1) {
232 return JSMN_ERROR_INVAL;
233 }
234 token = &tokens[parser->toknext - 1];
235 for (;;) {
236 if (token->start != -1 && token->end == -1) {
237 if (token->type != type) {
238 return JSMN_ERROR_INVAL;
239 }
240 token->end = parser->pos + 1;
241 parser->toksuper = token->parent;
242 break;
243 }
244 if (token->parent == -1) {
245 break;
246 }
247 token = &tokens[token->parent];
248 }
249#else
250 for (i = parser->toknext - 1; i >= 0; i--) {
251 token = &tokens[i];
252 if (token->start != -1 && token->end == -1) {
253 if (token->type != type) {
254 return JSMN_ERROR_INVAL;
255 }
256 parser->toksuper = -1;
257 token->end = parser->pos + 1;
258 break;
259 }
260 }
261 /* Error if unmatched closing bracket */
262 if (i == -1)
263 return JSMN_ERROR_INVAL;
264 for (; i >= 0; i--) {
265 token = &tokens[i];
266 if (token->start != -1 && token->end == -1) {
267 parser->toksuper = i;
268 break;
269 }
270 }
271#endif
272 break;
273 case '\"':
274 r = jsmn_parse_string(parser, js, len, tokens, num_tokens);
275 if (r < 0)
276 return r;
277 count++;
278 if (parser->toksuper != -1 && tokens != NULL)
279 tokens[parser->toksuper].size++;
280 break;
281 case '\t':
282 case '\r':
283 case '\n':
284 case ':':
285 case ',':
286 case ' ':
287 break;
288#ifdef JSMN_STRICT
289 /* In strict mode primitives are: numbers and booleans */
290 case '-':
291 case '0':
292 case '1':
293 case '2':
294 case '3':
295 case '4':
296 case '5':
297 case '6':
298 case '7':
299 case '8':
300 case '9':
301 case 't':
302 case 'f':
303 case 'n':
304#else
305 /* In non-strict mode every unquoted value is a primitive */
306 default:
307#endif
308 r = jsmn_parse_primitive(parser, js, len, tokens, num_tokens);
309 if (r < 0)
310 return r;
311 count++;
312 if (parser->toksuper != -1 && tokens != NULL)
313 tokens[parser->toksuper].size++;
314 break;
315
316#ifdef JSMN_STRICT
317 /* Unexpected char in strict mode */
318 default:
319 return JSMN_ERROR_INVAL;
320#endif
321 }
322 }
323
324 for (i = parser->toknext - 1; i >= 0; i--) {
325 /* Unmatched opened object or array */
326 if (tokens[i].start != -1 && tokens[i].end == -1) {
327 return JSMN_ERROR_PART;
328 }
329 }
330
331 return (jsmnerr_t) count;
332}
333
334/**
335 * Creates a new parser based over a given buffer with an array of tokens
336 * available.
337 */
338void jsmn_init(jsmn_parser *parser) {
339 parser->pos = 0;
340 parser->toknext = 0;
341 parser->toksuper = -1;
342}
diff --git a/aws_iot_src/utils/jsmn.h b/aws_iot_src/utils/jsmn.h
new file mode 100644
index 0000000..96bdb95
--- /dev/null
+++ b/aws_iot_src/utils/jsmn.h
@@ -0,0 +1,101 @@
1/*
2 * Copyright (c) 2010 Serge A. Zaitsev
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
22
23/**
24 * @file jsmn.h
25 * @brief Definition of the JSMN (Jasmine) JSON parser.
26 *
27 * For more information on JSMN:
28 * @see http://zserge.com/jsmn.html
29 */
30
31#ifndef __JSMN_H_
32#define __JSMN_H_
33#include <stddef.h>
34#define JSMN_STRICT
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39/**
40 * JSON type identifier. Basic types are:
41 * o Object
42 * o Array
43 * o String
44 * o Other primitive: number, boolean (true/false) or null
45 */
46typedef enum {
47 JSMN_PRIMITIVE = 0, JSMN_OBJECT = 1, JSMN_ARRAY = 2, JSMN_STRING = 3
48} jsmntype_t;
49
50typedef enum {
51 /* Not enough tokens were provided */
52 JSMN_ERROR_NOMEM = -1,
53 /* Invalid character inside JSON string */
54 JSMN_ERROR_INVAL = -2,
55 /* The string is not a full JSON packet, more bytes expected */
56 JSMN_ERROR_PART = -3,
57} jsmnerr_t;
58
59/**
60 * JSON token description.
61 * @param type type (object, array, string etc.)
62 * @param start start position in JSON data string
63 * @param end end position in JSON data string
64 */
65typedef struct {
66 jsmntype_t type;
67 int start;
68 int end;
69 int size;
70#ifdef JSMN_PARENT_LINKS
71 int parent;
72#endif
73} jsmntok_t;
74
75/**
76 * JSON parser. Contains an array of token blocks available. Also stores
77 * the string being parsed now and current position in that string
78 */
79typedef struct {
80 unsigned int pos; /* offset in the JSON string */
81 unsigned int toknext; /* next token to allocate */
82 int toksuper; /* superior token node, e.g parent object or array */
83} jsmn_parser;
84
85/**
86 * Create JSON parser over an array of tokens
87 */
88void jsmn_init(jsmn_parser *parser);
89
90/**
91 * Run JSON parser. It parses a JSON data string into and array of tokens, each describing
92 * a single JSON object.
93 */
94jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, size_t len,
95 jsmntok_t *tokens, unsigned int num_tokens);
96
97#ifdef __cplusplus
98}
99#endif
100
101#endif /* __JSMN_H_ */
diff --git a/aws_mqtt_embedded_client_lib/CONTRIBUTING.md b/aws_mqtt_embedded_client_lib/CONTRIBUTING.md
new file mode 100644
index 0000000..5f799ef
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/CONTRIBUTING.md
@@ -0,0 +1,47 @@
1Contributing to Paho
2====================
3
4Thanks for your interest in this project.
5
6Project description:
7--------------------
8
9The Paho project has been created to provide scalable open-source implementations of open and standard messaging protocols aimed at new, existing, and emerging applications for Machine-to-Machine (M2M) and Internet of Things (IoT).
10Paho reflects the inherent physical and cost constraints of device connectivity. Its objectives include effective levels of decoupling between devices and applications, designed to keep markets open and encourage the rapid growth of scalable Web and Enterprise middleware and applications. Paho is being kicked off with MQTT publish/subscribe client implementations for use on embedded platforms, along with corresponding server support as determined by the community.
11
12- https://projects.eclipse.org/projects/technology.paho
13
14Developer resources:
15--------------------
16
17Information regarding source code management, builds, coding standards, and more.
18
19- https://projects.eclipse.org/projects/technology.paho/developer
20
21Contributor License Agreement:
22------------------------------
23
24Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).
25
26- http://www.eclipse.org/legal/CLA.php
27
28Contact:
29--------
30
31Contact the project developers via the project's "dev" list.
32
33- https://dev.eclipse.org/mailman/listinfo/paho-dev
34
35Search for bugs:
36----------------
37
38This project uses Bugzilla to track ongoing development and issues.
39
40- https://bugs.eclipse.org/bugs/buglist.cgi?product=Paho
41
42Create a new bug:
43-----------------
44
45Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!
46
47- https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Paho
diff --git a/aws_mqtt_embedded_client_lib/CopySrc.mk b/aws_mqtt_embedded_client_lib/CopySrc.mk
new file mode 100644
index 0000000..02c6211
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/CopySrc.mk
@@ -0,0 +1,5 @@
1MQTTPacket := $(call copy, $(pwd)/MQTTPacket/src,$(brazil.build.dir)/MQTTPacket/src)
2
3MQTTClient := $(call copy, $(pwd)/MQTTClient/src,$(brazil.build.dir)/MQTTClient/src)
4
5MQTTClientC := $(call copy, $(pwd)/MQTTClient-C/src,$(brazil.build.dir)/MQTTClient-C/src)
diff --git a/aws_mqtt_embedded_client_lib/Debug/makefile b/aws_mqtt_embedded_client_lib/Debug/makefile
new file mode 100644
index 0000000..e0c8341
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/Debug/makefile
@@ -0,0 +1,45 @@
1################################################################################
2# Automatically-generated file. Do not edit!
3################################################################################
4
5-include ../makefile.init
6
7RM := rm -rf
8
9# All of the sources participating in the build are defined here
10-include sources.mk
11-include MQTTPacket/src/subdir.mk
12-include MQTTPacket/samples/subdir.mk
13-include subdir.mk
14-include objects.mk
15
16ifneq ($(MAKECMDGOALS),clean)
17ifneq ($(strip $(C_DEPS)),)
18-include $(C_DEPS)
19endif
20endif
21
22-include ../makefile.defs
23
24# Add inputs and outputs from these tool invocations to the build variables
25
26# All Target
27all: libembedded-C.so
28
29# Tool invocations
30libembedded-C.so: $(OBJS) $(USER_OBJS)
31 @echo 'Building target: $@'
32 @echo 'Invoking: GCC C Linker'
33 gcc -shared -o "libembedded-C.so" $(OBJS) $(USER_OBJS) $(LIBS)
34 @echo 'Finished building target: $@'
35 @echo ' '
36
37# Other Targets
38clean:
39 -$(RM) $(C_DEPS)$(LIBRARIES)$(OBJS) libembedded-C.so
40 -@echo ' '
41
42.PHONY: all clean dependents
43.SECONDARY:
44
45-include ../makefile.targets
diff --git a/aws_mqtt_embedded_client_lib/Debug/objects.mk b/aws_mqtt_embedded_client_lib/Debug/objects.mk
new file mode 100644
index 0000000..742c2da
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/Debug/objects.mk
@@ -0,0 +1,8 @@
1################################################################################
2# Automatically-generated file. Do not edit!
3################################################################################
4
5USER_OBJS :=
6
7LIBS :=
8
diff --git a/aws_mqtt_embedded_client_lib/Debug/sources.mk b/aws_mqtt_embedded_client_lib/Debug/sources.mk
new file mode 100644
index 0000000..00b7058
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/Debug/sources.mk
@@ -0,0 +1,18 @@
1################################################################################
2# Automatically-generated file. Do not edit!
3################################################################################
4
5ASM_SRCS :=
6OBJ_SRCS :=
7S_UPPER_SRCS :=
8C_SRCS :=
9O_SRCS :=
10C_DEPS :=
11LIBRARIES :=
12OBJS :=
13
14# Every subdirectory with source files must be described here
15SUBDIRS := \
16MQTTPacket/src \
17MQTTPacket/samples \
18
diff --git a/aws_mqtt_embedded_client_lib/Debug/src/MQTTDeserializeConnect.d b/aws_mqtt_embedded_client_lib/Debug/src/MQTTDeserializeConnect.d
new file mode 100644
index 0000000..5ca53ed
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/Debug/src/MQTTDeserializeConnect.d
@@ -0,0 +1,4 @@
1src/MQTTDeserializeConnect.d src/MQTTDeserializeConnect.o: \
2 ../src/MQTTDeserializeConnect.c ../src/StackTrace.h
3
4../src/StackTrace.h:
diff --git a/aws_mqtt_embedded_client_lib/Debug/src/subdir.mk b/aws_mqtt_embedded_client_lib/Debug/src/subdir.mk
new file mode 100644
index 0000000..cbae0e4
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/Debug/src/subdir.mk
@@ -0,0 +1,48 @@
1################################################################################
2# Automatically-generated file. Do not edit!
3################################################################################
4
5# Add inputs and outputs from these tool invocations to the build variables
6C_SRCS += \
7../src/MQTTConnectClient.c \
8../src/MQTTConnectServer.c \
9../src/MQTTDeserializePublish.c \
10../src/MQTTPacket.c \
11../src/MQTTSerializePublish.c \
12../src/MQTTSubscribeClient.c \
13../src/MQTTSubscribeServer.c \
14../src/MQTTUnsubscribeClient.c \
15../src/MQTTUnsubscribeServer.c
16
17C_DEPS += \
18./src/MQTTConnectClient.d \
19./src/MQTTConnectServer.d \
20./src/MQTTDeserializePublish.d \
21./src/MQTTPacket.d \
22./src/MQTTSerializePublish.d \
23./src/MQTTSubscribeClient.d \
24./src/MQTTSubscribeServer.d \
25./src/MQTTUnsubscribeClient.d \
26./src/MQTTUnsubscribeServer.d
27
28OBJS += \
29./src/MQTTConnectClient.o \
30./src/MQTTConnectServer.o \
31./src/MQTTDeserializePublish.o \
32./src/MQTTPacket.o \
33./src/MQTTSerializePublish.o \
34./src/MQTTSubscribeClient.o \
35./src/MQTTSubscribeServer.o \
36./src/MQTTUnsubscribeClient.o \
37./src/MQTTUnsubscribeServer.o
38
39
40# Each subdirectory must supply rules for building sources it contributes
41src/%.o: ../src/%.c
42 @echo 'Building file: $<'
43 @echo 'Invoking: GCC C Compiler'
44 gcc -I"/home/icraggs/work/paho/org.eclipse.paho.mqtt.embedded-c/src" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
45 @echo 'Finished building: $<'
46 @echo ' '
47
48
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient-C/samples/linux/build.sh b/aws_mqtt_embedded_client_lib/MQTTClient-C/samples/linux/build.sh
new file mode 100644
index 0000000..0c4c0e4
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient-C/samples/linux/build.sh
@@ -0,0 +1,3 @@
1cp ../../src/MQTTClient.c .
2sed -e 's/""/"MQTTLinux.h"/g' ../../src/MQTTClient.h > MQTTClient.h
3gcc stdoutsub.c -I ../../src -I ../../src/linux -I ../../../MQTTPacket/src MQTTClient.c ../../src/linux/MQTTLinux.c ../../../MQTTPacket/src/MQTTFormat.c ../../../MQTTPacket/src/MQTTPacket.c ../../../MQTTPacket/src/MQTTDeserializePublish.c ../../../MQTTPacket/src/MQTTConnectClient.c ../../../MQTTPacket/src/MQTTSubscribeClient.c ../../../MQTTPacket/src/MQTTSerializePublish.c -o stdoutsub ../../../MQTTPacket/src/MQTTConnectServer.c ../../../MQTTPacket/src/MQTTSubscribeServer.c ../../../MQTTPacket/src/MQTTUnsubscribeServer.c ../../../MQTTPacket/src/MQTTUnsubscribeClient.c \ No newline at end of file
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient-C/samples/linux/stdoutsub.c b/aws_mqtt_embedded_client_lib/MQTTClient-C/samples/linux/stdoutsub.c
new file mode 100644
index 0000000..a324754
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient-C/samples/linux/stdoutsub.c
@@ -0,0 +1,253 @@
1/*******************************************************************************
2 * Copyright (c) 2012, 2013 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial contribution
15 * Ian Craggs - change delimiter option from char to string
16 * Al Stockdill-Mander - Version using the embedded C client
17 *******************************************************************************/
18
19/*
20
21 stdout subscriber
22
23 compulsory parameters:
24
25 topic to subscribe to
26
27 defaulted parameters:
28
29 --host localhost
30 --port 1883
31 --qos 2
32 --delimiter \n
33 --clientid stdout_subscriber
34
35 --userid none
36 --password none
37
38 for example:
39
40 stdoutsub topic/of/interest --host iot.eclipse.org
41
42*/
43#include <stdio.h>
44#include "MQTTClient.h"
45
46#include <stdio.h>
47#include <signal.h>
48#include <memory.h>
49
50#include <sys/time.h>
51
52
53volatile int toStop = 0;
54
55
56void usage()
57{
58 printf("MQTT stdout subscriber\n");
59 printf("Usage: stdoutsub topicname <options>, where options are:\n");
60 printf(" --host <hostname> (default is localhost)\n");
61 printf(" --port <port> (default is 1883)\n");
62 printf(" --qos <qos> (default is 2)\n");
63 printf(" --delimiter <delim> (default is \\n)\n");
64 printf(" --clientid <clientid> (default is hostname+timestamp)\n");
65 printf(" --username none\n");
66 printf(" --password none\n");
67 printf(" --showtopics <on or off> (default is on if the topic has a wildcard, else off)\n");
68 exit(-1);
69}
70
71
72void cfinish(int sig)
73{
74 signal(SIGINT, NULL);
75 toStop = 1;
76}
77
78
79struct opts_struct
80{
81 char* clientid;
82 int nodelimiter;
83 char* delimiter;
84 enum QoS qos;
85 char* username;
86 char* password;
87 char* host;
88 int port;
89 int showtopics;
90} opts =
91{
92 (char*)"stdout-subscriber", 0, (char*)"\n", QOS2, NULL, NULL, (char*)"localhost", 1883, 0
93};
94
95
96void getopts(int argc, char** argv)
97{
98 int count = 2;
99
100 while (count < argc)
101 {
102 if (strcmp(argv[count], "--qos") == 0)
103 {
104 if (++count < argc)
105 {
106 if (strcmp(argv[count], "0") == 0)
107 opts.qos = QOS0;
108 else if (strcmp(argv[count], "1") == 0)
109 opts.qos = QOS1;
110 else if (strcmp(argv[count], "2") == 0)
111 opts.qos = QOS2;
112 else
113 usage();
114 }
115 else
116 usage();
117 }
118 else if (strcmp(argv[count], "--host") == 0)
119 {
120 if (++count < argc)
121 opts.host = argv[count];
122 else
123 usage();
124 }
125 else if (strcmp(argv[count], "--port") == 0)
126 {
127 if (++count < argc)
128 opts.port = atoi(argv[count]);
129 else
130 usage();
131 }
132 else if (strcmp(argv[count], "--clientid") == 0)
133 {
134 if (++count < argc)
135 opts.clientid = argv[count];
136 else
137 usage();
138 }
139 else if (strcmp(argv[count], "--username") == 0)
140 {
141 if (++count < argc)
142 opts.username = argv[count];
143 else
144 usage();
145 }
146 else if (strcmp(argv[count], "--password") == 0)
147 {
148 if (++count < argc)
149 opts.password = argv[count];
150 else
151 usage();
152 }
153 else if (strcmp(argv[count], "--delimiter") == 0)
154 {
155 if (++count < argc)
156 opts.delimiter = argv[count];
157 else
158 opts.nodelimiter = 1;
159 }
160 else if (strcmp(argv[count], "--showtopics") == 0)
161 {
162 if (++count < argc)
163 {
164 if (strcmp(argv[count], "on") == 0)
165 opts.showtopics = 1;
166 else if (strcmp(argv[count], "off") == 0)
167 opts.showtopics = 0;
168 else
169 usage();
170 }
171 else
172 usage();
173 }
174 count++;
175 }
176
177}
178
179
180void messageArrived(MessageData* md)
181{
182 MQTTMessage* message = md->message;
183
184 if (opts.showtopics)
185 printf("%.*s\t", md->topicName->lenstring.len, md->topicName->lenstring.data);
186 if (opts.nodelimiter)
187 printf("%.*s", (int)message->payloadlen, (char*)message->payload);
188 else
189 printf("%.*s%s", (int)message->payloadlen, (char*)message->payload, opts.delimiter);
190 //fflush(stdout);
191}
192
193
194int main(int argc, char** argv)
195{
196 int rc = 0;
197 unsigned char buf[100];
198 unsigned char readbuf[100];
199
200 if (argc < 2)
201 usage();
202
203 char* topic = argv[1];
204
205 if (strchr(topic, '#') || strchr(topic, '+'))
206 opts.showtopics = 1;
207 if (opts.showtopics)
208 printf("topic is %s\n", topic);
209
210 getopts(argc, argv);
211
212 Network n;
213 Client c;
214
215 signal(SIGINT, cfinish);
216 signal(SIGTERM, cfinish);
217
218 NewNetwork(&n);
219 ConnectNetwork(&n, opts.host, opts.port);
220 MQTTClient(&c, &n, 1000, buf, 100, readbuf, 100);
221
222 MQTTPacket_connectData data = MQTTPacket_connectData_initializer;
223 data.willFlag = 0;
224 data.MQTTVersion = 3;
225 data.clientID.cstring = opts.clientid;
226 data.username.cstring = opts.username;
227 data.password.cstring = opts.password;
228
229 data.keepAliveInterval = 10;
230 data.cleansession = 1;
231 printf("Connecting to %s %d\n", opts.host, opts.port);
232
233 rc = MQTTConnect(&c, &data);
234 printf("Connected %d\n", rc);
235
236 printf("Subscribing to %s\n", topic);
237 rc = MQTTSubscribe(&c, topic, opts.qos, messageArrived);
238 printf("Subscribed %d\n", rc);
239
240 while (!toStop)
241 {
242 MQTTYield(&c, 1000);
243 }
244
245 printf("Stopping\n");
246
247 MQTTDisconnect(&c);
248 n.disconnect(&n);
249
250 return 0;
251}
252
253
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient-C/src/MQTTClient.c b/aws_mqtt_embedded_client_lib/MQTTClient-C/src/MQTTClient.c
new file mode 100644
index 0000000..afe58fd
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient-C/src/MQTTClient.c
@@ -0,0 +1,568 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Allan Stockdill-Mander/Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#include "MQTTClient.h"
18#include <string.h>
19
20void NewMessageData(MessageData* md, MQTTString* aTopicName, MQTTMessage* aMessgage, pApplicationHandler_t applicationHandler) {
21 md->topicName = aTopicName;
22 md->message = aMessgage;
23 md->applicationHandler = applicationHandler;
24}
25
26
27int getNextPacketId(Client *c) {
28 return c->next_packetid = (c->next_packetid == MAX_PACKET_ID) ? 1 : c->next_packetid + 1;
29}
30
31
32int sendPacket(Client* c, int length, Timer* timer)
33{
34 int rc = FAILURE,
35 sent = 0;
36
37 if(length >= c->buf_size){
38 return FAILURE;
39 }
40
41 while (sent < length && !expired(timer))
42 {
43 rc = c->ipstack->mqttwrite(c->ipstack, &c->buf[sent], length, left_ms(timer));
44 if (rc < 0) // there was an error writing the data
45 break;
46 sent += rc;
47 }
48 if (sent == length)
49 {
50 //countdown(&c->ping_timer, c->keepAliveInterval); // record the fact that we have successfully sent the packet
51 rc = SUCCESS;
52 }
53 else
54 rc = FAILURE;
55 return rc;
56}
57
58
59void MQTTClient(Client* c, Network* network, unsigned int command_timeout_ms, unsigned char* buf, size_t buf_size, unsigned char* readbuf, size_t readbuf_size)
60{
61 int i;
62 c->ipstack = network;
63
64 for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
65 c->messageHandlers[i].topicFilter = 0;
66 c->command_timeout_ms = command_timeout_ms;
67 c->buf = buf;
68 c->buf_size = buf_size;
69 c->readbuf = readbuf;
70 c->readbuf_size = readbuf_size;
71 c->isconnected = 0;
72 c->ping_outstanding = 0;
73 c->defaultMessageHandler = NULL;
74 InitTimer(&c->ping_timer);
75}
76
77
78int decodePacket(Client* c, int* value, int timeout)
79{
80 unsigned char i;
81 int multiplier = 1;
82 int len = 0;
83 const int MAX_NO_OF_REMAINING_LENGTH_BYTES = 4;
84
85 *value = 0;
86 do
87 {
88 int rc = MQTTPACKET_READ_ERROR;
89
90 if (++len > MAX_NO_OF_REMAINING_LENGTH_BYTES)
91 {
92 rc = MQTTPACKET_READ_ERROR; /* bad data */
93 goto exit;
94 }
95 rc = c->ipstack->mqttread(c->ipstack, &i, 1, timeout);
96 if (rc != 1)
97 goto exit;
98 *value += (i & 127) * multiplier;
99 multiplier *= 128;
100 } while ((i & 128) != 0);
101exit:
102 return len;
103}
104
105
106int readPacket(Client* c, Timer* timer)
107{
108 int rc = FAILURE;
109 MQTTHeader header = {0};
110 int len = 0;
111 int rem_len = 0;
112
113 /* 1. read the header byte. This has the packet type in it */
114 if (c->ipstack->mqttread(c->ipstack, c->readbuf, 1, left_ms(timer)) != 1)
115 goto exit;
116
117 len = 1;
118 /* 2. read the remaining length. This is variable in itself */
119 decodePacket(c, &rem_len, left_ms(timer));
120
121 // if the buffer is too big then the message will be dropped silently
122 if(rem_len >= c->readbuf_size){
123 goto exit;
124 }
125 len += MQTTPacket_encode(c->readbuf + 1, rem_len); /* put the original remaining length back into the buffer */
126
127 /* 3. read the rest of the buffer using a callback to supply the rest of the data */
128 if (rem_len > 0 && (c->ipstack->mqttread(c->ipstack, c->readbuf + len, rem_len, left_ms(timer)) != rem_len))
129 goto exit;
130
131 header.byte = c->readbuf[0];
132 rc = header.bits.type;
133exit:
134 return rc;
135}
136
137
138// assume topic filter and name is in correct format
139// # can only be at end
140// + and # can only be next to separator
141char isTopicMatched(char* topicFilter, MQTTString* topicName)
142{
143 char* curf = topicFilter;
144 char* curn = topicName->lenstring.data;
145 char* curn_end = curn + topicName->lenstring.len;
146
147 while (*curf && curn < curn_end)
148 {
149 if (*curn == '/' && *curf != '/')
150 break;
151 if (*curf != '+' && *curf != '#' && *curf != *curn)
152 break;
153 if (*curf == '+')
154 { // skip until we meet the next separator, or end of string
155 char* nextpos = curn + 1;
156 while (nextpos < curn_end && *nextpos != '/')
157 nextpos = ++curn + 1;
158 }
159 else if (*curf == '#')
160 curn = curn_end - 1; // skip until end of string
161 curf++;
162 curn++;
163 };
164
165 return (curn == curn_end) && (*curf == '\0');
166}
167
168
169int deliverMessage(Client* c, MQTTString* topicName, MQTTMessage* message)
170{
171 int i;
172 int rc = FAILURE;
173
174 // we have to find the right message handler - indexed by topic
175 for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
176 {
177 if (c->messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(topicName, (char*)c->messageHandlers[i].topicFilter) ||
178 isTopicMatched((char*)c->messageHandlers[i].topicFilter, topicName)))
179 {
180 if (c->messageHandlers[i].fp != NULL)
181 {
182 MessageData md;
183 NewMessageData(&md, topicName, message, c->messageHandlers[i].applicationHandler);
184 c->messageHandlers[i].fp(&md);
185 rc = SUCCESS;
186 }
187 }
188 }
189
190 if (rc == FAILURE && c->defaultMessageHandler != NULL)
191 {
192 MessageData md;
193 NewMessageData(&md, topicName, message, NULL);
194 c->defaultMessageHandler(&md);
195 rc = SUCCESS;
196 }
197
198 return rc;
199}
200
201
202int keepalive(Client* c)
203{
204 int rc = FAILURE;
205
206 if (c->keepAliveInterval == 0)
207 {
208 return SUCCESS;
209 }
210
211 if (expired(&c->ping_timer))
212 {
213 if (!c->ping_outstanding)
214 {
215 // there is not a ping outstanding - send one
216 Timer timer;
217 InitTimer(&timer);
218 countdown_ms(&timer, 1000);
219 int len = MQTTSerialize_pingreq(c->buf, c->buf_size);
220 rc = sendPacket(c, len, &timer); // send the ping packet
221 if (len > 0 && rc == SUCCESS)
222 {
223 c->ping_outstanding = 1;
224 // start a timer to wait for PINGRESP from server
225 countdown(&c->ping_timer, c->keepAliveInterval / 2);
226 }
227 else
228 {
229 rc = FAILURE;
230 }
231 }
232 else
233 {
234 // timer expired while waiting for a ping - decide we are disconnected
235 MQTTDisconnect(c);
236 if (c->disconnectHandler != NULL) {
237 c->disconnectHandler();
238 }
239 }
240 }
241 else
242 {
243 rc = SUCCESS;
244 }
245
246 return rc;
247}
248
249
250int cycle(Client* c, Timer* timer)
251{
252 // read the socket, see what work is due
253 unsigned short packet_type = readPacket(c, timer);
254
255 int len = 0,
256 rc = SUCCESS;
257
258 switch (packet_type)
259 {
260 case CONNACK:
261 case PUBACK:
262 case SUBACK:
263 break;
264 case PUBLISH:
265 {
266 MQTTString topicName;
267 MQTTMessage msg;
268 if (MQTTDeserialize_publish((unsigned char*)&msg.dup, (int*)&msg.qos, (unsigned char*)&msg.retained, (unsigned short*)&msg.id, &topicName,
269 (unsigned char**)&msg.payload, (int*)&msg.payloadlen, c->readbuf, c->readbuf_size) != 1)
270 goto exit;
271 deliverMessage(c, &topicName, &msg);
272 if (msg.qos != QOS0)
273 {
274 if (msg.qos == QOS1)
275 len = MQTTSerialize_ack(c->buf, c->buf_size, PUBACK, 0, msg.id);
276 else if (msg.qos == QOS2)
277 len = MQTTSerialize_ack(c->buf, c->buf_size, PUBREC, 0, msg.id);
278 if (len <= 0)
279 rc = FAILURE;
280 else
281 rc = sendPacket(c, len, timer);
282 if (rc == FAILURE)
283 goto exit; // there was a problem
284 }
285 break;
286 }
287 case PUBREC:
288 {
289 unsigned short mypacketid;
290 unsigned char dup, type;
291 if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1)
292 rc = FAILURE;
293 else if ((len = MQTTSerialize_ack(c->buf, c->buf_size, PUBREL, 0, mypacketid)) <= 0)
294 rc = FAILURE;
295 else if ((rc = sendPacket(c, len, timer)) != SUCCESS) // send the PUBREL packet
296 rc = FAILURE; // there was a problem
297 if (rc == FAILURE)
298 goto exit; // there was a problem
299 break;
300 }
301 case PUBCOMP:
302 break;
303 case PINGRESP:
304 c->ping_outstanding = 0;
305 countdown(&c->ping_timer, c->keepAliveInterval);
306 break;
307 }
308 rc = keepalive(c);
309exit:
310 if (rc == SUCCESS)
311 rc = packet_type;
312 return rc;
313}
314
315
316int MQTTYield(Client* c, int timeout_ms)
317{
318 int rc = SUCCESS;
319 Timer timer;
320
321 if (!c->isconnected) {
322 return FAILURE;
323 }
324
325 InitTimer(&timer);
326 countdown_ms(&timer, timeout_ms);
327 while (!expired(&timer))
328 {
329 if (cycle(c, &timer) == FAILURE)
330 {
331 rc = FAILURE;
332 break;
333 }
334 }
335
336 return rc;
337}
338
339
340// only used in single-threaded mode where one command at a time is in process
341int waitfor(Client* c, int packet_type, Timer* timer)
342{
343 int rc = FAILURE;
344
345 do
346 {
347 if (expired(timer))
348 break; // we timed out
349 }
350 while ((rc = cycle(c, timer)) != packet_type);
351
352 return rc;
353}
354
355
356int MQTTConnect(Client* c, MQTTPacket_connectData* options)
357{
358 Timer connect_timer;
359 int rc = FAILURE;
360 MQTTPacket_connectData default_options = MQTTPacket_connectData_initializer;
361 int len = 0;
362
363 InitTimer(&connect_timer);
364 countdown_ms(&connect_timer, c->command_timeout_ms);
365
366 if (c->isconnected) // don't send connect packet again if we are already connected
367 goto exit;
368
369 if (options == 0)
370 options = &default_options; // set default options if none were supplied
371
372 c->keepAliveInterval = options->keepAliveInterval;
373 countdown(&c->ping_timer, c->keepAliveInterval);
374 if ((len = MQTTSerialize_connect(c->buf, c->buf_size, options)) <= 0)
375 goto exit;
376 if ((rc = sendPacket(c, len, &connect_timer)) != SUCCESS) // send the connect packet
377 goto exit; // there was a problem
378
379 // this will be a blocking call, wait for the connack
380 if (waitfor(c, CONNACK, &connect_timer) == CONNACK)
381 {
382 unsigned char connack_rc = 255;
383 char sessionPresent = 0;
384 if (MQTTDeserialize_connack((unsigned char*)&sessionPresent, &connack_rc, c->readbuf, c->readbuf_size) == 1)
385 rc = connack_rc;
386 else
387 rc = FAILURE;
388 }
389 else
390 rc = FAILURE;
391
392exit:
393 if (rc == SUCCESS)
394 c->isconnected = 1;
395 return rc;
396}
397
398
399int MQTTSubscribe(Client* c, const char* topicFilter, enum QoS qos, messageHandler messageHandler, pApplicationHandler_t applicationHandler)
400{
401 int rc = FAILURE;
402 Timer timer;
403 int len = 0;
404 int indexOfFreemessageHandler;
405
406 MQTTString topic = MQTTString_initializer;
407 topic.cstring = (char *)topicFilter;
408 unsigned char isMessageHandlerFree = 0;
409
410 InitTimer(&timer);
411 countdown_ms(&timer, c->command_timeout_ms);
412
413 if (!c->isconnected)
414 goto exit;
415
416 len = MQTTSerialize_subscribe(c->buf, c->buf_size, 0, getNextPacketId(c), 1, &topic, (int*)&qos);
417 if (len <= 0)
418 goto exit;
419
420 for (indexOfFreemessageHandler = 0; indexOfFreemessageHandler < MAX_MESSAGE_HANDLERS; ++indexOfFreemessageHandler){
421 if (c->messageHandlers[indexOfFreemessageHandler].topicFilter == 0){
422 isMessageHandlerFree = 1;
423 break;
424 }
425 }
426 if(isMessageHandlerFree == 0){
427 goto exit;
428 }
429 if ((rc = sendPacket(c, len, &timer)) != SUCCESS) // send the subscribe packet
430 goto exit; // there was a problem
431
432 if (waitfor(c, SUBACK, &timer) == SUBACK) // wait for suback
433 {
434 int count = 0, grantedQoS = -1;
435 unsigned short mypacketid;
436 if (MQTTDeserialize_suback(&mypacketid, 1, &count, &grantedQoS, c->readbuf, c->readbuf_size) == 1)
437 rc = grantedQoS; // 0, 1, 2 or 0x80
438 if (rc != 0x80)
439 {
440 c->messageHandlers[indexOfFreemessageHandler].topicFilter =
441 topicFilter;
442 c->messageHandlers[indexOfFreemessageHandler].fp = messageHandler;
443 c->messageHandlers[indexOfFreemessageHandler].applicationHandler =
444 applicationHandler;
445 rc = 0;
446 }
447 }
448 else
449 rc = FAILURE;
450
451exit:
452 return rc;
453}
454
455
456int MQTTUnsubscribe(Client* c, const char* topicFilter)
457{
458 int rc = FAILURE;
459 Timer timer;
460 MQTTString topic = MQTTString_initializer;
461 topic.cstring = (char *)topicFilter;
462 int len = 0;
463 int i=0;
464 InitTimer(&timer);
465 countdown_ms(&timer, c->command_timeout_ms);
466
467 if (!c->isconnected)
468 goto exit;
469
470 if ((len = MQTTSerialize_unsubscribe(c->buf, c->buf_size, 0, getNextPacketId(c), 1, &topic)) <= 0)
471 goto exit;
472 if ((rc = sendPacket(c, len, &timer)) != SUCCESS) // send the subscribe packet
473 goto exit; // there was a problem
474
475 if (waitfor(c, UNSUBACK, &timer) == UNSUBACK)
476 {
477 unsigned short mypacketid; // should be the same as the packetid above
478 if (MQTTDeserialize_unsuback(&mypacketid, c->readbuf, c->readbuf_size) == 1){
479 for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i){
480 if (c->messageHandlers[i].topicFilter != 0 && (strcmp(c->messageHandlers[i].topicFilter, topicFilter)==0)){
481 c->messageHandlers[i].topicFilter = 0;
482 // We dont want to break here, if the same topic is registered with 2 callbacks. Unlikeley scenario.
483 }
484 }
485 rc = 0;
486 }
487 }
488 else
489 rc = FAILURE;
490
491exit:
492 return rc;
493}
494
495
496int MQTTPublish(Client* c, const char* topicName, MQTTMessage* message)
497{
498 int rc = FAILURE;
499 Timer timer;
500 MQTTString topic = MQTTString_initializer;
501 topic.cstring = (char *)topicName;
502 int len = 0;
503
504 InitTimer(&timer);
505 countdown_ms(&timer, c->command_timeout_ms);
506
507 if (!c->isconnected)
508 goto exit;
509
510 if (message->qos == QOS1 || message->qos == QOS2)
511 message->id = getNextPacketId(c);
512
513 len = MQTTSerialize_publish(c->buf, c->buf_size, 0, message->qos, message->retained, message->id,
514 topic, (unsigned char*)message->payload, message->payloadlen);
515 if (len <= 0)
516 goto exit;
517 if ((rc = sendPacket(c, len, &timer)) != SUCCESS) // send the subscribe packet
518 goto exit; // there was a problem
519
520 if (message->qos == QOS1)
521 {
522 if (waitfor(c, PUBACK, &timer) == PUBACK)
523 {
524 unsigned short mypacketid;
525 unsigned char dup, type;
526 if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1)
527 rc = FAILURE;
528 }
529 else
530 rc = FAILURE;
531 }
532 else if (message->qos == QOS2)
533 {
534 if (waitfor(c, PUBCOMP, &timer) == PUBCOMP)
535 {
536 unsigned short mypacketid;
537 unsigned char dup, type;
538 if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1)
539 rc = FAILURE;
540 }
541 else
542 rc = FAILURE;
543 }
544
545exit:
546 return rc;
547}
548
549
550int MQTTDisconnect(Client* c)
551{
552 int rc = FAILURE;
553 Timer timer; // we might wait for incomplete incoming publishes to complete
554 int len = MQTTSerialize_disconnect(c->buf, c->buf_size);
555
556 InitTimer(&timer);
557 countdown_ms(&timer, c->command_timeout_ms);
558
559 if (len > 0)
560 rc = sendPacket(c, len, &timer); // send the disconnect packet
561
562 c->isconnected = 0;
563 return rc;
564}
565
566void setDisconnectHandler(Client* c, disconnectHander_t disconnectHandler) {
567 c->disconnectHandler = disconnectHandler;
568}
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient-C/src/MQTTClient.h b/aws_mqtt_embedded_client_lib/MQTTClient-C/src/MQTTClient.h
new file mode 100644
index 0000000..bf9cbc3
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient-C/src/MQTTClient.h
@@ -0,0 +1,103 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Allan Stockdill-Mander/Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#ifndef __MQTT_CLIENT_C_
18#define __MQTT_CLIENT_C_
19
20#include "MQTTPacket.h"
21#include "stdio.h"
22#include "aws_iot_config.h"
23
24//Platform specific implementation header file
25#include "network_interface.h"
26#include "timer_interface.h"
27
28#define MAX_PACKET_ID 65535
29#define MAX_MESSAGE_HANDLERS AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS
30
31enum QoS { QOS0, QOS1, QOS2 };
32
33// all failure return codes must be negative
34enum returnCode { BUFFER_OVERFLOW = -2, FAILURE = -1, SUCCESS = 0 };
35
36void NewTimer(Timer*);
37
38typedef struct MQTTMessage MQTTMessage;
39
40typedef struct MessageData MessageData;
41
42typedef void (*messageHandler)(MessageData*);
43typedef void (*pApplicationHandler_t)(void);
44typedef void (*disconnectHander_t)(void);
45
46struct MQTTMessage
47{
48 enum QoS qos;
49 char retained;
50 char dup;
51 unsigned short id;
52 void *payload;
53 size_t payloadlen;
54};
55
56struct MessageData
57{
58 MQTTMessage* message;
59 MQTTString* topicName;
60 pApplicationHandler_t applicationHandler;
61};
62
63typedef struct Client Client;
64
65int MQTTConnect (Client*, MQTTPacket_connectData*);
66int MQTTPublish (Client*, const char*, MQTTMessage*);
67int MQTTSubscribe(Client* c, const char* topicFilter, enum QoS qos, messageHandler messageHandler, pApplicationHandler_t applicationHandler);
68int MQTTUnsubscribe (Client*, const char*);
69int MQTTDisconnect (Client*);
70int MQTTYield (Client*, int);
71
72void setDefaultMessageHandler(Client*, messageHandler);
73void setDisconnectHandler(Client*, disconnectHander_t disconnectHandler);
74
75void MQTTClient(Client*, Network*, unsigned int, unsigned char*, size_t, unsigned char*, size_t);
76
77struct Client {
78 unsigned int next_packetid;
79 unsigned int command_timeout_ms;
80 size_t buf_size, readbuf_size;
81 unsigned char *buf;
82 unsigned char *readbuf;
83 unsigned int keepAliveInterval;
84 char ping_outstanding;
85 int isconnected;
86
87 struct MessageHandlers
88 {
89 const char* topicFilter;
90 void (*fp) (MessageData*);
91 pApplicationHandler_t applicationHandler;
92 } messageHandlers[MAX_MESSAGE_HANDLERS]; // Message handlers are indexed by subscription topic
93
94 void (*defaultMessageHandler) (MessageData*);
95 disconnectHander_t disconnectHandler;
96
97 Network* ipstack;
98 Timer ping_timer;
99};
100
101#define DefaultClient {0, 0, 0, 0, NULL, NULL, 0, 0, 0}
102
103#endif
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient-C/src/cc3200/MQTTCC3200.c b/aws_mqtt_embedded_client_lib/MQTTClient-C/src/cc3200/MQTTCC3200.c
new file mode 100644
index 0000000..ef798cc
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient-C/src/cc3200/MQTTCC3200.c
@@ -0,0 +1,196 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Allan Stockdill-Mander - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#include "MQTTCC3200.h"
18
19unsigned long MilliTimer;
20
21void SysTickIntHandler(void) {
22 MilliTimer++;
23}
24
25char expired(Timer* timer) {
26 long left = timer->end_time - MilliTimer;
27 return (left < 0);
28}
29
30
31void countdown_ms(Timer* timer, unsigned int timeout) {
32 timer->end_time = MilliTimer + timeout;
33}
34
35
36void countdown(Timer* timer, unsigned int timeout) {
37 timer->end_time = MilliTimer + (timeout * 1000);
38}
39
40
41int left_ms(Timer* timer) {
42 long left = timer->end_time - MilliTimer;
43 return (left < 0) ? 0 : left;
44}
45
46
47void InitTimer(Timer* timer) {
48 timer->end_time = 0;
49}
50
51
52int cc3200_read(Network* n, unsigned char* buffer, int len, int timeout_ms) {
53 SlTimeval_t timeVal;
54 SlFdSet_t fdset;
55 int rc = 0;
56 int recvLen = 0;
57
58 SL_FD_ZERO(&fdset);
59 SL_FD_SET(n->my_socket, &fdset);
60
61 timeVal.tv_sec = 0;
62 timeVal.tv_usec = timeout_ms * 1000;
63 if (sl_Select(n->my_socket + 1, &fdset, NULL, NULL, &timeVal) == 1) {
64 do {
65 rc = sl_Recv(n->my_socket, buffer + recvLen, len - recvLen, 0);
66 recvLen += rc;
67 } while(recvLen < len);
68 }
69 return recvLen;
70}
71
72
73int cc3200_write(Network* n, unsigned char* buffer, int len, int timeout_ms) {
74 SlTimeval_t timeVal;
75 SlFdSet_t fdset;
76 int rc = 0;
77 int readySock;
78
79 SL_FD_ZERO(&fdset);
80 SL_FD_SET(n->my_socket, &fdset);
81
82 timeVal.tv_sec = 0;
83 timeVal.tv_usec = timeout_ms * 1000;
84 do {
85 readySock = sl_Select(n->my_socket + 1, NULL, &fdset, NULL, &timeVal);
86 } while(readySock != 1);
87 rc = sl_Send(n->my_socket, buffer, len, 0);
88 return rc;
89}
90
91
92void cc3200_disconnect(Network* n) {
93 sl_Close(n->my_socket);
94}
95
96
97void NewNetwork(Network* n) {
98 n->my_socket = 0;
99 n->mqttread = cc3200_read;
100 n->mqttwrite = cc3200_write;
101 n->disconnect = cc3200_disconnect;
102}
103
104int TLSConnectNetwork(Network *n, char* addr, int port, SlSockSecureFiles_t* certificates, unsigned char sec_method, unsigned int cipher, char server_verify) {
105 SlSockAddrIn_t sAddr;
106 int addrSize;
107 int retVal;
108 unsigned long ipAddress;
109
110 retVal = sl_NetAppDnsGetHostByName(addr, strlen(addr), &ipAddress, AF_INET);
111 if (retVal < 0) {
112 return -1;
113 }
114
115 sAddr.sin_family = AF_INET;
116 sAddr.sin_port = sl_Htons((unsigned short)port);
117 sAddr.sin_addr.s_addr = sl_Htonl(ipAddress);
118
119 addrSize = sizeof(SlSockAddrIn_t);
120
121 n->my_socket = sl_Socket(SL_AF_INET,SL_SOCK_STREAM, SL_SEC_SOCKET);
122 if (n->my_socket < 0) {
123 return -1;
124 }
125
126 SlSockSecureMethod method;
127 method.secureMethod = sec_method;
128 retVal = sl_SetSockOpt(n->my_socket, SL_SOL_SOCKET, SL_SO_SECMETHOD, &method, sizeof(method));
129 if (retVal < 0) {
130 return retVal;
131 }
132
133 SlSockSecureMask mask;
134 mask.secureMask = cipher;
135 retVal = sl_SetSockOpt(n->my_socket, SL_SOL_SOCKET, SL_SO_SECURE_MASK, &mask, sizeof(mask));
136 if (retVal < 0) {
137 return retVal;
138 }
139
140 if (certificates != NULL) {
141 retVal = sl_SetSockOpt(n->my_socket, SL_SOL_SOCKET, SL_SO_SECURE_FILES, certificates->secureFiles, sizeof(SlSockSecureFiles_t));
142 if(retVal < 0)
143 {
144 return retVal;
145 }
146 }
147
148 retVal = sl_Connect(n->my_socket, ( SlSockAddr_t *)&sAddr, addrSize);
149 if( retVal < 0 ) {
150 if (server_verify || retVal != -453) {
151 sl_Close(n->my_socket);
152 return retVal;
153 }
154 }
155
156 SysTickIntRegister(SysTickIntHandler);
157 SysTickPeriodSet(80000);
158 SysTickEnable();
159
160 return retVal;
161}
162
163int ConnectNetwork(Network* n, char* addr, int port)
164{
165 SlSockAddrIn_t sAddr;
166 int addrSize;
167 int retVal;
168 unsigned long ipAddress;
169
170 sl_NetAppDnsGetHostByName(addr, strlen(addr), &ipAddress, AF_INET);
171
172 sAddr.sin_family = AF_INET;
173 sAddr.sin_port = sl_Htons((unsigned short)port);
174 sAddr.sin_addr.s_addr = sl_Htonl(ipAddress);
175
176 addrSize = sizeof(SlSockAddrIn_t);
177
178 n->my_socket = sl_Socket(SL_AF_INET,SL_SOCK_STREAM, 0);
179 if( n->my_socket < 0 ) {
180 // error
181 return -1;
182 }
183
184 retVal = sl_Connect(n->my_socket, ( SlSockAddr_t *)&sAddr, addrSize);
185 if( retVal < 0 ) {
186 // error
187 sl_Close(n->my_socket);
188 return retVal;
189 }
190
191 SysTickIntRegister(SysTickIntHandler);
192 SysTickPeriodSet(80000);
193 SysTickEnable();
194
195 return retVal;
196}
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient-C/src/cc3200/MQTTCC3200.h b/aws_mqtt_embedded_client_lib/MQTTClient-C/src/cc3200/MQTTCC3200.h
new file mode 100644
index 0000000..b23eff8
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient-C/src/cc3200/MQTTCC3200.h
@@ -0,0 +1,58 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Allan Stockdill-Mander - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#ifndef __MQTT_CC3200_
18#define __MQTT_CC3200_
19
20#include "simplelink.h"
21#include "netapp.h"
22#include "socket.h"
23#include "hw_types.h"
24#include "systick.h"
25
26typedef struct Timer Timer;
27
28struct Timer {
29 unsigned long systick_period;
30 unsigned long end_time;
31};
32
33typedef struct Network Network;
34
35struct Network
36{
37 int my_socket;
38 int (*mqttread) (Network*, unsigned char*, int, int);
39 int (*mqttwrite) (Network*, unsigned char*, int, int);
40 void (*disconnect) (Network*);
41};
42
43char expired(Timer*);
44void countdown_ms(Timer*, unsigned int);
45void countdown(Timer*, unsigned int);
46int left_ms(Timer*);
47
48void InitTimer(Timer*);
49
50int cc3200_read(Network*, unsigned char*, int, int);
51int cc3200_write(Network*, unsigned char*, int, int);
52void cc3200_disconnect(Network*);
53void NewNetwork(Network*);
54
55int ConnectNetwork(Network*, char*, int);
56int TLSConnectNetwork(Network*, char*, int, SlSockSecureFiles_t*, unsigned char, unsigned int, char);
57
58#endif
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient-C/src/linux/MQTTLinux.c b/aws_mqtt_embedded_client_lib/MQTTClient-C/src/linux/MQTTLinux.c
new file mode 100644
index 0000000..649c1af
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient-C/src/linux/MQTTLinux.c
@@ -0,0 +1,167 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Allan Stockdill-Mander - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#include "MQTTLinux.h"
18
19char expired(Timer* timer)
20{
21 struct timeval now, res;
22 gettimeofday(&now, NULL);
23 timersub(&timer->end_time, &now, &res);
24 return res.tv_sec < 0 || (res.tv_sec == 0 && res.tv_usec <= 0);
25}
26
27
28void countdown_ms(Timer* timer, unsigned int timeout)
29{
30 struct timeval now;
31 gettimeofday(&now, NULL);
32 struct timeval interval = {timeout / 1000, (timeout % 1000) * 1000};
33 timeradd(&now, &interval, &timer->end_time);
34}
35
36
37void countdown(Timer* timer, unsigned int timeout)
38{
39 struct timeval now;
40 gettimeofday(&now, NULL);
41 struct timeval interval = {timeout, 0};
42 timeradd(&now, &interval, &timer->end_time);
43}
44
45
46int left_ms(Timer* timer)
47{
48 struct timeval now, res;
49 gettimeofday(&now, NULL);
50 timersub(&timer->end_time, &now, &res);
51 //printf("left %d ms\n", (res.tv_sec < 0) ? 0 : res.tv_sec * 1000 + res.tv_usec / 1000);
52 return (res.tv_sec < 0) ? 0 : res.tv_sec * 1000 + res.tv_usec / 1000;
53}
54
55
56void InitTimer(Timer* timer)
57{
58 timer->end_time = (struct timeval){0, 0};
59}
60
61
62int linux_read(Network* n, unsigned char* buffer, int len, int timeout_ms)
63{
64 struct timeval interval = {timeout_ms / 1000, (timeout_ms % 1000) * 1000};
65 if (interval.tv_sec < 0 || (interval.tv_sec == 0 && interval.tv_usec <= 0))
66 {
67 interval.tv_sec = 0;
68 interval.tv_usec = 100;
69 }
70
71 setsockopt(n->my_socket, SOL_SOCKET, SO_RCVTIMEO, (char *)&interval, sizeof(struct timeval));
72
73 int bytes = 0;
74 while (bytes < len)
75 {
76 int rc = recv(n->my_socket, &buffer[bytes], (size_t)(len - bytes), 0);
77 if (rc == -1)
78 {
79 if (errno != ENOTCONN && errno != ECONNRESET)
80 {
81 bytes = -1;
82 break;
83 }
84 }
85 else
86 bytes += rc;
87 }
88 return bytes;
89}
90
91
92int linux_write(Network* n, unsigned char* buffer, int len, int timeout_ms)
93{
94 struct timeval tv;
95
96 tv.tv_sec = 0; /* 30 Secs Timeout */
97 tv.tv_usec = timeout_ms * 1000; // Not init'ing this can cause strange errors
98
99 setsockopt(n->my_socket, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv,sizeof(struct timeval));
100 int rc = write(n->my_socket, buffer, len);
101 return rc;
102}
103
104
105void linux_disconnect(Network* n)
106{
107 close(n->my_socket);
108}
109
110
111void NewNetwork(Network* n)
112{
113 n->my_socket = 0;
114 n->mqttread = linux_read;
115 n->mqttwrite = linux_write;
116 n->disconnect = linux_disconnect;
117}
118
119
120int ConnectNetwork(Network* n, char* addr, int port)
121{
122 int type = SOCK_STREAM;
123 struct sockaddr_in address;
124 int rc = -1;
125 sa_family_t family = AF_INET;
126 struct addrinfo *result = NULL;
127 struct addrinfo hints = {0, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP, 0, NULL, NULL, NULL};
128
129 if ((rc = getaddrinfo(addr, NULL, &hints, &result)) == 0)
130 {
131 struct addrinfo* res = result;
132
133 /* prefer ip4 addresses */
134 while (res)
135 {
136 if (res->ai_family == AF_INET)
137 {
138 result = res;
139 break;
140 }
141 res = res->ai_next;
142 }
143
144 if (result->ai_family == AF_INET)
145 {
146 address.sin_port = htons(port);
147 address.sin_family = family = AF_INET;
148 address.sin_addr = ((struct sockaddr_in*)(result->ai_addr))->sin_addr;
149 }
150 else
151 rc = -1;
152
153 freeaddrinfo(result);
154 }
155
156 if (rc == 0)
157 {
158 n->my_socket = socket(family, type, 0);
159 if (n->my_socket != -1)
160 {
161 int opt = 1;
162 rc = connect(n->my_socket, (struct sockaddr*)&address, sizeof(address));
163 }
164 }
165
166 return rc;
167} \ No newline at end of file
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient-C/src/linux/MQTTLinux.h b/aws_mqtt_embedded_client_lib/MQTTClient-C/src/linux/MQTTLinux.h
new file mode 100644
index 0000000..6a56376
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient-C/src/linux/MQTTLinux.h
@@ -0,0 +1,68 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Allan Stockdill-Mander - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#ifndef __MQTT_LINUX_
18#define __MQTT_LINUX_
19
20#include <sys/types.h>
21#include <sys/socket.h>
22#include <sys/param.h>
23#include <sys/time.h>
24#include <sys/select.h>
25#include <netinet/in.h>
26#include <netinet/tcp.h>
27#include <arpa/inet.h>
28#include <netdb.h>
29#include <stdio.h>
30#include <unistd.h>
31#include <errno.h>
32#include <fcntl.h>
33
34#include <stdlib.h>
35#include <string.h>
36#include <signal.h>
37
38typedef struct Timer Timer;
39
40struct Timer {
41 struct timeval end_time;
42};
43
44typedef struct Network Network;
45
46struct Network
47{
48 int my_socket;
49 int (*mqttread) (Network*, unsigned char*, int, int);
50 int (*mqttwrite) (Network*, unsigned char*, int, int);
51 void (*disconnect) (Network*);
52};
53
54char expired(Timer*);
55void countdown_ms(Timer*, unsigned int);
56void countdown(Timer*, unsigned int);
57int left_ms(Timer*);
58
59void InitTimer(Timer*);
60
61int linux_read(Network*, unsigned char*, int, int);
62int linux_write(Network*, unsigned char*, int, int);
63void linux_disconnect(Network*);
64void NewNetwork(Network*);
65
66int ConnectNetwork(Network*, char*, int);
67
68#endif \ No newline at end of file
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient/samples/arduino/Hello/Hello.ino b/aws_mqtt_embedded_client_lib/MQTTClient/samples/arduino/Hello/Hello.ino
new file mode 100644
index 0000000..60893e1
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient/samples/arduino/Hello/Hello.ino
@@ -0,0 +1,131 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp. and others
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial contribution
15 * Benjamin Cabe - adapt to IPStack, and add Yun instructions
16 *******************************************************************************/
17
18#define MQTTCLIENT_QOS2 1
19
20#include <SPI.h>
21#include <Ethernet.h>
22#include <IPStack.h>
23#include <Countdown.h>
24#include <MQTTClient.h>
25
26char printbuf[100];
27
28int arrivedcount = 0;
29
30void messageArrived(MQTT::MessageData& md)
31{
32 MQTT::Message &message = md.message;
33
34 sprintf(printbuf, "Message %d arrived: qos %d, retained %d, dup %d, packetid %d\n",
35 ++arrivedcount, message.qos, message.retained, message.dup, message.id);
36 Serial.print(printbuf);
37 sprintf(printbuf, "Payload %s\n", (char*)message.payload);
38 Serial.print(printbuf);
39}
40
41EthernetClient c; // replace by a YunClient if running on a Yun
42IPStack ipstack(c);
43MQTT::Client<IPStack, Countdown> client = MQTT::Client<IPStack, Countdown>(ipstack);
44
45byte mac[] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 }; // replace with your device's MAC
46const char* topic = "arduino-sample";
47
48void connect()
49{
50 char hostname[] = "iot.eclipse.org";
51 int port = 1883;
52 sprintf(printbuf, "Connecting to %s:%d\n", hostname, port);
53 Serial.print(printbuf);
54 int rc = ipstack.connect(hostname, port);
55 if (rc != 1)
56 {
57 sprintf(printbuf, "rc from TCP connect is %d\n", rc);
58 Serial.print(printbuf);
59 }
60
61 Serial.println("MQTT connecting");
62 MQTTPacket_connectData data = MQTTPacket_connectData_initializer;
63 data.MQTTVersion = 3;
64 data.clientID.cstring = (char*)"arduino-sample";
65 rc = client.connect(data);
66 if (rc != 0)
67 {
68 sprintf(printbuf, "rc from MQTT connect is %d\n", rc);
69 Serial.print(printbuf);
70 }
71 Serial.println("MQTT connected");
72
73 rc = client.subscribe(topic, MQTT::QOS2, messageArrived);
74 if (rc != 0)
75 {
76 sprintf(printbuf, "rc from MQTT subscribe is %d\n", rc);
77 Serial.print(printbuf);
78 }
79 Serial.println("MQTT subscribed");
80}
81
82void setup()
83{
84 Serial.begin(9600);
85 Ethernet.begin(mac); // replace by Bridge.begin() if running on a Yun
86 Serial.println("MQTT Hello example");
87 connect();
88}
89
90void loop()
91{
92 if (!client.isConnected())
93 connect();
94
95 MQTT::Message message;
96
97 arrivedcount = 0;
98
99 // Send and receive QoS 0 message
100 char buf[100];
101 sprintf(buf, "Hello World! QoS 0 message");
102 Serial.println(buf);
103 message.qos = MQTT::QOS0;
104 message.retained = false;
105 message.dup = false;
106 message.payload = (void*)buf;
107 message.payloadlen = strlen(buf)+1;
108 int rc = client.publish(topic, message);
109 while (arrivedcount == 0)
110 client.yield(1000);
111
112 // Send and receive QoS 1 message
113 sprintf(buf, "Hello World! QoS 1 message");
114 Serial.println(buf);
115 message.qos = MQTT::QOS1;
116 message.payloadlen = strlen(buf)+1;
117 rc = client.publish(topic, message);
118 while (arrivedcount == 1)
119 client.yield(1000);
120
121 // Send and receive QoS 2 message
122 sprintf(buf, "Hello World! QoS 2 message");
123 Serial.println(buf);
124 message.qos = MQTT::QOS2;
125 message.payloadlen = strlen(buf)+1;
126 rc = client.publish(topic, message);
127 while (arrivedcount == 2)
128 client.yield(1000);
129
130 delay(2000);
131}
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/build.sh b/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/build.sh
new file mode 100644
index 0000000..08099ec
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/build.sh
@@ -0,0 +1,3 @@
1g++ hello.cpp -I ../../src/ -I ../../src/linux -I ../../../MQTTPacket/src ../../../MQTTPacket/src/MQTTPacket.c ../../../MQTTPacket/src/MQTTDeserializePublish.c ../../../MQTTPacket/src/MQTTConnectClient.c ../../../MQTTPacket/src/MQTTSubscribeClient.c ../../../MQTTPacket/src/MQTTSerializePublish.c ../../../MQTTPacket/src/MQTTUnsubscribeClient.c -o hello
2
3g++ -g stdoutsub.cpp -I ../../src -I ../../src/linux -I ../../../MQTTPacket/src ../../../MQTTPacket/src/MQTTFormat.c ../../../MQTTPacket/src/MQTTPacket.c ../../../MQTTPacket/src/MQTTDeserializePublish.c ../../../MQTTPacket/src/MQTTConnectClient.c ../../../MQTTPacket/src/MQTTSubscribeClient.c ../../../MQTTPacket/src/MQTTSerializePublish.c -o stdoutsub ../../../MQTTPacket/src/MQTTConnectServer.c ../../../MQTTPacket/src/MQTTSubscribeServer.c ../../../MQTTPacket/src/MQTTUnsubscribeServer.c ../../../MQTTPacket/src/MQTTUnsubscribeClient.c
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/hello b/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/hello
new file mode 100644
index 0000000..73fe879
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/hello
Binary files differ
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/hello.cpp b/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/hello.cpp
new file mode 100644
index 0000000..fe0ba57
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/hello.cpp
@@ -0,0 +1,102 @@
1#define MQTTCLIENT_QOS2 1
2
3#include "MQTTClient.h"
4
5#define DEFAULT_STACK_SIZE -1
6
7#include "linux.cpp"
8
9int arrivedcount = 0;
10
11void messageArrived(MQTT::MessageData& md)
12{
13 MQTT::Message &message = md.message;
14
15 printf("Message %d arrived: qos %d, retained %d, dup %d, packetid %d\n",
16 ++arrivedcount, message.qos, message.retained, message.dup, message.id);
17 printf("Payload %.*s\n", message.payloadlen, (char*)message.payload);
18}
19
20
21int main(int argc, char* argv[])
22{
23 IPStack ipstack = IPStack();
24 float version = 0.3;
25 const char* topic = "mbed-sample";
26
27 printf("Version is %f\n", version);
28
29 MQTT::Client<IPStack, Countdown> client = MQTT::Client<IPStack, Countdown>(ipstack);
30
31 const char* hostname = "iot.eclipse.org";
32 int port = 1883;
33 printf("Connecting to %s:%d\n", hostname, port);
34 int rc = ipstack.connect(hostname, port);
35 if (rc != 0)
36 printf("rc from TCP connect is %d\n", rc);
37
38 printf("MQTT connecting\n");
39 MQTTPacket_connectData data = MQTTPacket_connectData_initializer;
40 data.MQTTVersion = 3;
41 data.clientID.cstring = (char*)"mbed-icraggs";
42 rc = client.connect(data);
43 if (rc != 0)
44 printf("rc from MQTT connect is %d\n", rc);
45 printf("MQTT connected\n");
46
47 rc = client.subscribe(topic, MQTT::QOS2, messageArrived);
48 if (rc != 0)
49 printf("rc from MQTT subscribe is %d\n", rc);
50
51 MQTT::Message message;
52
53 // QoS 0
54 char buf[100];
55 sprintf(buf, "Hello World! QoS 0 message from app version %f", version);
56 message.qos = MQTT::QOS0;
57 message.retained = false;
58 message.dup = false;
59 message.payload = (void*)buf;
60 message.payloadlen = strlen(buf)+1;
61 rc = client.publish(topic, message);
62 if (rc != 0)
63 printf("Error %d from sending QoS 0 message\n", rc);
64 else while (arrivedcount == 0)
65 client.yield(100);
66
67 // QoS 1
68 printf("Now QoS 1\n");
69 sprintf(buf, "Hello World! QoS 1 message from app version %f", version);
70 message.qos = MQTT::QOS1;
71 message.payloadlen = strlen(buf)+1;
72 rc = client.publish(topic, message);
73 if (rc != 0)
74 printf("Error %d from sending QoS 1 message\n", rc);
75 else while (arrivedcount == 1)
76 client.yield(100);
77
78 // QoS 2
79 sprintf(buf, "Hello World! QoS 2 message from app version %f", version);
80 message.qos = MQTT::QOS2;
81 message.payloadlen = strlen(buf)+1;
82 rc = client.publish(topic, message);
83 if (rc != 0)
84 printf("Error %d from sending QoS 2 message\n", rc);
85 while (arrivedcount == 2)
86 client.yield(100);
87
88 rc = client.unsubscribe(topic);
89 if (rc != 0)
90 printf("rc from unsubscribe was %d\n", rc);
91
92 rc = client.disconnect();
93 if (rc != 0)
94 printf("rc from disconnect was %d\n", rc);
95
96 ipstack.disconnect();
97
98 printf("Finishing with %d messages received\n", arrivedcount);
99
100 return 0;
101}
102
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/main.cpp b/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/main.cpp
new file mode 100644
index 0000000..b91d86d
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/main.cpp
@@ -0,0 +1,291 @@
1
2
3#include <sys/types.h>
4#include <sys/socket.h>
5#include <sys/param.h>
6#include <sys/time.h>
7#include <sys/select.h>
8#include <netinet/in.h>
9#include <netinet/tcp.h>
10#include <arpa/inet.h>
11#include <netdb.h>
12#include <stdio.h>
13#include <unistd.h>
14#include <errno.h>
15#include <fcntl.h>
16
17#include <stdlib.h>
18#include <string.h>
19#include <signal.h>
20
21#include "MQTTClient.h"
22//#include "FP.cpp"
23
24#define DEFAULT_STACK_SIZE -1
25
26
27class IPStack
28{
29public:
30 IPStack()
31 {
32
33 }
34
35 int Socket_error(const char* aString)
36 {
37
38 if (errno != EINTR && errno != EAGAIN && errno != EINPROGRESS && errno != EWOULDBLOCK)
39 {
40 if (strcmp(aString, "shutdown") != 0 || (errno != ENOTCONN && errno != ECONNRESET))
41 printf("Socket error %s in %s for socket %d\n", strerror(errno), aString, mysock);
42 }
43 return errno;
44 }
45
46 int connect(const char* hostname, int port)
47 {
48 int type = SOCK_STREAM;
49 struct sockaddr_in address;
50 int rc = -1;
51 sa_family_t family = AF_INET;
52 struct addrinfo *result = NULL;
53 struct addrinfo hints = {0, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP, 0, NULL, NULL, NULL};
54
55 if ((rc = getaddrinfo(hostname, NULL, &hints, &result)) == 0)
56 {
57 struct addrinfo* res = result;
58
59 /* prefer ip4 addresses */
60 while (res)
61 {
62 if (res->ai_family == AF_INET)
63 {
64 result = res;
65 break;
66 }
67 res = res->ai_next;
68 }
69
70 if (result->ai_family == AF_INET)
71 {
72 address.sin_port = htons(port);
73 address.sin_family = family = AF_INET;
74 address.sin_addr = ((struct sockaddr_in*)(result->ai_addr))->sin_addr;
75 }
76 else
77 rc = -1;
78
79 freeaddrinfo(result);
80 }
81
82 if (rc == 0)
83 {
84 mysock = socket(family, type, 0);
85 if (mysock != -1)
86 {
87 int opt = 1;
88
89 //if (setsockopt(mysock, SOL_SOCKET, SO_NOSIGPIPE, (void*)&opt, sizeof(opt)) != 0)
90 // printf("Could not set SO_NOSIGPIPE for socket %d", mysock);
91
92 rc = ::connect(mysock, (struct sockaddr*)&address, sizeof(address));
93 }
94 }
95
96 return rc;
97 }
98
99 int read(unsigned char* buffer, int len, int timeout_ms)
100 {
101 struct timeval interval = {timeout_ms / 1000, (timeout_ms % 1000) * 1000};
102 if (interval.tv_sec < 0 || (interval.tv_sec == 0 && interval.tv_usec <= 0))
103 {
104 interval.tv_sec = 0;
105 interval.tv_usec = 100;
106 }
107
108 setsockopt(mysock, SOL_SOCKET, SO_RCVTIMEO, (char *)&interval, sizeof(struct timeval));
109
110 //printf("reading %d bytes\n", len);
111 int rc = ::recv(mysock, buffer, (size_t)len, 0);
112 if (rc == -1)
113 Socket_error("read");
114 //printf("read %d bytes\n", rc);
115 return rc;
116 }
117
118 int write(unsigned char* buffer, int len, int timeout)
119 {
120 struct timeval tv;
121
122 tv.tv_sec = 0; /* 30 Secs Timeout */
123 tv.tv_usec = timeout * 1000; // Not init'ing this can cause strange errors
124
125 setsockopt(mysock, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv,sizeof(struct timeval));
126 int rc = ::write(mysock, buffer, len);
127 //printf("write rc %d\n", rc);
128 return rc;
129 }
130
131 int disconnect()
132 {
133 return ::close(mysock);
134 }
135
136private:
137
138 int mysock;
139
140};
141
142
143class Countdown
144{
145public:
146 Countdown()
147 {
148
149 }
150
151 Countdown(int ms)
152 {
153 countdown_ms(ms);
154 }
155
156
157 bool expired()
158 {
159 struct timeval now, res;
160 gettimeofday(&now, NULL);
161 timersub(&end_time, &now, &res);
162 //printf("left %d ms\n", (res.tv_sec < 0) ? 0 : res.tv_sec * 1000 + res.tv_usec / 1000);
163 //if (res.tv_sec > 0 || res.tv_usec > 0)
164 // printf("expired %d %d\n", res.tv_sec, res.tv_usec);
165 return res.tv_sec < 0 || (res.tv_sec == 0 && res.tv_usec <= 0);
166 }
167
168
169 void countdown_ms(int ms)
170 {
171 struct timeval now;
172 gettimeofday(&now, NULL);
173 struct timeval interval = {ms / 1000, (ms % 1000) * 1000};
174 //printf("interval %d %d\n", interval.tv_sec, interval.tv_usec);
175 timeradd(&now, &interval, &end_time);
176 }
177
178
179 void countdown(int seconds)
180 {
181 struct timeval now;
182 gettimeofday(&now, NULL);
183 struct timeval interval = {seconds, 0};
184 timeradd(&now, &interval, &end_time);
185 }
186
187
188 int left_ms()
189 {
190 struct timeval now, res;
191 gettimeofday(&now, NULL);
192 timersub(&end_time, &now, &res);
193 //printf("left %d ms\n", (res.tv_sec < 0) ? 0 : res.tv_sec * 1000 + res.tv_usec / 1000);
194 return (res.tv_sec < 0) ? 0 : res.tv_sec * 1000 + res.tv_usec / 1000;
195 }
196
197private:
198
199 struct timeval end_time;
200};
201
202
203int arrivedcount = 0;
204
205void messageArrived(MQTT::MessageData& md)
206{
207 MQTT::Message &message = md.message;
208
209 printf("Message %d arrived: qos %d, retained %d, dup %d, packetid %d\n",
210 ++arrivedcount, message.qos, message.retained, message.dup, message.id);
211 printf("Payload %.*s\n", message.payloadlen, (char*)message.payload);
212}
213
214
215int main(int argc, char* argv[])
216{
217 IPStack ipstack = IPStack();
218 float version = 0.3;
219 const char* topic = "mbed-sample";
220
221 printf("Version is %f\n", version);
222
223 MQTT::Client<IPStack, Countdown> client = MQTT::Client<IPStack, Countdown>(ipstack);
224
225 const char* hostname = "localhost"; //"m2m.eclipse.org";
226 int port = 1883;
227 printf("Connecting to %s:%d\n", hostname, port);
228 int rc = ipstack.connect(hostname, port);
229 if (rc != 0)
230 printf("rc from TCP connect is %d\n", rc);
231
232 printf("MQTT connecting\n");
233 MQTTPacket_connectData data = MQTTPacket_connectData_initializer;
234 data.MQTTVersion = 3;
235 data.clientID.cstring = (char*)"mbed-icraggs";
236 rc = client.connect(&data);
237 if (rc != 0)
238 printf("rc from MQTT connect is %d\n", rc);
239 printf("MQTT connected\n");
240
241 rc = client.subscribe("+", MQTT::QOS2, messageArrived);
242 if (rc != 0)
243 printf("rc from MQTT subscribe is %d\n", rc);
244
245 MQTT::Message message;
246
247 // QoS 0
248 char buf[100];
249 sprintf(buf, "Hello World! QoS 0 message from app version %f", version);
250 message.qos = MQTT::QOS0;
251 message.retained = false;
252 message.dup = false;
253 message.payload = (void*)buf;
254 message.payloadlen = strlen(buf)+1;
255 rc = client.publish(topic, &message);
256 while (arrivedcount == 0)
257 client.yield(100);
258
259 // QoS 1
260 printf("Now QoS 1\n");
261 sprintf(buf, "Hello World! QoS 1 message from app version %f", version);
262 message.qos = MQTT::QOS1;
263 message.payloadlen = strlen(buf)+1;
264 rc = client.publish(topic, &message);
265 while (arrivedcount == 1)
266 client.yield(100);
267
268 // QoS 2
269 sprintf(buf, "Hello World! QoS 2 message from app version %f", version);
270 message.qos = MQTT::QOS2;
271 message.payloadlen = strlen(buf)+1;
272 rc = client.publish(topic, &message);
273 while (arrivedcount == 2)
274 client.yield(100);
275
276 rc = client.unsubscribe(topic);
277 if (rc != 0)
278 printf("rc from unsubscribe was %d\n", rc);
279
280 rc = client.disconnect();
281 if (rc != 0)
282 printf("rc from disconnect was %d\n", rc);
283
284 ipstack.disconnect();
285
286 printf("Finishing with %d messages received\n", arrivedcount);
287
288 return 0;
289}
290
291
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/stdoutsub b/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/stdoutsub
new file mode 100644
index 0000000..d05a3e0
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/stdoutsub
Binary files differ
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/stdoutsub.cpp b/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/stdoutsub.cpp
new file mode 100644
index 0000000..3c8e622
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient/samples/linux/stdoutsub.cpp
@@ -0,0 +1,267 @@
1/*******************************************************************************
2 * Copyright (c) 2012, 2013 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial contribution
15 * Ian Craggs - change delimiter option from char to string
16 *******************************************************************************/
17
18/*
19
20 stdout subscriber
21
22 compulsory parameters:
23
24 topic to subscribe to
25
26 defaulted parameters:
27
28 --host localhost
29 --port 1883
30 --qos 2
31 --delimiter \n
32 --clientid stdout_subscriber
33
34 --userid none
35 --password none
36
37*/
38#include <stdio.h>
39#define MQTT_DEBUG 1
40#include "MQTTClient.h"
41
42#define DEFAULT_STACK_SIZE -1
43
44#include "linux.cpp"
45
46#include <stdio.h>
47#include <signal.h>
48#include <memory.h>
49
50#include <sys/time.h>
51#include <stdlib.h>
52
53
54volatile int toStop = 0;
55
56
57void usage()
58{
59 printf("MQTT stdout subscriber\n");
60 printf("Usage: stdoutsub topicname <options>, where options are:\n");
61 printf(" --host <hostname> (default is localhost)\n");
62 printf(" --port <port> (default is 1883)\n");
63 printf(" --qos <qos> (default is 2)\n");
64 printf(" --delimiter <delim> (default is \\n)\n");
65 printf(" --clientid <clientid> (default is hostname+timestamp)\n");
66 printf(" --username none\n");
67 printf(" --password none\n");
68 printf(" --showtopics <on or off> (default is on if the topic has a wildcard, else off)\n");
69 exit(-1);
70}
71
72
73void cfinish(int sig)
74{
75 signal(SIGINT, NULL);
76 toStop = 1;
77}
78
79
80struct opts_struct
81{
82 char* clientid;
83 int nodelimiter;
84 char* delimiter;
85 MQTT::QoS qos;
86 char* username;
87 char* password;
88 char* host;
89 int port;
90 int showtopics;
91} opts =
92{
93 (char*)"stdout-subscriber", 0, (char*)"\n", MQTT::QOS2, NULL, NULL, (char*)"localhost", 1883, 0
94};
95
96
97void getopts(int argc, char** argv)
98{
99 int count = 2;
100
101 while (count < argc)
102 {
103 if (strcmp(argv[count], "--qos") == 0)
104 {
105 if (++count < argc)
106 {
107 if (strcmp(argv[count], "0") == 0)
108 opts.qos = MQTT::QOS0;
109 else if (strcmp(argv[count], "1") == 0)
110 opts.qos = MQTT::QOS1;
111 else if (strcmp(argv[count], "2") == 0)
112 opts.qos = MQTT::QOS2;
113 else
114 usage();
115 }
116 else
117 usage();
118 }
119 else if (strcmp(argv[count], "--host") == 0)
120 {
121 if (++count < argc)
122 opts.host = argv[count];
123 else
124 usage();
125 }
126 else if (strcmp(argv[count], "--port") == 0)
127 {
128 if (++count < argc)
129 opts.port = atoi(argv[count]);
130 else
131 usage();
132 }
133 else if (strcmp(argv[count], "--clientid") == 0)
134 {
135 if (++count < argc)
136 opts.clientid = argv[count];
137 else
138 usage();
139 }
140 else if (strcmp(argv[count], "--username") == 0)
141 {
142 if (++count < argc)
143 opts.username = argv[count];
144 else
145 usage();
146 }
147 else if (strcmp(argv[count], "--password") == 0)
148 {
149 if (++count < argc)
150 opts.password = argv[count];
151 else
152 usage();
153 }
154 else if (strcmp(argv[count], "--delimiter") == 0)
155 {
156 if (++count < argc)
157 opts.delimiter = argv[count];
158 else
159 opts.nodelimiter = 1;
160 }
161 else if (strcmp(argv[count], "--showtopics") == 0)
162 {
163 if (++count < argc)
164 {
165 if (strcmp(argv[count], "on") == 0)
166 opts.showtopics = 1;
167 else if (strcmp(argv[count], "off") == 0)
168 opts.showtopics = 0;
169 else
170 usage();
171 }
172 else
173 usage();
174 }
175 count++;
176 }
177
178}
179
180
181void myconnect(IPStack& ipstack, MQTT::Client<IPStack, Countdown, 1000>& client, MQTTPacket_connectData& data)
182{
183 printf("Connecting to %s:%d\n", opts.host, opts.port);
184 int rc = ipstack.connect(opts.host, opts.port);
185 if (rc != 0)
186 printf("rc from TCP connect is %d\n", rc);
187
188 rc = client.connect(data);
189 if (rc != 0)
190 {
191 printf("Failed to connect, return code %d\n", rc);
192 exit(-1);
193 }
194 printf("Connected\n");
195}
196
197
198void messageArrived(MQTT::MessageData& md)
199{
200 MQTT::Message &message = md.message;
201
202 if (opts.showtopics)
203 printf("%.*s\t", md.topicName.lenstring.len, md.topicName.lenstring.data);
204 if (opts.nodelimiter)
205 printf("%.*s", (int)message.payloadlen, (char*)message.payload);
206 else
207 printf("%.*s%s", (int)message.payloadlen, (char*)message.payload, opts.delimiter);
208 fflush(stdout);
209}
210
211
212int main(int argc, char** argv)
213{
214 int rc = 0;
215
216 if (argc < 2)
217 usage();
218
219 char* topic = argv[1];
220
221 if (strchr(topic, '#') || strchr(topic, '+'))
222 opts.showtopics = 1;
223 if (opts.showtopics)
224 printf("topic is %s\n", topic);
225
226 getopts(argc, argv);
227
228 IPStack ipstack = IPStack();
229 MQTT::Client<IPStack, Countdown, 1000> client = MQTT::Client<IPStack, Countdown, 1000>(ipstack);
230
231 signal(SIGINT, cfinish);
232 signal(SIGTERM, cfinish);
233
234 MQTTPacket_connectData data = MQTTPacket_connectData_initializer;
235 data.willFlag = 0;
236 data.MQTTVersion = 3;
237 data.clientID.cstring = opts.clientid;
238 data.username.cstring = opts.username;
239 data.password.cstring = opts.password;
240
241 data.keepAliveInterval = 10;
242 data.cleansession = 1;
243 printf("will flag %d\n", data.willFlag);
244
245 myconnect(ipstack, client, data);
246
247 rc = client.subscribe(topic, opts.qos, messageArrived);
248 printf("Subscribed %d\n", rc);
249
250 while (!toStop)
251 {
252 client.yield(1000);
253
254 //if (!client.isconnected)
255 // myconnect(ipstack, client, data);
256 }
257
258 printf("Stopping\n");
259
260 rc = client.disconnect();
261
262 ipstack.disconnect();
263
264 return 0;
265}
266
267
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient/src/FP.h b/aws_mqtt_embedded_client_lib/MQTTClient/src/FP.h
new file mode 100644
index 0000000..de5221d
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient/src/FP.h
@@ -0,0 +1,208 @@
1/*******************************************************************************
2 * Copyright (c) 2013, 2014
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Sam Grove - initial API and implementation and/or initial documentation
15 * Ian Craggs - added attached and detached member functions
16 * Sam Grove - removed need for FP.cpp
17 *******************************************************************************/
18
19#ifndef FP_H
20#define FP_H
21
22/** Example using the FP Class with global functions
23 * @code
24 * #include "mbed.h"
25 * #include "FP.h"
26 *
27 * FP<void,bool>fp;
28 * DigitalOut myled(LED1);
29 *
30 * void handler(bool value)
31 * {
32 * myled = value;
33 * return;
34 * }
35 *
36 * int main()
37 * {
38 * fp.attach(&handler);
39 *
40 * while(1)
41 * {
42 * fp(1);
43 * wait(0.2);
44 * fp(0);
45 * wait(0.2);
46 * }
47 * }
48 * @endcode
49 */
50
51/** Example using the FP Class with different class member functions
52 * @code
53 * #include "mbed.h"
54 * #include "FP.h"
55 *
56 * FP<void,bool>fp;
57 * DigitalOut myled(LED4);
58 *
59 * class Wrapper
60 * {
61 * public:
62 * Wrapper(){}
63 *
64 * void handler(bool value)
65 * {
66 * myled = value;
67 * return;
68 * }
69 * };
70 *
71 * int main()
72 * {
73 * Wrapper wrapped;
74 * fp.attach(&wrapped, &Wrapper::handler);
75 *
76 * while(1)
77 * {
78 * fp(1);
79 * wait(0.2);
80 * fp(0);
81 * wait(0.2);
82 * }
83 * }
84 * @endcode
85 */
86
87/** Example using the FP Class with member FP and member function
88* @code
89* #include "mbed.h"
90* #include "FP.h"
91*
92* DigitalOut myled(LED2);
93*
94* class Wrapper
95* {
96* public:
97* Wrapper()
98* {
99* fp.attach(this, &Wrapper::handler);
100* }
101*
102* void handler(bool value)
103* {
104* myled = value;
105* return;
106* }
107*
108* FP<void,bool>fp;
109* };
110*
111* int main()
112* {
113* Wrapper wrapped;
114*
115* while(1)
116* {
117* wrapped.fp(1);
118* wait(0.2);
119* wrapped.fp(0);
120* wait(0.2);
121* }
122* }
123* @endcode
124*/
125
126/**
127 * @class FP
128 * @brief API for managing Function Pointers
129 */
130template<class retT, class argT>
131class FP
132{
133public:
134 /** Create the FP object - only one callback can be attached to the object, that is
135 * a member function or a global function, not both at the same time
136 */
137 FP()
138 {
139 obj_callback = 0;
140 c_callback = 0;
141 }
142
143 /** Add a callback function to the object
144 * @param item - Address of the initialized object
145 * @param member - Address of the member function (dont forget the scope that the function is defined in)
146 */
147 template<class T>
148 void attach(T *item, retT (T::*method)(argT))
149 {
150 obj_callback = (FPtrDummy *)(item);
151 method_callback = (retT (FPtrDummy::*)(argT))(method);
152 return;
153 }
154
155 /** Add a callback function to the object
156 * @param function - The address of a globally defined function
157 */
158 void attach(retT (*function)(argT))
159 {
160 c_callback = function;
161 }
162
163 /** Invoke the function attached to the class
164 * @param arg - An argument that is passed into the function handler that is called
165 * @return The return from the function hanlder called by this class
166 */
167 retT operator()(argT arg) const
168 {
169 if( 0 != c_callback ) {
170 return obj_callback ? (obj_callback->*method_callback)(arg) : (*c_callback)(arg);
171 }
172 return (retT)0;
173 }
174
175 /** Determine if an callback is currently hooked
176 * @return 1 if a method is hooked, 0 otherwise
177 */
178 bool attached()
179 {
180 return obj_callback || c_callback;
181 }
182
183 /** Release a function from the callback hook
184 */
185 void detach()
186 {
187 obj_callback = 0;
188 c_callback = 0;
189 }
190
191private:
192
193 // empty type used for casting
194 class FPtrDummy;
195
196 FPtrDummy *obj_callback;
197
198 /**
199 * @union Funciton
200 * @brief Member or global callback function
201 */
202 union {
203 retT (*c_callback)(argT); /*!< Footprint for a global function */
204 retT (FPtrDummy::*method_callback)(argT); /*!< Footprint for a member function */
205 };
206};
207
208#endif
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient/src/MQTTClient.h b/aws_mqtt_embedded_client_lib/MQTTClient/src/MQTTClient.h
new file mode 100644
index 0000000..e9d4720
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient/src/MQTTClient.h
@@ -0,0 +1,913 @@
1/*******************************************************************************
2 * Copyright (c) 2014, 2015 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 * Ian Craggs - fix for bug 458512 - QoS 2 messages
16 * Ian Craggs - fix for bug 460389 - send loop uses wrong length
17 *******************************************************************************/
18
19#if !defined(MQTTCLIENT_H)
20#define MQTTCLIENT_H
21
22#include "FP.h"
23#include "MQTTPacket.h"
24#include "stdio.h"
25#include "MQTTLogging.h"
26
27#if !defined(MQTTCLIENT_QOS1)
28 #define MQTTCLIENT_QOS1 1
29#endif
30#if !defined(MQTTCLIENT_QOS2)
31 #define MQTTCLIENT_QOS2 0
32#endif
33
34namespace MQTT
35{
36
37
38enum QoS { QOS0, QOS1, QOS2 };
39
40// all failure return codes must be negative
41enum returnCode { BUFFER_OVERFLOW = -2, FAILURE = -1, SUCCESS = 0 };
42
43
44struct Message
45{
46 enum QoS qos;
47 bool retained;
48 bool dup;
49 unsigned short id;
50 void *payload;
51 size_t payloadlen;
52};
53
54
55struct MessageData
56{
57 MessageData(MQTTString &aTopicName, struct Message &aMessage) : message(aMessage), topicName(aTopicName)
58 { }
59
60 struct Message &message;
61 MQTTString &topicName;
62};
63
64
65class PacketId
66{
67public:
68 PacketId()
69 {
70 next = 0;
71 }
72
73 int getNext()
74 {
75 return next = (next == MAX_PACKET_ID) ? 1 : ++next;
76 }
77
78private:
79 static const int MAX_PACKET_ID = 65535;
80 int next;
81};
82
83
84/**
85 * @class Client
86 * @brief blocking, non-threaded MQTT client API
87 *
88 * This version of the API blocks on all method calls, until they are complete. This means that only one
89 * MQTT request can be in process at any one time.
90 * @param Network a network class which supports send, receive
91 * @param Timer a timer class with the methods:
92 */
93template<class Network, class Timer, int MAX_MQTT_PACKET_SIZE = 100, int MAX_MESSAGE_HANDLERS = 5>
94class Client
95{
96
97public:
98
99 typedef void (*messageHandler)(MessageData&);
100
101 /** Construct the client
102 * @param network - pointer to an instance of the Network class - must be connected to the endpoint
103 * before calling MQTT connect
104 * @param limits an instance of the Limit class - to alter limits as required
105 */
106 Client(Network& network, unsigned int command_timeout_ms = 30000);
107
108 /** Set the default message handling callback - used for any message which does not match a subscription message handler
109 * @param mh - pointer to the callback function
110 */
111 void setDefaultMessageHandler(messageHandler mh)
112 {
113 defaultMessageHandler.attach(mh);
114 }
115
116 /** MQTT Connect - send an MQTT connect packet down the network and wait for a Connack
117 * The nework object must be connected to the network endpoint before calling this
118 * Default connect options are used
119 * @return success code -
120 */
121 int connect();
122
123 /** MQTT Connect - send an MQTT connect packet down the network and wait for a Connack
124 * The nework object must be connected to the network endpoint before calling this
125 * @param options - connect options
126 * @return success code -
127 */
128 int connect(MQTTPacket_connectData& options);
129
130 /** MQTT Publish - send an MQTT publish packet and wait for all acks to complete for all QoSs
131 * @param topic - the topic to publish to
132 * @param message - the message to send
133 * @return success code -
134 */
135 int publish(const char* topicName, Message& message);
136
137 /** MQTT Publish - send an MQTT publish packet and wait for all acks to complete for all QoSs
138 * @param topic - the topic to publish to
139 * @param payload - the data to send
140 * @param payloadlen - the length of the data
141 * @param qos - the QoS to send the publish at
142 * @param retained - whether the message should be retained
143 * @return success code -
144 */
145 int publish(const char* topicName, void* payload, size_t payloadlen, enum QoS qos = QOS0, bool retained = false);
146
147 /** MQTT Publish - send an MQTT publish packet and wait for all acks to complete for all QoSs
148 * @param topic - the topic to publish to
149 * @param payload - the data to send
150 * @param payloadlen - the length of the data
151 * @param id - the packet id used - returned
152 * @param qos - the QoS to send the publish at
153 * @param retained - whether the message should be retained
154 * @return success code -
155 */
156 int publish(const char* topicName, void* payload, size_t payloadlen, unsigned short& id, enum QoS qos = QOS1, bool retained = false);
157
158 /** MQTT Subscribe - send an MQTT subscribe packet and wait for the suback
159 * @param topicFilter - a topic pattern which can include wildcards
160 * @param qos - the MQTT QoS to subscribe at
161 * @param mh - the callback function to be invoked when a message is received for this subscription
162 * @return success code -
163 */
164 int subscribe(const char* topicFilter, enum QoS qos, messageHandler mh);
165
166 /** MQTT Unsubscribe - send an MQTT unsubscribe packet and wait for the unsuback
167 * @param topicFilter - a topic pattern which can include wildcards
168 * @return success code -
169 */
170 int unsubscribe(const char* topicFilter);
171
172 /** MQTT Disconnect - send an MQTT disconnect packet, and clean up any state
173 * @return success code -
174 */
175 int disconnect();
176
177 /** A call to this API must be made within the keepAlive interval to keep the MQTT connection alive
178 * yield can be called if no other MQTT operation is needed. This will also allow messages to be
179 * received.
180 * @param timeout_ms the time to wait, in milliseconds
181 * @return success code - on failure, this means the client has disconnected
182 */
183 int yield(unsigned long timeout_ms = 1000L);
184
185 /** Is the client connected?
186 * @return flag - is the client connected or not?
187 */
188 bool isConnected()
189 {
190 return isconnected;
191 }
192
193private:
194
195 int cycle(Timer& timer);
196 int waitfor(int packet_type, Timer& timer);
197 int keepalive();
198 int publish(int len, Timer& timer, enum QoS qos);
199
200 int decodePacket(int* value, int timeout);
201 int readPacket(Timer& timer);
202 int sendPacket(int length, Timer& timer);
203 int deliverMessage(MQTTString& topicName, Message& message);
204 bool isTopicMatched(char* topicFilter, MQTTString& topicName);
205
206 Network& ipstack;
207 unsigned long command_timeout_ms;
208
209 unsigned char sendbuf[MAX_MQTT_PACKET_SIZE];
210 unsigned char readbuf[MAX_MQTT_PACKET_SIZE];
211
212 Timer last_sent, last_received;
213 unsigned int keepAliveInterval;
214 bool ping_outstanding;
215 bool cleansession;
216
217 PacketId packetid;
218
219 struct MessageHandlers
220 {
221 const char* topicFilter;
222 FP<void, MessageData&> fp;
223 } messageHandlers[MAX_MESSAGE_HANDLERS]; // Message handlers are indexed by subscription topic
224
225 FP<void, MessageData&> defaultMessageHandler;
226
227 bool isconnected;
228
229#if MQTTCLIENT_QOS1 || MQTTCLIENT_QOS2
230 unsigned char pubbuf[MAX_MQTT_PACKET_SIZE]; // store the last publish for sending on reconnect
231 int inflightLen;
232 unsigned short inflightMsgid;
233 enum QoS inflightQoS;
234#endif
235
236#if MQTTCLIENT_QOS2
237 bool pubrel;
238 #if !defined(MAX_INCOMING_QOS2_MESSAGES)
239 #define MAX_INCOMING_QOS2_MESSAGES 10
240 #endif
241 unsigned short incomingQoS2messages[MAX_INCOMING_QOS2_MESSAGES];
242 bool isQoS2msgidFree(unsigned short id);
243 bool useQoS2msgid(unsigned short id);
244 void freeQoS2msgid(unsigned short id);
245#endif
246
247};
248
249}
250
251
252template<class Network, class Timer, int a, int MAX_MESSAGE_HANDLERS>
253MQTT::Client<Network, Timer, a, MAX_MESSAGE_HANDLERS>::Client(Network& network, unsigned int command_timeout_ms) : ipstack(network), packetid()
254{
255 last_sent = Timer();
256 last_received = Timer();
257 ping_outstanding = false;
258 for (int i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
259 messageHandlers[i].topicFilter = 0;
260 this->command_timeout_ms = command_timeout_ms;
261 isconnected = false;
262
263#if MQTTCLIENT_QOS1 || MQTTCLIENT_QOS2
264 inflightMsgid = 0;
265 inflightQoS = QOS0;
266#endif
267
268
269#if MQTTCLIENT_QOS2
270 pubrel = false;
271 for (int i = 0; i < MAX_INCOMING_QOS2_MESSAGES; ++i)
272 incomingQoS2messages[i] = 0;
273#endif
274}
275
276#if MQTTCLIENT_QOS2
277template<class Network, class Timer, int a, int b>
278bool MQTT::Client<Network, Timer, a, b>::isQoS2msgidFree(unsigned short id)
279{
280 for (int i = 0; i < MAX_INCOMING_QOS2_MESSAGES; ++i)
281 {
282 if (incomingQoS2messages[i] == id)
283 return false;
284 }
285 return true;
286}
287
288
289template<class Network, class Timer, int a, int b>
290bool MQTT::Client<Network, Timer, a, b>::useQoS2msgid(unsigned short id)
291{
292 for (int i = 0; i < MAX_INCOMING_QOS2_MESSAGES; ++i)
293 {
294 if (incomingQoS2messages[i] == 0)
295 {
296 incomingQoS2messages[i] = id;
297 return true;
298 }
299 }
300 return false;
301}
302
303
304template<class Network, class Timer, int a, int b>
305void MQTT::Client<Network, Timer, a, b>::freeQoS2msgid(unsigned short id)
306{
307 for (int i = 0; i < MAX_INCOMING_QOS2_MESSAGES; ++i)
308 {
309 if (incomingQoS2messages[i] == id)
310 {
311 incomingQoS2messages[i] = 0;
312 return;
313 }
314 }
315}
316#endif
317
318
319template<class Network, class Timer, int a, int b>
320int MQTT::Client<Network, Timer, a, b>::sendPacket(int length, Timer& timer)
321{
322 int rc = FAILURE,
323 sent = 0;
324
325 while (sent < length && !timer.expired())
326 {
327 rc = ipstack.write(&sendbuf[sent], length - sent, timer.left_ms());
328 if (rc < 0) // there was an error writing the data
329 break;
330 sent += rc;
331 }
332 if (sent == length)
333 {
334 if (this->keepAliveInterval > 0)
335 last_sent.countdown(this->keepAliveInterval); // record the fact that we have successfully sent the packet
336 rc = SUCCESS;
337 }
338 else
339 rc = FAILURE;
340
341#if defined(MQTT_DEBUG)
342 char printbuf[150];
343 DEBUG("Rc %d from sending packet %s\n", rc, MQTTFormat_toServerString(printbuf, sizeof(printbuf), sendbuf, length));
344#endif
345 return rc;
346}
347
348
349template<class Network, class Timer, int a, int b>
350int MQTT::Client<Network, Timer, a, b>::decodePacket(int* value, int timeout)
351{
352 unsigned char c;
353 int multiplier = 1;
354 int len = 0;
355 const int MAX_NO_OF_REMAINING_LENGTH_BYTES = 4;
356
357 *value = 0;
358 do
359 {
360 int rc = MQTTPACKET_READ_ERROR;
361
362 if (++len > MAX_NO_OF_REMAINING_LENGTH_BYTES)
363 {
364 rc = MQTTPACKET_READ_ERROR; /* bad data */
365 goto exit;
366 }
367 rc = ipstack.read(&c, 1, timeout);
368 if (rc != 1)
369 goto exit;
370 *value += (c & 127) * multiplier;
371 multiplier *= 128;
372 } while ((c & 128) != 0);
373exit:
374 return len;
375}
376
377
378/**
379 * If any read fails in this method, then we should disconnect from the network, as on reconnect
380 * the packets can be retried.
381 * @param timeout the max time to wait for the packet read to complete, in milliseconds
382 * @return the MQTT packet type, or -1 if none
383 */
384template<class Network, class Timer, int MAX_MQTT_PACKET_SIZE, int b>
385int MQTT::Client<Network, Timer, MAX_MQTT_PACKET_SIZE, b>::readPacket(Timer& timer)
386{
387 int rc = FAILURE;
388 MQTTHeader header = {0};
389 int len = 0;
390 int rem_len = 0;
391 int read = 0;
392
393 /* 1. read the header byte. This has the packet type in it */
394 if (ipstack.read(readbuf, 1, timer.left_ms()) != 1)
395 goto exit;
396
397 len = 1;
398 /* 2. read the remaining length. This is variable in itself */
399 decodePacket(&rem_len, timer.left_ms());
400 len += MQTTPacket_encode(readbuf + 1, rem_len); /* put the original remaining length into the buffer */
401
402 if (rem_len > (MAX_MQTT_PACKET_SIZE - len))
403 {
404 rc = BUFFER_OVERFLOW;
405 goto exit;
406 }
407
408 /* 3. read the rest of the buffer using a callback to supply the rest of the data */
409 if (rem_len > 0 && (ipstack.read(readbuf + len, rem_len, timer.left_ms()) != rem_len))
410 goto exit;
411
412 header.byte = readbuf[0];
413 rc = header.bits.type;
414 if (this->keepAliveInterval > 0)
415 last_received.countdown(this->keepAliveInterval); // record the fact that we have successfully received a packet
416exit:
417
418#if defined(MQTT_DEBUG)
419 if (rc >= 0)
420 {
421 char printbuf[50];
422 DEBUG("Rc %d from receiving packet %s\n", rc, MQTTFormat_toClientString(printbuf, sizeof(printbuf), readbuf, len));
423 }
424#endif
425 return rc;
426}
427
428
429// assume topic filter and name is in correct format
430// # can only be at end
431// + and # can only be next to separator
432template<class Network, class Timer, int a, int b>
433bool MQTT::Client<Network, Timer, a, b>::isTopicMatched(char* topicFilter, MQTTString& topicName)
434{
435 char* curf = topicFilter;
436 char* curn = topicName.lenstring.data;
437 char* curn_end = curn + topicName.lenstring.len;
438
439 while (*curf && curn < curn_end)
440 {
441 if (*curn == '/' && *curf != '/')
442 break;
443 if (*curf != '+' && *curf != '#' && *curf != *curn)
444 break;
445 if (*curf == '+')
446 { // skip until we meet the next separator, or end of string
447 char* nextpos = curn + 1;
448 while (nextpos < curn_end && *nextpos != '/')
449 nextpos = ++curn + 1;
450 }
451 else if (*curf == '#')
452 curn = curn_end - 1; // skip until end of string
453 curf++;
454 curn++;
455 };
456
457 return (curn == curn_end) && (*curf == '\0');
458}
459
460
461
462template<class Network, class Timer, int a, int MAX_MESSAGE_HANDLERS>
463int MQTT::Client<Network, Timer, a, MAX_MESSAGE_HANDLERS>::deliverMessage(MQTTString& topicName, Message& message)
464{
465 int rc = FAILURE;
466
467 // we have to find the right message handler - indexed by topic
468 for (int i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
469 {
470 if (messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(&topicName, (char*)messageHandlers[i].topicFilter) ||
471 isTopicMatched((char*)messageHandlers[i].topicFilter, topicName)))
472 {
473 if (messageHandlers[i].fp.attached())
474 {
475 MessageData md(topicName, message);
476 messageHandlers[i].fp(md);
477 rc = SUCCESS;
478 }
479 }
480 }
481
482 if (rc == FAILURE && defaultMessageHandler.attached())
483 {
484 MessageData md(topicName, message);
485 defaultMessageHandler(md);
486 rc = SUCCESS;
487 }
488
489 return rc;
490}
491
492
493
494template<class Network, class Timer, int a, int b>
495int MQTT::Client<Network, Timer, a, b>::yield(unsigned long timeout_ms)
496{
497 int rc = SUCCESS;
498 Timer timer = Timer();
499
500 timer.countdown_ms(timeout_ms);
501 while (!timer.expired())
502 {
503 if (cycle(timer) < 0)
504 {
505 rc = FAILURE;
506 break;
507 }
508 }
509
510 return rc;
511}
512
513
514template<class Network, class Timer, int MAX_MQTT_PACKET_SIZE, int b>
515int MQTT::Client<Network, Timer, MAX_MQTT_PACKET_SIZE, b>::cycle(Timer& timer)
516{
517 /* get one piece of work off the wire and one pass through */
518
519 // read the socket, see what work is due
520 int packet_type = readPacket(timer);
521
522 int len = 0,
523 rc = SUCCESS;
524
525 switch (packet_type)
526 {
527 case FAILURE:
528 case BUFFER_OVERFLOW:
529 rc = packet_type;
530 break;
531 case CONNACK:
532 case PUBACK:
533 case SUBACK:
534 break;
535 case PUBLISH:
536 {
537 MQTTString topicName = MQTTString_initializer;
538 Message msg;
539 if (MQTTDeserialize_publish((unsigned char*)&msg.dup, (int*)&msg.qos, (unsigned char*)&msg.retained, (unsigned short*)&msg.id, &topicName,
540 (unsigned char**)&msg.payload, (int*)&msg.payloadlen, readbuf, MAX_MQTT_PACKET_SIZE) != 1)
541 goto exit;
542#if MQTTCLIENT_QOS2
543 if (msg.qos != QOS2)
544#endif
545 deliverMessage(topicName, msg);
546#if MQTTCLIENT_QOS2
547 else if (isQoS2msgidFree(msg.id))
548 {
549 if (useQoS2msgid(msg.id))
550 deliverMessage(topicName, msg);
551 else
552 WARN("Maximum number of incoming QoS2 messages exceeded");
553 }
554#endif
555#if MQTTCLIENT_QOS1 || MQTTCLIENT_QOS2
556 if (msg.qos != QOS0)
557 {
558 if (msg.qos == QOS1)
559 len = MQTTSerialize_ack(sendbuf, MAX_MQTT_PACKET_SIZE, PUBACK, 0, msg.id);
560 else if (msg.qos == QOS2)
561 len = MQTTSerialize_ack(sendbuf, MAX_MQTT_PACKET_SIZE, PUBREC, 0, msg.id);
562 if (len <= 0)
563 rc = FAILURE;
564 else
565 rc = sendPacket(len, timer);
566 if (rc == FAILURE)
567 goto exit; // there was a problem
568 }
569 break;
570#endif
571 }
572#if MQTTCLIENT_QOS2
573 case PUBREC:
574 case PUBREL:
575 unsigned short mypacketid;
576 unsigned char dup, type;
577 if (MQTTDeserialize_ack(&type, &dup, &mypacketid, readbuf, MAX_MQTT_PACKET_SIZE) != 1)
578 rc = FAILURE;
579 else if ((len = MQTTSerialize_ack(sendbuf, MAX_MQTT_PACKET_SIZE,
580 (packet_type == PUBREC) ? PUBREL : PUBCOMP, 0, mypacketid)) <= 0)
581 rc = FAILURE;
582 else if ((rc = sendPacket(len, timer)) != SUCCESS) // send the PUBREL packet
583 rc = FAILURE; // there was a problem
584 if (rc == FAILURE)
585 goto exit; // there was a problem
586 if (packet_type == PUBREL)
587 freeQoS2msgid(mypacketid);
588 break;
589
590 case PUBCOMP:
591 break;
592#endif
593 case PINGRESP:
594 ping_outstanding = false;
595 break;
596 }
597 keepalive();
598exit:
599 if (rc == SUCCESS)
600 rc = packet_type;
601 return rc;
602}
603
604
605template<class Network, class Timer, int MAX_MQTT_PACKET_SIZE, int b>
606int MQTT::Client<Network, Timer, MAX_MQTT_PACKET_SIZE, b>::keepalive()
607{
608 int rc = FAILURE;
609
610 if (keepAliveInterval == 0)
611 {
612 rc = SUCCESS;
613 goto exit;
614 }
615
616 if (last_sent.expired() || last_received.expired())
617 {
618 if (!ping_outstanding)
619 {
620 Timer timer = Timer(1000);
621 int len = MQTTSerialize_pingreq(sendbuf, MAX_MQTT_PACKET_SIZE);
622 if (len > 0 && (rc = sendPacket(len, timer)) == SUCCESS) // send the ping packet
623 ping_outstanding = true;
624 }
625 }
626
627exit:
628 return rc;
629}
630
631
632// only used in single-threaded mode where one command at a time is in process
633template<class Network, class Timer, int a, int b>
634int MQTT::Client<Network, Timer, a, b>::waitfor(int packet_type, Timer& timer)
635{
636 int rc = FAILURE;
637
638 do
639 {
640 if (timer.expired())
641 break; // we timed out
642 }
643 while ((rc = cycle(timer)) != packet_type);
644
645 return rc;
646}
647
648
649template<class Network, class Timer, int MAX_MQTT_PACKET_SIZE, int b>
650int MQTT::Client<Network, Timer, MAX_MQTT_PACKET_SIZE, b>::connect(MQTTPacket_connectData& options)
651{
652 Timer connect_timer = Timer(command_timeout_ms);
653 int rc = FAILURE;
654 int len = 0;
655
656 if (isconnected) // don't send connect packet again if we are already connected
657 goto exit;
658
659 this->keepAliveInterval = options.keepAliveInterval;
660 this->cleansession = options.cleansession;
661 if ((len = MQTTSerialize_connect(sendbuf, MAX_MQTT_PACKET_SIZE, &options)) <= 0)
662 goto exit;
663 if ((rc = sendPacket(len, connect_timer)) != SUCCESS) // send the connect packet
664 goto exit; // there was a problem
665
666 if (this->keepAliveInterval > 0)
667 last_received.countdown(this->keepAliveInterval);
668 // this will be a blocking call, wait for the connack
669 if (waitfor(CONNACK, connect_timer) == CONNACK)
670 {
671 unsigned char connack_rc = 255;
672 bool sessionPresent = false;
673 if (MQTTDeserialize_connack((unsigned char*)&sessionPresent, &connack_rc, readbuf, MAX_MQTT_PACKET_SIZE) == 1)
674 rc = connack_rc;
675 else
676 rc = FAILURE;
677 }
678 else
679 rc = FAILURE;
680
681#if MQTTCLIENT_QOS2
682 // resend an inflight publish
683 if (inflightMsgid >0 && inflightQoS == QOS2 && pubrel)
684 {
685 if ((len = MQTTSerialize_ack(sendbuf, MAX_MQTT_PACKET_SIZE, PUBREL, 0, inflightMsgid)) <= 0)
686 rc = FAILURE;
687 else
688 rc = publish(len, connect_timer, inflightQoS);
689 }
690 else
691#endif
692#if MQTTCLIENT_QOS1 || MQTTCLIENT_QOS2
693 if (inflightMsgid > 0)
694 {
695 memcpy(sendbuf, pubbuf, MAX_MQTT_PACKET_SIZE);
696 rc = publish(inflightLen, connect_timer, inflightQoS);
697 }
698#endif
699
700exit:
701 if (rc == SUCCESS)
702 isconnected = true;
703 return rc;
704}
705
706
707template<class Network, class Timer, int MAX_MQTT_PACKET_SIZE, int b>
708int MQTT::Client<Network, Timer, MAX_MQTT_PACKET_SIZE, b>::connect()
709{
710 MQTTPacket_connectData default_options = MQTTPacket_connectData_initializer;
711 return connect(default_options);
712}
713
714
715template<class Network, class Timer, int MAX_MQTT_PACKET_SIZE, int MAX_MESSAGE_HANDLERS>
716int MQTT::Client<Network, Timer, MAX_MQTT_PACKET_SIZE, MAX_MESSAGE_HANDLERS>::subscribe(const char* topicFilter, enum QoS qos, messageHandler messageHandler)
717{
718 int rc = FAILURE;
719 Timer timer = Timer(command_timeout_ms);
720 int len = 0;
721 MQTTString topic = {(char*)topicFilter, 0, 0};
722
723 if (!isconnected)
724 goto exit;
725
726 len = MQTTSerialize_subscribe(sendbuf, MAX_MQTT_PACKET_SIZE, 0, packetid.getNext(), 1, &topic, (int*)&qos);
727 if (len <= 0)
728 goto exit;
729 if ((rc = sendPacket(len, timer)) != SUCCESS) // send the subscribe packet
730 goto exit; // there was a problem
731
732 if (waitfor(SUBACK, timer) == SUBACK) // wait for suback
733 {
734 int count = 0, grantedQoS = -1;
735 unsigned short mypacketid;
736 if (MQTTDeserialize_suback(&mypacketid, 1, &count, &grantedQoS, readbuf, MAX_MQTT_PACKET_SIZE) == 1)
737 rc = grantedQoS; // 0, 1, 2 or 0x80
738 if (rc != 0x80)
739 {
740 for (int i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
741 {
742 if (messageHandlers[i].topicFilter == 0)
743 {
744 messageHandlers[i].topicFilter = topicFilter;
745 messageHandlers[i].fp.attach(messageHandler);
746 rc = 0;
747 break;
748 }
749 }
750 }
751 }
752 else
753 rc = FAILURE;
754
755exit:
756 if (rc != SUCCESS)
757 isconnected = false;
758 return rc;
759}
760
761
762template<class Network, class Timer, int MAX_MQTT_PACKET_SIZE, int MAX_MESSAGE_HANDLERS>
763int MQTT::Client<Network, Timer, MAX_MQTT_PACKET_SIZE, MAX_MESSAGE_HANDLERS>::unsubscribe(const char* topicFilter)
764{
765 int rc = FAILURE;
766 Timer timer = Timer(command_timeout_ms);
767 MQTTString topic = {(char*)topicFilter, 0, 0};
768 int len = 0;
769
770 if (!isconnected)
771 goto exit;
772
773 if ((len = MQTTSerialize_unsubscribe(sendbuf, MAX_MQTT_PACKET_SIZE, 0, packetid.getNext(), 1, &topic)) <= 0)
774 goto exit;
775 if ((rc = sendPacket(len, timer)) != SUCCESS) // send the unsubscribe packet
776 goto exit; // there was a problem
777
778 if (waitfor(UNSUBACK, timer) == UNSUBACK)
779 {
780 unsigned short mypacketid; // should be the same as the packetid above
781 if (MQTTDeserialize_unsuback(&mypacketid, readbuf, MAX_MQTT_PACKET_SIZE) == 1)
782 rc = 0;
783 }
784 else
785 rc = FAILURE;
786
787exit:
788 if (rc != SUCCESS)
789 isconnected = false;
790 return rc;
791}
792
793
794template<class Network, class Timer, int MAX_MQTT_PACKET_SIZE, int b>
795int MQTT::Client<Network, Timer, MAX_MQTT_PACKET_SIZE, b>::publish(int len, Timer& timer, enum QoS qos)
796{
797 int rc;
798
799 if ((rc = sendPacket(len, timer)) != SUCCESS) // send the publish packet
800 goto exit; // there was a problem
801
802#if MQTTCLIENT_QOS1
803 if (qos == QOS1)
804 {
805 if (waitfor(PUBACK, timer) == PUBACK)
806 {
807 unsigned short mypacketid;
808 unsigned char dup, type;
809 if (MQTTDeserialize_ack(&type, &dup, &mypacketid, readbuf, MAX_MQTT_PACKET_SIZE) != 1)
810 rc = FAILURE;
811 else if (inflightMsgid == mypacketid)
812 inflightMsgid = 0;
813 }
814 else
815 rc = FAILURE;
816 }
817#elif MQTTCLIENT_QOS2
818 else if (qos == QOS2)
819 {
820 if (waitfor(PUBCOMP, timer) == PUBCOMP)
821 {
822 unsigned short mypacketid;
823 unsigned char dup, type;
824 if (MQTTDeserialize_ack(&type, &dup, &mypacketid, readbuf, MAX_MQTT_PACKET_SIZE) != 1)
825 rc = FAILURE;
826 else if (inflightMsgid == mypacketid)
827 inflightMsgid = 0;
828 }
829 else
830 rc = FAILURE;
831 }
832#endif
833
834exit:
835 if (rc != SUCCESS)
836 isconnected = false;
837 return rc;
838}
839
840
841
842template<class Network, class Timer, int MAX_MQTT_PACKET_SIZE, int b>
843int MQTT::Client<Network, Timer, MAX_MQTT_PACKET_SIZE, b>::publish(const char* topicName, void* payload, size_t payloadlen, unsigned short& id, enum QoS qos, bool retained)
844{
845 int rc = FAILURE;
846 Timer timer = Timer(command_timeout_ms);
847 MQTTString topicString = MQTTString_initializer;
848 int len = 0;
849
850 if (!isconnected)
851 goto exit;
852
853 topicString.cstring = (char*)topicName;
854
855#if MQTTCLIENT_QOS1 || MQTTCLIENT_QOS2
856 if (qos == QOS1 || qos == QOS2)
857 id = packetid.getNext();
858#endif
859
860 len = MQTTSerialize_publish(sendbuf, MAX_MQTT_PACKET_SIZE, 0, qos, retained, id,
861 topicString, (unsigned char*)payload, payloadlen);
862 if (len <= 0)
863 goto exit;
864
865#if MQTTCLIENT_QOS1 || MQTTCLIENT_QOS2
866 if (!cleansession)
867 {
868 memcpy(pubbuf, sendbuf, len);
869 inflightMsgid = id;
870 inflightLen = len;
871 inflightQoS = qos;
872#if MQTTCLIENT_QOS2
873 pubrel = false;
874#endif
875 }
876#endif
877
878 rc = publish(len, timer, qos);
879exit:
880 return rc;
881}
882
883
884template<class Network, class Timer, int MAX_MQTT_PACKET_SIZE, int b>
885int MQTT::Client<Network, Timer, MAX_MQTT_PACKET_SIZE, b>::publish(const char* topicName, void* payload, size_t payloadlen, enum QoS qos, bool retained)
886{
887 unsigned short id = 0; // dummy - not used for anything
888 return publish(topicName, payload, payloadlen, id, qos, retained);
889}
890
891
892template<class Network, class Timer, int MAX_MQTT_PACKET_SIZE, int b>
893int MQTT::Client<Network, Timer, MAX_MQTT_PACKET_SIZE, b>::publish(const char* topicName, Message& message)
894{
895 return publish(topicName, message.payload, message.payloadlen, message.qos, message.retained);
896}
897
898
899template<class Network, class Timer, int MAX_MQTT_PACKET_SIZE, int b>
900int MQTT::Client<Network, Timer, MAX_MQTT_PACKET_SIZE, b>::disconnect()
901{
902 int rc = FAILURE;
903 Timer timer = Timer(command_timeout_ms); // we might wait for incomplete incoming publishes to complete
904 int len = MQTTSerialize_disconnect(sendbuf, MAX_MQTT_PACKET_SIZE);
905 if (len > 0)
906 rc = sendPacket(len, timer); // send the disconnect packet
907
908 isconnected = false;
909 return rc;
910}
911
912
913#endif
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient/src/MQTTLogging.h b/aws_mqtt_embedded_client_lib/MQTTClient/src/MQTTLogging.h
new file mode 100644
index 0000000..fd83e61
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient/src/MQTTLogging.h
@@ -0,0 +1,55 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#if !defined(MQTT_LOGGING_H)
18#define MQTT_LOGGING_H
19
20#define STREAM stdout
21#if !defined(DEBUG)
22#define DEBUG(...) \
23 {\
24 fprintf(STREAM, "DEBUG: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \
25 fprintf(STREAM, ##__VA_ARGS__); \
26 fflush(STREAM); \
27 }
28#endif
29#if !defined(LOG)
30#define LOG(...) \
31 {\
32 fprintf(STREAM, "LOG: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \
33 fprintf(STREAM, ##__VA_ARGS__); \
34 fflush(STREAM); \
35 }
36#endif
37#if !defined(WARN)
38#define WARN(...) \
39 { \
40 fprintf(STREAM, "WARN: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \
41 fprintf(STREAM, ##__VA_ARGS__); \
42 fflush(STREAM); \
43 }
44#endif
45#if !defined(ERROR)
46#define ERROR(...) \
47 { \
48 fprintf(STREAM, "ERROR: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \
49 fprintf(STREAM, ##__VA_ARGS__); \
50 fflush(STREAM); \
51 exit(1); \
52 }
53#endif
54
55#endif
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient/src/arduino/Countdown.h b/aws_mqtt_embedded_client_lib/MQTTClient/src/arduino/Countdown.h
new file mode 100644
index 0000000..c9cb960
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient/src/arduino/Countdown.h
@@ -0,0 +1,57 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#if !defined(COUNTDOWN_H)
18#define COUNTDOWN_H
19
20class Countdown
21{
22public:
23 Countdown()
24 {
25 interval_end_ms = 0L;
26 }
27
28 Countdown(int ms)
29 {
30 countdown_ms(ms);
31 }
32
33 bool expired()
34 {
35 return (interval_end_ms > 0L) && (millis() >= interval_end_ms);
36 }
37
38 void countdown_ms(unsigned long ms)
39 {
40 interval_end_ms = millis() + ms;
41 }
42
43 void countdown(int seconds)
44 {
45 countdown_ms((unsigned long)seconds * 1000L);
46 }
47
48 int left_ms()
49 {
50 return interval_end_ms - millis();
51 }
52
53private:
54 unsigned long interval_end_ms;
55};
56
57#endif
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient/src/arduino/IPStack.h b/aws_mqtt_embedded_client_lib/MQTTClient/src/arduino/IPStack.h
new file mode 100644
index 0000000..66c858f
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient/src/arduino/IPStack.h
@@ -0,0 +1,79 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 * Benjamin Cabe - generic IPStack
16 *******************************************************************************/
17
18#if !defined(IPSTACK_H)
19#define IPSTACK_H
20
21#include <SPI.h>
22
23#include <Client.h>
24
25class IPStack
26{
27public:
28 IPStack(Client& client) : client(&client)
29 {
30
31 }
32
33 int connect(char* hostname, int port)
34 {
35 return client->connect(hostname, port);
36 }
37
38 int connect(uint32_t hostname, int port)
39 {
40 return client->connect(hostname, port);
41 }
42
43 int read(unsigned char* buffer, int len, int timeout)
44 {
45 int interval = 10; // all times are in milliseconds
46 int total = 0, rc = -1;
47
48 if (timeout < 30)
49 interval = 2;
50 while (client->available() < len && total < timeout)
51 {
52 delay(interval);
53 total += interval;
54 }
55 if (client->available() >= len)
56 rc = client->readBytes((char*)buffer, len);
57 return rc;
58 }
59
60 int write(unsigned char* buffer, int len, int timeout)
61 {
62 client->setTimeout(timeout);
63 return client->write((uint8_t*)buffer, len);
64 }
65
66 int disconnect()
67 {
68 client->stop();
69 return 0;
70 }
71
72private:
73
74 Client* client;
75};
76
77#endif
78
79
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient/src/arduino/WifiIPStack.h b/aws_mqtt_embedded_client_lib/MQTTClient/src/arduino/WifiIPStack.h
new file mode 100644
index 0000000..6761037
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient/src/arduino/WifiIPStack.h
@@ -0,0 +1,69 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#ifndef ARDUINOWIFIIPSTACK_H
18#define ARDUINOWIFIIPSTACK_H
19
20#include <WiFi.h>
21
22class WifiIPStack
23{
24public:
25 WifiIPStack()
26 {
27 //WiFi.begin(); // Use DHCP
28 iface.setTimeout(1000); // 1 second Timeout
29 }
30
31 int connect(char* hostname, int port)
32 {
33 return iface.connect(hostname, port);
34 }
35
36 int connect(uint32_t hostname, int port)
37 {
38 return iface.connect(hostname, port);
39 }
40
41 int read(char* buffer, int len, int timeout)
42 {
43 iface.setTimeout(timeout);
44 while(!iface.available());
45 return iface.readBytes(buffer, len);
46 }
47
48 int write(char* buffer, int len, int timeout)
49 {
50 iface.setTimeout(timeout);
51 return iface.write((uint8_t*)buffer, len);
52 }
53
54 int disconnect()
55 {
56 iface.stop();
57 return 0;
58 }
59
60private:
61
62 WiFiClient iface;
63
64};
65
66#endif
67
68
69
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient/src/linux/linux.cpp b/aws_mqtt_embedded_client_lib/MQTTClient/src/linux/linux.cpp
new file mode 100644
index 0000000..bb31de8
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient/src/linux/linux.cpp
@@ -0,0 +1,223 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#include <sys/types.h>
18#include <sys/socket.h>
19#include <sys/param.h>
20#include <sys/time.h>
21#include <sys/select.h>
22#include <netinet/in.h>
23#include <netinet/tcp.h>
24#include <arpa/inet.h>
25#include <netdb.h>
26#include <stdio.h>
27#include <unistd.h>
28#include <errno.h>
29#include <fcntl.h>
30
31#include <stdlib.h>
32#include <string.h>
33#include <signal.h>
34
35
36class IPStack
37{
38public:
39 IPStack()
40 {
41
42 }
43
44 int Socket_error(const char* aString)
45 {
46 int rc = 0;
47 //if (errno != EINTR && errno != EAGAIN && errno != EINPROGRESS && errno != EWOULDBLOCK)
48 //{
49 if (strcmp(aString, "shutdown") != 0 || (errno != ENOTCONN && errno != ECONNRESET))
50 {
51 printf("Socket error %s in %s for socket %d\n", strerror(errno), aString, mysock);
52 rc = errno;
53 }
54 //}
55 return errno;
56 }
57
58 int connect(const char* hostname, int port)
59 {
60 int type = SOCK_STREAM;
61 struct sockaddr_in address;
62 int rc = -1;
63 sa_family_t family = AF_INET;
64 struct addrinfo *result = NULL;
65 struct addrinfo hints = {0, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP, 0, NULL, NULL, NULL};
66
67 if ((rc = getaddrinfo(hostname, NULL, &hints, &result)) == 0)
68 {
69 struct addrinfo* res = result;
70
71 /* prefer ip4 addresses */
72 while (res)
73 {
74 if (res->ai_family == AF_INET)
75 {
76 result = res;
77 break;
78 }
79 res = res->ai_next;
80 }
81
82 if (result->ai_family == AF_INET)
83 {
84 address.sin_port = htons(port);
85 address.sin_family = family = AF_INET;
86 address.sin_addr = ((struct sockaddr_in*)(result->ai_addr))->sin_addr;
87 }
88 else
89 rc = -1;
90
91 freeaddrinfo(result);
92 }
93
94 if (rc == 0)
95 {
96 mysock = socket(family, type, 0);
97 if (mysock != -1)
98 {
99 int opt = 1;
100
101 //if (setsockopt(mysock, SOL_SOCKET, SO_NOSIGPIPE, (void*)&opt, sizeof(opt)) != 0)
102 // printf("Could not set SO_NOSIGPIPE for socket %d", mysock);
103
104 rc = ::connect(mysock, (struct sockaddr*)&address, sizeof(address));
105 }
106 }
107
108 return rc;
109 }
110
111 int read(unsigned char* buffer, int len, int timeout_ms)
112 {
113 struct timeval interval = {timeout_ms / 1000, (timeout_ms % 1000) * 1000};
114 if (interval.tv_sec < 0 || (interval.tv_sec == 0 && interval.tv_usec <= 0))
115 {
116 interval.tv_sec = 0;
117 interval.tv_usec = 100;
118 }
119
120 setsockopt(mysock, SOL_SOCKET, SO_RCVTIMEO, (char *)&interval, sizeof(struct timeval));
121
122 int bytes = 0;
123 while (bytes < len)
124 {
125 int rc = ::recv(mysock, &buffer[bytes], (size_t)(len - bytes), 0);
126 if (rc == -1)
127 {
128 if (Socket_error("read") != 0)
129 {
130 bytes = -1;
131 break;
132 }
133 }
134 else
135 bytes += rc;
136 }
137 return bytes;
138 }
139
140 int write(unsigned char* buffer, int len, int timeout)
141 {
142 struct timeval tv;
143
144 tv.tv_sec = 0; /* 30 Secs Timeout */
145 tv.tv_usec = timeout * 1000; // Not init'ing this can cause strange errors
146
147 setsockopt(mysock, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv,sizeof(struct timeval));
148 int rc = ::write(mysock, buffer, len);
149 //printf("write rc %d\n", rc);
150 return rc;
151 }
152
153 int disconnect()
154 {
155 return ::close(mysock);
156 }
157
158private:
159
160 int mysock;
161
162};
163
164
165class Countdown
166{
167public:
168 Countdown()
169 {
170
171 }
172
173 Countdown(int ms)
174 {
175 countdown_ms(ms);
176 }
177
178
179 bool expired()
180 {
181 struct timeval now, res;
182 gettimeofday(&now, NULL);
183 timersub(&end_time, &now, &res);
184 //printf("left %d ms\n", (res.tv_sec < 0) ? 0 : res.tv_sec * 1000 + res.tv_usec / 1000);
185 //if (res.tv_sec > 0 || res.tv_usec > 0)
186 // printf("expired %d %d\n", res.tv_sec, res.tv_usec);
187 return res.tv_sec < 0 || (res.tv_sec == 0 && res.tv_usec <= 0);
188 }
189
190
191 void countdown_ms(int ms)
192 {
193 struct timeval now;
194 gettimeofday(&now, NULL);
195 struct timeval interval = {ms / 1000, (ms % 1000) * 1000};
196 //printf("interval %d %d\n", interval.tv_sec, interval.tv_usec);
197 timeradd(&now, &interval, &end_time);
198 }
199
200
201 void countdown(int seconds)
202 {
203 struct timeval now;
204 gettimeofday(&now, NULL);
205 struct timeval interval = {seconds, 0};
206 timeradd(&now, &interval, &end_time);
207 }
208
209
210 int left_ms()
211 {
212 struct timeval now, res;
213 gettimeofday(&now, NULL);
214 timersub(&end_time, &now, &res);
215 //printf("left %d ms\n", (res.tv_sec < 0) ? 0 : res.tv_sec * 1000 + res.tv_usec / 1000);
216 return (res.tv_sec < 0) ? 0 : res.tv_sec * 1000 + res.tv_usec / 1000;
217 }
218
219private:
220
221 struct timeval end_time;
222};
223
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient/src/mbed/MQTTEthernet.h b/aws_mqtt_embedded_client_lib/MQTTClient/src/mbed/MQTTEthernet.h
new file mode 100644
index 0000000..d6133a5
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient/src/mbed/MQTTEthernet.h
@@ -0,0 +1,40 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#if !defined(MQTTETHERNET_H)
18#define MQTTETHERNET_H
19
20#include "MQTT_mbed.h"
21#include "EthernetInterface.h"
22#include "MQTTSocket.h"
23
24class MQTTEthernet : public MQTTSocket
25{
26public:
27 MQTTEthernet()
28 {
29 eth.init(); // Use DHCP
30 eth.connect();
31 }
32
33private:
34
35 EthernetInterface eth;
36
37};
38
39
40#endif
diff --git a/aws_mqtt_embedded_client_lib/MQTTClient/src/mbed/MQTTSocket.h b/aws_mqtt_embedded_client_lib/MQTTClient/src/mbed/MQTTSocket.h
new file mode 100644
index 0000000..0d48d66
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTClient/src/mbed/MQTTSocket.h
@@ -0,0 +1,57 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#if !defined(MQTTSOCKET_H)
18#define MQTTSOCKET_H
19
20#include "MQTT_mbed.h"
21#include "TCPSocketConnection.h"
22
23class MQTTSocket
24{
25public:
26 int connect(char* hostname, int port, int timeout=1000)
27 {
28 mysock.set_blocking(false, timeout); // 1 second Timeout
29 return mysock.connect(hostname, port);
30 }
31
32 int read(unsigned char* buffer, int len, int timeout)
33 {
34 mysock.set_blocking(false, timeout);
35 return mysock.receive((char*)buffer, len);
36 }
37
38 int write(unsigned char* buffer, int len, int timeout)
39 {
40 mysock.set_blocking(false, timeout);
41 return mysock.send((char*)buffer, len);
42 }
43
44 int disconnect()
45 {
46 return mysock.close();
47 }
48
49private:
50
51 TCPSocketConnection mysock;
52
53};
54
55
56
57#endif
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/samples/build b/aws_mqtt_embedded_client_lib/MQTTPacket/samples/build
new file mode 100644
index 0000000..6b452ee
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/samples/build
@@ -0,0 +1,6 @@
1gcc -Wall -c transport.c -Os -s
2gcc qos0pub.c transport.o -I ../src ../src/MQTTConnectClient.c ../src/MQTTSerializePublish.c ../src/MQTTPacket.c -o qos0pub -Os -s
3
4gcc pub0sub1.c transport.o -I ../src ../src/MQTTConnectClient.c ../src/MQTTSerializePublish.c ../src/MQTTPacket.c ../src/MQTTSubscribeClient.c -o pub0sub1 ../src/MQTTDeserializePublish.c -Os -s ../src/MQTTConnectServer.c ../src/MQTTSubscribeServer.c ../src/MQTTUnsubscribeServer.c ../src/MQTTUnsubscribeClient.c -ggdb
5gcc pub0sub1_nb.c transport.o -I ../src ../src/MQTTConnectClient.c ../src/MQTTSerializePublish.c ../src/MQTTPacket.c ../src/MQTTSubscribeClient.c -o pub0sub1_nb ../src/MQTTDeserializePublish.c -Os -s ../src/MQTTConnectServer.c ../src/MQTTSubscribeServer.c ../src/MQTTUnsubscribeServer.c ../src/MQTTUnsubscribeClient.c -ggdb
6
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/samples/null.c b/aws_mqtt_embedded_client_lib/MQTTPacket/samples/null.c
new file mode 100644
index 0000000..d123e09
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/samples/null.c
@@ -0,0 +1,4 @@
1int main(int argc, char** argv)
2{
3 return 0;
4}
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/samples/pub0sub1.c b/aws_mqtt_embedded_client_lib/MQTTPacket/samples/pub0sub1.c
new file mode 100644
index 0000000..37bc2d4
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/samples/pub0sub1.c
@@ -0,0 +1,153 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 * Sergio R. Caprile - clarifications and/or documentation extension
16 *******************************************************************************/
17
18#include <stdio.h>
19#include <string.h>
20#include <stdlib.h>
21
22#include "MQTTPacket.h"
23#include "transport.h"
24
25/* This is in order to get an asynchronous signal to stop the sample,
26as the code loops waiting for msgs on the subscribed topic.
27Your actual code will depend on your hw and approach*/
28#include <signal.h>
29
30int toStop = 0;
31
32void cfinish(int sig)
33{
34 signal(SIGINT, NULL);
35 toStop = 1;
36}
37
38void stop_init(void)
39{
40 signal(SIGINT, cfinish);
41 signal(SIGTERM, cfinish);
42}
43/* */
44
45int main(int argc, char *argv[])
46{
47 MQTTPacket_connectData data = MQTTPacket_connectData_initializer;
48 int rc = 0;
49 int mysock = 0;
50 unsigned char buf[200];
51 int buflen = sizeof(buf);
52 int msgid = 1;
53 MQTTString topicString = MQTTString_initializer;
54 int req_qos = 0;
55 char* payload = "mypayload";
56 int payloadlen = strlen(payload);
57 int len = 0;
58 char *host = "m2m.eclipse.org";
59 int port = 1883;
60
61 stop_init();
62 if (argc > 1)
63 host = argv[1];
64
65 if (argc > 2)
66 port = atoi(argv[2]);
67
68 mysock = transport_open(host, port);
69 if(mysock < 0)
70 return mysock;
71
72 printf("Sending to hostname %s port %d\n", host, port);
73
74 data.clientID.cstring = "me";
75 data.keepAliveInterval = 20;
76 data.cleansession = 1;
77 data.username.cstring = "testuser";
78 data.password.cstring = "testpassword";
79
80 len = MQTTSerialize_connect(buf, buflen, &data);
81 rc = transport_sendPacketBuffer(mysock, buf, len);
82
83 /* wait for connack */
84 if (MQTTPacket_read(buf, buflen, transport_getdata) == CONNACK)
85 {
86 unsigned char sessionPresent, connack_rc;
87
88 if (MQTTDeserialize_connack(&sessionPresent, &connack_rc, buf, buflen) != 1 || connack_rc != 0)
89 {
90 printf("Unable to connect, return code %d\n", connack_rc);
91 goto exit;
92 }
93 }
94 else
95 goto exit;
96
97 /* subscribe */
98 topicString.cstring = "substopic";
99 len = MQTTSerialize_subscribe(buf, buflen, 0, msgid, 1, &topicString, &req_qos);
100
101 rc = transport_sendPacketBuffer(mysock, buf, len);
102 if (MQTTPacket_read(buf, buflen, transport_getdata) == SUBACK) /* wait for suback */
103 {
104 unsigned short submsgid;
105 int subcount;
106 int granted_qos;
107
108 rc = MQTTDeserialize_suback(&submsgid, 1, &subcount, &granted_qos, buf, buflen);
109 if (granted_qos != 0)
110 {
111 printf("granted qos != 0, %d\n", granted_qos);
112 goto exit;
113 }
114 }
115 else
116 goto exit;
117
118 /* loop getting msgs on subscribed topic */
119 topicString.cstring = "pubtopic";
120 while (!toStop)
121 {
122 /* transport_getdata() has a built-in 1 second timeout,
123 your mileage will vary */
124 if (MQTTPacket_read(buf, buflen, transport_getdata) == PUBLISH)
125 {
126 unsigned char dup;
127 int qos;
128 unsigned char retained;
129 unsigned short msgid;
130 int payloadlen_in;
131 unsigned char* payload_in;
132 int rc;
133 MQTTString receivedTopic;
134
135 rc = MQTTDeserialize_publish(&dup, &qos, &retained, &msgid, &receivedTopic,
136 &payload_in, &payloadlen_in, buf, buflen);
137 printf("message arrived %.*s\n", payloadlen_in, payload_in);
138 }
139
140 printf("publishing reading\n");
141 len = MQTTSerialize_publish(buf, buflen, 0, 0, 0, 0, topicString, (unsigned char*)payload, payloadlen);
142 rc = transport_sendPacketBuffer(mysock, buf, len);
143 }
144
145 printf("disconnecting\n");
146 len = MQTTSerialize_disconnect(buf, buflen);
147 rc = transport_sendPacketBuffer(mysock, buf, len);
148
149exit:
150 transport_close(mysock);
151
152 return 0;
153}
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/samples/pub0sub1_nb.c b/aws_mqtt_embedded_client_lib/MQTTPacket/samples/pub0sub1_nb.c
new file mode 100644
index 0000000..fdc79ba
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/samples/pub0sub1_nb.c
@@ -0,0 +1,158 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 * Sergio R. Caprile - clarifications and/or documentation extension
16 *******************************************************************************/
17
18#include <stdio.h>
19#include <string.h>
20#include <stdlib.h>
21
22#include "MQTTPacket.h"
23#include "transport.h"
24
25/* This is in order to get an asynchronous signal to stop the sample,
26as the code loops waiting for msgs on the subscribed topic.
27Your actual code will depend on your hw and approach*/
28#include <signal.h>
29
30int toStop = 0;
31
32void cfinish(int sig)
33{
34 signal(SIGINT, NULL);
35 toStop = 1;
36}
37
38void stop_init(void)
39{
40 signal(SIGINT, cfinish);
41 signal(SIGTERM, cfinish);
42}
43/* */
44
45int main(int argc, char *argv[])
46{
47 MQTTPacket_connectData data = MQTTPacket_connectData_initializer;
48 int rc = 0;
49 int mysock = 0;
50 unsigned char buf[200];
51 int buflen = sizeof(buf);
52 int msgid = 1;
53 MQTTString topicString = MQTTString_initializer;
54 int req_qos = 0;
55 char* payload = "mypayload";
56 int payloadlen = strlen(payload);
57 int len = 0;
58 char *host = "m2m.eclipse.org";
59 int port = 1883;
60 MQTTTransport mytransport;
61
62 stop_init();
63 if (argc > 1)
64 host = argv[1];
65
66 if (argc > 2)
67 port = atoi(argv[2]);
68
69 mysock = transport_open(host, port);
70 if(mysock < 0)
71 return mysock;
72
73 printf("Sending to hostname %s port %d\n", host, port);
74
75 mytransport.sck = &mysock;
76 mytransport.getfn = transport_getdatanb;
77 mytransport.state = 0;
78 data.clientID.cstring = "me";
79 data.keepAliveInterval = 20;
80 data.cleansession = 1;
81 data.username.cstring = "testuser";
82 data.password.cstring = "testpassword";
83
84 len = MQTTSerialize_connect(buf, buflen, &data);
85 rc = transport_sendPacketBuffer(mysock, buf, len);
86
87 /* wait for connack */
88 if (MQTTPacket_read(buf, buflen, transport_getdata) == CONNACK)
89 {
90 unsigned char sessionPresent, connack_rc;
91
92 if (MQTTDeserialize_connack(&sessionPresent, &connack_rc, buf, buflen) != 1 || connack_rc != 0)
93 {
94 printf("Unable to connect, return code %d\n", connack_rc);
95 goto exit;
96 }
97 }
98 else
99 goto exit;
100
101 /* subscribe */
102 topicString.cstring = "substopic";
103 len = MQTTSerialize_subscribe(buf, buflen, 0, msgid, 1, &topicString, &req_qos);
104
105 rc = transport_sendPacketBuffer(mysock, buf, len);
106 do {
107 int frc;
108 if ((frc=MQTTPacket_readnb(buf, buflen, &mytransport)) == SUBACK) /* wait for suback */
109 {
110 unsigned short submsgid;
111 int subcount;
112 int granted_qos;
113
114 rc = MQTTDeserialize_suback(&submsgid, 1, &subcount, &granted_qos, buf, buflen);
115 if (granted_qos != 0)
116 {
117 printf("granted qos != 0, %d\n", granted_qos);
118 goto exit;
119 }
120 break;
121 }
122 else if (frc == -1)
123 goto exit;
124 } while (1); /* handle timeouts here */
125 /* loop getting msgs on subscribed topic */
126 topicString.cstring = "pubtopic";
127 while (!toStop)
128 {
129 /* handle timeouts */
130 if (MQTTPacket_readnb(buf, buflen, &mytransport) == PUBLISH)
131 {
132 unsigned char dup;
133 int qos;
134 unsigned char retained;
135 unsigned short msgid;
136 int payloadlen_in;
137 unsigned char* payload_in;
138 int rc;
139 MQTTString receivedTopic;
140
141 rc = MQTTDeserialize_publish(&dup, &qos, &retained, &msgid, &receivedTopic,
142 &payload_in, &payloadlen_in, buf, buflen);
143 printf("message arrived %.*s\n", payloadlen_in, payload_in);
144 printf("publishing reading\n");
145 len = MQTTSerialize_publish(buf, buflen, 0, 0, 0, 0, topicString, (unsigned char*)payload, payloadlen);
146 rc = transport_sendPacketBuffer(mysock, buf, len);
147 }
148 }
149
150 printf("disconnecting\n");
151 len = MQTTSerialize_disconnect(buf, buflen);
152 rc = transport_sendPacketBuffer(mysock, buf, len);
153
154exit:
155 transport_close(mysock);
156
157 return 0;
158}
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/samples/qos0pub.c b/aws_mqtt_embedded_client_lib/MQTTPacket/samples/qos0pub.c
new file mode 100644
index 0000000..e61a487
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/samples/qos0pub.c
@@ -0,0 +1,76 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 * Sergio R. Caprile - clarifications and/or documentation extension
16 *******************************************************************************/
17
18#include <stdio.h>
19#include <string.h>
20#include <stdlib.h>
21
22#include "MQTTPacket.h"
23#include "transport.h"
24
25
26int main(int argc, char *argv[])
27{
28 MQTTPacket_connectData data = MQTTPacket_connectData_initializer;
29 int rc = 0;
30 char buf[200];
31 int buflen = sizeof(buf);
32 int mysock = 0;
33 MQTTString topicString = MQTTString_initializer;
34 char* payload = "mypayload";
35 int payloadlen = strlen(payload);
36 int len = 0;
37 char *host = "m2m.eclipse.org";
38 int port = 1883;
39
40 if (argc > 1)
41 host = argv[1];
42
43 if (argc > 2)
44 port = atoi(argv[2]);
45
46 mysock = transport_open(host,port);
47 if(mysock < 0)
48 return mysock;
49
50 printf("Sending to hostname %s port %d\n", host, port);
51
52 data.clientID.cstring = "me";
53 data.keepAliveInterval = 20;
54 data.cleansession = 1;
55 data.username.cstring = "testuser";
56 data.password.cstring = "testpassword";
57 data.MQTTVersion = 4;
58
59 len = MQTTSerialize_connect((unsigned char *)buf, buflen, &data);
60
61 topicString.cstring = "mytopic";
62 len += MQTTSerialize_publish((unsigned char *)(buf + len), buflen - len, 0, 0, 0, 0, topicString, (unsigned char *)payload, payloadlen);
63
64 len += MQTTSerialize_disconnect((unsigned char *)(buf + len), buflen - len);
65
66 rc = transport_sendPacketBuffer(mysock, buf, len);
67 if (rc == len)
68 printf("Successfully published\n");
69 else
70 printf("Publish failed\n");
71
72exit:
73 transport_close(mysock);
74
75 return 0;
76}
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/samples/transport.c b/aws_mqtt_embedded_client_lib/MQTTPacket/samples/transport.c
new file mode 100644
index 0000000..98ded0e
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/samples/transport.c
@@ -0,0 +1,205 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 * Sergio R. Caprile - "commonalization" from prior samples and/or documentation extension
16 *******************************************************************************/
17
18#include <sys/types.h>
19
20#if !defined(SOCKET_ERROR)
21 /** error in socket operation */
22 #define SOCKET_ERROR -1
23#endif
24
25#if defined(WIN32)
26/* default on Windows is 64 - increase to make Linux and Windows the same */
27#define FD_SETSIZE 1024
28#include <winsock2.h>
29#include <ws2tcpip.h>
30#define MAXHOSTNAMELEN 256
31#define EAGAIN WSAEWOULDBLOCK
32#define EINTR WSAEINTR
33#define EINVAL WSAEINVAL
34#define EINPROGRESS WSAEINPROGRESS
35#define EWOULDBLOCK WSAEWOULDBLOCK
36#define ENOTCONN WSAENOTCONN
37#define ECONNRESET WSAECONNRESET
38#define ioctl ioctlsocket
39#define socklen_t int
40#else
41#define INVALID_SOCKET SOCKET_ERROR
42#include <sys/socket.h>
43#include <sys/param.h>
44#include <sys/time.h>
45#include <netinet/in.h>
46#include <netinet/tcp.h>
47#include <arpa/inet.h>
48#include <netdb.h>
49#include <stdio.h>
50#include <unistd.h>
51#include <errno.h>
52#include <fcntl.h>
53#include <string.h>
54#include <stdlib.h>
55#endif
56
57#if defined(WIN32)
58#include <Iphlpapi.h>
59#else
60#include <sys/ioctl.h>
61#include <net/if.h>
62#endif
63
64/**
65This simple low-level implementation assumes a single connection for a single thread. Thus, a static
66variable is used for that connection.
67On other scenarios, the user must solve this by taking into account that the current implementation of
68MQTTPacket_read() has a function pointer for a function call to get the data to a buffer, but no provisions
69to know the caller or other indicator (the socket id): int (*getfn)(unsigned char*, int)
70*/
71static int mysock = INVALID_SOCKET;
72
73
74int transport_sendPacketBuffer(int sock, unsigned char* buf, int buflen)
75{
76 int rc = 0;
77 rc = write(sock, buf, buflen);
78 return rc;
79}
80
81
82int transport_getdata(unsigned char* buf, int count)
83{
84 int rc = recv(mysock, buf, count, 0);
85 //printf("received %d bytes count %d\n", rc, (int)count);
86 return rc;
87}
88
89int transport_getdatanb(void *sck, unsigned char* buf, int count)
90{
91 int sock = *((int *)sck); /* sck: pointer to whatever the system may use to identify the transport */
92 /* this call will return after the timeout set on initialization if no bytes;
93 in your system you will use whatever you use to get whichever outstanding
94 bytes your socket equivalent has ready to be extracted right now, if any,
95 or return immediately */
96 int rc = recv(sock, buf, count, 0);
97 if (rc == -1) {
98 /* check error conditions from your system here, and return -1 */
99 return 0;
100 }
101 return rc;
102}
103
104/**
105return >=0 for a socket descriptor, <0 for an error code
106@todo Basically moved from the sample without changes, should accomodate same usage for 'sock' for clarity,
107removing indirections
108*/
109int transport_open(char* addr, int port)
110{
111int* sock = &mysock;
112 int type = SOCK_STREAM;
113 struct sockaddr_in address;
114#if defined(AF_INET6)
115 struct sockaddr_in6 address6;
116#endif
117 int rc = -1;
118#if defined(WIN32)
119 short family;
120#else
121 sa_family_t family = AF_INET;
122#endif
123 struct addrinfo *result = NULL;
124 struct addrinfo hints = {0, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP, 0, NULL, NULL, NULL};
125 static struct timeval tv;
126
127 *sock = -1;
128 if (addr[0] == '[')
129 ++addr;
130
131 if ((rc = getaddrinfo(addr, NULL, &hints, &result)) == 0)
132 {
133 struct addrinfo* res = result;
134
135 /* prefer ip4 addresses */
136 while (res)
137 {
138 if (res->ai_family == AF_INET)
139 {
140 result = res;
141 break;
142 }
143 res = res->ai_next;
144 }
145
146#if defined(AF_INET6)
147 if (result->ai_family == AF_INET6)
148 {
149 address6.sin6_port = htons(port);
150 address6.sin6_family = family = AF_INET6;
151 address6.sin6_addr = ((struct sockaddr_in6*)(result->ai_addr))->sin6_addr;
152 }
153 else
154#endif
155 if (result->ai_family == AF_INET)
156 {
157 address.sin_port = htons(port);
158 address.sin_family = family = AF_INET;
159 address.sin_addr = ((struct sockaddr_in*)(result->ai_addr))->sin_addr;
160 }
161 else
162 rc = -1;
163
164 freeaddrinfo(result);
165 }
166
167 if (rc == 0)
168 {
169 *sock = socket(family, type, 0);
170 if (*sock != -1)
171 {
172#if defined(NOSIGPIPE)
173 int opt = 1;
174
175 if (setsockopt(*sock, SOL_SOCKET, SO_NOSIGPIPE, (void*)&opt, sizeof(opt)) != 0)
176 Log(TRACE_MIN, -1, "Could not set SO_NOSIGPIPE for socket %d", *sock);
177#endif
178
179 if (family == AF_INET)
180 rc = connect(*sock, (struct sockaddr*)&address, sizeof(address));
181 #if defined(AF_INET6)
182 else
183 rc = connect(*sock, (struct sockaddr*)&address6, sizeof(address6));
184 #endif
185 }
186 }
187 if (mysock == INVALID_SOCKET)
188 return rc;
189
190 tv.tv_sec = 1; /* 1 second Timeout */
191 tv.tv_usec = 0;
192 setsockopt(mysock, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv,sizeof(struct timeval));
193 return mysock;
194}
195
196int transport_close(int sock)
197{
198int rc;
199
200 rc = shutdown(sock, SHUT_WR);
201 rc = recv(sock, NULL, (size_t)0, 0);
202 rc = close(sock);
203
204 return rc;
205}
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/samples/transport.h b/aws_mqtt_embedded_client_lib/MQTTPacket/samples/transport.h
new file mode 100644
index 0000000..c3e7b6c
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/samples/transport.h
@@ -0,0 +1,22 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 * Sergio R. Caprile - "commonalization" from prior samples and/or documentation extension
16 *******************************************************************************/
17
18int transport_sendPacketBuffer(int sock, unsigned char* buf, int buflen);
19int transport_getdata(unsigned char* buf, int count);
20int transport_getdatanb(void *sck, unsigned char* buf, int count);
21int transport_open(char* host, int port);
22int transport_close(int sock);
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTConnect.h b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTConnect.h
new file mode 100644
index 0000000..db90251
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTConnect.h
@@ -0,0 +1,136 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 * Xiang Rong - 442039 Add makefile to Embedded C client
16 *******************************************************************************/
17
18#ifndef MQTTCONNECT_H_
19#define MQTTCONNECT_H_
20
21#if !defined(DLLImport)
22 #define DLLImport
23#endif
24#if !defined(DLLExport)
25 #define DLLExport
26#endif
27
28
29typedef union
30{
31 unsigned char all; /**< all connect flags */
32#if defined(REVERSED)
33 struct
34 {
35 unsigned int username : 1; /**< 3.1 user name */
36 unsigned int password : 1; /**< 3.1 password */
37 unsigned int willRetain : 1; /**< will retain setting */
38 unsigned int willQoS : 2; /**< will QoS value */
39 unsigned int will : 1; /**< will flag */
40 unsigned int cleansession : 1; /**< clean session flag */
41 unsigned int : 1; /**< unused */
42 } bits;
43#else
44 struct
45 {
46 unsigned int : 1; /**< unused */
47 unsigned int cleansession : 1; /**< cleansession flag */
48 unsigned int will : 1; /**< will flag */
49 unsigned int willQoS : 2; /**< will QoS value */
50 unsigned int willRetain : 1; /**< will retain setting */
51 unsigned int password : 1; /**< 3.1 password */
52 unsigned int username : 1; /**< 3.1 user name */
53 } bits;
54#endif
55} MQTTConnectFlags; /**< connect flags byte */
56
57
58
59/**
60 * Defines the MQTT "Last Will and Testament" (LWT) settings for
61 * the connect packet.
62 */
63typedef struct
64{
65 /** The eyecatcher for this structure. must be MQTW. */
66 char struct_id[4];
67 /** The version number of this structure. Must be 0 */
68 int struct_version;
69 /** The LWT topic to which the LWT message will be published. */
70 MQTTString topicName;
71 /** The LWT payload. */
72 MQTTString message;
73 /**
74 * The retained flag for the LWT message (see MQTTAsync_message.retained).
75 */
76 unsigned char retained;
77 /**
78 * The quality of service setting for the LWT message (see
79 * MQTTAsync_message.qos and @ref qos).
80 */
81 char qos;
82} MQTTPacket_willOptions;
83
84
85#define MQTTPacket_willOptions_initializer { {'M', 'Q', 'T', 'W'}, 0, {NULL, {0, NULL}}, {NULL, {0, NULL}}, 0, 0 }
86
87
88typedef struct
89{
90 /** The eyecatcher for this structure. must be MQTC. */
91 char struct_id[4];
92 /** The version number of this structure. Must be 0 */
93 int struct_version;
94 /** Version of MQTT to be used. 3 = 3.1 4 = 3.1.1
95 */
96 unsigned char MQTTVersion;
97 MQTTString clientID;
98 unsigned short keepAliveInterval;
99 unsigned char cleansession;
100 unsigned char willFlag;
101 MQTTPacket_willOptions will;
102 MQTTString username;
103 MQTTString password;
104} MQTTPacket_connectData;
105
106typedef union
107{
108 unsigned char all; /**< all connack flags */
109#if defined(REVERSED)
110 struct
111 {
112 unsigned int sessionpresent : 1; /**< session present flag */
113 unsigned int : 7; /**< unused */
114 } bits;
115#else
116 struct
117 {
118 unsigned int : 7; /**< unused */
119 unsigned int sessionpresent : 1; /**< session present flag */
120 } bits;
121#endif
122} MQTTConnackFlags; /**< connack flags byte */
123
124#define MQTTPacket_connectData_initializer { {'M', 'Q', 'T', 'C'}, 0, 4, {NULL, {0, NULL}}, 60, 1, 0, \
125 MQTTPacket_willOptions_initializer, {NULL, {0, NULL}}, {NULL, {0, NULL}} }
126
127DLLExport int MQTTSerialize_connect(unsigned char* buf, int buflen, MQTTPacket_connectData* options);
128DLLExport int MQTTDeserialize_connect(MQTTPacket_connectData* data, unsigned char* buf, int len);
129
130DLLExport int MQTTSerialize_connack(unsigned char* buf, int buflen, unsigned char connack_rc, unsigned char sessionPresent);
131DLLExport int MQTTDeserialize_connack(unsigned char* sessionPresent, unsigned char* connack_rc, unsigned char* buf, int buflen);
132
133DLLExport int MQTTSerialize_disconnect(unsigned char* buf, int buflen);
134DLLExport int MQTTSerialize_pingreq(unsigned char* buf, int buflen);
135
136#endif /* MQTTCONNECT_H_ */
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTConnectClient.c b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTConnectClient.c
new file mode 100644
index 0000000..5f3cc29
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTConnectClient.c
@@ -0,0 +1,214 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#include "MQTTPacket.h"
18#include "StackTrace.h"
19
20#include <string.h>
21
22/**
23 * Determines the length of the MQTT connect packet that would be produced using the supplied connect options.
24 * @param options the options to be used to build the connect packet
25 * @return the length of buffer needed to contain the serialized version of the packet
26 */
27int MQTTSerialize_connectLength(MQTTPacket_connectData* options)
28{
29 int len = 0;
30
31 FUNC_ENTRY;
32
33 if (options->MQTTVersion == 3)
34 len = 12; /* variable depending on MQTT or MQIsdp */
35 else if (options->MQTTVersion == 4)
36 len = 10;
37
38 len += MQTTstrlen(options->clientID)+2;
39 if (options->willFlag)
40 len += MQTTstrlen(options->will.topicName)+2 + MQTTstrlen(options->will.message)+2;
41 if (options->username.cstring || options->username.lenstring.data)
42 len += MQTTstrlen(options->username)+2;
43 if (options->password.cstring || options->password.lenstring.data)
44 len += MQTTstrlen(options->password)+2;
45
46 FUNC_EXIT_RC(len);
47 return len;
48}
49
50
51/**
52 * Serializes the connect options into the buffer.
53 * @param buf the buffer into which the packet will be serialized
54 * @param len the length in bytes of the supplied buffer
55 * @param options the options to be used to build the connect packet
56 * @return serialized length, or error if 0
57 */
58int MQTTSerialize_connect(unsigned char* buf, int buflen, MQTTPacket_connectData* options)
59{
60 unsigned char *ptr = buf;
61 MQTTHeader header = {0};
62 MQTTConnectFlags flags = {0};
63 int len = 0;
64 int rc = -1;
65
66 FUNC_ENTRY;
67 if (MQTTPacket_len(len = MQTTSerialize_connectLength(options)) > buflen)
68 {
69 rc = MQTTPACKET_BUFFER_TOO_SHORT;
70 goto exit;
71 }
72
73 header.byte = 0;
74 header.bits.type = CONNECT;
75 writeChar(&ptr, header.byte); /* write header */
76
77 ptr += MQTTPacket_encode(ptr, len); /* write remaining length */
78
79 if (options->MQTTVersion == 4)
80 {
81 writeCString(&ptr, "MQTT");
82 writeChar(&ptr, (char) 4);
83 }
84 else
85 {
86 writeCString(&ptr, "MQIsdp");
87 writeChar(&ptr, (char) 3);
88 }
89
90 flags.all = 0;
91 flags.bits.cleansession = options->cleansession;
92 flags.bits.will = (options->willFlag) ? 1 : 0;
93 if (flags.bits.will)
94 {
95 flags.bits.willQoS = options->will.qos;
96 flags.bits.willRetain = options->will.retained;
97 }
98
99 if (options->username.cstring || options->username.lenstring.data)
100 flags.bits.username = 1;
101 if (options->password.cstring || options->password.lenstring.data)
102 flags.bits.password = 1;
103
104 writeChar(&ptr, flags.all);
105 writeInt(&ptr, options->keepAliveInterval);
106 writeMQTTString(&ptr, options->clientID);
107 if (options->willFlag)
108 {
109 writeMQTTString(&ptr, options->will.topicName);
110 writeMQTTString(&ptr, options->will.message);
111 }
112 if (flags.bits.username)
113 writeMQTTString(&ptr, options->username);
114 if (flags.bits.password)
115 writeMQTTString(&ptr, options->password);
116
117 rc = ptr - buf;
118
119 exit: FUNC_EXIT_RC(rc);
120 return rc;
121}
122
123
124/**
125 * Deserializes the supplied (wire) buffer into connack data - return code
126 * @param sessionPresent the session present flag returned (only for MQTT 3.1.1)
127 * @param connack_rc returned integer value of the connack return code
128 * @param buf the raw buffer data, of the correct length determined by the remaining length field
129 * @param len the length in bytes of the data in the supplied buffer
130 * @return error code. 1 is success, 0 is failure
131 */
132int MQTTDeserialize_connack(unsigned char* sessionPresent, unsigned char* connack_rc, unsigned char* buf, int buflen)
133{
134 MQTTHeader header = {0};
135 unsigned char* curdata = buf;
136 unsigned char* enddata = NULL;
137 int rc = 0;
138 int mylen;
139 MQTTConnackFlags flags = {0};
140
141 FUNC_ENTRY;
142 header.byte = readChar(&curdata);
143 if (header.bits.type != CONNACK)
144 goto exit;
145
146 curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */
147 enddata = curdata + mylen;
148 if (enddata - curdata < 2)
149 goto exit;
150
151 flags.all = readChar(&curdata);
152 *sessionPresent = flags.bits.sessionpresent;
153 *connack_rc = readChar(&curdata);
154
155 rc = 1;
156exit:
157 FUNC_EXIT_RC(rc);
158 return rc;
159}
160
161
162/**
163 * Serializes a 0-length packet into the supplied buffer, ready for writing to a socket
164 * @param buf the buffer into which the packet will be serialized
165 * @param buflen the length in bytes of the supplied buffer, to avoid overruns
166 * @param packettype the message type
167 * @return serialized length, or error if 0
168 */
169int MQTTSerialize_zero(unsigned char* buf, int buflen, unsigned char packettype)
170{
171 MQTTHeader header = {0};
172 int rc = -1;
173 unsigned char *ptr = buf;
174
175 FUNC_ENTRY;
176 if (buflen < 2)
177 {
178 rc = MQTTPACKET_BUFFER_TOO_SHORT;
179 goto exit;
180 }
181 header.byte = 0;
182 header.bits.type = packettype;
183 writeChar(&ptr, header.byte); /* write header */
184
185 ptr += MQTTPacket_encode(ptr, 0); /* write remaining length */
186 rc = ptr - buf;
187exit:
188 FUNC_EXIT_RC(rc);
189 return rc;
190}
191
192
193/**
194 * Serializes a disconnect packet into the supplied buffer, ready for writing to a socket
195 * @param buf the buffer into which the packet will be serialized
196 * @param buflen the length in bytes of the supplied buffer, to avoid overruns
197 * @return serialized length, or error if 0
198 */
199int MQTTSerialize_disconnect(unsigned char* buf, int buflen)
200{
201 return MQTTSerialize_zero(buf, buflen, DISCONNECT);
202}
203
204
205/**
206 * Serializes a disconnect packet into the supplied buffer, ready for writing to a socket
207 * @param buf the buffer into which the packet will be serialized
208 * @param buflen the length in bytes of the supplied buffer, to avoid overruns
209 * @return serialized length, or error if 0
210 */
211int MQTTSerialize_pingreq(unsigned char* buf, int buflen)
212{
213 return MQTTSerialize_zero(buf, buflen, PINGREQ);
214}
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTConnectServer.c b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTConnectServer.c
new file mode 100644
index 0000000..07c7cb5
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTConnectServer.c
@@ -0,0 +1,148 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#include "StackTrace.h"
18#include "MQTTPacket.h"
19#include <string.h>
20
21#define min(a, b) ((a < b) ? a : b)
22
23
24/**
25 * Validates MQTT protocol name and version combinations
26 * @param protocol the MQTT protocol name as an MQTTString
27 * @param version the MQTT protocol version number, as in the connect packet
28 * @return correct MQTT combination? 1 is true, 0 is false
29 */
30int MQTTPacket_checkVersion(MQTTString* protocol, int version)
31{
32 int rc = 0;
33
34 if (version == 3 && memcmp(protocol->lenstring.data, "MQIsdp",
35 min(6, protocol->lenstring.len)) == 0)
36 rc = 1;
37 else if (version == 4 && memcmp(protocol->lenstring.data, "MQTT",
38 min(4, protocol->lenstring.len)) == 0)
39 rc = 1;
40 return rc;
41}
42
43
44/**
45 * Deserializes the supplied (wire) buffer into connect data structure
46 * @param data the connect data structure to be filled out
47 * @param buf the raw buffer data, of the correct length determined by the remaining length field
48 * @param len the length in bytes of the data in the supplied buffer
49 * @return error code. 1 is success, 0 is failure
50 */
51int MQTTDeserialize_connect(MQTTPacket_connectData* data, unsigned char* buf, int len)
52{
53 MQTTHeader header = {0};
54 MQTTConnectFlags flags = {0};
55 unsigned char* curdata = buf;
56 unsigned char* enddata = &buf[len];
57 int rc = 0;
58 MQTTString Protocol;
59 int version;
60 int mylen = 0;
61
62 FUNC_ENTRY;
63 header.byte = readChar(&curdata);
64 if (header.bits.type != CONNECT)
65 goto exit;
66
67 curdata += MQTTPacket_decodeBuf(curdata, &mylen); /* read remaining length */
68
69 if (!readMQTTLenString(&Protocol, &curdata, enddata) ||
70 enddata - curdata < 0) /* do we have enough data to read the protocol version byte? */
71 goto exit;
72
73 version = (int)readChar(&curdata); /* Protocol version */
74 /* If we don't recognize the protocol version, we don't parse the connect packet on the
75 * basis that we don't know what the format will be.
76 */
77 if (MQTTPacket_checkVersion(&Protocol, version))
78 {
79 flags.all = readChar(&curdata);
80 data->cleansession = flags.bits.cleansession;
81 data->keepAliveInterval = readInt(&curdata);
82 if (!readMQTTLenString(&data->clientID, &curdata, enddata))
83 goto exit;
84 data->willFlag = flags.bits.will;
85 if (flags.bits.will)
86 {
87 data->will.qos = flags.bits.willQoS;
88 data->will.retained = flags.bits.willRetain;
89 if (!readMQTTLenString(&data->will.topicName, &curdata, enddata) ||
90 !readMQTTLenString(&data->will.message, &curdata, enddata))
91 goto exit;
92 }
93 if (flags.bits.username)
94 {
95 if (enddata - curdata < 3 || !readMQTTLenString(&data->username, &curdata, enddata))
96 goto exit; /* username flag set, but no username supplied - invalid */
97 if (flags.bits.password &&
98 (enddata - curdata < 3 || !readMQTTLenString(&data->password, &curdata, enddata)))
99 goto exit; /* password flag set, but no password supplied - invalid */
100 }
101 else if (flags.bits.password)
102 goto exit; /* password flag set without username - invalid */
103 rc = 1;
104 }
105exit:
106 FUNC_EXIT_RC(rc);
107 return rc;
108}
109
110
111/**
112 * Serializes the connack packet into the supplied buffer.
113 * @param buf the buffer into which the packet will be serialized
114 * @param buflen the length in bytes of the supplied buffer
115 * @param connack_rc the integer connack return code to be used
116 * @param sessionPresent the MQTT 3.1.1 sessionPresent flag
117 * @return serialized length, or error if 0
118 */
119int MQTTSerialize_connack(unsigned char* buf, int buflen, unsigned char connack_rc, unsigned char sessionPresent)
120{
121 MQTTHeader header = {0};
122 int rc = 0;
123 unsigned char *ptr = buf;
124 MQTTConnackFlags flags = {0};
125
126 FUNC_ENTRY;
127 if (buflen < 2)
128 {
129 rc = MQTTPACKET_BUFFER_TOO_SHORT;
130 goto exit;
131 }
132 header.byte = 0;
133 header.bits.type = CONNACK;
134 writeChar(&ptr, header.byte); /* write header */
135
136 ptr += MQTTPacket_encode(ptr, 2); /* write remaining length */
137
138 flags.all = 0;
139 flags.bits.sessionpresent = sessionPresent;
140 writeChar(&ptr, flags.all);
141 writeChar(&ptr, connack_rc);
142
143 rc = ptr - buf;
144exit:
145 FUNC_EXIT_RC(rc);
146 return rc;
147}
148
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTDeserializePublish.c b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTDeserializePublish.c
new file mode 100644
index 0000000..dafb6a3
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTDeserializePublish.c
@@ -0,0 +1,107 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#include "StackTrace.h"
18#include "MQTTPacket.h"
19#include <string.h>
20
21#define min(a, b) ((a < b) ? 1 : 0)
22
23/**
24 * Deserializes the supplied (wire) buffer into publish data
25 * @param dup returned integer - the MQTT dup flag
26 * @param qos returned integer - the MQTT QoS value
27 * @param retained returned integer - the MQTT retained flag
28 * @param packetid returned integer - the MQTT packet identifier
29 * @param topicName returned MQTTString - the MQTT topic in the publish
30 * @param payload returned byte buffer - the MQTT publish payload
31 * @param payloadlen returned integer - the length of the MQTT payload
32 * @param buf the raw buffer data, of the correct length determined by the remaining length field
33 * @param buflen the length in bytes of the data in the supplied buffer
34 * @return error code. 1 is success
35 */
36int MQTTDeserialize_publish(unsigned char* dup, int* qos, unsigned char* retained, unsigned short* packetid, MQTTString* topicName,
37 unsigned char** payload, int* payloadlen, unsigned char* buf, int buflen)
38{
39 MQTTHeader header = {0};
40 unsigned char* curdata = buf;
41 unsigned char* enddata = NULL;
42 int rc = 0;
43 int mylen = 0;
44
45 FUNC_ENTRY;
46 header.byte = readChar(&curdata);
47 if (header.bits.type != PUBLISH)
48 goto exit;
49 *dup = header.bits.dup;
50 *qos = header.bits.qos;
51 *retained = header.bits.retain;
52
53 curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */
54 enddata = curdata + mylen;
55
56 if (!readMQTTLenString(topicName, &curdata, enddata) ||
57 enddata - curdata < 0) /* do we have enough data to read the protocol version byte? */
58 goto exit;
59
60 if (*qos > 0)
61 *packetid = readInt(&curdata);
62
63 *payloadlen = enddata - curdata;
64 *payload = curdata;
65 rc = 1;
66exit:
67 FUNC_EXIT_RC(rc);
68 return rc;
69}
70
71
72
73/**
74 * Deserializes the supplied (wire) buffer into an ack
75 * @param packettype returned integer - the MQTT packet type
76 * @param dup returned integer - the MQTT dup flag
77 * @param packetid returned integer - the MQTT packet identifier
78 * @param buf the raw buffer data, of the correct length determined by the remaining length field
79 * @param buflen the length in bytes of the data in the supplied buffer
80 * @return error code. 1 is success, 0 is failure
81 */
82int MQTTDeserialize_ack(unsigned char* packettype, unsigned char* dup, unsigned short* packetid, unsigned char* buf, int buflen)
83{
84 MQTTHeader header = {0};
85 unsigned char* curdata = buf;
86 unsigned char* enddata = NULL;
87 int rc = 0;
88 int mylen;
89
90 FUNC_ENTRY;
91 header.byte = readChar(&curdata);
92 *dup = header.bits.dup;
93 *packettype = header.bits.type;
94
95 curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */
96 enddata = curdata + mylen;
97
98 if (enddata - curdata < 2)
99 goto exit;
100 *packetid = readInt(&curdata);
101
102 rc = 1;
103exit:
104 FUNC_EXIT_RC(rc);
105 return rc;
106}
107
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTFormat.c b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTFormat.c
new file mode 100644
index 0000000..5f78f47
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTFormat.c
@@ -0,0 +1,258 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#include "StackTrace.h"
18#include "MQTTPacket.h"
19
20#include <string.h>
21
22
23const char* MQTTPacket_names[] =
24{
25 "RESERVED", "CONNECT", "CONNACK", "PUBLISH", "PUBACK", "PUBREC", "PUBREL",
26 "PUBCOMP", "SUBSCRIBE", "SUBACK", "UNSUBSCRIBE", "UNSUBACK",
27 "PINGREQ", "PINGRESP", "DISCONNECT"
28};
29
30
31const char* MQTTPacket_getName(unsigned short packetid)
32{
33 return MQTTPacket_names[packetid];
34}
35
36
37int MQTTStringFormat_connect(char* strbuf, int strbuflen, MQTTPacket_connectData* data)
38{
39 int strindex = 0;
40
41 strindex = snprintf(strbuf, strbuflen,
42 "CONNECT MQTT version %d, client id %.*s, clean session %d, keep alive %d",
43 (int)data->MQTTVersion, data->clientID.lenstring.len, data->clientID.lenstring.data,
44 (int)data->cleansession, data->keepAliveInterval);
45 if (data->willFlag)
46 strindex += snprintf(&strbuf[strindex], strbuflen - strindex,
47 ", will QoS %d, will retain %d, will topic %.*s, will message %.*s",
48 data->will.qos, data->will.retained,
49 data->will.topicName.lenstring.len, data->will.topicName.lenstring.data,
50 data->will.message.lenstring.len, data->will.message.lenstring.data);
51 if (data->username.lenstring.data && data->username.lenstring.len > 0)
52 strindex += snprintf(&strbuf[strindex], strbuflen - strindex,
53 ", user name %.*s", data->username.lenstring.len, data->username.lenstring.data);
54 if (data->password.lenstring.data && data->password.lenstring.len > 0)
55 strindex += snprintf(&strbuf[strindex], strbuflen - strindex,
56 ", password %.*s", data->password.lenstring.len, data->password.lenstring.data);
57 return strindex;
58}
59
60
61int MQTTStringFormat_connack(char* strbuf, int strbuflen, unsigned char connack_rc, unsigned char sessionPresent)
62{
63 int strindex = snprintf(strbuf, strbuflen, "CONNACK session present %d, rc %d", sessionPresent, connack_rc);
64 return strindex;
65}
66
67
68int MQTTStringFormat_publish(char* strbuf, int strbuflen, unsigned char dup, int qos, unsigned char retained,
69 unsigned short packetid, MQTTString topicName, unsigned char* payload, int payloadlen)
70{
71 int strindex = snprintf(strbuf, strbuflen,
72 "PUBLISH dup %d, QoS %d, retained %d, packet id %d, topic %.*s, payload length %d, payload %.*s",
73 dup, qos, retained, packetid,
74 (topicName.lenstring.len < 20) ? topicName.lenstring.len : 20, topicName.lenstring.data,
75 payloadlen, (payloadlen < 20) ? payloadlen : 20, payload);
76 return strindex;
77}
78
79
80int MQTTStringFormat_ack(char* strbuf, int strbuflen, unsigned char packettype, unsigned char dup, unsigned short packetid)
81{
82 int strindex = snprintf(strbuf, strbuflen, "%s, packet id %d", MQTTPacket_names[packettype], packetid);
83 if (dup)
84 strindex += snprintf(strbuf + strindex, strbuflen - strindex, ", dup %d", dup);
85 return strindex;
86}
87
88
89int MQTTStringFormat_subscribe(char* strbuf, int strbuflen, unsigned char dup, unsigned short packetid, int count,
90 MQTTString topicFilters[], int requestedQoSs[])
91{
92 return snprintf(strbuf, strbuflen,
93 "SUBSCRIBE dup %d, packet id %d count %d topic %.*s qos %d",
94 dup, packetid, count,
95 topicFilters[0].lenstring.len, topicFilters[0].lenstring.data,
96 requestedQoSs[0]);
97}
98
99
100int MQTTStringFormat_suback(char* strbuf, int strbuflen, unsigned short packetid, int count, int* grantedQoSs)
101{
102 return snprintf(strbuf, strbuflen,
103 "SUBACK packet id %d count %d granted qos %d", packetid, count, grantedQoSs[0]);
104}
105
106
107int MQTTStringFormat_unsubscribe(char* strbuf, int strbuflen, unsigned char dup, unsigned short packetid,
108 int count, MQTTString topicFilters[])
109{
110 return snprintf(strbuf, strbuflen,
111 "UNSUBSCRIBE dup %d, packet id %d count %d topic %.*s",
112 dup, packetid, count,
113 topicFilters[0].lenstring.len, topicFilters[0].lenstring.data);
114}
115
116
117char* MQTTFormat_toClientString(char* strbuf, int strbuflen, unsigned char* buf, int buflen)
118{
119 int index = 0;
120 int rem_length = 0;
121 MQTTHeader header = {0};
122 int strindex = 0;
123
124 header.byte = buf[index++];
125 index += MQTTPacket_decodeBuf(&buf[index], &rem_length);
126
127 switch (header.bits.type)
128 {
129 case CONNACK:
130 {
131 unsigned char sessionPresent, connack_rc;
132 if (MQTTDeserialize_connack(&sessionPresent, &connack_rc, buf, buflen) == 1)
133 strindex = MQTTStringFormat_connack(strbuf, strbuflen, connack_rc, sessionPresent);
134 }
135 break;
136 case PUBLISH:
137 {
138 unsigned char dup, retained, *payload;
139 unsigned short packetid;
140 int qos, payloadlen;
141 MQTTString topicName = MQTTString_initializer;
142 if (MQTTDeserialize_publish(&dup, &qos, &retained, &packetid, &topicName,
143 &payload, &payloadlen, buf, buflen) == 1)
144 strindex = MQTTStringFormat_publish(strbuf, strbuflen, dup, qos, retained, packetid,
145 topicName, payload, payloadlen);
146 }
147 break;
148 case PUBACK:
149 case PUBREC:
150 case PUBREL:
151 case PUBCOMP:
152 {
153 unsigned char packettype, dup;
154 unsigned short packetid;
155 if (MQTTDeserialize_ack(&packettype, &dup, &packetid, buf, buflen) == 1)
156 strindex = MQTTStringFormat_ack(strbuf, strbuflen, packettype, dup, packetid);
157 }
158 break;
159 case SUBACK:
160 {
161 unsigned short packetid;
162 int maxcount = 1, count = 0;
163 int grantedQoSs[1];
164 if (MQTTDeserialize_suback(&packetid, maxcount, &count, grantedQoSs, buf, buflen) == 1)
165 strindex = MQTTStringFormat_suback(strbuf, strbuflen, packetid, count, grantedQoSs);
166 }
167 break;
168 case UNSUBACK:
169 {
170 unsigned short packetid;
171 if (MQTTDeserialize_unsuback(&packetid, buf, buflen) == 1)
172 strindex = MQTTStringFormat_ack(strbuf, strbuflen, UNSUBACK, 0, packetid);
173 }
174 break;
175 case PINGREQ:
176 case PINGRESP:
177 case DISCONNECT:
178 strindex = snprintf(strbuf, strbuflen, "%s", MQTTPacket_names[header.bits.type]);
179 break;
180 }
181 return strbuf;
182}
183
184
185char* MQTTFormat_toServerString(char* strbuf, int strbuflen, unsigned char* buf, int buflen)
186{
187 int index = 0;
188 int rem_length = 0;
189 MQTTHeader header = {0};
190 int strindex = 0;
191
192 header.byte = buf[index++];
193 index += MQTTPacket_decodeBuf(&buf[index], &rem_length);
194
195 switch (header.bits.type)
196 {
197 case CONNECT:
198 {
199 MQTTPacket_connectData data;
200 int rc;
201 if ((rc = MQTTDeserialize_connect(&data, buf, buflen)) == 1)
202 strindex = MQTTStringFormat_connect(strbuf, strbuflen, &data);
203 }
204 break;
205 case PUBLISH:
206 {
207 unsigned char dup, retained, *payload;
208 unsigned short packetid;
209 int qos, payloadlen;
210 MQTTString topicName = MQTTString_initializer;
211 if (MQTTDeserialize_publish(&dup, &qos, &retained, &packetid, &topicName,
212 &payload, &payloadlen, buf, buflen) == 1)
213 strindex = MQTTStringFormat_publish(strbuf, strbuflen, dup, qos, retained, packetid,
214 topicName, payload, payloadlen);
215 }
216 break;
217 case PUBACK:
218 case PUBREC:
219 case PUBREL:
220 case PUBCOMP:
221 {
222 unsigned char packettype, dup;
223 unsigned short packetid;
224 if (MQTTDeserialize_ack(&packettype, &dup, &packetid, buf, buflen) == 1)
225 strindex = MQTTStringFormat_ack(strbuf, strbuflen, packettype, dup, packetid);
226 }
227 break;
228 case SUBSCRIBE:
229 {
230 unsigned char dup;
231 unsigned short packetid;
232 int maxcount = 1, count = 0;
233 MQTTString topicFilters[1];
234 int requestedQoSs[1];
235 if (MQTTDeserialize_subscribe(&dup, &packetid, maxcount, &count,
236 topicFilters, requestedQoSs, buf, buflen) == 1)
237 strindex = MQTTStringFormat_subscribe(strbuf, strbuflen, dup, packetid, count, topicFilters, requestedQoSs);;
238 }
239 break;
240 case UNSUBSCRIBE:
241 {
242 unsigned char dup;
243 unsigned short packetid;
244 int maxcount = 1, count = 0;
245 MQTTString topicFilters[1];
246 if (MQTTDeserialize_unsubscribe(&dup, &packetid, maxcount, &count, topicFilters, buf, buflen) == 1)
247 strindex = MQTTStringFormat_unsubscribe(strbuf, strbuflen, dup, packetid, count, topicFilters);
248 }
249 break;
250 case PINGREQ:
251 case PINGRESP:
252 case DISCONNECT:
253 strindex = snprintf(strbuf, strbuflen, "%s", MQTTPacket_names[header.bits.type]);
254 break;
255 }
256 strbuf[strbuflen] = '\0';
257 return strbuf;
258}
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTFormat.h b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTFormat.h
new file mode 100644
index 0000000..47b0c41
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTFormat.h
@@ -0,0 +1,37 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#if !defined(MQTTFORMAT_H)
18#define MQTTFORMAT_H
19
20#include "StackTrace.h"
21#include "MQTTPacket.h"
22
23const char* MQTTPacket_getName(unsigned short packetid);
24int MQTTStringFormat_connect(char* strbuf, int strbuflen, MQTTPacket_connectData* data);
25int MQTTStringFormat_connack(char* strbuf, int strbuflen, unsigned char connack_rc, unsigned char sessionPresent);
26int MQTTStringFormat_publish(char* strbuf, int strbuflen, unsigned char dup, int qos, unsigned char retained,
27 unsigned short packetid, MQTTString topicName, unsigned char* payload, int payloadlen);
28int MQTTStringFormat_ack(char* strbuf, int strbuflen, unsigned char packettype, unsigned char dup, unsigned short packetid);
29int MQTTStringFormat_subscribe(char* strbuf, int strbuflen, unsigned char dup, unsigned short packetid, int count,
30 MQTTString topicFilters[], int requestedQoSs[]);
31int MQTTStringFormat_suback(char* strbuf, int strbuflen, unsigned short packetid, int count, int* grantedQoSs);
32int MQTTStringFormat_unsubscribe(char* strbuf, int strbuflen, unsigned char dup, unsigned short packetid,
33 int count, MQTTString topicFilters[]);
34char* MQTTFormat_toClientString(char* strbuf, int strbuflen, unsigned char* buf, int buflen);
35char* MQTTFormat_toServerString(char* strbuf, int strbuflen, unsigned char* buf, int buflen);
36
37#endif
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTPacket.c b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTPacket.c
new file mode 100644
index 0000000..bd5f90a
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTPacket.c
@@ -0,0 +1,410 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 * Sergio R. Caprile - non-blocking packet read functions for stream transport
16 *******************************************************************************/
17
18#include "StackTrace.h"
19#include "MQTTPacket.h"
20
21#include <string.h>
22
23/**
24 * Encodes the message length according to the MQTT algorithm
25 * @param buf the buffer into which the encoded data is written
26 * @param length the length to be encoded
27 * @return the number of bytes written to buffer
28 */
29int MQTTPacket_encode(unsigned char* buf, int length)
30{
31 int rc = 0;
32
33 FUNC_ENTRY;
34 do
35 {
36 char d = length % 128;
37 length /= 128;
38 /* if there are more digits to encode, set the top bit of this digit */
39 if (length > 0)
40 d |= 0x80;
41 buf[rc++] = d;
42 } while (length > 0);
43 FUNC_EXIT_RC(rc);
44 return rc;
45}
46
47
48/**
49 * Decodes the message length according to the MQTT algorithm
50 * @param getcharfn pointer to function to read the next character from the data source
51 * @param value the decoded length returned
52 * @return the number of bytes read from the socket
53 */
54int MQTTPacket_decode(int (*getcharfn)(unsigned char*, int), int* value)
55{
56 unsigned char c;
57 int multiplier = 1;
58 int len = 0;
59#define MAX_NO_OF_REMAINING_LENGTH_BYTES 4
60
61 FUNC_ENTRY;
62 *value = 0;
63 do
64 {
65 int rc = MQTTPACKET_READ_ERROR;
66
67 if (++len > MAX_NO_OF_REMAINING_LENGTH_BYTES)
68 {
69 rc = MQTTPACKET_READ_ERROR; /* bad data */
70 goto exit;
71 }
72 rc = (*getcharfn)(&c, 1);
73 if (rc != 1)
74 goto exit;
75 *value += (c & 127) * multiplier;
76 multiplier *= 128;
77 } while ((c & 128) != 0);
78exit:
79 FUNC_EXIT_RC(len);
80 return len;
81}
82
83
84int MQTTPacket_len(int rem_len)
85{
86 rem_len += 1; /* header byte */
87
88 /* now remaining_length field */
89 if (rem_len < 128)
90 rem_len += 1;
91 else if (rem_len < 16384)
92 rem_len += 2;
93 else if (rem_len < 2097151)
94 rem_len += 3;
95 else
96 rem_len += 4;
97 return rem_len;
98}
99
100
101static unsigned char* bufptr;
102
103int bufchar(unsigned char* c, int count)
104{
105 int i;
106
107 for (i = 0; i < count; ++i)
108 *c = *bufptr++;
109 return count;
110}
111
112
113int MQTTPacket_decodeBuf(unsigned char* buf, int* value)
114{
115 bufptr = buf;
116 return MQTTPacket_decode(bufchar, value);
117}
118
119
120/**
121 * Calculates an integer from two bytes read from the input buffer
122 * @param pptr pointer to the input buffer - incremented by the number of bytes used & returned
123 * @return the integer value calculated
124 */
125int readInt(unsigned char** pptr)
126{
127 unsigned char* ptr = *pptr;
128 int len = 256*(*ptr) + (*(ptr+1));
129 *pptr += 2;
130 return len;
131}
132
133
134/**
135 * Reads one character from the input buffer.
136 * @param pptr pointer to the input buffer - incremented by the number of bytes used & returned
137 * @return the character read
138 */
139char readChar(unsigned char** pptr)
140{
141 char c = **pptr;
142 (*pptr)++;
143 return c;
144}
145
146
147/**
148 * Writes one character to an output buffer.
149 * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned
150 * @param c the character to write
151 */
152void writeChar(unsigned char** pptr, char c)
153{
154 **pptr = c;
155 (*pptr)++;
156}
157
158
159/**
160 * Writes an integer as 2 bytes to an output buffer.
161 * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned
162 * @param anInt the integer to write
163 */
164void writeInt(unsigned char** pptr, int anInt)
165{
166 **pptr = (unsigned char)(anInt / 256);
167 (*pptr)++;
168 **pptr = (unsigned char)(anInt % 256);
169 (*pptr)++;
170}
171
172
173/**
174 * Writes a "UTF" string to an output buffer. Converts C string to length-delimited.
175 * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned
176 * @param string the C string to write
177 */
178void writeCString(unsigned char** pptr, const char* string)
179{
180 int len = strlen(string);
181 writeInt(pptr, len);
182 memcpy(*pptr, string, len);
183 *pptr += len;
184}
185
186
187int getLenStringLen(char* ptr)
188{
189 int len = 256*((unsigned char)(*ptr)) + (unsigned char)(*(ptr+1));
190 return len;
191}
192
193
194void writeMQTTString(unsigned char** pptr, MQTTString mqttstring)
195{
196 if (mqttstring.lenstring.len > 0)
197 {
198 writeInt(pptr, mqttstring.lenstring.len);
199 memcpy(*pptr, mqttstring.lenstring.data, mqttstring.lenstring.len);
200 *pptr += mqttstring.lenstring.len;
201 }
202 else if (mqttstring.cstring)
203 writeCString(pptr, mqttstring.cstring);
204 else
205 writeInt(pptr, 0);
206}
207
208
209/**
210 * @param mqttstring the MQTTString structure into which the data is to be read
211 * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned
212 * @param enddata pointer to the end of the data: do not read beyond
213 * @return 1 if successful, 0 if not
214 */
215int readMQTTLenString(MQTTString* mqttstring, unsigned char** pptr, unsigned char* enddata)
216{
217 int rc = 0;
218
219 FUNC_ENTRY;
220 /* the first two bytes are the length of the string */
221 if (enddata - (*pptr) > 1) /* enough length to read the integer? */
222 {
223 mqttstring->lenstring.len = readInt(pptr); /* increments pptr to point past length */
224 if (&(*pptr)[mqttstring->lenstring.len] <= enddata)
225 {
226 mqttstring->lenstring.data = (char*)*pptr;
227 *pptr += mqttstring->lenstring.len;
228 rc = 1;
229 }
230 }
231 mqttstring->cstring = NULL;
232 FUNC_EXIT_RC(rc);
233 return rc;
234}
235
236
237/**
238 * Return the length of the MQTTstring - C string if there is one, otherwise the length delimited string
239 * @param mqttstring the string to return the length of
240 * @return the length of the string
241 */
242int MQTTstrlen(MQTTString mqttstring)
243{
244 int rc = 0;
245
246 if (mqttstring.cstring)
247 rc = strlen(mqttstring.cstring);
248 else
249 rc = mqttstring.lenstring.len;
250 return rc;
251}
252
253
254/**
255 * Compares an MQTTString to a C string
256 * @param a the MQTTString to compare
257 * @param bptr the C string to compare
258 * @return boolean - equal or not
259 */
260int MQTTPacket_equals(MQTTString* a, char* bptr)
261{
262 int alen = 0,
263 blen = 0;
264 char *aptr;
265
266 if (a->cstring)
267 {
268 aptr = a->cstring;
269 alen = strlen(a->cstring);
270 }
271 else
272 {
273 aptr = a->lenstring.data;
274 alen = a->lenstring.len;
275 }
276 blen = strlen(bptr);
277
278 return (alen == blen) && (strncmp(aptr, bptr, alen) == 0);
279}
280
281
282/**
283 * Helper function to read packet data from some source into a buffer
284 * @param buf the buffer into which the packet will be serialized
285 * @param buflen the length in bytes of the supplied buffer
286 * @param getfn pointer to a function which will read any number of bytes from the needed source
287 * @return integer MQTT packet type, or -1 on error
288 * @note the whole message must fit into the caller's buffer
289 */
290int MQTTPacket_read(unsigned char* buf, int buflen, int (*getfn)(unsigned char*, int))
291{
292 int rc = -1;
293 MQTTHeader header = {0};
294 int len = 0;
295 int rem_len = 0;
296
297 /* 1. read the header byte. This has the packet type in it */
298 if ((*getfn)(buf, 1) != 1)
299 goto exit;
300
301 len = 1;
302 /* 2. read the remaining length. This is variable in itself */
303 MQTTPacket_decode(getfn, &rem_len);
304 len += MQTTPacket_encode(buf + 1, rem_len); /* put the original remaining length back into the buffer */
305
306 /* 3. read the rest of the buffer using a callback to supply the rest of the data */
307 if((rem_len + len) > buflen)
308 goto exit;
309 if ((*getfn)(buf + len, rem_len) != rem_len)
310 goto exit;
311
312 header.byte = buf[0];
313 rc = header.bits.type;
314exit:
315 return rc;
316}
317
318/**
319 * Decodes the message length according to the MQTT algorithm, non-blocking
320 * @param trp pointer to a transport structure holding what is needed to solve getting data from it
321 * @param value the decoded length returned
322 * @return integer the number of bytes read from the socket, 0 for call again, or -1 on error
323 */
324static int MQTTPacket_decodenb(MQTTTransport *trp)
325{
326 unsigned char c;
327 int rc = MQTTPACKET_READ_ERROR;
328
329 FUNC_ENTRY;
330 if(trp->len == 0){ /* initialize on first call */
331 trp->multiplier = 1;
332 trp->rem_len = 0;
333 }
334 do {
335 int frc;
336 if (++(trp->len) > MAX_NO_OF_REMAINING_LENGTH_BYTES)
337 goto exit;
338 if ((frc=(*trp->getfn)(trp->sck, &c, 1)) == -1)
339 goto exit;
340 if (frc == 0){
341 rc = 0;
342 goto exit;
343 }
344 trp->rem_len += (c & 127) * trp->multiplier;
345 trp->multiplier *= 128;
346 } while ((c & 128) != 0);
347 rc = trp->len;
348exit:
349 FUNC_EXIT_RC(rc);
350 return rc;
351}
352
353/**
354 * Helper function to read packet data from some source into a buffer, non-blocking
355 * @param buf the buffer into which the packet will be serialized
356 * @param buflen the length in bytes of the supplied buffer
357 * @param trp pointer to a transport structure holding what is needed to solve getting data from it
358 * @return integer MQTT packet type, 0 for call again, or -1 on error
359 * @note the whole message must fit into the caller's buffer
360 */
361int MQTTPacket_readnb(unsigned char* buf, int buflen, MQTTTransport *trp)
362{
363 int rc = -1, frc;
364 MQTTHeader header = {0};
365
366 switch(trp->state){
367 default:
368 trp->state = 0;
369 /*FALLTHROUGH*/
370 case 0:
371 /* read the header byte. This has the packet type in it */
372 if ((frc=(*trp->getfn)(trp->sck, buf, 1)) == -1)
373 goto exit;
374 if (frc == 0)
375 return 0;
376 trp->len = 0;
377 ++trp->state;
378 /*FALLTHROUGH*/
379 /* read the remaining length. This is variable in itself */
380 case 1:
381 if((frc=MQTTPacket_decodenb(trp)) == MQTTPACKET_READ_ERROR)
382 goto exit;
383 if(frc == 0)
384 return 0;
385 trp->len = 1 + MQTTPacket_encode(buf + 1, trp->rem_len); /* put the original remaining length back into the buffer */
386 if((trp->rem_len + trp->len) > buflen)
387 goto exit;
388 ++trp->state;
389 /*FALLTHROUGH*/
390 case 2:
391 /* read the rest of the buffer using a callback to supply the rest of the data */
392 if ((frc=(*trp->getfn)(trp->sck, buf + trp->len, trp->rem_len)) == -1)
393 goto exit;
394 if (frc == 0)
395 return 0;
396 trp->rem_len -= frc;
397 trp->len += frc;
398 if(trp->rem_len)
399 return 0;
400
401 header.byte = buf[0];
402 rc = header.bits.type;
403 break;
404 }
405
406exit:
407 trp->state = 0;
408 return rc;
409}
410
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTPacket.h b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTPacket.h
new file mode 100644
index 0000000..588966d
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTPacket.h
@@ -0,0 +1,133 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 * Xiang Rong - 442039 Add makefile to Embedded C client
16 *******************************************************************************/
17
18#ifndef MQTTPACKET_H_
19#define MQTTPACKET_H_
20
21#if defined(__cplusplus) /* If this is a C++ compiler, use C linkage */
22extern "C" {
23#endif
24
25#if defined(WIN32_DLL) || defined(WIN64_DLL)
26 #define DLLImport __declspec(dllimport)
27 #define DLLExport __declspec(dllexport)
28#elif defined(LINUX_SO)
29 #define DLLImport extern
30 #define DLLExport __attribute__ ((visibility ("default")))
31#else
32 #define DLLImport
33 #define DLLExport
34#endif
35
36enum errors
37{
38 MQTTPACKET_BUFFER_TOO_SHORT = -2,
39 MQTTPACKET_READ_ERROR = -1,
40 MQTTPACKET_READ_COMPLETE
41};
42
43enum msgTypes
44{
45 CONNECT = 1, CONNACK, PUBLISH, PUBACK, PUBREC, PUBREL,
46 PUBCOMP, SUBSCRIBE, SUBACK, UNSUBSCRIBE, UNSUBACK,
47 PINGREQ, PINGRESP, DISCONNECT
48};
49
50/**
51 * Bitfields for the MQTT header byte.
52 */
53typedef union
54{
55 unsigned char byte; /**< the whole byte */
56#if defined(REVERSED)
57 struct
58 {
59 unsigned int type : 4; /**< message type nibble */
60 unsigned int dup : 1; /**< DUP flag bit */
61 unsigned int qos : 2; /**< QoS value, 0, 1 or 2 */
62 unsigned int retain : 1; /**< retained flag bit */
63 } bits;
64#else
65 struct
66 {
67 unsigned int retain : 1; /**< retained flag bit */
68 unsigned int qos : 2; /**< QoS value, 0, 1 or 2 */
69 unsigned int dup : 1; /**< DUP flag bit */
70 unsigned int type : 4; /**< message type nibble */
71 } bits;
72#endif
73} MQTTHeader;
74
75typedef struct
76{
77 int len;
78 char* data;
79} MQTTLenString;
80
81typedef struct
82{
83 char* cstring;
84 MQTTLenString lenstring;
85} MQTTString;
86
87#define MQTTString_initializer {NULL, {0, NULL}}
88
89int MQTTstrlen(MQTTString mqttstring);
90
91#include "MQTTConnect.h"
92#include "MQTTPublish.h"
93#include "MQTTSubscribe.h"
94#include "MQTTUnsubscribe.h"
95#include "MQTTFormat.h"
96
97int MQTTSerialize_ack(unsigned char* buf, int buflen, unsigned char type, unsigned char dup, unsigned short packetid);
98int MQTTDeserialize_ack(unsigned char* packettype, unsigned char* dup, unsigned short* packetid, unsigned char* buf, int buflen);
99
100int MQTTPacket_len(int rem_len);
101int MQTTPacket_equals(MQTTString* a, char* b);
102
103int MQTTPacket_encode(unsigned char* buf, int length);
104int MQTTPacket_decode(int (*getcharfn)(unsigned char*, int), int* value);
105int MQTTPacket_decodeBuf(unsigned char* buf, int* value);
106
107int readInt(unsigned char** pptr);
108char readChar(unsigned char** pptr);
109void writeChar(unsigned char** pptr, char c);
110void writeInt(unsigned char** pptr, int anInt);
111int readMQTTLenString(MQTTString* mqttstring, unsigned char** pptr, unsigned char* enddata);
112void writeCString(unsigned char** pptr, const char* string);
113void writeMQTTString(unsigned char** pptr, MQTTString mqttstring);
114
115DLLExport int MQTTPacket_read(unsigned char* buf, int buflen, int (*getfn)(unsigned char*, int));
116
117typedef struct {
118 int (*getfn)(void *, unsigned char*, int); /* must return -1 for error, 0 for call again, or the number of bytes read */
119 void *sck; /* pointer to whatever the system may use to identify the transport */
120 int multiplier;
121 int rem_len;
122 int len;
123 char state;
124}MQTTTransport;
125
126int MQTTPacket_readnb(unsigned char* buf, int buflen, MQTTTransport *trp);
127
128#ifdef __cplusplus /* If this is a C++ compiler, use C linkage */
129}
130#endif
131
132
133#endif /* MQTTPACKET_H_ */
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTPublish.h b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTPublish.h
new file mode 100644
index 0000000..ebe479d
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTPublish.h
@@ -0,0 +1,38 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 * Xiang Rong - 442039 Add makefile to Embedded C client
16 *******************************************************************************/
17
18#ifndef MQTTPUBLISH_H_
19#define MQTTPUBLISH_H_
20
21#if !defined(DLLImport)
22 #define DLLImport
23#endif
24#if !defined(DLLExport)
25 #define DLLExport
26#endif
27
28DLLExport int MQTTSerialize_publish(unsigned char* buf, int buflen, unsigned char dup, int qos, unsigned char retained, unsigned short packetid,
29 MQTTString topicName, unsigned char* payload, int payloadlen);
30
31DLLExport int MQTTDeserialize_publish(unsigned char* dup, int* qos, unsigned char* retained, unsigned short* packetid, MQTTString* topicName,
32 unsigned char** payload, int* payloadlen, unsigned char* buf, int len);
33
34DLLExport int MQTTSerialize_puback(unsigned char* buf, int buflen, unsigned short packetid);
35DLLExport int MQTTSerialize_pubrel(unsigned char* buf, int buflen, unsigned char dup, unsigned short packetid);
36DLLExport int MQTTSerialize_pubcomp(unsigned char* buf, int buflen, unsigned short packetid);
37
38#endif /* MQTTPUBLISH_H_ */
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTSerializePublish.c b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTSerializePublish.c
new file mode 100644
index 0000000..77a58b5
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTSerializePublish.c
@@ -0,0 +1,169 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 * Ian Craggs - fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=453144
16 *******************************************************************************/
17
18#include "MQTTPacket.h"
19#include "StackTrace.h"
20
21#include <string.h>
22
23
24/**
25 * Determines the length of the MQTT publish packet that would be produced using the supplied parameters
26 * @param qos the MQTT QoS of the publish (packetid is omitted for QoS 0)
27 * @param topicName the topic name to be used in the publish
28 * @param payloadlen the length of the payload to be sent
29 * @return the length of buffer needed to contain the serialized version of the packet
30 */
31int MQTTSerialize_publishLength(int qos, MQTTString topicName, int payloadlen)
32{
33 int len = 0;
34
35 len += 2 + MQTTstrlen(topicName) + payloadlen;
36 if (qos > 0)
37 len += 2; /* packetid */
38 return len;
39}
40
41
42/**
43 * Serializes the supplied publish data into the supplied buffer, ready for sending
44 * @param buf the buffer into which the packet will be serialized
45 * @param buflen the length in bytes of the supplied buffer
46 * @param dup integer - the MQTT dup flag
47 * @param qos integer - the MQTT QoS value
48 * @param retained integer - the MQTT retained flag
49 * @param packetid integer - the MQTT packet identifier
50 * @param topicName MQTTString - the MQTT topic in the publish
51 * @param payload byte buffer - the MQTT publish payload
52 * @param payloadlen integer - the length of the MQTT payload
53 * @return the length of the serialized data. <= 0 indicates error
54 */
55int MQTTSerialize_publish(unsigned char* buf, int buflen, unsigned char dup, int qos, unsigned char retained, unsigned short packetid,
56 MQTTString topicName, unsigned char* payload, int payloadlen)
57{
58 unsigned char *ptr = buf;
59 MQTTHeader header = {0};
60 int rem_len = 0;
61 int rc = 0;
62
63 FUNC_ENTRY;
64 if (MQTTPacket_len(rem_len = MQTTSerialize_publishLength(qos, topicName, payloadlen)) > buflen)
65 {
66 rc = MQTTPACKET_BUFFER_TOO_SHORT;
67 goto exit;
68 }
69
70 header.bits.type = PUBLISH;
71 header.bits.dup = dup;
72 header.bits.qos = qos;
73 header.bits.retain = retained;
74 writeChar(&ptr, header.byte); /* write header */
75
76 ptr += MQTTPacket_encode(ptr, rem_len); /* write remaining length */;
77
78 writeMQTTString(&ptr, topicName);
79
80 if (qos > 0)
81 writeInt(&ptr, packetid);
82
83 memcpy(ptr, payload, payloadlen);
84 ptr += payloadlen;
85
86 rc = ptr - buf;
87
88exit:
89 FUNC_EXIT_RC(rc);
90 return rc;
91}
92
93
94
95/**
96 * Serializes the ack packet into the supplied buffer.
97 * @param buf the buffer into which the packet will be serialized
98 * @param buflen the length in bytes of the supplied buffer
99 * @param type the MQTT packet type
100 * @param dup the MQTT dup flag
101 * @param packetid the MQTT packet identifier
102 * @return serialized length, or error if 0
103 */
104int MQTTSerialize_ack(unsigned char* buf, int buflen, unsigned char packettype, unsigned char dup, unsigned short packetid)
105{
106 MQTTHeader header = {0};
107 int rc = 0;
108 unsigned char *ptr = buf;
109
110 FUNC_ENTRY;
111 if (buflen < 4)
112 {
113 rc = MQTTPACKET_BUFFER_TOO_SHORT;
114 goto exit;
115 }
116 header.bits.type = packettype;
117 header.bits.dup = dup;
118 header.bits.qos = (packettype == PUBREL) ? 1 : 0;
119 writeChar(&ptr, header.byte); /* write header */
120
121 ptr += MQTTPacket_encode(ptr, 2); /* write remaining length */
122 writeInt(&ptr, packetid);
123 rc = ptr - buf;
124exit:
125 FUNC_EXIT_RC(rc);
126 return rc;
127}
128
129
130/**
131 * Serializes a puback packet into the supplied buffer.
132 * @param buf the buffer into which the packet will be serialized
133 * @param buflen the length in bytes of the supplied buffer
134 * @param packetid integer - the MQTT packet identifier
135 * @return serialized length, or error if 0
136 */
137int MQTTSerialize_puback(unsigned char* buf, int buflen, unsigned short packetid)
138{
139 return MQTTSerialize_ack(buf, buflen, PUBACK, 0, packetid);
140}
141
142
143/**
144 * Serializes a pubrel packet into the supplied buffer.
145 * @param buf the buffer into which the packet will be serialized
146 * @param buflen the length in bytes of the supplied buffer
147 * @param dup integer - the MQTT dup flag
148 * @param packetid integer - the MQTT packet identifier
149 * @return serialized length, or error if 0
150 */
151int MQTTSerialize_pubrel(unsigned char* buf, int buflen, unsigned char dup, unsigned short packetid)
152{
153 return MQTTSerialize_ack(buf, buflen, PUBREL, dup, packetid);
154}
155
156
157/**
158 * Serializes a pubrel packet into the supplied buffer.
159 * @param buf the buffer into which the packet will be serialized
160 * @param buflen the length in bytes of the supplied buffer
161 * @param packetid integer - the MQTT packet identifier
162 * @return serialized length, or error if 0
163 */
164int MQTTSerialize_pubcomp(unsigned char* buf, int buflen, unsigned short packetid)
165{
166 return MQTTSerialize_ack(buf, buflen, PUBCOMP, 0, packetid);
167}
168
169
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTSubscribe.h b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTSubscribe.h
new file mode 100644
index 0000000..aa91826
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTSubscribe.h
@@ -0,0 +1,39 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 * Xiang Rong - 442039 Add makefile to Embedded C client
16 *******************************************************************************/
17
18#ifndef MQTTSUBSCRIBE_H_
19#define MQTTSUBSCRIBE_H_
20
21#if !defined(DLLImport)
22 #define DLLImport
23#endif
24#if !defined(DLLExport)
25 #define DLLExport
26#endif
27
28DLLExport int MQTTSerialize_subscribe(unsigned char* buf, int buflen, unsigned char dup, unsigned short packetid,
29 int count, MQTTString topicFilters[], int requestedQoSs[]);
30
31DLLExport int MQTTDeserialize_subscribe(unsigned char* dup, unsigned short* packetid,
32 int maxcount, int* count, MQTTString topicFilters[], int requestedQoSs[], unsigned char* buf, int len);
33
34DLLExport int MQTTSerialize_suback(unsigned char* buf, int buflen, unsigned short packetid, int count, int* grantedQoSs);
35
36DLLExport int MQTTDeserialize_suback(unsigned short* packetid, int maxcount, int* count, int grantedQoSs[], unsigned char* buf, int len);
37
38
39#endif /* MQTTSUBSCRIBE_H_ */
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTSubscribeClient.c b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTSubscribeClient.c
new file mode 100644
index 0000000..57a0613
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTSubscribeClient.c
@@ -0,0 +1,137 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#include "MQTTPacket.h"
18#include "StackTrace.h"
19
20#include <string.h>
21
22/**
23 * Determines the length of the MQTT subscribe packet that would be produced using the supplied parameters
24 * @param count the number of topic filter strings in topicFilters
25 * @param topicFilters the array of topic filter strings to be used in the publish
26 * @return the length of buffer needed to contain the serialized version of the packet
27 */
28int MQTTSerialize_subscribeLength(int count, MQTTString topicFilters[])
29{
30 int i;
31 int len = 2; /* packetid */
32
33 for (i = 0; i < count; ++i)
34 len += 2 + MQTTstrlen(topicFilters[i]) + 1; /* length + topic + req_qos */
35 return len;
36}
37
38
39/**
40 * Serializes the supplied subscribe data into the supplied buffer, ready for sending
41 * @param buf the buffer into which the packet will be serialized
42 * @param buflen the length in bytes of the supplied bufferr
43 * @param dup integer - the MQTT dup flag
44 * @param packetid integer - the MQTT packet identifier
45 * @param count - number of members in the topicFilters and reqQos arrays
46 * @param topicFilters - array of topic filter names
47 * @param requestedQoSs - array of requested QoS
48 * @return the length of the serialized data. <= 0 indicates error
49 */
50int MQTTSerialize_subscribe(unsigned char* buf, int buflen, unsigned char dup, unsigned short packetid, int count,
51 MQTTString topicFilters[], int requestedQoSs[])
52{
53 unsigned char *ptr = buf;
54 MQTTHeader header = {0};
55 int rem_len = 0;
56 int rc = 0;
57 int i = 0;
58
59 FUNC_ENTRY;
60 if (MQTTPacket_len(rem_len = MQTTSerialize_subscribeLength(count, topicFilters)) > buflen)
61 {
62 rc = MQTTPACKET_BUFFER_TOO_SHORT;
63 goto exit;
64 }
65
66 header.byte = 0;
67 header.bits.type = SUBSCRIBE;
68 header.bits.dup = dup;
69 header.bits.qos = 1;
70 writeChar(&ptr, header.byte); /* write header */
71
72 ptr += MQTTPacket_encode(ptr, rem_len); /* write remaining length */;
73
74 writeInt(&ptr, packetid);
75
76 for (i = 0; i < count; ++i)
77 {
78 writeMQTTString(&ptr, topicFilters[i]);
79 writeChar(&ptr, requestedQoSs[i]);
80 }
81
82 rc = ptr - buf;
83exit:
84 FUNC_EXIT_RC(rc);
85 return rc;
86}
87
88
89
90/**
91 * Deserializes the supplied (wire) buffer into suback data
92 * @param packetid returned integer - the MQTT packet identifier
93 * @param maxcount - the maximum number of members allowed in the grantedQoSs array
94 * @param count returned integer - number of members in the grantedQoSs array
95 * @param grantedQoSs returned array of integers - the granted qualities of service
96 * @param buf the raw buffer data, of the correct length determined by the remaining length field
97 * @param buflen the length in bytes of the data in the supplied buffer
98 * @return error code. 1 is success, 0 is failure
99 */
100int MQTTDeserialize_suback(unsigned short* packetid, int maxcount, int* count, int grantedQoSs[], unsigned char* buf, int buflen)
101{
102 MQTTHeader header = {0};
103 unsigned char* curdata = buf;
104 unsigned char* enddata = NULL;
105 int rc = 0;
106 int mylen;
107
108 FUNC_ENTRY;
109 header.byte = readChar(&curdata);
110 if (header.bits.type != SUBACK)
111 goto exit;
112
113 curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */
114 enddata = curdata + mylen;
115 if (enddata - curdata < 2)
116 goto exit;
117
118 *packetid = readInt(&curdata);
119
120 *count = 0;
121 while (curdata < enddata)
122 {
123 if (*count > maxcount)
124 {
125 rc = -1;
126 goto exit;
127 }
128 grantedQoSs[(*count)++] = readChar(&curdata);
129 }
130
131 rc = 1;
132exit:
133 FUNC_EXIT_RC(rc);
134 return rc;
135}
136
137
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTSubscribeServer.c b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTSubscribeServer.c
new file mode 100644
index 0000000..5579645
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTSubscribeServer.c
@@ -0,0 +1,112 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#include "MQTTPacket.h"
18#include "StackTrace.h"
19
20#include <string.h>
21
22
23/**
24 * Deserializes the supplied (wire) buffer into subscribe data
25 * @param dup integer returned - the MQTT dup flag
26 * @param packetid integer returned - the MQTT packet identifier
27 * @param maxcount - the maximum number of members allowed in the topicFilters and requestedQoSs arrays
28 * @param count - number of members in the topicFilters and requestedQoSs arrays
29 * @param topicFilters - array of topic filter names
30 * @param requestedQoSs - array of requested QoS
31 * @param buf the raw buffer data, of the correct length determined by the remaining length field
32 * @param buflen the length in bytes of the data in the supplied buffer
33 * @return the length of the serialized data. <= 0 indicates error
34 */
35int MQTTDeserialize_subscribe(unsigned char* dup, unsigned short* packetid, int maxcount, int* count, MQTTString topicFilters[],
36 int requestedQoSs[], unsigned char* buf, int buflen)
37{
38 MQTTHeader header = {0};
39 unsigned char* curdata = buf;
40 unsigned char* enddata = NULL;
41 int rc = -1;
42 int mylen = 0;
43
44 FUNC_ENTRY;
45 header.byte = readChar(&curdata);
46 if (header.bits.type != SUBSCRIBE)
47 goto exit;
48 *dup = header.bits.dup;
49
50 curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */
51 enddata = curdata + mylen;
52
53 *packetid = readInt(&curdata);
54
55 *count = 0;
56 while (curdata < enddata)
57 {
58 if (!readMQTTLenString(&topicFilters[*count], &curdata, enddata))
59 goto exit;
60 if (curdata >= enddata) /* do we have enough data to read the req_qos version byte? */
61 goto exit;
62 requestedQoSs[*count] = readChar(&curdata);
63 (*count)++;
64 }
65
66 rc = 1;
67exit:
68 FUNC_EXIT_RC(rc);
69 return rc;
70}
71
72
73/**
74 * Serializes the supplied suback data into the supplied buffer, ready for sending
75 * @param buf the buffer into which the packet will be serialized
76 * @param buflen the length in bytes of the supplied buffer
77 * @param packetid integer - the MQTT packet identifier
78 * @param count - number of members in the grantedQoSs array
79 * @param grantedQoSs - array of granted QoS
80 * @return the length of the serialized data. <= 0 indicates error
81 */
82int MQTTSerialize_suback(unsigned char* buf, int buflen, unsigned short packetid, int count, int* grantedQoSs)
83{
84 MQTTHeader header = {0};
85 int rc = -1;
86 unsigned char *ptr = buf;
87 int i;
88
89 FUNC_ENTRY;
90 if (buflen < 2 + count)
91 {
92 rc = MQTTPACKET_BUFFER_TOO_SHORT;
93 goto exit;
94 }
95 header.byte = 0;
96 header.bits.type = SUBACK;
97 writeChar(&ptr, header.byte); /* write header */
98
99 ptr += MQTTPacket_encode(ptr, 2 + count); /* write remaining length */
100
101 writeInt(&ptr, packetid);
102
103 for (i = 0; i < count; ++i)
104 writeChar(&ptr, grantedQoSs[i]);
105
106 rc = ptr - buf;
107exit:
108 FUNC_EXIT_RC(rc);
109 return rc;
110}
111
112
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTUnsubscribe.h b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTUnsubscribe.h
new file mode 100644
index 0000000..355ca9a
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTUnsubscribe.h
@@ -0,0 +1,38 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 * Xiang Rong - 442039 Add makefile to Embedded C client
16 *******************************************************************************/
17
18#ifndef MQTTUNSUBSCRIBE_H_
19#define MQTTUNSUBSCRIBE_H_
20
21#if !defined(DLLImport)
22 #define DLLImport
23#endif
24#if !defined(DLLExport)
25 #define DLLExport
26#endif
27
28DLLExport int MQTTSerialize_unsubscribe(unsigned char* buf, int buflen, unsigned char dup, unsigned short packetid,
29 int count, MQTTString topicFilters[]);
30
31DLLExport int MQTTDeserialize_unsubscribe(unsigned char* dup, unsigned short* packetid, int max_count, int* count, MQTTString topicFilters[],
32 unsigned char* buf, int len);
33
34DLLExport int MQTTSerialize_unsuback(unsigned char* buf, int buflen, unsigned short packetid);
35
36DLLExport int MQTTDeserialize_unsuback(unsigned short* packetid, unsigned char* buf, int len);
37
38#endif /* MQTTUNSUBSCRIBE_H_ */
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTUnsubscribeClient.c b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTUnsubscribeClient.c
new file mode 100644
index 0000000..e7ec530
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTUnsubscribeClient.c
@@ -0,0 +1,106 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#include "MQTTPacket.h"
18#include "StackTrace.h"
19
20#include <string.h>
21
22/**
23 * Determines the length of the MQTT unsubscribe packet that would be produced using the supplied parameters
24 * @param count the number of topic filter strings in topicFilters
25 * @param topicFilters the array of topic filter strings to be used in the publish
26 * @return the length of buffer needed to contain the serialized version of the packet
27 */
28int MQTTSerialize_unsubscribeLength(int count, MQTTString topicFilters[])
29{
30 int i;
31 int len = 2; /* packetid */
32
33 for (i = 0; i < count; ++i)
34 len += 2 + MQTTstrlen(topicFilters[i]); /* length + topic*/
35 return len;
36}
37
38
39/**
40 * Serializes the supplied unsubscribe data into the supplied buffer, ready for sending
41 * @param buf the raw buffer data, of the correct length determined by the remaining length field
42 * @param buflen the length in bytes of the data in the supplied buffer
43 * @param dup integer - the MQTT dup flag
44 * @param packetid integer - the MQTT packet identifier
45 * @param count - number of members in the topicFilters array
46 * @param topicFilters - array of topic filter names
47 * @return the length of the serialized data. <= 0 indicates error
48 */
49int MQTTSerialize_unsubscribe(unsigned char* buf, int buflen, unsigned char dup, unsigned short packetid,
50 int count, MQTTString topicFilters[])
51{
52 unsigned char *ptr = buf;
53 MQTTHeader header = {0};
54 int rem_len = 0;
55 int rc = -1;
56 int i = 0;
57
58 FUNC_ENTRY;
59 if (MQTTPacket_len(rem_len = MQTTSerialize_unsubscribeLength(count, topicFilters)) > buflen)
60 {
61 rc = MQTTPACKET_BUFFER_TOO_SHORT;
62 goto exit;
63 }
64
65 header.byte = 0;
66 header.bits.type = UNSUBSCRIBE;
67 header.bits.dup = dup;
68 header.bits.qos = 1;
69 writeChar(&ptr, header.byte); /* write header */
70
71 ptr += MQTTPacket_encode(ptr, rem_len); /* write remaining length */;
72
73 writeInt(&ptr, packetid);
74
75 for (i = 0; i < count; ++i)
76 writeMQTTString(&ptr, topicFilters[i]);
77
78 rc = ptr - buf;
79exit:
80 FUNC_EXIT_RC(rc);
81 return rc;
82}
83
84
85/**
86 * Deserializes the supplied (wire) buffer into unsuback data
87 * @param packetid returned integer - the MQTT packet identifier
88 * @param buf the raw buffer data, of the correct length determined by the remaining length field
89 * @param buflen the length in bytes of the data in the supplied buffer
90 * @return error code. 1 is success, 0 is failure
91 */
92int MQTTDeserialize_unsuback(unsigned short* packetid, unsigned char* buf, int buflen)
93{
94 unsigned char type = 0;
95 unsigned char dup = 0;
96 int rc = 0;
97
98 FUNC_ENTRY;
99 rc = MQTTDeserialize_ack(&type, &dup, packetid, buf, buflen);
100 if (type == UNSUBACK)
101 rc = 1;
102 FUNC_EXIT_RC(rc);
103 return rc;
104}
105
106
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTUnsubscribeServer.c b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTUnsubscribeServer.c
new file mode 100644
index 0000000..42b6102
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTUnsubscribeServer.c
@@ -0,0 +1,102 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17#include "MQTTPacket.h"
18#include "StackTrace.h"
19
20#include <string.h>
21
22
23/**
24 * Deserializes the supplied (wire) buffer into unsubscribe data
25 * @param dup integer returned - the MQTT dup flag
26 * @param packetid integer returned - the MQTT packet identifier
27 * @param maxcount - the maximum number of members allowed in the topicFilters and requestedQoSs arrays
28 * @param count - number of members in the topicFilters and requestedQoSs arrays
29 * @param topicFilters - array of topic filter names
30 * @param buf the raw buffer data, of the correct length determined by the remaining length field
31 * @param buflen the length in bytes of the data in the supplied buffer
32 * @return the length of the serialized data. <= 0 indicates error
33 */
34int MQTTDeserialize_unsubscribe(unsigned char* dup, unsigned short* packetid, int maxcount, int* count, MQTTString topicFilters[],
35 unsigned char* buf, int len)
36{
37 MQTTHeader header = {0};
38 unsigned char* curdata = buf;
39 unsigned char* enddata = NULL;
40 int rc = 0;
41 int mylen = 0;
42
43 FUNC_ENTRY;
44 header.byte = readChar(&curdata);
45 if (header.bits.type != UNSUBSCRIBE)
46 goto exit;
47 *dup = header.bits.dup;
48
49 curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */
50 enddata = curdata + mylen;
51
52 *packetid = readInt(&curdata);
53
54 *count = 0;
55 while (curdata < enddata)
56 {
57 if (!readMQTTLenString(&topicFilters[*count], &curdata, enddata))
58 goto exit;
59 (*count)++;
60 }
61
62 rc = 1;
63exit:
64 FUNC_EXIT_RC(rc);
65 return rc;
66}
67
68
69/**
70 * Serializes the supplied unsuback data into the supplied buffer, ready for sending
71 * @param buf the buffer into which the packet will be serialized
72 * @param buflen the length in bytes of the supplied buffer
73 * @param packetid integer - the MQTT packet identifier
74 * @return the length of the serialized data. <= 0 indicates error
75 */
76int MQTTSerialize_unsuback(unsigned char* buf, int buflen, unsigned short packetid)
77{
78 MQTTHeader header = {0};
79 int rc = 0;
80 unsigned char *ptr = buf;
81
82 FUNC_ENTRY;
83 if (buflen < 2)
84 {
85 rc = MQTTPACKET_BUFFER_TOO_SHORT;
86 goto exit;
87 }
88 header.byte = 0;
89 header.bits.type = UNSUBACK;
90 writeChar(&ptr, header.byte); /* write header */
91
92 ptr += MQTTPacket_encode(ptr, 2); /* write remaining length */
93
94 writeInt(&ptr, packetid);
95
96 rc = ptr - buf;
97exit:
98 FUNC_EXIT_RC(rc);
99 return rc;
100}
101
102
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/src/StackTrace.h b/aws_mqtt_embedded_client_lib/MQTTPacket/src/StackTrace.h
new file mode 100644
index 0000000..2808a0d
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/src/StackTrace.h
@@ -0,0 +1,78 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 * Ian Craggs - fix for bug #434081
16 *******************************************************************************/
17
18#ifndef STACKTRACE_H_
19#define STACKTRACE_H_
20
21#include <stdio.h>
22#define NOSTACKTRACE 1
23
24#if defined(NOSTACKTRACE)
25#define FUNC_ENTRY
26#define FUNC_ENTRY_NOLOG
27#define FUNC_ENTRY_MED
28#define FUNC_ENTRY_MAX
29#define FUNC_EXIT
30#define FUNC_EXIT_NOLOG
31#define FUNC_EXIT_MED
32#define FUNC_EXIT_MAX
33#define FUNC_EXIT_RC(x)
34#define FUNC_EXIT_MED_RC(x)
35#define FUNC_EXIT_MAX_RC(x)
36
37#else
38
39#if defined(WIN32)
40#define inline __inline
41#define FUNC_ENTRY StackTrace_entry(__FUNCTION__, __LINE__, TRACE_MINIMUM)
42#define FUNC_ENTRY_NOLOG StackTrace_entry(__FUNCTION__, __LINE__, -1)
43#define FUNC_ENTRY_MED StackTrace_entry(__FUNCTION__, __LINE__, TRACE_MEDIUM)
44#define FUNC_ENTRY_MAX StackTrace_entry(__FUNCTION__, __LINE__, TRACE_MAXIMUM)
45#define FUNC_EXIT StackTrace_exit(__FUNCTION__, __LINE__, NULL, TRACE_MINIMUM)
46#define FUNC_EXIT_NOLOG StackTrace_exit(__FUNCTION__, __LINE__, -1)
47#define FUNC_EXIT_MED StackTrace_exit(__FUNCTION__, __LINE__, NULL, TRACE_MEDIUM)
48#define FUNC_EXIT_MAX StackTrace_exit(__FUNCTION__, __LINE__, NULL, TRACE_MAXIMUM)
49#define FUNC_EXIT_RC(x) StackTrace_exit(__FUNCTION__, __LINE__, &x, TRACE_MINIMUM)
50#define FUNC_EXIT_MED_RC(x) StackTrace_exit(__FUNCTION__, __LINE__, &x, TRACE_MEDIUM)
51#define FUNC_EXIT_MAX_RC(x) StackTrace_exit(__FUNCTION__, __LINE__, &x, TRACE_MAXIMUM)
52#else
53#define FUNC_ENTRY StackTrace_entry(__func__, __LINE__, TRACE_MINIMUM)
54#define FUNC_ENTRY_NOLOG StackTrace_entry(__func__, __LINE__, -1)
55#define FUNC_ENTRY_MED StackTrace_entry(__func__, __LINE__, TRACE_MEDIUM)
56#define FUNC_ENTRY_MAX StackTrace_entry(__func__, __LINE__, TRACE_MAXIMUM)
57#define FUNC_EXIT StackTrace_exit(__func__, __LINE__, NULL, TRACE_MINIMUM)
58#define FUNC_EXIT_NOLOG StackTrace_exit(__func__, __LINE__, NULL, -1)
59#define FUNC_EXIT_MED StackTrace_exit(__func__, __LINE__, NULL, TRACE_MEDIUM)
60#define FUNC_EXIT_MAX StackTrace_exit(__func__, __LINE__, NULL, TRACE_MAXIMUM)
61#define FUNC_EXIT_RC(x) StackTrace_exit(__func__, __LINE__, &x, TRACE_MINIMUM)
62#define FUNC_EXIT_MED_RC(x) StackTrace_exit(__func__, __LINE__, &x, TRACE_MEDIUM)
63#define FUNC_EXIT_MAX_RC(x) StackTrace_exit(__func__, __LINE__, &x, TRACE_MAXIMUM)
64
65void StackTrace_entry(const char* name, int line, int trace);
66void StackTrace_exit(const char* name, int line, void* return_value, int trace);
67
68void StackTrace_printStack(FILE* dest);
69char* StackTrace_get(unsigned long);
70
71#endif
72
73#endif
74
75
76
77
78#endif /* STACKTRACE_H_ */
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/test/build_test b/aws_mqtt_embedded_client_lib/MQTTPacket/test/build_test
new file mode 100644
index 0000000..eedf3d1
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/test/build_test
@@ -0,0 +1 @@
gcc -Wall test1.c -o test1 -I../src ../src/MQTTConnectClient.c ../src/MQTTConnectServer.c ../src/MQTTPacket.c ../src/MQTTSerializePublish.c ../src/MQTTDeserializePublish.c ../src/MQTTSubscribeServer.c ../src/MQTTSubscribeClient.c ../src/MQTTUnsubscribeServer.c ../src/MQTTUnsubscribeClient.c
diff --git a/aws_mqtt_embedded_client_lib/MQTTPacket/test/test1.c b/aws_mqtt_embedded_client_lib/MQTTPacket/test/test1.c
new file mode 100644
index 0000000..4614ff7
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/MQTTPacket/test/test1.c
@@ -0,0 +1,635 @@
1/*******************************************************************************
2 * Copyright (c) 2014 IBM Corp.
3 *
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and Eclipse Distribution License v1.0 which accompany this distribution.
7 *
8 * The Eclipse Public License is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 * and the Eclipse Distribution License is available at
11 * http://www.eclipse.org/org/documents/edl-v10.php.
12 *
13 * Contributors:
14 * Ian Craggs - initial API and implementation and/or initial documentation
15 *******************************************************************************/
16
17
18#include "MQTTPacket.h"
19#include <string.h>
20#include <stdlib.h>
21#include <stdio.h>
22
23#if !defined(_WINDOWS)
24 #include <sys/time.h>
25 #include <sys/socket.h>
26 #include <unistd.h>
27 #include <errno.h>
28#else
29#include <winsock2.h>
30#include <ws2tcpip.h>
31#define MAXHOSTNAMELEN 256
32#define EAGAIN WSAEWOULDBLOCK
33#define EINTR WSAEINTR
34#define EINPROGRESS WSAEINPROGRESS
35#define EWOULDBLOCK WSAEWOULDBLOCK
36#define ENOTCONN WSAENOTCONN
37#define ECONNRESET WSAECONNRESET
38#endif
39
40#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
41
42struct Options
43{
44 char* connection; /**< connection to system under test. */
45 char** haconnections;
46 int hacount;
47 int verbose;
48 int test_no;
49} options =
50{
51 "tcp://m2m.eclipse.org:1883",
52 NULL,
53 0,
54 0,
55 0,
56};
57
58void usage()
59{
60
61}
62
63void getopts(int argc, char** argv)
64{
65 int count = 1;
66
67 while (count < argc)
68 {
69 if (strcmp(argv[count], "--test_no") == 0)
70 {
71 if (++count < argc)
72 options.test_no = atoi(argv[count]);
73 else
74 usage();
75 }
76 else if (strcmp(argv[count], "--connection") == 0)
77 {
78 if (++count < argc)
79 {
80 options.connection = argv[count];
81 printf("\nSetting connection to %s\n", options.connection);
82 }
83 else
84 usage();
85 }
86 else if (strcmp(argv[count], "--haconnections") == 0)
87 {
88 if (++count < argc)
89 {
90 char* tok = strtok(argv[count], " ");
91 options.hacount = 0;
92 options.haconnections = malloc(sizeof(char*) * 5);
93 while (tok)
94 {
95 options.haconnections[options.hacount] = malloc(strlen(tok) + 1);
96 strcpy(options.haconnections[options.hacount], tok);
97 options.hacount++;
98 tok = strtok(NULL, " ");
99 }
100 }
101 else
102 usage();
103 }
104 else if (strcmp(argv[count], "--verbose") == 0)
105 {
106 options.verbose = 1;
107 printf("\nSetting verbose on\n");
108 }
109 count++;
110 }
111}
112
113
114#define LOGA_DEBUG 0
115#define LOGA_INFO 1
116#include <stdarg.h>
117#include <time.h>
118#include <sys/timeb.h>
119void MyLog(int LOGA_level, char* format, ...)
120{
121 static char msg_buf[256];
122 va_list args;
123 struct timeb ts;
124
125 struct tm *timeinfo;
126
127 if (LOGA_level == LOGA_DEBUG && options.verbose == 0)
128 return;
129
130 ftime(&ts);
131 timeinfo = localtime(&ts.time);
132 strftime(msg_buf, 80, "%Y%m%d %H%M%S", timeinfo);
133
134 sprintf(&msg_buf[strlen(msg_buf)], ".%.3hu ", ts.millitm);
135
136 va_start(args, format);
137 vsnprintf(&msg_buf[strlen(msg_buf)], sizeof(msg_buf) - strlen(msg_buf), format, args);
138 va_end(args);
139
140 printf("%s\n", msg_buf);
141 fflush(stdout);
142}
143
144
145#if defined(WIN32) || defined(_WINDOWS)
146#define mqsleep(A) Sleep(1000*A)
147#define START_TIME_TYPE DWORD
148static DWORD start_time = 0;
149START_TIME_TYPE start_clock(void)
150{
151 return GetTickCount();
152}
153#elif defined(AIX)
154#define mqsleep sleep
155#define START_TIME_TYPE struct timespec
156START_TIME_TYPE start_clock(void)
157{
158 static struct timespec start;
159 clock_gettime(CLOCK_REALTIME, &start);
160 return start;
161}
162#else
163#define mqsleep sleep
164#define START_TIME_TYPE struct timeval
165/* TODO - unused - remove? static struct timeval start_time; */
166START_TIME_TYPE start_clock(void)
167{
168 struct timeval start_time;
169 gettimeofday(&start_time, NULL);
170 return start_time;
171}
172#endif
173
174
175#if defined(WIN32)
176long elapsed(START_TIME_TYPE start_time)
177{
178 return GetTickCount() - start_time;
179}
180#elif defined(AIX)
181#define assert(a)
182long elapsed(struct timespec start)
183{
184 struct timespec now, res;
185
186 clock_gettime(CLOCK_REALTIME, &now);
187 ntimersub(now, start, res);
188 return (res.tv_sec)*1000L + (res.tv_nsec)/1000000L;
189}
190#else
191long elapsed(START_TIME_TYPE start_time)
192{
193 struct timeval now, res;
194
195 gettimeofday(&now, NULL);
196 timersub(&now, &start_time, &res);
197 return (res.tv_sec)*1000 + (res.tv_usec)/1000;
198}
199#endif
200
201
202#define assert(a, b, c, d) myassert(__FILE__, __LINE__, a, b, c, d)
203#define assert1(a, b, c, d, e) myassert(__FILE__, __LINE__, a, b, c, d, e)
204
205int tests = 0;
206int failures = 0;
207FILE* xml;
208START_TIME_TYPE global_start_time;
209char output[3000];
210char* cur_output = output;
211
212
213void write_test_result()
214{
215 long duration = elapsed(global_start_time);
216
217 fprintf(xml, " time=\"%ld.%.3ld\" >\n", duration / 1000, duration % 1000);
218 if (cur_output != output)
219 {
220 fprintf(xml, "%s", output);
221 cur_output = output;
222 }
223 fprintf(xml, "</testcase>\n");
224}
225
226
227void myassert(char* filename, int lineno, char* description, int value, char* format, ...)
228{
229 ++tests;
230 if (!value)
231 {
232 va_list args;
233
234 ++failures;
235 printf("Assertion failed, file %s, line %d, description: %s\n", filename, lineno, description);
236
237 va_start(args, format);
238 vprintf(format, args);
239 va_end(args);
240
241 cur_output += sprintf(cur_output, "<failure type=\"%s\">file %s, line %d </failure>\n",
242 description, filename, lineno);
243 }
244 else
245 MyLog(LOGA_DEBUG, "Assertion succeeded, file %s, line %d, description: %s", filename, lineno, description);
246}
247
248#define min(a, b) ((a < b) ? a : b)
249
250int checkMQTTStrings(MQTTString a, MQTTString b)
251{
252 if (!a.lenstring.data)
253 {
254 a.lenstring.data = a.cstring;
255 if (a.cstring)
256 a.lenstring.len = strlen(a.cstring);
257 }
258 if (!b.lenstring.data)
259 {
260 b.lenstring.data = b.cstring;
261 if (b.cstring)
262 b.lenstring.len = strlen(b.cstring);
263 }
264 return memcmp(a.lenstring.data, b.lenstring.data, min(a.lenstring.len, b.lenstring.len)) == 0;
265}
266
267
268int checkConnectPackets(MQTTPacket_connectData* before, MQTTPacket_connectData* after)
269{
270 int rc = 0;
271 int start_failures = failures;
272
273 assert("struct_ids should be the same",
274 memcmp(before->struct_id, after->struct_id, 4) == 0, "struct_ids were different %.4s\n", after->struct_id);
275
276 assert("struct_versions should be the same",
277 before->struct_version == after->struct_version, "struct_versions were different\n", rc);
278
279 assert("MQTT versions should be the same",
280 before->MQTTVersion == after->MQTTVersion, "MQTT versions were different\n", rc);
281
282 assert("ClientIDs should be the same",
283 checkMQTTStrings(before->clientID, after->clientID), "ClientIDs were different\n", rc);
284
285 assert("keepAliveIntervals should be the same",
286 before->keepAliveInterval == after->keepAliveInterval, "keepAliveIntervals were different %d\n", after->keepAliveInterval);
287
288 assert("cleansessions should be the same",
289 before->cleansession == after->cleansession, "cleansessions were different\n", rc);
290
291 assert("willFlags should be the same",
292 before->willFlag == after->willFlag, "willFlags were different\n", rc);
293
294 if (before->willFlag)
295 {
296 assert("will struct_ids should be the same",
297 memcmp(before->will.struct_id, after->will.struct_id, 4) == 0, "will struct_ids were different %.4s\n", after->struct_id);
298
299 assert("will struct_versions should be the same",
300 before->will.struct_version == after->will.struct_version, "will struct_versions were different\n", rc);
301
302 assert("topic names should be the same",
303 checkMQTTStrings(before->will.topicName, after->will.topicName), "topic names were different\n", rc);
304
305 assert("messages should be the same",
306 checkMQTTStrings(before->will.message, after->will.message), "messages were different\n", rc);
307
308 assert("retained flags should be the same",
309 before->will.retained == after->will.retained, "retained flags were different\n", rc);
310
311 assert("will qos should be the same",
312 before->will.qos == after->will.qos, "will qos were different\n", rc);
313 }
314
315 assert("usernames should be the same",
316 checkMQTTStrings(before->clientID, after->clientID), "usernames were different\n", rc);
317 assert("passwords should be the same",
318 checkMQTTStrings(before->password, after->password), "passwords were different\n", rc);
319 return failures == start_failures;
320}
321
322int test1(struct Options options)
323{
324 MQTTPacket_connectData data = MQTTPacket_connectData_initializer;
325 MQTTPacket_connectData data_after = MQTTPacket_connectData_initializer;
326 int rc = 0;
327 unsigned char buf[100];
328 int buflen = sizeof(buf);
329
330 fprintf(xml, "<testcase classname=\"test1\" name=\"de/serialization\"");
331 global_start_time = start_clock();
332 failures = 0;
333 MyLog(LOGA_INFO, "Starting test 1 - serialization of connect and back");
334
335 data.clientID.cstring = "me";
336
337 data.keepAliveInterval = 20;
338 data.cleansession = 1;
339 data.username.cstring = "testuser";
340 data.password.cstring = "testpassword";
341
342 data.willFlag = 1;
343 data.will.message.cstring = "will message";
344 data.will.qos = 1;
345 data.will.retained = 0;
346 data.will.topicName.cstring = "will topic";
347
348 rc = MQTTSerialize_connect(buf, buflen, &data);
349 assert("good rc from serialize connect", rc > 0, "rc was %d\n", rc);
350
351 rc = MQTTDeserialize_connect(&data_after, buf, buflen);
352 assert("good rc from deserialize connect", rc == 1, "rc was %d\n", rc);
353
354 /* data after should be the same as data before */
355 rc = checkConnectPackets(&data, &data_after);
356 assert("packets should be the same", rc == 1, "packets were different\n", rc);
357
358/* exit: */
359 MyLog(LOGA_INFO, "TEST1: test %s. %d tests run, %d failures.",
360 (failures == 0) ? "passed" : "failed", tests, failures);
361 write_test_result();
362 return failures;
363}
364
365
366int test2(struct Options options)
367{
368 int rc = 0;
369 unsigned char buf[100];
370 int buflen = sizeof(buf);
371
372 unsigned char dup = 0;
373 int qos = 2;
374 unsigned char retained = 0;
375 unsigned short msgid = 23;
376 MQTTString topicString = MQTTString_initializer;
377 unsigned char *payload = (unsigned char*)"kkhkhkjkj jkjjk jk jk ";
378 int payloadlen = strlen((char*)payload);
379
380 unsigned char dup2 = 1;
381 int qos2 = 1;
382 unsigned char retained2 = 1;
383 unsigned short msgid2 = 3243;
384 MQTTString topicString2 = MQTTString_initializer;
385 unsigned char *payload2 = NULL;
386 int payloadlen2 = 0;
387
388 fprintf(xml, "<testcase classname=\"test1\" name=\"de/serialization\"");
389 global_start_time = start_clock();
390 failures = 0;
391 MyLog(LOGA_INFO, "Starting test 2 - serialization of publish and back");
392
393 topicString.cstring = "mytopic";
394 rc = MQTTSerialize_publish(buf, buflen, dup, qos, retained, msgid, topicString,
395 payload, payloadlen);
396 assert("good rc from serialize publish", rc > 0, "rc was %d\n", rc);
397
398 rc = MQTTDeserialize_publish(&dup2, &qos2, &retained2, &msgid2, &topicString2,
399 &payload2, &payloadlen2, buf, buflen);
400 assert("good rc from deserialize publish", rc == 1, "rc was %d\n", rc);
401
402 /* data after should be the same as data before */
403 assert("dups should be the same", dup == dup2, "dups were different %d\n", dup2);
404 assert("qoss should be the same", qos == qos2, "qoss were different %d\n", qos2);
405 assert("retaineds should be the same", retained == retained2, "retaineds were different %d\n", retained2);
406 assert("msgids should be the same", msgid == msgid2, "msgids were different %d\n", msgid2);
407
408 assert("topics should be the same",
409 checkMQTTStrings(topicString, topicString2), "topics were different %s\n", ""); //topicString2);
410
411 assert("payload lengths should be the same",
412 payloadlen == payloadlen2, "payload lengths were different %d\n", payloadlen2);
413
414 assert("payloads should be the same",
415 memcmp(payload, payload2, payloadlen) == 0, "payloads were different %s\n", "");
416
417/*exit:*/
418 MyLog(LOGA_INFO, "TEST2: test %s. %d tests run, %d failures.",
419 (failures == 0) ? "passed" : "failed", tests, failures);
420 write_test_result();
421 return failures;
422}
423
424
425
426int test3(struct Options options)
427{
428 int i = 0;
429 int rc = 0;
430 unsigned char buf[100];
431 int buflen = sizeof(buf);
432#define TOPIC_COUNT 2
433
434 unsigned char dup = 0;
435 unsigned short msgid = 23;
436 int count = TOPIC_COUNT;
437 MQTTString topicStrings[TOPIC_COUNT] = { MQTTString_initializer, MQTTString_initializer };
438 int req_qoss[TOPIC_COUNT] = {2, 1};
439
440 unsigned char dup2 = 1;
441 unsigned short msgid2 = 2223;
442 int count2 = 0;
443 MQTTString topicStrings2[TOPIC_COUNT] = { MQTTString_initializer, MQTTString_initializer };
444 int req_qoss2[TOPIC_COUNT] = {0, 0};
445
446 fprintf(xml, "<testcase classname=\"test1\" name=\"de/serialization\"");
447 global_start_time = start_clock();
448 failures = 0;
449 MyLog(LOGA_INFO, "Starting test 2 - serialization of subscribe and back");
450
451 topicStrings[0].cstring = "mytopic";
452 topicStrings[1].cstring = "mytopic2";
453 rc = MQTTSerialize_subscribe(buf, buflen, dup, msgid, count, topicStrings, req_qoss);
454 assert("good rc from serialize subscribe", rc > 0, "rc was %d\n", rc);
455
456 rc = MQTTDeserialize_subscribe(&dup2, &msgid2, 2, &count2, topicStrings2, req_qoss2, buf, buflen);
457 assert("good rc from deserialize subscribe", rc == 1, "rc was %d\n", rc);
458
459 /* data after should be the same as data before */
460 assert("dups should be the same", dup == dup2, "dups were different %d\n", dup2);
461 assert("msgids should be the same", msgid == msgid2, "msgids were different %d\n", msgid2);
462
463 assert("count should be the same", count == count2, "counts were different %d\n", count2);
464
465 for (i = 0; i < count2; ++i)
466 {
467 assert("topics should be the same",
468 checkMQTTStrings(topicStrings[i], topicStrings2[i]), "topics were different %s\n", "");
469
470 assert("qoss should be the same", req_qoss[i] == req_qoss2[i], "qoss were different %d\n", req_qoss2[i]);
471 }
472
473/*exit:*/
474 MyLog(LOGA_INFO, "TEST3: test %s. %d tests run, %d failures.",
475 (failures == 0) ? "passed" : "failed", tests, failures);
476 write_test_result();
477 return failures;
478}
479
480
481int test4(struct Options options)
482{
483 int i = 0;
484 int rc = 0;
485 unsigned char buf[100];
486 int buflen = sizeof(buf);
487#define TOPIC_COUNT 2
488
489 int msgid = 23;
490 int count = TOPIC_COUNT;
491 int granted_qoss[TOPIC_COUNT] = {2, 1};
492
493 unsigned short msgid2 = 2223;
494 int count2 = 0;
495 int granted_qoss2[TOPIC_COUNT] = {0, 0};
496
497 fprintf(xml, "<testcase classname=\"test1\" name=\"de/serialization\"");
498 global_start_time = start_clock();
499 failures = 0;
500 MyLog(LOGA_INFO, "Starting test 4 - serialization of suback and back");
501
502 rc = MQTTSerialize_suback(buf, buflen, msgid, count, granted_qoss);
503 assert("good rc from serialize suback", rc > 0, "rc was %d\n", rc);
504
505 rc = MQTTDeserialize_suback(&msgid2, 2, &count2, granted_qoss2, buf, buflen);
506 assert("good rc from deserialize suback", rc == 1, "rc was %d\n", rc);
507
508 /* data after should be the same as data before */
509 assert("msgids should be the same", msgid == msgid2, "msgids were different %d\n", msgid2);
510
511 assert("count should be the same", count == count2, "counts were different %d\n", count2);
512
513 for (i = 0; i < count2; ++i)
514 assert("qoss should be the same", granted_qoss[i] == granted_qoss2[i], "qoss were different %d\n", granted_qoss2[i]);
515
516/* exit: */
517 MyLog(LOGA_INFO, "TEST4: test %s. %d tests run, %d failures.",
518 (failures == 0) ? "passed" : "failed", tests, failures);
519 write_test_result();
520 return failures;
521}
522
523
524int test5(struct Options options)
525{
526 int i = 0;
527 int rc = 0;
528 unsigned char buf[100];
529 int buflen = sizeof(buf);
530#define TOPIC_COUNT 2
531
532 unsigned char dup = 0;
533 unsigned short msgid = 23;
534 int count = TOPIC_COUNT;
535 MQTTString topicStrings[TOPIC_COUNT] = { MQTTString_initializer, MQTTString_initializer };
536
537 unsigned char dup2 = 1;
538 unsigned short msgid2 = 2223;
539 int count2 = 0;
540 MQTTString topicStrings2[TOPIC_COUNT] = { MQTTString_initializer, MQTTString_initializer };
541
542 fprintf(xml, "<testcase classname=\"test1\" name=\"de/serialization\"");
543 global_start_time = start_clock();
544 failures = 0;
545 MyLog(LOGA_INFO, "Starting test 2 - serialization of unsubscribe and back");
546
547 topicStrings[0].cstring = "mytopic";
548 topicStrings[1].cstring = "mytopic2";
549 rc = MQTTSerialize_unsubscribe(buf, buflen, dup, msgid, count, topicStrings);
550 assert("good rc from serialize unsubscribe", rc > 0, "rc was %d\n", rc);
551
552 rc = MQTTDeserialize_unsubscribe(&dup2, &msgid2, 2, &count2, topicStrings2, buf, buflen);
553 assert("good rc from deserialize unsubscribe", rc == 1, "rc was %d\n", rc);
554
555 /* data after should be the same as data before */
556 assert("dups should be the same", dup == dup2, "dups were different %d\n", dup2);
557 assert("msgids should be the same", msgid == msgid2, "msgids were different %d\n", msgid2);
558
559 assert("count should be the same", count == count2, "counts were different %d\n", count2);
560
561 for (i = 0; i < count2; ++i)
562 assert("topics should be the same",
563 checkMQTTStrings(topicStrings[i], topicStrings2[i]), "topics were different %s\n", "");
564
565/* exit: */
566 MyLog(LOGA_INFO, "TEST5: test %s. %d tests run, %d failures.",
567 (failures == 0) ? "passed" : "failed", tests, failures);
568 write_test_result();
569 return failures;
570}
571
572
573int test6(struct Options options)
574{
575 int rc = 0;
576 unsigned char buf[100];
577 int buflen = sizeof(buf);
578
579 unsigned char sessionPresent = 1;
580 unsigned char connack_rc = 77;
581
582 unsigned char sessionPresent2 = 0;
583 unsigned char connack_rc2 = 0;
584
585 fprintf(xml, "<testcase classname=\"test1\" name=\"de/serialization\"");
586 global_start_time = start_clock();
587 failures = 0;
588 MyLog(LOGA_INFO, "Starting test 2 - serialization of connack and back");
589
590 rc = MQTTSerialize_connack(buf, buflen, connack_rc, sessionPresent);
591 assert("good rc from serialize connack", rc > 0, "rc was %d\n", rc);
592
593 rc = MQTTDeserialize_connack(&sessionPresent2, &connack_rc2, buf, buflen);
594 assert("good rc from deserialize connack", rc == 1, "rc was %d\n", rc);
595
596 /* data after should be the same as data before */
597 assert("connack rcs should be the same", connack_rc == connack_rc2, "connack rcs were different %d\n", connack_rc2);
598 assert("session present flags should be the same", sessionPresent == sessionPresent2,
599 "session present flags were different %d\n", sessionPresent2);
600
601/* exit: */
602 MyLog(LOGA_INFO, "TEST6: test %s. %d tests run, %d failures.",
603 (failures == 0) ? "passed" : "failed", tests, failures);
604 write_test_result();
605 return failures;
606}
607
608
609int main(int argc, char** argv)
610{
611 int rc = 0;
612 int (*tests[])() = {NULL, test1, test2, test3, test4, test5, test6};
613
614 xml = fopen("TEST-test1.xml", "w");
615 fprintf(xml, "<testsuite name=\"test1\" tests=\"%d\">\n", (int)(ARRAY_SIZE(tests) - 1));
616
617 getopts(argc, argv);
618
619 if (options.test_no == 0)
620 { /* run all the tests */
621 for (options.test_no = 1; options.test_no < ARRAY_SIZE(tests); ++options.test_no)
622 rc += tests[options.test_no](options); /* return number of failures. 0 = test succeeded */
623 }
624 else
625 rc = tests[options.test_no](options); /* run just the selected test */
626
627 if (rc == 0)
628 MyLog(LOGA_INFO, "verdict pass");
629 else
630 MyLog(LOGA_INFO, "verdict fail");
631
632 fprintf(xml, "</testsuite>\n");
633 fclose(xml);
634 return rc;
635}
diff --git a/aws_mqtt_embedded_client_lib/Makefile b/aws_mqtt_embedded_client_lib/Makefile
new file mode 100644
index 0000000..da9b832
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/Makefile
@@ -0,0 +1,219 @@
1#*******************************************************************************
2# Copyright (c) 2009, 2014 IBM Corp.
3#
4# All rights reserved. This program and the accompanying materials
5# are made available under the terms of the Eclipse Public License v1.0
6# and Eclipse Distribution License v1.0 which accompany this distribution.
7#
8# The Eclipse Public License is available at
9# http://www.eclipse.org/legal/epl-v10.html
10# and the Eclipse Distribution License is available at
11# http://www.eclipse.org/org/documents/edl-v10.php.
12#
13# Contributors:
14# Xiang Rong - 442039 Add makefile to Embedded C client
15#*******************************************************************************/
16
17# Note: on OS X you should install XCode and the associated command-line tools
18
19SHELL = /bin/sh
20.PHONY: clean, mkdir, install, uninstall, html
21
22# assume this is normally run in the main Paho directory
23ifndef srcdir
24 srcdir = MQTTPacket/src
25endif
26
27ifndef blddir
28 blddir = build/output
29endif
30
31ifndef prefix
32 prefix = /usr/local
33endif
34
35ifndef exec_prefix
36 exec_prefix = ${prefix}
37endif
38
39bindir = $(exec_prefix)/bin
40includedir = $(prefix)/include
41libdir = $(exec_prefix)/lib
42
43SOURCE_FILES_C = $(srcdir)/*.c
44
45HEADERS = $(srcdir)/*.h
46
47
48SAMPLE_FILES_C = pub0sub1 qos0pub
49SYNC_SAMPLES = ${addprefix ${blddir}/samples/,${SAMPLE_FILES_C}}
50
51
52TEST_FILES_C = test1
53SYNC_TESTS = ${addprefix ${blddir}/test/,${TEST_FILES_C}}
54
55
56# The names of libraries to be built
57MQTT_EMBED_LIB_C = paho-embed-mqtt3c
58
59
60# determine current platform
61ifeq ($(OS),Windows_NT)
62 OSTYPE = $(OS)
63else
64 OSTYPE = $(shell uname -s)
65 MACHINETYPE = $(shell uname -m)
66endif
67
68ifeq ($(OSTYPE),Linux)
69
70CC ?= gcc
71
72ifndef INSTALL
73INSTALL = install
74endif
75INSTALL_PROGRAM = $(INSTALL)
76INSTALL_DATA = $(INSTALL) -m 644
77
78MAJOR_VERSION = 1
79MINOR_VERSION = 0
80VERSION = ${MAJOR_VERSION}.${MINOR_VERSION}
81
82EMBED_MQTTLIB_C_TARGET = ${blddir}/lib${MQTT_EMBED_LIB_C}.so.${VERSION}
83
84
85CCFLAGS_SO = -g -fPIC -Os -Wall -fvisibility=hidden -DLINUX_SO
86FLAGS_EXE = -I ${srcdir} -L ${blddir}
87
88LDFLAGS_C = -shared -Wl,-soname,lib$(MQTT_EMBED_LIB_C).so.${MAJOR_VERSION}
89
90all: build
91
92build: | mkdir ${EMBED_MQTTLIB_C_TARGET} ${SYNC_SAMPLES} ${SYNC_TESTS}
93
94clean:
95 rm -rf ${blddir}/*
96
97mkdir:
98 -mkdir -p ${blddir}/samples
99 -mkdir -p ${blddir}/test
100
101${SYNC_TESTS}: ${blddir}/test/%: ${srcdir}/../test/%.c
102 ${CC} -g -o ${blddir}/test/${basename ${+F}} $< -l${MQTT_EMBED_LIB_C} ${FLAGS_EXE}
103
104
105${SYNC_SAMPLES}: ${blddir}/samples/%: ${srcdir}/../samples/%.c
106 ${CC} -o ${blddir}/samples/${basename ${+F}} $< -l${MQTT_EMBED_LIB_C} ${FLAGS_EXE}
107
108
109
110${EMBED_MQTTLIB_C_TARGET}: ${SOURCE_FILES_C} ${HEADERS_C}
111 ${CC} ${CCFLAGS_SO} -o $@ ${SOURCE_FILES_C} ${LDFLAGS_C}
112 -ln -s lib$(MQTT_EMBED_LIB_C).so.${VERSION} ${blddir}/lib$(MQTT_EMBED_LIB_C).so.${MAJOR_VERSION}
113 -ln -s lib$(MQTT_EMBED_LIB_C).so.${MAJOR_VERSION} ${blddir}/lib$(MQTT_EMBED_LIB_C).so
114
115
116strip_options:
117 $(eval INSTALL_OPTS := -s)
118
119install-strip: build strip_options install
120
121install: build
122 $(INSTALL_DATA) ${INSTALL_OPTS} ${EMBED_MQTTLIB_C_TARGET} $(DESTDIR)${libdir}
123
124
125 /sbin/ldconfig $(DESTDIR)${libdir}
126 ln -s lib$(MQTT_EMBED_LIB_C).so.${MAJOR_VERSION} $(DESTDIR)${libdir}/lib$(MQTT_EMBED_LIB_C).so
127
128
129uninstall:
130 rm $(DESTDIR)${libdir}/lib$(MQTT_EMBED_LIB_C).so.${VERSION}
131
132 /sbin/ldconfig $(DESTDIR)${libdir}
133 rm $(DESTDIR)${libdir}/lib$(MQTT_EMBED_LIB_C).so
134
135
136html:
137
138ARDUINO_LIB_FILES = MQTTClient/src/*.h MQTTClient/src/arduino/*.h $(srcdir)/*
139ARDUINO_SAMPLES = MQTTClient/samples/arduino/*
140LEGAL_FILES = edl-v10 epl-v10 notice.html about.html CONTRIBUTING.md README.md
141
142arduino: mkdir
143 -mkdir -p ${blddir}/arduino/MQTTClient/examples
144 cp $(ARDUINO_LIB_FILES) ${blddir}/arduino/MQTTClient
145 cp $(LEGAL_FILES) ${blddir}/arduino/MQTTClient
146 cp -R $(ARDUINO_SAMPLES) ${blddir}/arduino/MQTTClient/examples
147 cd ${blddir}/arduino && zip -r arduino MQTTClient
148
149endif
150
151
152
153ifeq ($(OSTYPE),Darwin)
154
155CC ?= gcc
156
157ifndef INSTALL
158INSTALL = install
159endif
160INSTALL_PROGRAM = $(INSTALL)
161INSTALL_DATA = $(INSTALL) -m 644
162
163MAJOR_VERSION = 1
164MINOR_VERSION = 0
165VERSION = ${MAJOR_VERSION}.${MINOR_VERSION}
166
167EMBED_MQTTLIB_C_TARGET = ${blddir}/lib${MQTT_EMBED_LIB_C}.so.${VERSION}
168
169
170CCFLAGS_SO = -g -fPIC -Os -Wall -fvisibility=hidden -Wno-deprecated-declarations -DUSE_NAMED_SEMAPHORES
171FLAGS_EXE = -I ${srcdir} -L ${blddir}
172
173LDFLAGS_C = -shared -Wl,-install_name,lib$(MQTT_EMBED_LIB_C).so.${MAJOR_VERSION}
174
175all: build
176
177build: | mkdir ${EMBED_MQTTLIB_C_TARGET} ${SYNC_SAMPLES} ${SYNC_TESTS}
178
179clean:
180 rm -rf ${blddir}/*
181
182mkdir:
183 -mkdir -p ${blddir}/samples
184 -mkdir -p ${blddir}/test
185
186${SYNC_TESTS}: ${blddir}/test/%: ${srcdir}/../test/%.c
187 ${CC} -g -o ${blddir}/test/${basename ${+F}} $< -l${MQTT_EMBED_LIB_C} ${FLAGS_EXE}
188
189${SYNC_SAMPLES}: ${blddir}/samples/%: ${srcdir}/../samples/%.c
190 ${CC} -o ${blddir}/samples/${basename ${+F}} $< ${FLAGS_EXE} -l${MQTT_EMBED_LIB_C}
191
192${EMBED_MQTTLIB_C_TARGET}: ${SOURCE_FILES_C} ${HEADERS_C}
193 ${CC} ${CCFLAGS_SO} -o $@ ${SOURCE_FILES_C} ${LDFLAGS_C}
194 -ln -s lib$(MQTT_EMBED_LIB_C).so.${VERSION} ${blddir}/lib$(MQTT_EMBED_LIB_C).so.${MAJOR_VERSION}
195 -ln -s lib$(MQTT_EMBED_LIB_C).so.${MAJOR_VERSION} ${blddir}/lib$(MQTT_EMBED_LIB_C).so
196
197
198strip_options:
199 $(eval INSTALL_OPTS := -s)
200
201install-strip: build strip_options install
202
203install: build
204 $(INSTALL_DATA) ${INSTALL_OPTS} ${EMBED_MQTTLIB_C_TARGET} $(DESTDIR)${libdir}
205
206 /sbin/ldconfig $(DESTDIR)${libdir}
207 ln -s lib$(MQTT_EMBED_LIB_C).so.${MAJOR_VERSION} $(DESTDIR)${libdir}/lib$(MQTT_EMBED_LIB_C).so
208
209
210uninstall:
211 rm $(DESTDIR)${libdir}/lib$(MQTT_EMBED_LIB_C).so.${VERSION}
212 /sbin/ldconfig $(DESTDIR)${libdir}
213 rm $(DESTDIR)${libdir}/lib$(MQTT_EMBED_LIB_C).so
214
215
216html:
217
218
219endif
diff --git a/aws_mqtt_embedded_client_lib/README.md b/aws_mqtt_embedded_client_lib/README.md
new file mode 100644
index 0000000..b670b78
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/README.md
@@ -0,0 +1,37 @@
1# Eclipse Paho MQTT C/C++ client for Embedded platforms
2
3This repository contains the source code for the [Eclipse Paho](http://eclipse.org/paho) MQTT C/C++ client library for Embedded platorms.
4
5It is dual licensed under the EPL and EDL (see about.html and notice.html for more details). You can choose which of these licenses you want to use the code under. The EDL allows you to embed the code into your application, and distribute your application in binary or source form without contributing any of your code, or any changes you make back to Paho. See the EDL for the exact conditions.
6
7The MQTTPacket directory contains the lowest level C library with the smallest requirements. This supplies simple serialization
8and deserialization routines. It is mainly up to you to write and read to and from the network.
9
10The MQTTClient directory contains the next level C++ library. This still avoids most networking code so that you can plugin the
11network of your choice.
12
13## Build requirements / compilation
14
15There are helper scripts (build...) in various directories. The client library is a set of building blocks which you pick and choose from, so that the smallest MQTT application can be built.
16
17## Usage and API
18
19See the samples directory for examples of intended use.
20
21
22## Runtime tracing
23
24As yet, there is no tracing. For the smallest client, should we have tracing?
25
26
27## Reporting bugs
28
29Please report bugs under the "MQTT-Embedded-C" Component in [Eclipse Bugzilla](http://bugs.eclipse.org/bugs/) for the Paho Technology project.
30
31## More information
32
33Discussion of the Paho clients takes place on the [Eclipse paho-dev mailing list](https://dev.eclipse.org/mailman/listinfo/paho-dev).
34
35General questions about the MQTT protocol are discussed in the [MQTT Google Group](https://groups.google.com/forum/?hl=en-US&fromgroups#!forum/mqtt).
36
37There is much more information available via the [MQTT community site](http://mqtt.org).
diff --git a/aws_mqtt_embedded_client_lib/about.html b/aws_mqtt_embedded_client_lib/about.html
new file mode 100644
index 0000000..6555a44
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/about.html
@@ -0,0 +1,28 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml"><head>
3<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4<title>About</title>
5</head>
6<body lang="EN-US">
7<h2>About This Content</h2>
8
9<p><em>December 9, 2013</em></p>
10<h3>License</h3>
11
12<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
13indicated below, the Content is provided to you under the terms and conditions of the
14Eclipse Public License Version 1.0 ("EPL") and Eclipse Distribution License Version 1.0 ("EDL").
15A copy of the EPL is available at
16<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
17and a copy of the EDL is available at
18<a href="http://www.eclipse.org/org/documents/edl-v10.php">http://www.eclipse.org/org/documents/edl-v10.php</a>.
19For purposes of the EPL, "Program" will mean the Content.</p>
20
21<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
22being redistributed by another party ("Redistributor") and different terms and conditions may
23apply to your use of any object code in the Content. Check the Redistributor's license that was
24provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
25indicated below, the terms and conditions of the EPL still apply to any source code in the Content
26and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
27
28</body></html>
diff --git a/aws_mqtt_embedded_client_lib/edl-v10 b/aws_mqtt_embedded_client_lib/edl-v10
new file mode 100644
index 0000000..cf989f1
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/edl-v10
@@ -0,0 +1,15 @@
1
2Eclipse Distribution License - v 1.0
3
4Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
5
6All rights reserved.
7
8Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
9
10 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
11 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
12 Neither the name of the Eclipse Foundation, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
13
14THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15
diff --git a/aws_mqtt_embedded_client_lib/epl-v10 b/aws_mqtt_embedded_client_lib/epl-v10
new file mode 100644
index 0000000..79e486c
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/epl-v10
@@ -0,0 +1,70 @@
1Eclipse Public License - v 1.0
2
3THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
4
51. DEFINITIONS
6
7"Contribution" means:
8
9a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
10b) in the case of each subsequent Contributor:
11i) changes to the Program, and
12ii) additions to the Program;
13where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
14"Contributor" means any person or entity that distributes the Program.
15
16"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
17
18"Program" means the Contributions distributed in accordance with this Agreement.
19
20"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
21
222. GRANT OF RIGHTS
23
24a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
25b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
26c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
27d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
283. REQUIREMENTS
29
30A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
31
32a) it complies with the terms and conditions of this Agreement; and
33b) its license agreement:
34i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
35ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
36iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
37iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
38When the Program is made available in source code form:
39
40a) it must be made available under this Agreement; and
41b) a copy of this Agreement must be included with each copy of the Program.
42Contributors may not remove or alter any copyright notices contained within the Program.
43
44Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
45
464. COMMERCIAL DISTRIBUTION
47
48Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
49
50For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
51
525. NO WARRANTY
53
54EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
55
566. DISCLAIMER OF LIABILITY
57
58EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
59
607. GENERAL
61
62If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
63
64If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
65
66All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
67
68Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
69
70This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
diff --git a/aws_mqtt_embedded_client_lib/notice.html b/aws_mqtt_embedded_client_lib/notice.html
new file mode 100644
index 0000000..f19c483
--- /dev/null
+++ b/aws_mqtt_embedded_client_lib/notice.html
@@ -0,0 +1,108 @@
1<?xml version="1.0" encoding="ISO-8859-1" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
6<title>Eclipse Foundation Software User Agreement</title>
7</head>
8
9<body lang="EN-US">
10<h2>Eclipse Foundation Software User Agreement</h2>
11<p>February 1, 2011</p>
12
13<h3>Usage Of Content</h3>
14
15<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
16 (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
17 CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
18 OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
19 NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
20 CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
21
22<h3>Applicable Licenses</h3>
23
24<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
25 (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
26 For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
27
28<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
29 repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
30
31<ul>
32 <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
33 <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
34 <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
35 and/or Fragments associated with that Feature.</li>
36 <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
37</ul>
38
39<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
40Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
41including, but not limited to the following locations:</p>
42
43<ul>
44 <li>The top-level (root) directory</li>
45 <li>Plug-in and Fragment directories</li>
46 <li>Inside Plug-ins and Fragments packaged as JARs</li>
47 <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
48 <li>Feature directories</li>
49</ul>
50
51<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
52installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
53inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
54Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
55that directory.</p>
56
57<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
58OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
59
60<ul>
61 <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
62 <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
63 <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
64 <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
65 <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
66 <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
67</ul>
68
69<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
70contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
71
72
73<h3>Use of Provisioning Technology</h3>
74
75<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
76 Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
77 other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
78 install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
79 href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
80 (&quot;Specification&quot;).</p>
81
82<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
83 applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
84 in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
85 Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
86
87<ol>
88 <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
89 on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
90 product.</li>
91 <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
92 accessed and copied to the Target Machine.</li>
93 <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
94 Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
95 Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
96 the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
97 indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
98</ol>
99
100<h3>Cryptography</h3>
101
102<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
103 another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
104 possession, or use, and re-export of encryption software, to see if this is permitted.</p>
105
106<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
107</body>
108</html>
diff --git a/docs/html/MQTTSubPub.html b/docs/html/MQTTSubPub.html
new file mode 100644
index 0000000..240a726
--- /dev/null
+++ b/docs/html/MQTTSubPub.html
@@ -0,0 +1,79 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: MQTT Publish and Subscribe</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42</div>
43<div class="header">
44 <div class="headertitle">
45<h1>MQTT Publish and Subscribe </h1> </div>
46</div>
47<div class="contents">
48<p>AWS IoT supports MQTT protocol </p>
49<h2><a class="anchor" id="MQTTSample"></a>
50Getting started with a sample?</h2>
51<p>The SDK comes with a simple pub sub sample that publishes and subscribes on the same topic </p>
52<h3><a class="anchor" id="MQTTPrerequisites"></a>
53What are the prerequisites ?</h3>
54<p>Creation of the certs and attaching the appropriate policies </p>
55<h2><a class="anchor" id="MQTTApi"></a>
56What are the files that are needed for using MQTT Pub Sub</h2>
57<h3><a class="anchor" id="MQTTmainfile"></a>
58interface files</h3>
59<p><a class="el" href="aws__iot__shadow__interface_8h.html" title="Interface for thing shadow.">aws_iot_shadow_interface.h</a> </p>
60</div>
61<!--- window showing the filter options -->
62<div id="MSearchSelectWindow"
63 onmouseover="return searchBox.OnSearchSelectShow()"
64 onmouseout="return searchBox.OnSearchSelectHide()"
65 onkeydown="return searchBox.OnSearchSelectKey(event)">
66<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
67
68<!-- iframe showing the search results (closed by default) -->
69<div id="MSearchResultsWindow">
70<iframe src="" frameborder="0"
71 name="MSearchResults" id="MSearchResults">
72</iframe>
73</div>
74
75<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
76<a href="http://www.doxygen.org/index.html">
77<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
78</body>
79</html>
diff --git a/docs/html/annotated.html b/docs/html/annotated.html
new file mode 100644
index 0000000..4c33ca1
--- /dev/null
+++ b/docs/html/annotated.html
@@ -0,0 +1,93 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: Data Structures</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="headertitle">
52<h1>Data Structures</h1> </div>
53</div>
54<div class="contents">
55Here are the data structures with brief descriptions:<table>
56 <tr><td class="indexkey"><a class="el" href="structjsmn__parser.html">jsmn_parser</a></td><td class="indexvalue"></td></tr>
57 <tr><td class="indexkey"><a class="el" href="structjsmntok__t.html">jsmntok_t</a></td><td class="indexvalue"></td></tr>
58 <tr><td class="indexkey"><a class="el" href="structjsonStruct.html">jsonStruct</a></td><td class="indexvalue"></td></tr>
59 <tr><td class="indexkey"><a class="el" href="structJsonTokenTable__t.html">JsonTokenTable_t</a></td><td class="indexvalue"></td></tr>
60 <tr><td class="indexkey"><a class="el" href="structMQTTCallbackParams.html">MQTTCallbackParams</a></td><td class="indexvalue">MQTT Callback Function Parameters </td></tr>
61 <tr><td class="indexkey"><a class="el" href="structMQTTClient__t.html">MQTTClient_t</a></td><td class="indexvalue">MQTT Client Type Definition </td></tr>
62 <tr><td class="indexkey"><a class="el" href="structMQTTConnectParams.html">MQTTConnectParams</a></td><td class="indexvalue">MQTT Connection Parameters </td></tr>
63 <tr><td class="indexkey"><a class="el" href="structMQTTMessageParams.html">MQTTMessageParams</a></td><td class="indexvalue">MQTT Message Parameters </td></tr>
64 <tr><td class="indexkey"><a class="el" href="structMQTTPublishParams.html">MQTTPublishParams</a></td><td class="indexvalue">MQTT Publish Parameters </td></tr>
65 <tr><td class="indexkey"><a class="el" href="structMQTTSubscribeParams.html">MQTTSubscribeParams</a></td><td class="indexvalue">MQTT Subscription Parameters </td></tr>
66 <tr><td class="indexkey"><a class="el" href="structMQTTwillOptions.html">MQTTwillOptions</a></td><td class="indexvalue">Last Will and Testament Definition </td></tr>
67 <tr><td class="indexkey"><a class="el" href="structNetwork.html">Network</a></td><td class="indexvalue"><a class="el" href="structNetwork.html" title="Network Structure.">Network</a> Structure </td></tr>
68 <tr><td class="indexkey"><a class="el" href="structShadowParameters__t.html">ShadowParameters_t</a></td><td class="indexvalue">Shadow Connect parameters </td></tr>
69 <tr><td class="indexkey"><a class="el" href="structSubscriptionRecord__t.html">SubscriptionRecord_t</a></td><td class="indexvalue"></td></tr>
70 <tr><td class="indexkey"><a class="el" href="structTimer.html">Timer</a></td><td class="indexvalue"></td></tr>
71 <tr><td class="indexkey"><a class="el" href="structTLSConnectParams.html">TLSConnectParams</a></td><td class="indexvalue">TLS Connection Parameters </td></tr>
72 <tr><td class="indexkey"><a class="el" href="structToBeReceivedAckRecord__t.html">ToBeReceivedAckRecord_t</a></td><td class="indexvalue"></td></tr>
73</table>
74</div>
75<!--- window showing the filter options -->
76<div id="MSearchSelectWindow"
77 onmouseover="return searchBox.OnSearchSelectShow()"
78 onmouseout="return searchBox.OnSearchSelectHide()"
79 onkeydown="return searchBox.OnSearchSelectKey(event)">
80<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
81
82<!-- iframe showing the search results (closed by default) -->
83<div id="MSearchResultsWindow">
84<iframe src="" frameborder="0"
85 name="MSearchResults" id="MSearchResults">
86</iframe>
87</div>
88
89<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
90<a href="http://www.doxygen.org/index.html">
91<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
92</body>
93</html>
diff --git a/docs/html/aws__iot__config_8h.html b/docs/html/aws__iot__config_8h.html
new file mode 100644
index 0000000..07fcc71
--- /dev/null
+++ b/docs/html/aws__iot__config_8h.html
@@ -0,0 +1,142 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: aws_iot_config.h File Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48</div>
49<div class="header">
50 <div class="summary">
51<a href="#define-members">Defines</a> </div>
52 <div class="headertitle">
53<h1>aws_iot_config.h File Reference</h1> </div>
54</div>
55<div class="contents">
56
57<p>AWS IoT specific configuration file.
58<a href="#_details">More...</a></p>
59<!-- startSectionHeader --><div class="dynheader">
60This graph shows which files directly or indirectly include this file:<!-- endSectionHeader --></div>
61<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
62<div class="center"><img src="aws__iot__config_8h__dep__incl.png" border="0" usemap="#aws__iot__config_8hdep" alt=""/></div>
63<map name="aws__iot__config_8hdep" id="aws__iot__config_8hdep">
64</map>
65<!-- endSectionContent --></div>
66
67<p><a href="aws__iot__config_8h_source.html">Go to the source code of this file.</a></p>
68<table class="memberdecls">
69<tr><td colspan="2"><h2><a name="define-members"></a>
70Defines</h2></td></tr>
71<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2e4c4f825443b5ae37e5a34e309cec72"></a><!-- doxytag: member="aws_iot_config.h::AWS_IOT_MQTT_HOST" ref="a2e4c4f825443b5ae37e5a34e309cec72" args="" -->
72#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__config_8h.html#a2e4c4f825443b5ae37e5a34e309cec72">AWS_IOT_MQTT_HOST</a>&#160;&#160;&#160;&quot;&quot;</td></tr>
73<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Customer specific MQTT HOST. The same will be used for Thing Shadow. <br/></td></tr>
74<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a231b4a87bce653b0d31172501de89fdb"></a><!-- doxytag: member="aws_iot_config.h::AWS_IOT_MQTT_PORT" ref="a231b4a87bce653b0d31172501de89fdb" args="" -->
75#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__config_8h.html#a231b4a87bce653b0d31172501de89fdb">AWS_IOT_MQTT_PORT</a>&#160;&#160;&#160;8883</td></tr>
76<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">default port for MQTT/S <br/></td></tr>
77<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a508462ce0da61fccdc537b70d50778aa"></a><!-- doxytag: member="aws_iot_config.h::AWS_IOT_MQTT_CLIENT_ID" ref="a508462ce0da61fccdc537b70d50778aa" args="" -->
78#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__config_8h.html#a508462ce0da61fccdc537b70d50778aa">AWS_IOT_MQTT_CLIENT_ID</a>&#160;&#160;&#160;&quot;c-sdk-client-id&quot;</td></tr>
79<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">MQTT client ID should be unique for every device. <br/></td></tr>
80<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae5283c01e3f612fd5eb92dbc3e446d38"></a><!-- doxytag: member="aws_iot_config.h::AWS_IOT_MY_THING_NAME" ref="ae5283c01e3f612fd5eb92dbc3e446d38" args="" -->
81#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__config_8h.html#ae5283c01e3f612fd5eb92dbc3e446d38">AWS_IOT_MY_THING_NAME</a>&#160;&#160;&#160;&quot;AWS-IoT-C-SDK&quot;</td></tr>
82<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Thing Name of the Shadow this device is associated with. <br/></td></tr>
83<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aed5cda81bc7b006dd0803809b6474a67"></a><!-- doxytag: member="aws_iot_config.h::AWS_IOT_ROOT_CA_FILENAME" ref="aed5cda81bc7b006dd0803809b6474a67" args="" -->
84#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__config_8h.html#aed5cda81bc7b006dd0803809b6474a67">AWS_IOT_ROOT_CA_FILENAME</a>&#160;&#160;&#160;&quot;aws-iot-rootCA.crt&quot;</td></tr>
85<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Root CA file name. <br/></td></tr>
86<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a990de7fbd70659dafba8a982326e8644"></a><!-- doxytag: member="aws_iot_config.h::AWS_IOT_CERTIFICATE_FILENAME" ref="a990de7fbd70659dafba8a982326e8644" args="" -->
87#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__config_8h.html#a990de7fbd70659dafba8a982326e8644">AWS_IOT_CERTIFICATE_FILENAME</a>&#160;&#160;&#160;&quot;cert.pem&quot;</td></tr>
88<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">device signed certificate file name <br/></td></tr>
89<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa6c6d979225eb348ab07054a8d3db6c6"></a><!-- doxytag: member="aws_iot_config.h::AWS_IOT_PRIVATE_KEY_FILENAME" ref="aa6c6d979225eb348ab07054a8d3db6c6" args="" -->
90#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__config_8h.html#aa6c6d979225eb348ab07054a8d3db6c6">AWS_IOT_PRIVATE_KEY_FILENAME</a>&#160;&#160;&#160;&quot;privkey.pem&quot;</td></tr>
91<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Device private key filename. <br/></td></tr>
92<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a69d749cf372e4b6e0e5f202cdb645fee"></a><!-- doxytag: member="aws_iot_config.h::AWS_IOT_MQTT_TX_BUF_LEN" ref="a69d749cf372e4b6e0e5f202cdb645fee" args="" -->
93#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__config_8h.html#a69d749cf372e4b6e0e5f202cdb645fee">AWS_IOT_MQTT_TX_BUF_LEN</a>&#160;&#160;&#160;512</td></tr>
94<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Any time a message is sent out through the MQTT layer. <br/></td></tr>
95<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a56924a0ab46fb3d02329954fe478d99c"></a><!-- doxytag: member="aws_iot_config.h::AWS_IOT_MQTT_RX_BUF_LEN" ref="a56924a0ab46fb3d02329954fe478d99c" args="" -->
96#define&#160;</td><td class="memItemRight" valign="bottom"><b>AWS_IOT_MQTT_RX_BUF_LEN</b>&#160;&#160;&#160;512</td></tr>
97<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a80d534c1bf73c5c4aacd148cfcbef11b"></a><!-- doxytag: member="aws_iot_config.h::AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS" ref="a80d534c1bf73c5c4aacd148cfcbef11b" args="" -->
98#define&#160;</td><td class="memItemRight" valign="bottom"><b>AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS</b>&#160;&#160;&#160;5</td></tr>
99<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3072be59f0ef2b033cd04a6deb1c5d36"></a><!-- doxytag: member="aws_iot_config.h::SHADOW_MAX_SIZE_OF_RX_BUFFER" ref="a3072be59f0ef2b033cd04a6deb1c5d36" args="" -->
100#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHADOW_MAX_SIZE_OF_RX_BUFFER</b>&#160;&#160;&#160;AWS_IOT_MQTT_RX_BUF_LEN+1</td></tr>
101<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a56207bd83241b9d3725cb1f0fcddc812"></a><!-- doxytag: member="aws_iot_config.h::MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES" ref="a56207bd83241b9d3725cb1f0fcddc812" args="" -->
102#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES</b>&#160;&#160;&#160;80</td></tr>
103<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af2fa43a4252a6063ec0de1f52cf5ef13"></a><!-- doxytag: member="aws_iot_config.h::MAX_SIZE_CLIENT_ID_WITH_SEQUENCE" ref="af2fa43a4252a6063ec0de1f52cf5ef13" args="" -->
104#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_SIZE_CLIENT_ID_WITH_SEQUENCE</b>&#160;&#160;&#160;MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES + 10</td></tr>
105<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a40b29ae9b25643591d53bba30f4a2254"></a><!-- doxytag: member="aws_iot_config.h::MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE" ref="a40b29ae9b25643591d53bba30f4a2254" args="" -->
106#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE</b>&#160;&#160;&#160;MAX_SIZE_CLIENT_ID_WITH_SEQUENCE + 20</td></tr>
107<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ecbb553d6f9d9b1c848ad043494d3ff"></a><!-- doxytag: member="aws_iot_config.h::MAX_SIZE_OF_THINGNAME" ref="a5ecbb553d6f9d9b1c848ad043494d3ff" args="" -->
108#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_SIZE_OF_THINGNAME</b>&#160;&#160;&#160;30</td></tr>
109<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5a4c1a56ea1abf6c52893aa3c9852c7a"></a><!-- doxytag: member="aws_iot_config.h::MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME" ref="a5a4c1a56ea1abf6c52893aa3c9852c7a" args="" -->
110#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME</b>&#160;&#160;&#160;10</td></tr>
111<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a939c2ffb6c613b59b9d90e18f8ace026"></a><!-- doxytag: member="aws_iot_config.h::MAX_THINGNAME_HANDLED_AT_ANY_GIVEN_TIME" ref="a939c2ffb6c613b59b9d90e18f8ace026" args="" -->
112#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_THINGNAME_HANDLED_AT_ANY_GIVEN_TIME</b>&#160;&#160;&#160;10</td></tr>
113<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad68f57bee9eb5d5e704e02766fb73f9a"></a><!-- doxytag: member="aws_iot_config.h::MAX_JSON_TOKEN_EXPECTED" ref="ad68f57bee9eb5d5e704e02766fb73f9a" args="" -->
114#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_JSON_TOKEN_EXPECTED</b>&#160;&#160;&#160;120</td></tr>
115<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7c8510e5cd4b15ebea2fc3268cd5bb4a"></a><!-- doxytag: member="aws_iot_config.h::MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME" ref="a7c8510e5cd4b15ebea2fc3268cd5bb4a" args="" -->
116#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME</b>&#160;&#160;&#160;60</td></tr>
117<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a826855d821708a27c9480a12528a16ab"></a><!-- doxytag: member="aws_iot_config.h::MAX_SIZE_OF_THING_NAME" ref="a826855d821708a27c9480a12528a16ab" args="" -->
118#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_SIZE_OF_THING_NAME</b>&#160;&#160;&#160;20</td></tr>
119<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa6da50cf5e41405ab4367a3a987e576a"></a><!-- doxytag: member="aws_iot_config.h::MAX_SHADOW_TOPIC_LENGTH_BYTES" ref="aa6da50cf5e41405ab4367a3a987e576a" args="" -->
120#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_SHADOW_TOPIC_LENGTH_BYTES</b>&#160;&#160;&#160;MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME + MAX_SIZE_OF_THING_NAME</td></tr>
121</table>
122<hr/><a name="_details"></a><h2>Detailed Description</h2>
123</div>
124<!--- window showing the filter options -->
125<div id="MSearchSelectWindow"
126 onmouseover="return searchBox.OnSearchSelectShow()"
127 onmouseout="return searchBox.OnSearchSelectHide()"
128 onkeydown="return searchBox.OnSearchSelectKey(event)">
129<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
130
131<!-- iframe showing the search results (closed by default) -->
132<div id="MSearchResultsWindow">
133<iframe src="" frameborder="0"
134 name="MSearchResults" id="MSearchResults">
135</iframe>
136</div>
137
138<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
139<a href="http://www.doxygen.org/index.html">
140<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
141</body>
142</html>
diff --git a/docs/html/aws__iot__config_8h__dep__incl.dot b/docs/html/aws__iot__config_8h__dep__incl.dot
new file mode 100644
index 0000000..77fc8b1
--- /dev/null
+++ b/docs/html/aws__iot__config_8h__dep__incl.dot
@@ -0,0 +1,10 @@
1digraph G
2{
3 edge [fontname="FreeSans.ttf",fontsize="10",labelfontname="FreeSans.ttf",labelfontsize="10"];
4 node [fontname="FreeSans.ttf",fontsize="10",shape=record];
5 Node1 [label="aws_iot_config.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
6 Node1 -> Node2 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
7 Node2 [label="shadow_sample.c",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$shadow__sample_8c.html",tooltip="A simple connected window example demonstrating the use of Thing Shadow."];
8 Node1 -> Node3 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
9 Node3 [label="aws_iot_shadow_records.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$aws__iot__shadow__records_8h_source.html"];
10}
diff --git a/docs/html/aws__iot__config_8h__dep__incl.md5 b/docs/html/aws__iot__config_8h__dep__incl.md5
new file mode 100644
index 0000000..507f968
--- /dev/null
+++ b/docs/html/aws__iot__config_8h__dep__incl.md5
@@ -0,0 +1 @@
0cb46a335a868d3d4672ea120af0316a \ No newline at end of file
diff --git a/docs/html/aws__iot__config_8h_source.html b/docs/html/aws__iot__config_8h_source.html
new file mode 100644
index 0000000..8702dcb
--- /dev/null
+++ b/docs/html/aws__iot__config_8h_source.html
@@ -0,0 +1,121 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: aws_iot_config.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>aws_iot_config.h</h1> </div>
51</div>
52<div class="contents">
53<a href="aws__iot__config_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
54<a name="l00002"></a>00002 <span class="comment"> * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span>
55<a name="l00003"></a>00003 <span class="comment"> *</span>
56<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span>
57<a name="l00005"></a>00005 <span class="comment"> * You may not use this file except in compliance with the License.</span>
58<a name="l00006"></a>00006 <span class="comment"> * A copy of the License is located at</span>
59<a name="l00007"></a>00007 <span class="comment"> *</span>
60<a name="l00008"></a>00008 <span class="comment"> * http://aws.amazon.com/apache2.0</span>
61<a name="l00009"></a>00009 <span class="comment"> *</span>
62<a name="l00010"></a>00010 <span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span>
63<a name="l00011"></a>00011 <span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span>
64<a name="l00012"></a>00012 <span class="comment"> * express or implied. See the License for the specific language governing</span>
65<a name="l00013"></a>00013 <span class="comment"> * permissions and limitations under the License.</span>
66<a name="l00014"></a>00014 <span class="comment"> */</span>
67<a name="l00015"></a>00015
68<a name="l00021"></a>00021 <span class="preprocessor">#ifndef SRC_SHADOW_IOT_SHADOW_CONFIG_H_</span>
69<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define SRC_SHADOW_IOT_SHADOW_CONFIG_H_</span>
70<a name="l00023"></a>00023 <span class="preprocessor"></span>
71<a name="l00024"></a>00024 <span class="comment">// Get from console</span>
72<a name="l00025"></a>00025 <span class="comment">// =================================================</span>
73<a name="l00026"></a><a class="code" href="aws__iot__config_8h.html#a2e4c4f825443b5ae37e5a34e309cec72">00026</a> <span class="preprocessor">#define AWS_IOT_MQTT_HOST &quot;&quot; ///&lt; Customer specific MQTT HOST. The same will be used for Thing Shadow</span>
74<a name="l00027"></a><a class="code" href="aws__iot__config_8h.html#a231b4a87bce653b0d31172501de89fdb">00027</a> <span class="preprocessor"></span><span class="preprocessor">#define AWS_IOT_MQTT_PORT 8883 ///&lt; default port for MQTT/S</span>
75<a name="l00028"></a><a class="code" href="aws__iot__config_8h.html#a508462ce0da61fccdc537b70d50778aa">00028</a> <span class="preprocessor"></span><span class="preprocessor">#define AWS_IOT_MQTT_CLIENT_ID &quot;c-sdk-client-id&quot; ///&lt; MQTT client ID should be unique for every device</span>
76<a name="l00029"></a><a class="code" href="aws__iot__config_8h.html#ae5283c01e3f612fd5eb92dbc3e446d38">00029</a> <span class="preprocessor"></span><span class="preprocessor">#define AWS_IOT_MY_THING_NAME &quot;AWS-IoT-C-SDK&quot; ///&lt; Thing Name of the Shadow this device is associated with</span>
77<a name="l00030"></a><a class="code" href="aws__iot__config_8h.html#aed5cda81bc7b006dd0803809b6474a67">00030</a> <span class="preprocessor"></span><span class="preprocessor">#define AWS_IOT_ROOT_CA_FILENAME &quot;aws-iot-rootCA.crt&quot; ///&lt; Root CA file name</span>
78<a name="l00031"></a><a class="code" href="aws__iot__config_8h.html#a990de7fbd70659dafba8a982326e8644">00031</a> <span class="preprocessor"></span><span class="preprocessor">#define AWS_IOT_CERTIFICATE_FILENAME &quot;cert.pem&quot; ///&lt; device signed certificate file name</span>
79<a name="l00032"></a><a class="code" href="aws__iot__config_8h.html#aa6c6d979225eb348ab07054a8d3db6c6">00032</a> <span class="preprocessor"></span><span class="preprocessor">#define AWS_IOT_PRIVATE_KEY_FILENAME &quot;privkey.pem&quot; ///&lt; Device private key filename</span>
80<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="comment">// =================================================</span>
81<a name="l00034"></a>00034
82<a name="l00035"></a>00035 <span class="comment">// MQTT PubSub</span>
83<a name="l00036"></a><a class="code" href="aws__iot__config_8h.html#a69d749cf372e4b6e0e5f202cdb645fee">00036</a> <span class="preprocessor">#define AWS_IOT_MQTT_TX_BUF_LEN 512 ///&lt; Any time a message is sent out through the MQTT layer</span>
84<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define AWS_IOT_MQTT_RX_BUF_LEN 512</span>
85<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS 5</span>
86<a name="l00039"></a>00039 <span class="preprocessor"></span>
87<a name="l00040"></a>00040 <span class="comment">// Thing Shadow specific configs</span>
88<a name="l00041"></a>00041 <span class="preprocessor">#define SHADOW_MAX_SIZE_OF_RX_BUFFER AWS_IOT_MQTT_RX_BUF_LEN+1 </span>
89<a name="l00042"></a>00042 <span class="preprocessor">#define MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES 80 </span>
90<a name="l00043"></a>00043 <span class="preprocessor">#define MAX_SIZE_CLIENT_ID_WITH_SEQUENCE MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES + 10 </span>
91<a name="l00044"></a>00044 <span class="preprocessor">#define MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE MAX_SIZE_CLIENT_ID_WITH_SEQUENCE + 20 </span>
92<a name="l00045"></a>00045 <span class="preprocessor">#define MAX_SIZE_OF_THINGNAME 30</span>
93<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#define MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME 10</span>
94<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define MAX_THINGNAME_HANDLED_AT_ANY_GIVEN_TIME 10</span>
95<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#define MAX_JSON_TOKEN_EXPECTED 120</span>
96<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#define MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME 60</span>
97<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#define MAX_SIZE_OF_THING_NAME 20</span>
98<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#define MAX_SHADOW_TOPIC_LENGTH_BYTES MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME + MAX_SIZE_OF_THING_NAME</span>
99<a name="l00052"></a>00052 <span class="preprocessor"></span>
100<a name="l00053"></a>00053 <span class="preprocessor">#endif </span><span class="comment">/* SRC_SHADOW_IOT_SHADOW_CONFIG_H_ */</span>
101</pre></div></div>
102</div>
103<!--- window showing the filter options -->
104<div id="MSearchSelectWindow"
105 onmouseover="return searchBox.OnSearchSelectShow()"
106 onmouseout="return searchBox.OnSearchSelectHide()"
107 onkeydown="return searchBox.OnSearchSelectKey(event)">
108<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
109
110<!-- iframe showing the search results (closed by default) -->
111<div id="MSearchResultsWindow">
112<iframe src="" frameborder="0"
113 name="MSearchResults" id="MSearchResults">
114</iframe>
115</div>
116
117<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
118<a href="http://www.doxygen.org/index.html">
119<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
120</body>
121</html>
diff --git a/docs/html/aws__iot__error_8h_source.html b/docs/html/aws__iot__error_8h_source.html
new file mode 100644
index 0000000..d65d4de
--- /dev/null
+++ b/docs/html/aws__iot__error_8h_source.html
@@ -0,0 +1,119 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: aws_iot_error.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>aws_iot_error.h</h1> </div>
51</div>
52<div class="contents">
53<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
54<a name="l00002"></a>00002 <span class="comment"> * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span>
55<a name="l00003"></a>00003 <span class="comment"> *</span>
56<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span>
57<a name="l00005"></a>00005 <span class="comment"> * You may not use this file except in compliance with the License.</span>
58<a name="l00006"></a>00006 <span class="comment"> * A copy of the License is located at</span>
59<a name="l00007"></a>00007 <span class="comment"> *</span>
60<a name="l00008"></a>00008 <span class="comment"> * http://aws.amazon.com/apache2.0</span>
61<a name="l00009"></a>00009 <span class="comment"> *</span>
62<a name="l00010"></a>00010 <span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span>
63<a name="l00011"></a>00011 <span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span>
64<a name="l00012"></a>00012 <span class="comment"> * express or implied. See the License for the specific language governing</span>
65<a name="l00013"></a>00013 <span class="comment"> * permissions and limitations under the License.</span>
66<a name="l00014"></a>00014 <span class="comment"> */</span>
67<a name="l00015"></a>00015
68<a name="l00021"></a>00021 <span class="preprocessor">#ifndef AWS_IOT_SDK_SRC_IOT_ERROR_H_</span>
69<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define AWS_IOT_SDK_SRC_IOT_ERROR_H_</span>
70<a name="l00023"></a>00023 <span class="preprocessor"></span>
71<a name="l00024"></a>00024
72<a name="l00030"></a>00030 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
73<a name="l00031"></a>00031 NONE_ERROR = 0,
74<a name="l00032"></a>00032 GENERIC_ERROR = -1,
75<a name="l00033"></a>00033 NULL_VALUE_ERROR = -2,
76<a name="l00034"></a>00034 CONNECTION_ERROR = -3,
77<a name="l00035"></a>00035 SUBSCRIBE_ERROR = -4,
78<a name="l00036"></a>00036 PUBLISH_ERROR = -5,
79<a name="l00037"></a>00037 DISCONNECT_ERROR = -6,
80<a name="l00038"></a>00038 YIELD_ERROR = -7,
81<a name="l00039"></a>00039 TCP_CONNECT_ERROR = -8,
82<a name="l00040"></a>00040 SSL_CONNECT_ERROR = -9,
83<a name="l00041"></a>00041 TCP_SETUP_ERROR =-10,
84<a name="l00042"></a>00042 SSL_CONNECT_TIMEOUT_ERROR = -11,
85<a name="l00043"></a>00043 SSL_WRITE_ERROR = -12,
86<a name="l00044"></a>00044 SSL_INIT_ERROR = -13,
87<a name="l00045"></a>00045 SSL_CERT_ERROR= -14,
88<a name="l00046"></a>00046 UNSUBSCRIBE_ERROR = -15,
89<a name="l00047"></a>00047 JSON_PARSE_ERROR = -16,
90<a name="l00048"></a>00048 WAIT_FOR_PUBLISH = -17,
91<a name="l00049"></a>00049 SSL_WRITE_TIMEOUT_ERROR = -18,
92<a name="l00050"></a>00050 SSL_READ_TIMEOUT_ERROR = -19,
93<a name="l00051"></a>00051 SSL_READ_ERROR = -20,
94<a name="l00052"></a>00052 SHADOW_JSON_BUFFER_TRUNCATED = -21,
95<a name="l00053"></a>00053 SHADOW_JSON_ERROR = -22
96<a name="l00054"></a>00054 }IoT_Error_t;
97<a name="l00055"></a>00055
98<a name="l00056"></a>00056 <span class="preprocessor">#endif </span><span class="comment">/* AWS_IOT_SDK_SRC_IOT_ERROR_H_ */</span>
99</pre></div></div>
100</div>
101<!--- window showing the filter options -->
102<div id="MSearchSelectWindow"
103 onmouseover="return searchBox.OnSearchSelectShow()"
104 onmouseout="return searchBox.OnSearchSelectHide()"
105 onkeydown="return searchBox.OnSearchSelectKey(event)">
106<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
107
108<!-- iframe showing the search results (closed by default) -->
109<div id="MSearchResultsWindow">
110<iframe src="" frameborder="0"
111 name="MSearchResults" id="MSearchResults">
112</iframe>
113</div>
114
115<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
116<a href="http://www.doxygen.org/index.html">
117<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
118</body>
119</html>
diff --git a/docs/html/aws__iot__json__utils_8h_source.html b/docs/html/aws__iot__json__utils_8h_source.html
new file mode 100644
index 0000000..3bea965
--- /dev/null
+++ b/docs/html/aws__iot__json__utils_8h_source.html
@@ -0,0 +1,121 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: aws_iot_json_utils.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>aws_iot_json_utils.h</h1> </div>
51</div>
52<div class="contents">
53<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
54<a name="l00002"></a>00002 <span class="comment"> * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span>
55<a name="l00003"></a>00003 <span class="comment"> *</span>
56<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span>
57<a name="l00005"></a>00005 <span class="comment"> * You may not use this file except in compliance with the License.</span>
58<a name="l00006"></a>00006 <span class="comment"> * A copy of the License is located at</span>
59<a name="l00007"></a>00007 <span class="comment"> *</span>
60<a name="l00008"></a>00008 <span class="comment"> * http://aws.amazon.com/apache2.0</span>
61<a name="l00009"></a>00009 <span class="comment"> *</span>
62<a name="l00010"></a>00010 <span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span>
63<a name="l00011"></a>00011 <span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span>
64<a name="l00012"></a>00012 <span class="comment"> * express or implied. See the License for the specific language governing</span>
65<a name="l00013"></a>00013 <span class="comment"> * permissions and limitations under the License.</span>
66<a name="l00014"></a>00014 <span class="comment"> */</span>
67<a name="l00015"></a>00015
68<a name="l00025"></a>00025 <span class="preprocessor">#ifndef AWS_IOT_SDK_SRC_JSON_UTILS_H_</span>
69<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define AWS_IOT_SDK_SRC_JSON_UTILS_H_</span>
70<a name="l00027"></a>00027 <span class="preprocessor"></span>
71<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;stdbool.h&gt;</span>
72<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
73<a name="l00030"></a>00030
74<a name="l00031"></a>00031 <span class="preprocessor">#include &quot;aws_iot_error.h&quot;</span>
75<a name="l00032"></a>00032 <span class="preprocessor">#include &quot;<a class="code" href="jsmn_8h.html" title="Definition of the JSMN (Jasmine) JSON parser.">jsmn.h</a>&quot;</span>
76<a name="l00033"></a>00033
77<a name="l00034"></a>00034 <span class="comment">// utility functions</span>
78<a name="l00047"></a>00047 <span class="comment"></span>int8_t jsoneq(<span class="keyword">const</span> <span class="keywordtype">char</span> *json, <a class="code" href="structjsmntok__t.html">jsmntok_t</a> *tok, <span class="keyword">const</span> <span class="keywordtype">char</span> *s);
79<a name="l00048"></a>00048
80<a name="l00061"></a>00061 IoT_Error_t parseInteger32Value(int32_t *i, <span class="keyword">const</span> <span class="keywordtype">char</span> *jsonString, <a class="code" href="structjsmntok__t.html">jsmntok_t</a> *token);
81<a name="l00062"></a>00062
82<a name="l00075"></a>00075 IoT_Error_t parseInteger16Value(int16_t *i, <span class="keyword">const</span> <span class="keywordtype">char</span> *jsonString, <a class="code" href="structjsmntok__t.html">jsmntok_t</a> *token);
83<a name="l00076"></a>00076
84<a name="l00089"></a>00089 IoT_Error_t parseInteger8Value(int8_t *i, <span class="keyword">const</span> <span class="keywordtype">char</span> *jsonString, <a class="code" href="structjsmntok__t.html">jsmntok_t</a> *token);
85<a name="l00090"></a>00090
86<a name="l00103"></a>00103 IoT_Error_t parseUnsignedInteger32Value(uint32_t *i, <span class="keyword">const</span> <span class="keywordtype">char</span> *jsonString, <a class="code" href="structjsmntok__t.html">jsmntok_t</a> *token);
87<a name="l00104"></a>00104
88<a name="l00117"></a>00117 IoT_Error_t parseUnsignedInteger16Value(uint16_t *i, <span class="keyword">const</span> <span class="keywordtype">char</span> *jsonString, <a class="code" href="structjsmntok__t.html">jsmntok_t</a> *token);
89<a name="l00118"></a>00118
90<a name="l00131"></a>00131 IoT_Error_t parseUnsignedInteger8Value(uint8_t *i, <span class="keyword">const</span> <span class="keywordtype">char</span> *jsonString, <a class="code" href="structjsmntok__t.html">jsmntok_t</a> *token);
91<a name="l00132"></a>00132
92<a name="l00145"></a>00145 IoT_Error_t parseFloatValue(<span class="keywordtype">float</span> *f, <span class="keyword">const</span> <span class="keywordtype">char</span> *jsonString, <a class="code" href="structjsmntok__t.html">jsmntok_t</a> *token);
93<a name="l00146"></a>00146
94<a name="l00159"></a>00159 IoT_Error_t parseDoubleValue(<span class="keywordtype">double</span> *d, <span class="keyword">const</span> <span class="keywordtype">char</span> *jsonString, <a class="code" href="structjsmntok__t.html">jsmntok_t</a> *token);
95<a name="l00160"></a>00160
96<a name="l00173"></a>00173 IoT_Error_t parseBooleanValue(<span class="keywordtype">bool</span> *b, <span class="keyword">const</span> <span class="keywordtype">char</span> *jsonString, <a class="code" href="structjsmntok__t.html">jsmntok_t</a> *token);
97<a name="l00174"></a>00174
98<a name="l00187"></a>00187 IoT_Error_t parseStringValue(<span class="keywordtype">char</span> *buf, <span class="keyword">const</span> <span class="keywordtype">char</span> *jsonString, <a class="code" href="structjsmntok__t.html">jsmntok_t</a> *token);
99<a name="l00188"></a>00188
100<a name="l00189"></a>00189 <span class="preprocessor">#endif </span><span class="comment">/* AWS_IOT_SDK_SRC_JSON_UTILS_H_ */</span>
101</pre></div></div>
102</div>
103<!--- window showing the filter options -->
104<div id="MSearchSelectWindow"
105 onmouseover="return searchBox.OnSearchSelectShow()"
106 onmouseout="return searchBox.OnSearchSelectHide()"
107 onkeydown="return searchBox.OnSearchSelectKey(event)">
108<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
109
110<!-- iframe showing the search results (closed by default) -->
111<div id="MSearchResultsWindow">
112<iframe src="" frameborder="0"
113 name="MSearchResults" id="MSearchResults">
114</iframe>
115</div>
116
117<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
118<a href="http://www.doxygen.org/index.html">
119<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
120</body>
121</html>
diff --git a/docs/html/aws__iot__log_8h_source.html b/docs/html/aws__iot__log_8h_source.html
new file mode 100644
index 0000000..0d2516c
--- /dev/null
+++ b/docs/html/aws__iot__log_8h_source.html
@@ -0,0 +1,124 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: aws_iot_log.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>aws_iot_log.h</h1> </div>
51</div>
52<div class="contents">
53<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
54<a name="l00013"></a>00013 <span class="preprocessor">#ifndef _IOT_LOG_H</span>
55<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define _IOT_LOG_H</span>
56<a name="l00015"></a>00015 <span class="preprocessor"></span>
57<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
58<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
59<a name="l00018"></a>00018
60<a name="l00024"></a>00024 <span class="preprocessor">#ifdef IOT_DEBUG</span>
61<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define DEBUG(...) \</span>
62<a name="l00026"></a>00026 <span class="preprocessor"> {\</span>
63<a name="l00027"></a>00027 <span class="preprocessor"> printf(&quot;DEBUG: %s L#%d &quot;, __PRETTY_FUNCTION__, __LINE__); \</span>
64<a name="l00028"></a>00028 <span class="preprocessor"> printf(__VA_ARGS__); \</span>
65<a name="l00029"></a>00029 <span class="preprocessor"> printf(&quot;\n&quot;); \</span>
66<a name="l00030"></a>00030 <span class="preprocessor"> }</span>
67<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#else</span>
68<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define DEBUG(...)</span>
69<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
70<a name="l00034"></a>00034 <span class="preprocessor"></span>
71<a name="l00040"></a>00040 <span class="preprocessor">#ifdef IOT_INFO</span>
72<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#define INFO(...) \</span>
73<a name="l00042"></a>00042 <span class="preprocessor"> {\</span>
74<a name="l00043"></a>00043 <span class="preprocessor"> printf(__VA_ARGS__); \</span>
75<a name="l00044"></a>00044 <span class="preprocessor"> printf(&quot;\n&quot;); \</span>
76<a name="l00045"></a>00045 <span class="preprocessor"> }</span>
77<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#else</span>
78<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define INFO(...)</span>
79<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
80<a name="l00049"></a>00049 <span class="preprocessor"></span>
81<a name="l00055"></a>00055 <span class="preprocessor">#ifdef IOT_WARN</span>
82<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="preprocessor">#define WARN(...) \</span>
83<a name="l00057"></a>00057 <span class="preprocessor"> { \</span>
84<a name="l00058"></a>00058 <span class="preprocessor"> printf(&quot;WARN: %s L#%d &quot;, __PRETTY_FUNCTION__, __LINE__); \</span>
85<a name="l00059"></a>00059 <span class="preprocessor"> printf(__VA_ARGS__); \</span>
86<a name="l00060"></a>00060 <span class="preprocessor"> printf(&quot;\n&quot;); \</span>
87<a name="l00061"></a>00061 <span class="preprocessor"> }</span>
88<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#else</span>
89<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#define WARN(...)</span>
90<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
91<a name="l00065"></a>00065 <span class="preprocessor"></span>
92<a name="l00071"></a>00071 <span class="preprocessor">#ifdef IOT_ERROR</span>
93<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor">#define ERROR(...) \</span>
94<a name="l00073"></a>00073 <span class="preprocessor"> { \</span>
95<a name="l00074"></a>00074 <span class="preprocessor"> printf(&quot;ERROR: %s L#%d &quot;, __PRETTY_FUNCTION__, __LINE__); \</span>
96<a name="l00075"></a>00075 <span class="preprocessor"> printf(__VA_ARGS__); \</span>
97<a name="l00076"></a>00076 <span class="preprocessor"> printf(&quot;\n&quot;); \</span>
98<a name="l00077"></a>00077 <span class="preprocessor"> }</span>
99<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">#else</span>
100<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#define ERROR(...)</span>
101<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
102<a name="l00081"></a>00081 <span class="preprocessor"></span>
103<a name="l00082"></a>00082 <span class="preprocessor">#endif // _IOT_LOG_H</span>
104</pre></div></div>
105</div>
106<!--- window showing the filter options -->
107<div id="MSearchSelectWindow"
108 onmouseover="return searchBox.OnSearchSelectShow()"
109 onmouseout="return searchBox.OnSearchSelectHide()"
110 onkeydown="return searchBox.OnSearchSelectKey(event)">
111<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
112
113<!-- iframe showing the search results (closed by default) -->
114<div id="MSearchResultsWindow">
115<iframe src="" frameborder="0"
116 name="MSearchResults" id="MSearchResults">
117</iframe>
118</div>
119
120<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
121<a href="http://www.doxygen.org/index.html">
122<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
123</body>
124</html>
diff --git a/docs/html/aws__iot__mqtt__interface_8h_source.html b/docs/html/aws__iot__mqtt__interface_8h_source.html
new file mode 100644
index 0000000..2a8f5df
--- /dev/null
+++ b/docs/html/aws__iot__mqtt__interface_8h_source.html
@@ -0,0 +1,206 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: aws_iot_mqtt_interface.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>aws_iot_mqtt_interface.h</h1> </div>
51</div>
52<div class="contents">
53<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
54<a name="l00002"></a>00002 <span class="comment"> * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span>
55<a name="l00003"></a>00003 <span class="comment"> *</span>
56<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span>
57<a name="l00005"></a>00005 <span class="comment"> * You may not use this file except in compliance with the License.</span>
58<a name="l00006"></a>00006 <span class="comment"> * A copy of the License is located at</span>
59<a name="l00007"></a>00007 <span class="comment"> *</span>
60<a name="l00008"></a>00008 <span class="comment"> * http://aws.amazon.com/apache2.0</span>
61<a name="l00009"></a>00009 <span class="comment"> *</span>
62<a name="l00010"></a>00010 <span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span>
63<a name="l00011"></a>00011 <span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span>
64<a name="l00012"></a>00012 <span class="comment"> * express or implied. See the License for the specific language governing</span>
65<a name="l00013"></a>00013 <span class="comment"> * permissions and limitations under the License.</span>
66<a name="l00014"></a>00014 <span class="comment"> */</span>
67<a name="l00015"></a>00015
68<a name="l00021"></a>00021 <span class="preprocessor">#ifndef AWS_IOT_SDK_SRC_IOT_MQTT_INTERFACE_H_</span>
69<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define AWS_IOT_SDK_SRC_IOT_MQTT_INTERFACE_H_</span>
70<a name="l00023"></a>00023 <span class="preprocessor"></span>
71<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;stddef.h&quot;</span>
72<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;stdbool.h&quot;</span>
73<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;stdint.h&quot;</span>
74<a name="l00027"></a>00027 <span class="preprocessor">#include &quot;aws_iot_error.h&quot;</span>
75<a name="l00028"></a>00028
76<a name="l00035"></a>00035 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
77<a name="l00036"></a>00036 MQTT_3_1 = 3,
78<a name="l00037"></a>00037 MQTT_3_1_1 = 4
79<a name="l00038"></a>00038 } MQTT_Ver_t;
80<a name="l00039"></a>00039
81<a name="l00047"></a>00047 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
82<a name="l00048"></a>00048 QOS_0,
83<a name="l00049"></a>00049 QOS_1,
84<a name="l00050"></a>00050 QOS_2
85<a name="l00051"></a>00051 } QoSLevel;
86<a name="l00052"></a>00052
87<a name="l00060"></a><a class="code" href="structMQTTwillOptions.html">00060</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
88<a name="l00061"></a><a class="code" href="structMQTTwillOptions.html#aa27c5b47d2f848ac32cd2180d97dd8e3">00061</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structMQTTwillOptions.html#aa27c5b47d2f848ac32cd2180d97dd8e3" title="LWT Topic.">pTopicName</a>;
89<a name="l00062"></a><a class="code" href="structMQTTwillOptions.html#a3113cbbc7701ed62735a7fc0635e8d2f">00062</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structMQTTwillOptions.html#a3113cbbc7701ed62735a7fc0635e8d2f" title="Message to be delivered as LWT.">pMessage</a>;
90<a name="l00063"></a><a class="code" href="structMQTTwillOptions.html#a5a056c3e21c3ba7b7825b601d4eb8ec4">00063</a> <span class="keywordtype">bool</span> <a class="code" href="structMQTTwillOptions.html#a5a056c3e21c3ba7b7825b601d4eb8ec4" title="NOT supported.">isRetained</a>;
91<a name="l00064"></a><a class="code" href="structMQTTwillOptions.html#a6c5ff6dad1a3487cd131bb6eaa990a3f">00064</a> QoSLevel <a class="code" href="structMQTTwillOptions.html#a6c5ff6dad1a3487cd131bb6eaa990a3f" title="QoS of LWT message.">qos</a>;
92<a name="l00065"></a>00065 } <a class="code" href="structMQTTwillOptions.html" title="Last Will and Testament Definition.">MQTTwillOptions</a>;
93<a name="l00066"></a>00066 <span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="structMQTTwillOptions.html" title="Last Will and Testament Definition.">MQTTwillOptions</a> MQTTwillOptionsDefault;
94<a name="l00067"></a>00067
95<a name="l00074"></a>00074 <span class="keyword">typedef</span> void (*iot_disconnect_handler)(void);
96<a name="l00075"></a>00075
97<a name="l00082"></a><a class="code" href="structMQTTConnectParams.html">00082</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
98<a name="l00083"></a><a class="code" href="structMQTTConnectParams.html#afe7a9782130dab062a9b27aabcade48d">00083</a> <span class="keywordtype">char</span> *<a class="code" href="structMQTTConnectParams.html#afe7a9782130dab062a9b27aabcade48d" title="Pointer to a string defining the endpoint for the MQTT service.">pHostURL</a>;
99<a name="l00084"></a><a class="code" href="structMQTTConnectParams.html#a03eed7f477e9f834294d0891d125ad5c">00084</a> uint16_t <a class="code" href="structMQTTConnectParams.html#a03eed7f477e9f834294d0891d125ad5c" title="MQTT service listening port.">port</a>;
100<a name="l00085"></a><a class="code" href="structMQTTConnectParams.html#ac8128e06c4135460050acf220bee7297">00085</a> <span class="keywordtype">char</span> *<a class="code" href="structMQTTConnectParams.html#ac8128e06c4135460050acf220bee7297" title="Pointer to a string defining the Root CA file (full file, not path)">pRootCALocation</a>;
101<a name="l00086"></a><a class="code" href="structMQTTConnectParams.html#a0ff5b27384df86ae50caac0b4bb8a429">00086</a> <span class="keywordtype">char</span> *<a class="code" href="structMQTTConnectParams.html#a0ff5b27384df86ae50caac0b4bb8a429" title="Pointer to a string defining the device identity certificate file (full file, not path)...">pDeviceCertLocation</a>;
102<a name="l00087"></a><a class="code" href="structMQTTConnectParams.html#a99ce9a0fe10c70ef3e445cf7612be919">00087</a> <span class="keywordtype">char</span> *<a class="code" href="structMQTTConnectParams.html#a99ce9a0fe10c70ef3e445cf7612be919" title="Pointer to a string defining the device private key file (full file, not path)">pDevicePrivateKeyLocation</a>;
103<a name="l00088"></a><a class="code" href="structMQTTConnectParams.html#ae089333563f566afdb36caa82e5375bf">00088</a> <span class="keywordtype">char</span> *<a class="code" href="structMQTTConnectParams.html#ae089333563f566afdb36caa82e5375bf" title="Pointer to a string defining the MQTT client ID (this needs to be unique per device across your AWS a...">pClientID</a>;
104<a name="l00089"></a><a class="code" href="structMQTTConnectParams.html#a2efa006d6305a8c6bea31cbbfb20cbfe">00089</a> <span class="keywordtype">char</span> *<a class="code" href="structMQTTConnectParams.html#a2efa006d6305a8c6bea31cbbfb20cbfe" title="Not used in the AWS IoT Service.">pUserName</a>;
105<a name="l00090"></a><a class="code" href="structMQTTConnectParams.html#a09497a2124f8021a70bde9d713350611">00090</a> <span class="keywordtype">char</span> *<a class="code" href="structMQTTConnectParams.html#a09497a2124f8021a70bde9d713350611" title="Not used in the AWS IoT Service.">pPassword</a>;
106<a name="l00091"></a><a class="code" href="structMQTTConnectParams.html#a25577733f870ba683b7f44e2288036a7">00091</a> MQTT_Ver_t <a class="code" href="structMQTTConnectParams.html#a25577733f870ba683b7f44e2288036a7" title="Desired MQTT version used during connection.">MQTTVersion</a>;
107<a name="l00092"></a><a class="code" href="structMQTTConnectParams.html#a8ae47bfc9025dafc49e80605317e7232">00092</a> uint16_t <a class="code" href="structMQTTConnectParams.html#a8ae47bfc9025dafc49e80605317e7232" title="MQTT keep alive interval in seconds. Defines inactivity time allowed before determining the connectio...">KeepAliveInterval_sec</a>;
108<a name="l00093"></a><a class="code" href="structMQTTConnectParams.html#a4ed3fb7b2aad72c7f33b39494c04eee7">00093</a> <span class="keywordtype">bool</span> <a class="code" href="structMQTTConnectParams.html#a4ed3fb7b2aad72c7f33b39494c04eee7" title="MQTT clean session. True = this session is to be treated as clean. Previous server state is cleared a...">isCleansession</a>;
109<a name="l00094"></a><a class="code" href="structMQTTConnectParams.html#ae5bed52bd50304de0d06795fac5502e6">00094</a> <span class="keywordtype">bool</span> <a class="code" href="structMQTTConnectParams.html#ae5bed52bd50304de0d06795fac5502e6" title="Is there a LWT associated with this connection?">isWillMsgPresent</a>;
110<a name="l00095"></a><a class="code" href="structMQTTConnectParams.html#abd5a646508c84aa7445822855969eaf6">00095</a> <a class="code" href="structMQTTwillOptions.html" title="Last Will and Testament Definition.">MQTTwillOptions</a> <a class="code" href="structMQTTConnectParams.html#abd5a646508c84aa7445822855969eaf6" title="MQTT LWT parameters.">will</a>;
111<a name="l00096"></a><a class="code" href="structMQTTConnectParams.html#ac2d24e342b29b7f3ea4777732fd6988a">00096</a> uint32_t <a class="code" href="structMQTTConnectParams.html#ac2d24e342b29b7f3ea4777732fd6988a" title="Timeout for MQTT blocking calls. In milliseconds.">mqttCommandTimeout_ms</a>;
112<a name="l00097"></a><a class="code" href="structMQTTConnectParams.html#aa870d2df978a54f739214ee888c67171">00097</a> uint32_t <a class="code" href="structMQTTConnectParams.html#aa870d2df978a54f739214ee888c67171" title="TLS handshake timeout. In milliseconds.">tlsHandshakeTimeout_ms</a>;
113<a name="l00098"></a><a class="code" href="structMQTTConnectParams.html#a11d7d74c185dabcafa71c938c7a6bdb8">00098</a> <span class="keywordtype">bool</span> <a class="code" href="structMQTTConnectParams.html#a11d7d74c185dabcafa71c938c7a6bdb8" title="Client should perform server certificate hostname validation.">isSSLHostnameVerify</a>;
114<a name="l00099"></a><a class="code" href="structMQTTConnectParams.html#a770dfb57d9cc24f2f7048275d134350b">00099</a> iot_disconnect_handler <a class="code" href="structMQTTConnectParams.html#a770dfb57d9cc24f2f7048275d134350b" title="Callback to be invoked upon connection loss.">disconnectHandler</a>;
115<a name="l00100"></a>00100 } <a class="code" href="structMQTTConnectParams.html" title="MQTT Connection Parameters.">MQTTConnectParams</a>;
116<a name="l00101"></a>00101 <span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="structMQTTConnectParams.html" title="MQTT Connection Parameters.">MQTTConnectParams</a> MQTTConnectParamsDefault;
117<a name="l00102"></a>00102
118<a name="l00109"></a><a class="code" href="structMQTTMessageParams.html">00109</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
119<a name="l00110"></a><a class="code" href="structMQTTMessageParams.html#aef06a771fecb653893f75ee74b5067aa">00110</a> QoSLevel <a class="code" href="structMQTTMessageParams.html#aef06a771fecb653893f75ee74b5067aa" title="Message Quality of Service.">qos</a>;
120<a name="l00111"></a><a class="code" href="structMQTTMessageParams.html#a6d0ac76d1a77b4369160b462214abe81">00111</a> <span class="keywordtype">bool</span> <a class="code" href="structMQTTMessageParams.html#a6d0ac76d1a77b4369160b462214abe81" title="Retained messages are NOT supported by the AWS IoT Service at the time of this SDK release...">isRetained</a>;
121<a name="l00112"></a><a class="code" href="structMQTTMessageParams.html#a4df7a8f21af28a9982483282b5ed65f2">00112</a> <span class="keywordtype">bool</span> <a class="code" href="structMQTTMessageParams.html#a4df7a8f21af28a9982483282b5ed65f2" title="Is this message a duplicate QoS &amp;gt; 0 message? Handled automatically by the MQTT client...">isDuplicate</a>;
122<a name="l00113"></a><a class="code" href="structMQTTMessageParams.html#a9faad31a60f5d4c26d0765832af8552e">00113</a> uint16_t <a class="code" href="structMQTTMessageParams.html#a9faad31a60f5d4c26d0765832af8552e" title="Message sequence identifier. Handled automatically by the MQTT client.">id</a>;
123<a name="l00114"></a><a class="code" href="structMQTTMessageParams.html#ae0103a22ff8338af06553f3403b4b916">00114</a> <span class="keywordtype">void</span> *<a class="code" href="structMQTTMessageParams.html#ae0103a22ff8338af06553f3403b4b916" title="Pointer to MQTT message payload (bytes).">pPayload</a>;
124<a name="l00115"></a><a class="code" href="structMQTTMessageParams.html#a41d4499e625695a8682eb2f51c0fddf9">00115</a> uint32_t <a class="code" href="structMQTTMessageParams.html#a41d4499e625695a8682eb2f51c0fddf9" title="Length of MQTT payload.">PayloadLen</a>;
125<a name="l00116"></a>00116 } <a class="code" href="structMQTTMessageParams.html" title="MQTT Message Parameters.">MQTTMessageParams</a>;
126<a name="l00117"></a>00117 <span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="structMQTTMessageParams.html" title="MQTT Message Parameters.">MQTTMessageParams</a> MQTTMessageParamsDefault;
127<a name="l00124"></a><a class="code" href="structMQTTCallbackParams.html">00124</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
128<a name="l00125"></a><a class="code" href="structMQTTCallbackParams.html#af6b4ccd3c4cab157b93c3d0c1d8f1dc9">00125</a> <span class="keywordtype">char</span> *<a class="code" href="structMQTTCallbackParams.html#af6b4ccd3c4cab157b93c3d0c1d8f1dc9" title="Pointer to the topic string on which the message was delivered. In the case of a wildcard subscriptio...">pTopicName</a>;
129<a name="l00126"></a><a class="code" href="structMQTTCallbackParams.html#acb1088787c038d920c2f24fca3aecd3c">00126</a> uint16_t <a class="code" href="structMQTTCallbackParams.html#acb1088787c038d920c2f24fca3aecd3c" title="Length of the topic string.">TopicNameLen</a>;
130<a name="l00127"></a><a class="code" href="structMQTTCallbackParams.html#ac350fbe59e29d1f9c08d61340bdb9170">00127</a> <a class="code" href="structMQTTMessageParams.html" title="MQTT Message Parameters.">MQTTMessageParams</a> <a class="code" href="structMQTTCallbackParams.html#ac350fbe59e29d1f9c08d61340bdb9170" title="Message parameters structure.">MessageParams</a>;
131<a name="l00128"></a>00128 } <a class="code" href="structMQTTCallbackParams.html" title="MQTT Callback Function Parameters.">MQTTCallbackParams</a>;
132<a name="l00129"></a>00129 <span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="structMQTTCallbackParams.html" title="MQTT Callback Function Parameters.">MQTTCallbackParams</a> MQTTCallbackParamsDefault;
133<a name="l00130"></a>00130
134<a name="l00139"></a>00139 <span class="keyword">typedef</span> int32_t (*iot_message_handler)(<a class="code" href="structMQTTCallbackParams.html" title="MQTT Callback Function Parameters.">MQTTCallbackParams</a> params);
135<a name="l00140"></a>00140
136<a name="l00147"></a><a class="code" href="structMQTTSubscribeParams.html">00147</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
137<a name="l00148"></a><a class="code" href="structMQTTSubscribeParams.html#a8bbbc1a4a96d1270e11a58d3aa31521e">00148</a> <span class="keywordtype">char</span> *<a class="code" href="structMQTTSubscribeParams.html#a8bbbc1a4a96d1270e11a58d3aa31521e" title="Pointer to the string defining the desired subscription topic.">pTopic</a>;
138<a name="l00149"></a><a class="code" href="structMQTTSubscribeParams.html#adcfb4d6691c3d68818b49b996addf4fa">00149</a> QoSLevel <a class="code" href="structMQTTSubscribeParams.html#adcfb4d6691c3d68818b49b996addf4fa" title="Quality of service of the subscription.">qos</a>;
139<a name="l00150"></a><a class="code" href="structMQTTSubscribeParams.html#a5d21b3e72ac4530110cd43ccdc2245b1">00150</a> iot_message_handler <a class="code" href="structMQTTSubscribeParams.html#a5d21b3e72ac4530110cd43ccdc2245b1" title="Callback to be invoked upon receipt of a message on the subscribed topic.">mHandler</a>;
140<a name="l00151"></a>00151 } <a class="code" href="structMQTTSubscribeParams.html" title="MQTT Subscription Parameters.">MQTTSubscribeParams</a>;
141<a name="l00152"></a>00152 <span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="structMQTTSubscribeParams.html" title="MQTT Subscription Parameters.">MQTTSubscribeParams</a> MQTTSubscribeParamsDefault;
142<a name="l00153"></a>00153
143<a name="l00160"></a><a class="code" href="structMQTTPublishParams.html">00160</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
144<a name="l00161"></a><a class="code" href="structMQTTPublishParams.html#ad8b1bb06e8bd823de87b00b912d8b6e1">00161</a> <span class="keywordtype">char</span> *<a class="code" href="structMQTTPublishParams.html#ad8b1bb06e8bd823de87b00b912d8b6e1" title="Pointer to the string defining the desired publishing topic.">pTopic</a>;
145<a name="l00162"></a><a class="code" href="structMQTTPublishParams.html#a7ac4d0b9e84808a07e0036f9a0e4b369">00162</a> <a class="code" href="structMQTTMessageParams.html" title="MQTT Message Parameters.">MQTTMessageParams</a> <a class="code" href="structMQTTPublishParams.html#a7ac4d0b9e84808a07e0036f9a0e4b369" title="Parameters defining the message to be published.">MessageParams</a>;
146<a name="l00163"></a>00163 } <a class="code" href="structMQTTPublishParams.html" title="MQTT Publish Parameters.">MQTTPublishParams</a>;
147<a name="l00164"></a>00164 <span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="structMQTTPublishParams.html" title="MQTT Publish Parameters.">MQTTPublishParams</a> MQTTPublishParamsDefault;
148<a name="l00165"></a>00165
149<a name="l00174"></a>00174 IoT_Error_t aws_iot_mqtt_connect(<a class="code" href="structMQTTConnectParams.html" title="MQTT Connection Parameters.">MQTTConnectParams</a> *pParams);
150<a name="l00175"></a>00175
151<a name="l00187"></a>00187 IoT_Error_t aws_iot_mqtt_publish(<a class="code" href="structMQTTPublishParams.html" title="MQTT Publish Parameters.">MQTTPublishParams</a> *pParams);
152<a name="l00188"></a>00188
153<a name="l00199"></a>00199 IoT_Error_t aws_iot_mqtt_subscribe(<a class="code" href="structMQTTSubscribeParams.html" title="MQTT Subscription Parameters.">MQTTSubscribeParams</a> *pParams);
154<a name="l00200"></a>00200
155<a name="l00211"></a>00211 IoT_Error_t aws_iot_mqtt_unsubscribe(<span class="keywordtype">char</span> *pTopic);
156<a name="l00212"></a>00212
157<a name="l00220"></a>00220 IoT_Error_t aws_iot_mqtt_disconnect(<span class="keywordtype">void</span>);
158<a name="l00221"></a>00221
159<a name="l00237"></a>00237 IoT_Error_t aws_iot_mqtt_yield(<span class="keywordtype">int</span> timeout);
160<a name="l00238"></a>00238
161<a name="l00247"></a>00247 <span class="keywordtype">bool</span> aws_iot_is_mqtt_connected(<span class="keywordtype">void</span>);
162<a name="l00248"></a>00248
163<a name="l00249"></a>00249 <span class="keyword">typedef</span> IoT_Error_t (*pConnectFunc_t)(<a class="code" href="structMQTTConnectParams.html" title="MQTT Connection Parameters.">MQTTConnectParams</a> *pParams);
164<a name="l00250"></a>00250 <span class="keyword">typedef</span> IoT_Error_t (*pPublishFunc_t)(<a class="code" href="structMQTTPublishParams.html" title="MQTT Publish Parameters.">MQTTPublishParams</a> *pParams);
165<a name="l00251"></a>00251 <span class="keyword">typedef</span> IoT_Error_t (*pSubscribeFunc_t)(<a class="code" href="structMQTTSubscribeParams.html" title="MQTT Subscription Parameters.">MQTTSubscribeParams</a> *pParams);
166<a name="l00252"></a>00252 <span class="keyword">typedef</span> IoT_Error_t (*pUnsubscribeFunc_t)(<span class="keywordtype">char</span> *pTopic);
167<a name="l00253"></a>00253 <span class="keyword">typedef</span> IoT_Error_t (*pDisconnectFunc_t)(void);
168<a name="l00254"></a>00254 <span class="keyword">typedef</span> IoT_Error_t (*pYieldFunc_t)(<span class="keywordtype">int</span> timeout);
169<a name="l00255"></a>00255 <span class="keyword">typedef</span> bool (*pIsConnectedFunc_t)(void);
170<a name="l00256"></a>00256
171<a name="l00265"></a><a class="code" href="structMQTTClient__t.html">00265</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>{
172<a name="l00266"></a><a class="code" href="structMQTTClient__t.html#aaa8b9c7c1d9e3205095c400ca54bf3fc">00266</a> pConnectFunc_t <a class="code" href="structMQTTClient__t.html#aaa8b9c7c1d9e3205095c400ca54bf3fc" title="function implementing the iot_mqtt_connect function">connect</a>;
173<a name="l00267"></a><a class="code" href="structMQTTClient__t.html#accddc5560b9d33e8d7556c336847c584">00267</a> pPublishFunc_t <a class="code" href="structMQTTClient__t.html#accddc5560b9d33e8d7556c336847c584" title="function implementing the iot_mqtt_publish function">publish</a>;
174<a name="l00268"></a><a class="code" href="structMQTTClient__t.html#a7053d0cd48d1c22a217d847babe372c4">00268</a> pSubscribeFunc_t <a class="code" href="structMQTTClient__t.html#a7053d0cd48d1c22a217d847babe372c4" title="function implementing the iot_mqtt_subscribe function">subscribe</a>;
175<a name="l00269"></a><a class="code" href="structMQTTClient__t.html#ad4fca46f97db56c20667c4245d0bdea1">00269</a> pUnsubscribeFunc_t <a class="code" href="structMQTTClient__t.html#ad4fca46f97db56c20667c4245d0bdea1" title="function implementing the iot_mqtt_unsubscribe function">unsubscribe</a>;
176<a name="l00270"></a><a class="code" href="structMQTTClient__t.html#a6b466b3c30e2f81dc2c8bdcc1477ea10">00270</a> pDisconnectFunc_t <a class="code" href="structMQTTClient__t.html#a6b466b3c30e2f81dc2c8bdcc1477ea10" title="function implementing the iot_mqtt_disconnect function">disconnect</a>;
177<a name="l00271"></a><a class="code" href="structMQTTClient__t.html#accaa6a8595048819c8629a80a398bc54">00271</a> pYieldFunc_t <a class="code" href="structMQTTClient__t.html#accaa6a8595048819c8629a80a398bc54" title="function implementing the iot_mqtt_yield function">yield</a>;
178<a name="l00272"></a><a class="code" href="structMQTTClient__t.html#a5ff9ec93a1e65a90c2f3b2f14bc3193a">00272</a> pIsConnectedFunc_t <a class="code" href="structMQTTClient__t.html#a5ff9ec93a1e65a90c2f3b2f14bc3193a" title="function implementing the iot_is_mqtt_connected function">isConnected</a>;
179<a name="l00273"></a>00273 }<a class="code" href="structMQTTClient__t.html" title="MQTT Client Type Definition.">MQTTClient_t</a>;
180<a name="l00274"></a>00274
181<a name="l00275"></a>00275
182<a name="l00284"></a>00284 <span class="keywordtype">void</span> aws_iot_mqtt_init(<a class="code" href="structMQTTClient__t.html" title="MQTT Client Type Definition.">MQTTClient_t</a> *pClient);
183<a name="l00285"></a>00285
184<a name="l00286"></a>00286
185<a name="l00287"></a>00287 <span class="preprocessor">#endif </span><span class="comment">/* AWS_IOT_SDK_SRC_IOT_MQTT_INTERFACE_H_ */</span>
186</pre></div></div>
187</div>
188<!--- window showing the filter options -->
189<div id="MSearchSelectWindow"
190 onmouseover="return searchBox.OnSearchSelectShow()"
191 onmouseout="return searchBox.OnSearchSelectHide()"
192 onkeydown="return searchBox.OnSearchSelectKey(event)">
193<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
194
195<!-- iframe showing the search results (closed by default) -->
196<div id="MSearchResultsWindow">
197<iframe src="" frameborder="0"
198 name="MSearchResults" id="MSearchResults">
199</iframe>
200</div>
201
202<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
203<a href="http://www.doxygen.org/index.html">
204<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
205</body>
206</html>
diff --git a/docs/html/aws__iot__shadow__actions_8h_source.html b/docs/html/aws__iot__shadow__actions_8h_source.html
new file mode 100644
index 0000000..c1c4d8b
--- /dev/null
+++ b/docs/html/aws__iot__shadow__actions_8h_source.html
@@ -0,0 +1,98 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: aws_iot_shadow_actions.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>aws_iot_shadow_actions.h</h1> </div>
51</div>
52<div class="contents">
53<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
54<a name="l00002"></a>00002 <span class="comment"> * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span>
55<a name="l00003"></a>00003 <span class="comment"> *</span>
56<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span>
57<a name="l00005"></a>00005 <span class="comment"> * You may not use this file except in compliance with the License.</span>
58<a name="l00006"></a>00006 <span class="comment"> * A copy of the License is located at</span>
59<a name="l00007"></a>00007 <span class="comment"> *</span>
60<a name="l00008"></a>00008 <span class="comment"> * http://aws.amazon.com/apache2.0</span>
61<a name="l00009"></a>00009 <span class="comment"> *</span>
62<a name="l00010"></a>00010 <span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span>
63<a name="l00011"></a>00011 <span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span>
64<a name="l00012"></a>00012 <span class="comment"> * express or implied. See the License for the specific language governing</span>
65<a name="l00013"></a>00013 <span class="comment"> * permissions and limitations under the License.</span>
66<a name="l00014"></a>00014 <span class="comment"> */</span>
67<a name="l00015"></a>00015
68<a name="l00016"></a>00016 <span class="preprocessor">#ifndef SRC_SHADOW_AWS_IOT_SHADOW_ACTIONS_H_</span>
69<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define SRC_SHADOW_AWS_IOT_SHADOW_ACTIONS_H_</span>
70<a name="l00018"></a>00018 <span class="preprocessor"></span>
71<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;<a class="code" href="aws__iot__shadow__interface_8h.html" title="Interface for thing shadow.">aws_iot_shadow_interface.h</a>&quot;</span>
72<a name="l00020"></a>00020
73<a name="l00021"></a>00021 IoT_Error_t iot_shadow_action(<a class="code" href="structMQTTClient__t.html" title="MQTT Client Type Definition.">MQTTClient_t</a> *pClient, <span class="keyword">const</span> <span class="keywordtype">char</span> *pThingName, <a class="code" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c" title="Thing Shadow Action type enum.">ShadowActions_t</a> action,
74<a name="l00022"></a>00022 <span class="keyword">const</span> <span class="keywordtype">char</span> *pJsonDocumentToBeSent, <a class="code" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445" title="Function Pointer typedef used as the callback for every action.">fpActionCallback_t</a> callback, <span class="keywordtype">void</span> *pCallbackContext,
75<a name="l00023"></a>00023 uint32_t timeout_seconds, <span class="keywordtype">bool</span> isSticky);
76<a name="l00024"></a>00024
77<a name="l00025"></a>00025 <span class="preprocessor">#endif </span><span class="comment">/* SRC_SHADOW_AWS_IOT_SHADOW_ACTIONS_H_ */</span>
78</pre></div></div>
79</div>
80<!--- window showing the filter options -->
81<div id="MSearchSelectWindow"
82 onmouseover="return searchBox.OnSearchSelectShow()"
83 onmouseout="return searchBox.OnSearchSelectHide()"
84 onkeydown="return searchBox.OnSearchSelectKey(event)">
85<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
86
87<!-- iframe showing the search results (closed by default) -->
88<div id="MSearchResultsWindow">
89<iframe src="" frameborder="0"
90 name="MSearchResults" id="MSearchResults">
91</iframe>
92</div>
93
94<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
95<a href="http://www.doxygen.org/index.html">
96<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
97</body>
98</html>
diff --git a/docs/html/aws__iot__shadow__interface_8h.html b/docs/html/aws__iot__shadow__interface_8h.html
new file mode 100644
index 0000000..5de2b45
--- /dev/null
+++ b/docs/html/aws__iot__shadow__interface_8h.html
@@ -0,0 +1,622 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: aws_iot_shadow_interface.h File Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48</div>
49<div class="header">
50 <div class="summary">
51<a href="#nested-classes">Data Structures</a> &#124;
52<a href="#typedef-members">Typedefs</a> &#124;
53<a href="#enum-members">Enumerations</a> &#124;
54<a href="#func-members">Functions</a> </div>
55 <div class="headertitle">
56<h1>aws_iot_shadow_interface.h File Reference</h1> </div>
57</div>
58<div class="contents">
59
60<p>Interface for thing shadow.
61<a href="#_details">More...</a></p>
62<code>#include &quot;aws_iot_mqtt_interface.h&quot;</code><br/>
63<code>#include &quot;aws_iot_shadow_json_data.h&quot;</code><br/>
64<!-- startSectionHeader --><div class="dynheader">
65Include dependency graph for aws_iot_shadow_interface.h:<!-- endSectionHeader --></div>
66<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
67<div class="center"><img src="aws__iot__shadow__interface_8h__incl.png" border="0" usemap="#aws__iot__shadow__interface_8h" alt=""/></div>
68<map name="aws__iot__shadow__interface_8h" id="aws__iot__shadow__interface_8h">
69</map>
70<!-- endSectionContent --></div>
71<!-- startSectionHeader --><div class="dynheader">
72This graph shows which files directly or indirectly include this file:<!-- endSectionHeader --></div>
73<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
74<div class="center"><img src="aws__iot__shadow__interface_8h__dep__incl.png" border="0" usemap="#aws__iot__shadow__interface_8hdep" alt=""/></div>
75<map name="aws__iot__shadow__interface_8hdep" id="aws__iot__shadow__interface_8hdep">
76</map>
77<!-- endSectionContent --></div>
78
79<p><a href="aws__iot__shadow__interface_8h_source.html">Go to the source code of this file.</a></p>
80<table class="memberdecls">
81<tr><td colspan="2"><h2><a name="nested-classes"></a>
82Data Structures</h2></td></tr>
83<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structShadowParameters__t.html">ShadowParameters_t</a></td></tr>
84<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Shadow Connect parameters. <a href="structShadowParameters__t.html#_details">More...</a><br/></td></tr>
85<tr><td colspan="2"><h2><a name="typedef-members"></a>
86Typedefs</h2></td></tr>
87<tr><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445">fpActionCallback_t</a> )(const char *pThingName, <a class="el" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c">ShadowActions_t</a> action, <a class="el" href="aws__iot__shadow__interface_8h.html#ad946163c2ac5df0aa896520949d47956">Shadow_Ack_Status_t</a> status, const char *pReceivedJsonDocument, void *pContextData)</td></tr>
88<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Function Pointer typedef used as the callback for every action. <a href="#a3aa42acf96d7ca3039a196c94ca57445"></a><br/></td></tr>
89<tr><td colspan="2"><h2><a name="enum-members"></a>
90Enumerations</h2></td></tr>
91<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__shadow__interface_8h.html#ad946163c2ac5df0aa896520949d47956">Shadow_Ack_Status_t</a> { <b>SHADOW_ACK_TIMEOUT</b>,
92<b>SHADOW_ACK_REJECTED</b>,
93<b>SHADOW_ACK_ACCEPTED</b>
94 }</td></tr>
95<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>Thing Shadow Acknowledgment enum. </p>
96 <a href="aws__iot__shadow__interface_8h.html#ad946163c2ac5df0aa896520949d47956">More...</a><br/></td></tr>
97<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c">ShadowActions_t</a> { <b>SHADOW_GET</b>,
98<b>SHADOW_UPDATE</b>,
99<b>SHADOW_DELETE</b>
100 }</td></tr>
101<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>Thing Shadow Action type enum. </p>
102 <a href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c">More...</a><br/></td></tr>
103<tr><td colspan="2"><h2><a name="func-members"></a>
104Functions</h2></td></tr>
105<tr><td class="memItemLeft" align="right" valign="top">IoT_Error_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__shadow__interface_8h.html#a79596d860d0f30ece4d2ee167784a2aa">aws_iot_shadow_init</a> (<a class="el" href="structMQTTClient__t.html">MQTTClient_t</a> *pClient)</td></tr>
106<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the Thing Shadow before use. <a href="#a79596d860d0f30ece4d2ee167784a2aa"></a><br/></td></tr>
107<tr><td class="memItemLeft" align="right" valign="top">IoT_Error_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__shadow__interface_8h.html#a2c923cc396a5e82f0c7d3468400fea2c">aws_iot_shadow_connect</a> (<a class="el" href="structMQTTClient__t.html">MQTTClient_t</a> *pClient, <a class="el" href="structShadowParameters__t.html">ShadowParameters_t</a> *pParams)</td></tr>
108<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect to the AWS IoT Thing Shadow service over MQTT. <a href="#a2c923cc396a5e82f0c7d3468400fea2c"></a><br/></td></tr>
109<tr><td class="memItemLeft" align="right" valign="top">IoT_Error_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__shadow__interface_8h.html#a0c5d153544c57027f0f802bf29376f87">aws_iot_shadow_yield</a> (<a class="el" href="structMQTTClient__t.html">MQTTClient_t</a> *pClient, int timeout)</td></tr>
110<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Yield function to let the background tasks of MQTT and Shadow. <a href="#a0c5d153544c57027f0f802bf29376f87"></a><br/></td></tr>
111<tr><td class="memItemLeft" align="right" valign="top">IoT_Error_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__shadow__interface_8h.html#afdd8ea8d0677badf06b2765b5ec27109">aws_iot_shadow_disconnect</a> (<a class="el" href="structMQTTClient__t.html">MQTTClient_t</a> *pClient)</td></tr>
112<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnect from the AWS IoT Thing Shadow service over MQTT. <a href="#afdd8ea8d0677badf06b2765b5ec27109"></a><br/></td></tr>
113<tr><td class="memItemLeft" align="right" valign="top">IoT_Error_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__shadow__interface_8h.html#ab762304e44b7315a39e9f1ed5462a498">aws_iot_shadow_update</a> (<a class="el" href="structMQTTClient__t.html">MQTTClient_t</a> *pClient, const char *pThingName, char *pJsonString, <a class="el" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445">fpActionCallback_t</a> callback, void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscribe)</td></tr>
114<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the one used to perform an Update action to a Thing Name's Shadow. <a href="#ab762304e44b7315a39e9f1ed5462a498"></a><br/></td></tr>
115<tr><td class="memItemLeft" align="right" valign="top">IoT_Error_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__shadow__interface_8h.html#adf3d2ab4117b6061aeb756a6ec639966">aws_iot_shadow_get</a> (<a class="el" href="structMQTTClient__t.html">MQTTClient_t</a> *pClient, const char *pThingName, <a class="el" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445">fpActionCallback_t</a> callback, void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscribe)</td></tr>
116<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the one used to perform an Get action to a Thing Name's Shadow. <a href="#adf3d2ab4117b6061aeb756a6ec639966"></a><br/></td></tr>
117<tr><td class="memItemLeft" align="right" valign="top">IoT_Error_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__shadow__interface_8h.html#a826d6fd7d28b753d8cef2cc4ed717f7a">aws_iot_shadow_delete</a> (<a class="el" href="structMQTTClient__t.html">MQTTClient_t</a> *pClient, const char *pThingName, <a class="el" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445">fpActionCallback_t</a> callback, void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscriptions)</td></tr>
118<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the one used to perform an Delete action to a Thing Name's Shadow. <a href="#a826d6fd7d28b753d8cef2cc4ed717f7a"></a><br/></td></tr>
119<tr><td class="memItemLeft" align="right" valign="top">IoT_Error_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__shadow__interface_8h.html#a2018994362d1ecc99af2151227d5bb41">aws_iot_shadow_register_delta</a> (<a class="el" href="structMQTTClient__t.html">MQTTClient_t</a> *pClient, <a class="el" href="structjsonStruct.html">jsonStruct_t</a> *pStruct)</td></tr>
120<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to listen on the delta topic of <a class="el" href="aws__iot__config_8h.html#ae5283c01e3f612fd5eb92dbc3e446d38" title="Thing Name of the Shadow this device is associated with.">AWS_IOT_MY_THING_NAME</a> mentioned in the <a class="el" href="aws__iot__config_8h.html" title="AWS IoT specific configuration file.">aws_iot_config.h</a> file. <a href="#a2018994362d1ecc99af2151227d5bb41"></a><br/></td></tr>
121<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__shadow__interface_8h.html#a2885a09ae8254c80f9db61c50c3018ca">aws_iot_shadow_reset_last_received_version</a> (void)</td></tr>
122<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset the last received version number to zero. This will be useful if the Thing Shadow is deleted and would like to to reset the local version. <a href="#a2885a09ae8254c80f9db61c50c3018ca"></a><br/></td></tr>
123<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__shadow__interface_8h.html#a416a959f46ab39f97ca4e137e8d8ed71">aws_iot_shadow_get_last_received_version</a> (void)</td></tr>
124<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Version of a document is received with every accepted/rejected and the SDK keeps track of the last received version of the JSON document of <a class="el" href="aws__iot__config_8h.html#ae5283c01e3f612fd5eb92dbc3e446d38" title="Thing Name of the Shadow this device is associated with.">AWS_IOT_MY_THING_NAME</a> shadow. <a href="#a416a959f46ab39f97ca4e137e8d8ed71"></a><br/></td></tr>
125<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__shadow__interface_8h.html#a764d85d53cff3f15f8a3d8047002a487">aws_iot_shadow_enable_discard_old_delta_msgs</a> (void)</td></tr>
126<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable the ignoring of delta messages with old version number. <a href="#a764d85d53cff3f15f8a3d8047002a487"></a><br/></td></tr>
127<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af539707306365d92f333efdb5b4d0046"></a><!-- doxytag: member="aws_iot_shadow_interface.h::aws_iot_shadow_disable_discard_old_delta_msgs" ref="af539707306365d92f333efdb5b4d0046" args="(void)" -->
128void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aws__iot__shadow__interface_8h.html#af539707306365d92f333efdb5b4d0046">aws_iot_shadow_disable_discard_old_delta_msgs</a> (void)</td></tr>
129<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable the ignoring of delta messages with old version number. <br/></td></tr>
130</table>
131<hr/><a name="_details"></a><h2>Detailed Description</h2>
132<p>These are the functions and structs to manage/interact the Thing Shadow(in the cloud). This SDK will let you interact with your own thing shadow or any other shadow using its Thing Name. There are totally 3 actions a device can perform on the shadow - Get, Update and Delete.</p>
133<p>Currently the device should use MQTT/S underneath. In the future this will also support other protocols. As it supports MQTT, the shadow needs to connect and disconnect. It will also work on the pub/sub model. On performing any action, the acknowledgment will be received in either accepted or rejected. For Example: If we want to perform a GET on the thing shadow the following messages will be sent and received: 1. A MQTT Publish on the topic - $aws/things/{thingName}/shadow/get 2. Subscribe to MQTT topics - $aws/things/{thingName}/shadow/get/accepted and $aws/things/{thingName}/shadow/get/rejected. If the request was successful we will receive the things json document in the accepted topic. </p>
134<hr/><h2>Typedef Documentation</h2>
135<a class="anchor" id="a3aa42acf96d7ca3039a196c94ca57445"></a><!-- doxytag: member="aws_iot_shadow_interface.h::fpActionCallback_t" ref="a3aa42acf96d7ca3039a196c94ca57445" args=")(const char *pThingName, ShadowActions_t action, Shadow_Ack_Status_t status, const char *pReceivedJsonDocument, void *pContextData)" -->
136<div class="memitem">
137<div class="memproto">
138 <table class="memname">
139 <tr>
140 <td class="memname">typedef void(* <a class="el" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445">fpActionCallback_t</a>)(const char *pThingName, <a class="el" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c">ShadowActions_t</a> action, <a class="el" href="aws__iot__shadow__interface_8h.html#ad946163c2ac5df0aa896520949d47956">Shadow_Ack_Status_t</a> status, const char *pReceivedJsonDocument, void *pContextData)</td>
141 </tr>
142 </table>
143</div>
144<div class="memdoc">
145<p>This function will be called from the context of <code><a class="el" href="aws__iot__shadow__interface_8h.html#a0c5d153544c57027f0f802bf29376f87" title="Yield function to let the background tasks of MQTT and Shadow.">aws_iot_shadow_yield()</a></code> context</p>
146<dl><dt><b>Parameters:</b></dt><dd>
147 <table class="params">
148 <tr><td class="paramname">pThingName</td><td>Thing Name of the response received </td></tr>
149 <tr><td class="paramname">action</td><td>The response of the action </td></tr>
150 <tr><td class="paramname">status</td><td>Informs if the action was Accepted/Rejected or Timed out </td></tr>
151 <tr><td class="paramname">pReceivedJsonDocument</td><td>Received JSON document </td></tr>
152 <tr><td class="paramname">pContextData</td><td>the void* data passed in during the action call(update, get or delete) </td></tr>
153 </table>
154 </dd>
155</dl>
156
157</div>
158</div>
159<hr/><h2>Enumeration Type Documentation</h2>
160<a class="anchor" id="ad946163c2ac5df0aa896520949d47956"></a><!-- doxytag: member="aws_iot_shadow_interface.h::Shadow_Ack_Status_t" ref="ad946163c2ac5df0aa896520949d47956" args="" -->
161<div class="memitem">
162<div class="memproto">
163 <table class="memname">
164 <tr>
165 <td class="memname">enum <a class="el" href="aws__iot__shadow__interface_8h.html#ad946163c2ac5df0aa896520949d47956">Shadow_Ack_Status_t</a></td>
166 </tr>
167 </table>
168</div>
169<div class="memdoc">
170<p>This enum type is use in the callback for the action response </p>
171
172</div>
173</div>
174<a class="anchor" id="a1fc9e025434023d44d33737f8b7c2a8c"></a><!-- doxytag: member="aws_iot_shadow_interface.h::ShadowActions_t" ref="a1fc9e025434023d44d33737f8b7c2a8c" args="" -->
175<div class="memitem">
176<div class="memproto">
177 <table class="memname">
178 <tr>
179 <td class="memname">enum <a class="el" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c">ShadowActions_t</a></td>
180 </tr>
181 </table>
182</div>
183<div class="memdoc">
184<p>This enum type is use in the callback for the action response </p>
185
186</div>
187</div>
188<hr/><h2>Function Documentation</h2>
189<a class="anchor" id="a2c923cc396a5e82f0c7d3468400fea2c"></a><!-- doxytag: member="aws_iot_shadow_interface.h::aws_iot_shadow_connect" ref="a2c923cc396a5e82f0c7d3468400fea2c" args="(MQTTClient_t *pClient, ShadowParameters_t *pParams)" -->
190<div class="memitem">
191<div class="memproto">
192 <table class="memname">
193 <tr>
194 <td class="memname">IoT_Error_t aws_iot_shadow_connect </td>
195 <td>(</td>
196 <td class="paramtype"><a class="el" href="structMQTTClient__t.html">MQTTClient_t</a> *&#160;</td>
197 <td class="paramname"> <em>pClient</em>, </td>
198 </tr>
199 <tr>
200 <td class="paramkey"></td>
201 <td></td>
202 <td class="paramtype"><a class="el" href="structShadowParameters__t.html">ShadowParameters_t</a> *&#160;</td>
203 <td class="paramname"> <em>pParams</em>&#160;</td>
204 </tr>
205 <tr>
206 <td></td>
207 <td>)</td>
208 <td></td><td></td>
209 </tr>
210 </table>
211</div>
212<div class="memdoc">
213<p>This function does the TLSv1.2 handshake and establishes the MQTT connection</p>
214<dl><dt><b>Parameters:</b></dt><dd>
215 <table class="params">
216 <tr><td class="paramname">pClient</td><td>MQTT Client used as the protocol layer </td></tr>
217 <tr><td class="paramname">pParams</td><td>Shadow Conenction parameters like TLS cert location </td></tr>
218 </table>
219 </dd>
220</dl>
221<dl class="return"><dt><b>Returns:</b></dt><dd>An IoT Error Type defining successful/failed Connection </dd></dl>
222
223</div>
224</div>
225<a class="anchor" id="a826d6fd7d28b753d8cef2cc4ed717f7a"></a><!-- doxytag: member="aws_iot_shadow_interface.h::aws_iot_shadow_delete" ref="a826d6fd7d28b753d8cef2cc4ed717f7a" args="(MQTTClient_t *pClient, const char *pThingName, fpActionCallback_t callback, void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscriptions)" -->
226<div class="memitem">
227<div class="memproto">
228 <table class="memname">
229 <tr>
230 <td class="memname">IoT_Error_t aws_iot_shadow_delete </td>
231 <td>(</td>
232 <td class="paramtype"><a class="el" href="structMQTTClient__t.html">MQTTClient_t</a> *&#160;</td>
233 <td class="paramname"> <em>pClient</em>, </td>
234 </tr>
235 <tr>
236 <td class="paramkey"></td>
237 <td></td>
238 <td class="paramtype">const char *&#160;</td>
239 <td class="paramname"> <em>pThingName</em>, </td>
240 </tr>
241 <tr>
242 <td class="paramkey"></td>
243 <td></td>
244 <td class="paramtype"><a class="el" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445">fpActionCallback_t</a>&#160;</td>
245 <td class="paramname"> <em>callback</em>, </td>
246 </tr>
247 <tr>
248 <td class="paramkey"></td>
249 <td></td>
250 <td class="paramtype">void *&#160;</td>
251 <td class="paramname"> <em>pContextData</em>, </td>
252 </tr>
253 <tr>
254 <td class="paramkey"></td>
255 <td></td>
256 <td class="paramtype">uint8_t&#160;</td>
257 <td class="paramname"> <em>timeout_seconds</em>, </td>
258 </tr>
259 <tr>
260 <td class="paramkey"></td>
261 <td></td>
262 <td class="paramtype">bool&#160;</td>
263 <td class="paramname"> <em>isPersistentSubscriptions</em>&#160;</td>
264 </tr>
265 <tr>
266 <td></td>
267 <td>)</td>
268 <td></td><td></td>
269 </tr>
270 </table>
271</div>
272<div class="memdoc">
273<p>This is not a very common use case for device. It is generally the responsibility of the accompanying app to do the delete. It is similar to the Update function internally except it does not take a JSON document as the input. The Thing Shadow referred by the ThingName will be deleted.</p>
274<dl><dt><b>Parameters:</b></dt><dd>
275 <table class="params">
276 <tr><td class="paramname">pClient</td><td>MQTT Client used as the protocol layer </td></tr>
277 <tr><td class="paramname">pThingName</td><td>Thing Name of the Shadow that should be deleted </td></tr>
278 <tr><td class="paramname">callback</td><td>This is the callback that will be used to inform the caller of the response from the AWS IoT Shadow service.Callback could be set to NULL if response is not important </td></tr>
279 <tr><td class="paramname">pContextData</td><td>This is an extra parameter that could be passed along with the callback. It should be set to NULL if not used </td></tr>
280 <tr><td class="paramname">timeout_seconds</td><td>It is the time the SDK will wait for the response on either accepted/rejected before declaring timeout on the action </td></tr>
281 <tr><td class="paramname">isPersistentSubscribe</td><td>As mentioned above, every time if a device deletes the same Sahdow (JSON document) then this should be set to true to avoid repeated subscription and un-subscription. If the Thing Name is one off delete then this should be set to false </td></tr>
282 </table>
283 </dd>
284</dl>
285<dl class="return"><dt><b>Returns:</b></dt><dd>An IoT Error Type defining successful/failed delete action </dd></dl>
286
287</div>
288</div>
289<a class="anchor" id="afdd8ea8d0677badf06b2765b5ec27109"></a><!-- doxytag: member="aws_iot_shadow_interface.h::aws_iot_shadow_disconnect" ref="afdd8ea8d0677badf06b2765b5ec27109" args="(MQTTClient_t *pClient)" -->
290<div class="memitem">
291<div class="memproto">
292 <table class="memname">
293 <tr>
294 <td class="memname">IoT_Error_t aws_iot_shadow_disconnect </td>
295 <td>(</td>
296 <td class="paramtype"><a class="el" href="structMQTTClient__t.html">MQTTClient_t</a> *&#160;</td>
297 <td class="paramname"> <em>pClient</em>&#160;)</td>
298 <td></td>
299 </tr>
300 </table>
301</div>
302<div class="memdoc">
303<p>This will close the underlying TCP connection, MQTT connection will also be closed</p>
304<dl><dt><b>Parameters:</b></dt><dd>
305 <table class="params">
306 <tr><td class="paramname">pClient</td><td>MQTT Client used as the protocol layer </td></tr>
307 </table>
308 </dd>
309</dl>
310<dl class="return"><dt><b>Returns:</b></dt><dd>An IoT Error Type defining successful/failed disconnect status </dd></dl>
311
312</div>
313</div>
314<a class="anchor" id="a764d85d53cff3f15f8a3d8047002a487"></a><!-- doxytag: member="aws_iot_shadow_interface.h::aws_iot_shadow_enable_discard_old_delta_msgs" ref="a764d85d53cff3f15f8a3d8047002a487" args="(void)" -->
315<div class="memitem">
316<div class="memproto">
317 <table class="memname">
318 <tr>
319 <td class="memname">void aws_iot_shadow_enable_discard_old_delta_msgs </td>
320 <td>(</td>
321 <td class="paramtype">void&#160;</td>
322 <td class="paramname">&#160;)</td>
323 <td></td>
324 </tr>
325 </table>
326</div>
327<div class="memdoc">
328<p>As we use MQTT underneath, there could be more than 1 of the same message if we use QoS 0. To avoid getting called for the same message, this functionality should be enabled. All the old message will be ignored </p>
329
330</div>
331</div>
332<a class="anchor" id="adf3d2ab4117b6061aeb756a6ec639966"></a><!-- doxytag: member="aws_iot_shadow_interface.h::aws_iot_shadow_get" ref="adf3d2ab4117b6061aeb756a6ec639966" args="(MQTTClient_t *pClient, const char *pThingName, fpActionCallback_t callback, void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscribe)" -->
333<div class="memitem">
334<div class="memproto">
335 <table class="memname">
336 <tr>
337 <td class="memname">IoT_Error_t aws_iot_shadow_get </td>
338 <td>(</td>
339 <td class="paramtype"><a class="el" href="structMQTTClient__t.html">MQTTClient_t</a> *&#160;</td>
340 <td class="paramname"> <em>pClient</em>, </td>
341 </tr>
342 <tr>
343 <td class="paramkey"></td>
344 <td></td>
345 <td class="paramtype">const char *&#160;</td>
346 <td class="paramname"> <em>pThingName</em>, </td>
347 </tr>
348 <tr>
349 <td class="paramkey"></td>
350 <td></td>
351 <td class="paramtype"><a class="el" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445">fpActionCallback_t</a>&#160;</td>
352 <td class="paramname"> <em>callback</em>, </td>
353 </tr>
354 <tr>
355 <td class="paramkey"></td>
356 <td></td>
357 <td class="paramtype">void *&#160;</td>
358 <td class="paramname"> <em>pContextData</em>, </td>
359 </tr>
360 <tr>
361 <td class="paramkey"></td>
362 <td></td>
363 <td class="paramtype">uint8_t&#160;</td>
364 <td class="paramname"> <em>timeout_seconds</em>, </td>
365 </tr>
366 <tr>
367 <td class="paramkey"></td>
368 <td></td>
369 <td class="paramtype">bool&#160;</td>
370 <td class="paramname"> <em>isPersistentSubscribe</em>&#160;</td>
371 </tr>
372 <tr>
373 <td></td>
374 <td>)</td>
375 <td></td><td></td>
376 </tr>
377 </table>
378</div>
379<div class="memdoc">
380<p>One use of this function is usually to get the config of a device at boot up. It is similar to the Update function internally except it does not take a JSON document as the input. The entire JSON document will be sent over the accepted topic</p>
381<dl><dt><b>Parameters:</b></dt><dd>
382 <table class="params">
383 <tr><td class="paramname">pClient</td><td>MQTT Client used as the protocol layer </td></tr>
384 <tr><td class="paramname">pThingName</td><td>Thing Name of the JSON document that is needed </td></tr>
385 <tr><td class="paramname">callback</td><td>This is the callback that will be used to inform the caller of the response from the AWS IoT Shadow service.Callback could be set to NULL if response is not important </td></tr>
386 <tr><td class="paramname">pContextData</td><td>This is an extra parameter that could be passed along with the callback. It should be set to NULL if not used </td></tr>
387 <tr><td class="paramname">timeout_seconds</td><td>It is the time the SDK will wait for the response on either accepted/rejected before declaring timeout on the action </td></tr>
388 <tr><td class="paramname">isPersistentSubscribe</td><td>As mentioned above, every time if a device gets the same Sahdow (JSON document) then this should be set to true to avoid repeated subscription and un-subscription. If the Thing Name is one off get then this should be set to false </td></tr>
389 </table>
390 </dd>
391</dl>
392<dl class="return"><dt><b>Returns:</b></dt><dd>An IoT Error Type defining successful/failed get action </dd></dl>
393
394</div>
395</div>
396<a class="anchor" id="a416a959f46ab39f97ca4e137e8d8ed71"></a><!-- doxytag: member="aws_iot_shadow_interface.h::aws_iot_shadow_get_last_received_version" ref="a416a959f46ab39f97ca4e137e8d8ed71" args="(void)" -->
397<div class="memitem">
398<div class="memproto">
399 <table class="memname">
400 <tr>
401 <td class="memname">uint32_t aws_iot_shadow_get_last_received_version </td>
402 <td>(</td>
403 <td class="paramtype">void&#160;</td>
404 <td class="paramname">&#160;)</td>
405 <td></td>
406 </tr>
407 </table>
408</div>
409<div class="memdoc">
410<p>One exception to this version tracking is that, the SDK will ignore the version from update/accepted topic. Rest of the responses will be scanned to update the version number. Accepting version change for update/accepted may cause version conflicts for delta message if the update message is received before the delta.</p>
411<dl class="return"><dt><b>Returns:</b></dt><dd>version number of the last received response </dd></dl>
412
413</div>
414</div>
415<a class="anchor" id="a79596d860d0f30ece4d2ee167784a2aa"></a><!-- doxytag: member="aws_iot_shadow_interface.h::aws_iot_shadow_init" ref="a79596d860d0f30ece4d2ee167784a2aa" args="(MQTTClient_t *pClient)" -->
416<div class="memitem">
417<div class="memproto">
418 <table class="memname">
419 <tr>
420 <td class="memname">IoT_Error_t aws_iot_shadow_init </td>
421 <td>(</td>
422 <td class="paramtype"><a class="el" href="structMQTTClient__t.html">MQTTClient_t</a> *&#160;</td>
423 <td class="paramname"> <em>pClient</em>&#160;)</td>
424 <td></td>
425 </tr>
426 </table>
427</div>
428<div class="memdoc">
429<p>This function takes care of initializing the internal book-keeping data structures</p>
430<dl><dt><b>Parameters:</b></dt><dd>
431 <table class="params">
432 <tr><td class="paramname">pClient</td><td>MQTT Client used as the protocol layer </td></tr>
433 </table>
434 </dd>
435</dl>
436<dl class="return"><dt><b>Returns:</b></dt><dd>An IoT Error Type defining successful/failed Initialization </dd></dl>
437
438</div>
439</div>
440<a class="anchor" id="a2018994362d1ecc99af2151227d5bb41"></a><!-- doxytag: member="aws_iot_shadow_interface.h::aws_iot_shadow_register_delta" ref="a2018994362d1ecc99af2151227d5bb41" args="(MQTTClient_t *pClient, jsonStruct_t *pStruct)" -->
441<div class="memitem">
442<div class="memproto">
443 <table class="memname">
444 <tr>
445 <td class="memname">IoT_Error_t aws_iot_shadow_register_delta </td>
446 <td>(</td>
447 <td class="paramtype"><a class="el" href="structMQTTClient__t.html">MQTTClient_t</a> *&#160;</td>
448 <td class="paramname"> <em>pClient</em>, </td>
449 </tr>
450 <tr>
451 <td class="paramkey"></td>
452 <td></td>
453 <td class="paramtype"><a class="el" href="structjsonStruct.html">jsonStruct_t</a> *&#160;</td>
454 <td class="paramname"> <em>pStruct</em>&#160;</td>
455 </tr>
456 <tr>
457 <td></td>
458 <td>)</td>
459 <td></td><td></td>
460 </tr>
461 </table>
462</div>
463<div class="memdoc">
464<p>Any time a delta is published the Json document will be delivered to the pStruct-&gt;cb. If you don't want the parsing done by the SDK then use the jsonStruct_t key set to "state". A good example of this is displayed in the sample_apps/shadow_console_echo.c</p>
465<dl><dt><b>Parameters:</b></dt><dd>
466 <table class="params">
467 <tr><td class="paramname">pClient</td><td>MQTT Client used as the protocol layer </td></tr>
468 <tr><td class="paramname">pStruct</td><td>The struct used to parse JSON value </td></tr>
469 </table>
470 </dd>
471</dl>
472<dl class="return"><dt><b>Returns:</b></dt><dd>An IoT Error Type defining successful/failed delta registering </dd></dl>
473
474</div>
475</div>
476<a class="anchor" id="a2885a09ae8254c80f9db61c50c3018ca"></a><!-- doxytag: member="aws_iot_shadow_interface.h::aws_iot_shadow_reset_last_received_version" ref="a2885a09ae8254c80f9db61c50c3018ca" args="(void)" -->
477<div class="memitem">
478<div class="memproto">
479 <table class="memname">
480 <tr>
481 <td class="memname">void aws_iot_shadow_reset_last_received_version </td>
482 <td>(</td>
483 <td class="paramtype">void&#160;</td>
484 <td class="paramname">&#160;)</td>
485 <td></td>
486 </tr>
487 </table>
488</div>
489<div class="memdoc">
490<dl class="return"><dt><b>Returns:</b></dt><dd>no return values </dd></dl>
491
492</div>
493</div>
494<a class="anchor" id="ab762304e44b7315a39e9f1ed5462a498"></a><!-- doxytag: member="aws_iot_shadow_interface.h::aws_iot_shadow_update" ref="ab762304e44b7315a39e9f1ed5462a498" args="(MQTTClient_t *pClient, const char *pThingName, char *pJsonString, fpActionCallback_t callback, void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscribe)" -->
495<div class="memitem">
496<div class="memproto">
497 <table class="memname">
498 <tr>
499 <td class="memname">IoT_Error_t aws_iot_shadow_update </td>
500 <td>(</td>
501 <td class="paramtype"><a class="el" href="structMQTTClient__t.html">MQTTClient_t</a> *&#160;</td>
502 <td class="paramname"> <em>pClient</em>, </td>
503 </tr>
504 <tr>
505 <td class="paramkey"></td>
506 <td></td>
507 <td class="paramtype">const char *&#160;</td>
508 <td class="paramname"> <em>pThingName</em>, </td>
509 </tr>
510 <tr>
511 <td class="paramkey"></td>
512 <td></td>
513 <td class="paramtype">char *&#160;</td>
514 <td class="paramname"> <em>pJsonString</em>, </td>
515 </tr>
516 <tr>
517 <td class="paramkey"></td>
518 <td></td>
519 <td class="paramtype"><a class="el" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445">fpActionCallback_t</a>&#160;</td>
520 <td class="paramname"> <em>callback</em>, </td>
521 </tr>
522 <tr>
523 <td class="paramkey"></td>
524 <td></td>
525 <td class="paramtype">void *&#160;</td>
526 <td class="paramname"> <em>pContextData</em>, </td>
527 </tr>
528 <tr>
529 <td class="paramkey"></td>
530 <td></td>
531 <td class="paramtype">uint8_t&#160;</td>
532 <td class="paramname"> <em>timeout_seconds</em>, </td>
533 </tr>
534 <tr>
535 <td class="paramkey"></td>
536 <td></td>
537 <td class="paramtype">bool&#160;</td>
538 <td class="paramname"> <em>isPersistentSubscribe</em>&#160;</td>
539 </tr>
540 <tr>
541 <td></td>
542 <td>)</td>
543 <td></td><td></td>
544 </tr>
545 </table>
546</div>
547<div class="memdoc">
548<p>update is one of the most frequently used functionality by a device. In most cases the device may be just reporting few params to update the thing shadow in the cloud Update Action if no callback or if the JSON document does not have a client token then will just publish the update and not track it.</p>
549<dl class="note"><dt><b>Note:</b></dt><dd>The update has to subscribe to two topics update/accepted and update/rejected. This function waits 2 seconds to ensure the subscriptions are registered before publishing the update message. The following steps are performed on using this function: 1. Subscribe to Shadow topics - $aws/things/{thingName}/shadow/update/accepted and $aws/things/{thingName}/shadow/update/rejected 2. wait for 2 seconds for the subscription to take effect 3. Publish on the update topic - $aws/things/{thingName}/shadow/update 4. In the <code><a class="el" href="aws__iot__shadow__interface_8h.html#a0c5d153544c57027f0f802bf29376f87" title="Yield function to let the background tasks of MQTT and Shadow.">aws_iot_shadow_yield()</a></code> function the response will be handled. In case of timeout or if the response is received, the subscription to shadow response topics are un-subscribed from. On the contrary if the persistent subscription is set to true then the un-subscribe will not be done. The topics will always be listened to</dd></dl>
550<dl><dt><b>Parameters:</b></dt><dd>
551 <table class="params">
552 <tr><td class="paramname">pClient</td><td>MQTT Client used as the protocol layer </td></tr>
553 <tr><td class="paramname">pThingName</td><td>Thing Name of the shadow that needs to be Updated </td></tr>
554 <tr><td class="paramname">pJsonString</td><td>The update action expects a JSON document to sent. This JSON document should adhere to the AWS IoT Thing Shadow specification. To help in the process of creating this document- SDK provides apis in <code><a class="el" href="aws__iot__shadow__json__data_8h_source.html">aws_iot_shadow_json_data.h</a></code> </td></tr>
555 <tr><td class="paramname">callback</td><td>This is the callback that will be used to inform the caller of the response from the AWS IoT Shadow service.Callback could be set to NULL if response is not important </td></tr>
556 <tr><td class="paramname">pContextData</td><td>This is an extra parameter that could be passed along with the callback. It should be set to NULL if not used </td></tr>
557 <tr><td class="paramname">timeout_seconds</td><td>It is the time the SDK will wait for the response on either accepted/rejected before declaring timeout on the action </td></tr>
558 <tr><td class="paramname">isPersistentSubscribe</td><td>As mentioned above, every time if a device updates the same shadow then this should be set to true to avoid repeated subscription and unsubscription. If the Thing Name is one off update then this should be set to false </td></tr>
559 </table>
560 </dd>
561</dl>
562<dl class="return"><dt><b>Returns:</b></dt><dd>An IoT Error Type defining successful/failed update action </dd></dl>
563
564</div>
565</div>
566<a class="anchor" id="a0c5d153544c57027f0f802bf29376f87"></a><!-- doxytag: member="aws_iot_shadow_interface.h::aws_iot_shadow_yield" ref="a0c5d153544c57027f0f802bf29376f87" args="(MQTTClient_t *pClient, int timeout)" -->
567<div class="memitem">
568<div class="memproto">
569 <table class="memname">
570 <tr>
571 <td class="memname">IoT_Error_t aws_iot_shadow_yield </td>
572 <td>(</td>
573 <td class="paramtype"><a class="el" href="structMQTTClient__t.html">MQTTClient_t</a> *&#160;</td>
574 <td class="paramname"> <em>pClient</em>, </td>
575 </tr>
576 <tr>
577 <td class="paramkey"></td>
578 <td></td>
579 <td class="paramtype">int&#160;</td>
580 <td class="paramname"> <em>timeout</em>&#160;</td>
581 </tr>
582 <tr>
583 <td></td>
584 <td>)</td>
585 <td></td><td></td>
586 </tr>
587 </table>
588</div>
589<div class="memdoc">
590<p>This function could be use in a separate thread waiting for the incoming messages, ensuring the connection is kept alive with the AWS Service. It also ensures the expired requests of Shadow actions are cleared and Timeout callback is executed. </p>
591<dl class="note"><dt><b>Note:</b></dt><dd>All callbacks ever used in the SDK will be executed in the context of this function.</dd></dl>
592<dl><dt><b>Parameters:</b></dt><dd>
593 <table class="params">
594 <tr><td class="paramname">pClient</td><td>MQTT Client used as the protocol layer </td></tr>
595 <tr><td class="paramname">timeout</td><td>in milliseconds, This is the maximum time the yield function will wait for a message and/or read the messages from the TLS buffer </td></tr>
596 </table>
597 </dd>
598</dl>
599<dl class="return"><dt><b>Returns:</b></dt><dd>An IoT Error Type defining successful/failed Yield </dd></dl>
600
601</div>
602</div>
603</div>
604<!--- window showing the filter options -->
605<div id="MSearchSelectWindow"
606 onmouseover="return searchBox.OnSearchSelectShow()"
607 onmouseout="return searchBox.OnSearchSelectHide()"
608 onkeydown="return searchBox.OnSearchSelectKey(event)">
609<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
610
611<!-- iframe showing the search results (closed by default) -->
612<div id="MSearchResultsWindow">
613<iframe src="" frameborder="0"
614 name="MSearchResults" id="MSearchResults">
615</iframe>
616</div>
617
618<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
619<a href="http://www.doxygen.org/index.html">
620<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
621</body>
622</html>
diff --git a/docs/html/aws__iot__shadow__interface_8h__dep__incl.dot b/docs/html/aws__iot__shadow__interface_8h__dep__incl.dot
new file mode 100644
index 0000000..18a5ccb
--- /dev/null
+++ b/docs/html/aws__iot__shadow__interface_8h__dep__incl.dot
@@ -0,0 +1,12 @@
1digraph G
2{
3 edge [fontname="FreeSans.ttf",fontsize="10",labelfontname="FreeSans.ttf",labelfontsize="10"];
4 node [fontname="FreeSans.ttf",fontsize="10",shape=record];
5 Node1 [label="aws_iot_shadow_interface.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
6 Node1 -> Node2 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
7 Node2 [label="shadow_sample.c",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$shadow__sample_8c.html",tooltip="A simple connected window example demonstrating the use of Thing Shadow."];
8 Node1 -> Node3 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
9 Node3 [label="aws_iot_shadow_actions.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$aws__iot__shadow__actions_8h_source.html"];
10 Node1 -> Node4 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
11 Node4 [label="aws_iot_shadow_records.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$aws__iot__shadow__records_8h_source.html"];
12}
diff --git a/docs/html/aws__iot__shadow__interface_8h__dep__incl.md5 b/docs/html/aws__iot__shadow__interface_8h__dep__incl.md5
new file mode 100644
index 0000000..576e468
--- /dev/null
+++ b/docs/html/aws__iot__shadow__interface_8h__dep__incl.md5
@@ -0,0 +1 @@
f4e192311f4b71e0833ab2d736688a25 \ No newline at end of file
diff --git a/docs/html/aws__iot__shadow__interface_8h__incl.dot b/docs/html/aws__iot__shadow__interface_8h__incl.dot
new file mode 100644
index 0000000..ad7cf3a
--- /dev/null
+++ b/docs/html/aws__iot__shadow__interface_8h__incl.dot
@@ -0,0 +1,19 @@
1digraph G
2{
3 edge [fontname="FreeSans.ttf",fontsize="10",labelfontname="FreeSans.ttf",labelfontsize="10"];
4 node [fontname="FreeSans.ttf",fontsize="10",shape=record];
5 Node1 [label="aws_iot_shadow_interface.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
6 Node1 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
7 Node2 [label="aws_iot_mqtt_interface.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$aws__iot__mqtt__interface_8h_source.html"];
8 Node2 -> Node3 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
9 Node3 [label="stddef.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
10 Node2 -> Node4 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
11 Node4 [label="stdbool.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
12 Node2 -> Node5 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
13 Node5 [label="stdint.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
14 Node2 -> Node6 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
15 Node6 [label="aws_iot_error.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$aws__iot__error_8h_source.html"];
16 Node1 -> Node7 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
17 Node7 [label="aws_iot_shadow_json_data.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$aws__iot__shadow__json__data_8h_source.html"];
18 Node7 -> Node3 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
19}
diff --git a/docs/html/aws__iot__shadow__interface_8h__incl.md5 b/docs/html/aws__iot__shadow__interface_8h__incl.md5
new file mode 100644
index 0000000..2dedd27
--- /dev/null
+++ b/docs/html/aws__iot__shadow__interface_8h__incl.md5
@@ -0,0 +1 @@
e0b750e3d0e532bd857c5a8a5a074501 \ No newline at end of file
diff --git a/docs/html/aws__iot__shadow__interface_8h_source.html b/docs/html/aws__iot__shadow__interface_8h_source.html
new file mode 100644
index 0000000..b335835
--- /dev/null
+++ b/docs/html/aws__iot__shadow__interface_8h_source.html
@@ -0,0 +1,140 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: aws_iot_shadow_interface.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>aws_iot_shadow_interface.h</h1> </div>
51</div>
52<div class="contents">
53<a href="aws__iot__shadow__interface_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
54<a name="l00002"></a>00002 <span class="comment"> * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span>
55<a name="l00003"></a>00003 <span class="comment"> *</span>
56<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span>
57<a name="l00005"></a>00005 <span class="comment"> * You may not use this file except in compliance with the License.</span>
58<a name="l00006"></a>00006 <span class="comment"> * A copy of the License is located at</span>
59<a name="l00007"></a>00007 <span class="comment"> *</span>
60<a name="l00008"></a>00008 <span class="comment"> * http://aws.amazon.com/apache2.0</span>
61<a name="l00009"></a>00009 <span class="comment"> *</span>
62<a name="l00010"></a>00010 <span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span>
63<a name="l00011"></a>00011 <span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span>
64<a name="l00012"></a>00012 <span class="comment"> * express or implied. See the License for the specific language governing</span>
65<a name="l00013"></a>00013 <span class="comment"> * permissions and limitations under the License.</span>
66<a name="l00014"></a>00014 <span class="comment"> */</span>
67<a name="l00015"></a>00015 <span class="preprocessor">#ifndef AWS_IOT_SDK_SRC_IOT_SHADOW_H_</span>
68<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define AWS_IOT_SDK_SRC_IOT_SHADOW_H_</span>
69<a name="l00017"></a>00017 <span class="preprocessor"></span>
70<a name="l00018"></a>00018
71<a name="l00036"></a>00036 <span class="preprocessor">#include &quot;aws_iot_mqtt_interface.h&quot;</span>
72<a name="l00037"></a>00037 <span class="preprocessor">#include &quot;aws_iot_shadow_json_data.h&quot;</span>
73<a name="l00038"></a>00038
74<a name="l00048"></a><a class="code" href="structShadowParameters__t.html">00048</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
75<a name="l00049"></a><a class="code" href="structShadowParameters__t.html#adb78403e35dd900410d5d26ef0fa315d">00049</a> <span class="keywordtype">char</span> *<a class="code" href="structShadowParameters__t.html#adb78403e35dd900410d5d26ef0fa315d" title="Every device has a Thing Shadow and this is the placeholder for name.">pMyThingName</a>;
76<a name="l00050"></a><a class="code" href="structShadowParameters__t.html#a27619390335abf973719645b8f31a277">00050</a> <span class="keywordtype">char</span> *<a class="code" href="structShadowParameters__t.html#a27619390335abf973719645b8f31a277" title="Currently the Shadow uses MQTT to connect and it is important to ensure we have unique client id...">pMqttClientId</a>;
77<a name="l00051"></a><a class="code" href="structShadowParameters__t.html#abebf2ba2657ead7718385f2406730cc0">00051</a> <span class="keywordtype">char</span> *<a class="code" href="structShadowParameters__t.html#abebf2ba2657ead7718385f2406730cc0" title="This will be unique to a customer and can be retrieved from the console.">pHost</a>;
78<a name="l00052"></a><a class="code" href="structShadowParameters__t.html#a3243eeb13c8bad2cf78dcd7003b1d665">00052</a> <span class="keywordtype">int</span> <a class="code" href="structShadowParameters__t.html#a3243eeb13c8bad2cf78dcd7003b1d665" title="By default the port is 8883.">port</a>;
79<a name="l00053"></a><a class="code" href="structShadowParameters__t.html#afa3bbe30735094046913d645b6d2ae50">00053</a> <span class="keywordtype">char</span> *<a class="code" href="structShadowParameters__t.html#afa3bbe30735094046913d645b6d2ae50" title="Location with the Filename of the Root CA.">pRootCA</a>;
80<a name="l00054"></a><a class="code" href="structShadowParameters__t.html#a9ba70adf7b2553a574d0c493815c3fde">00054</a> <span class="keywordtype">char</span> *<a class="code" href="structShadowParameters__t.html#a9ba70adf7b2553a574d0c493815c3fde" title="Location of Device certs signed by AWS IoT service.">pClientCRT</a>;
81<a name="l00055"></a><a class="code" href="structShadowParameters__t.html#af0a34f1265930aec7023f625af80df7f">00055</a> <span class="keywordtype">char</span> *<a class="code" href="structShadowParameters__t.html#af0a34f1265930aec7023f625af80df7f" title="Location of Device private key.">pClientKey</a>;
82<a name="l00056"></a>00056 } <a class="code" href="structShadowParameters__t.html" title="Shadow Connect parameters.">ShadowParameters_t</a>;
83<a name="l00057"></a>00057
84<a name="l00064"></a><a class="code" href="structShadowParameters__t.html#adc225bbde6004034d41899a4f4b13074">00064</a> <span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="structShadowParameters__t.html" title="Shadow Connect parameters.">ShadowParameters_t</a> <a class="code" href="structShadowParameters__t.html#adc225bbde6004034d41899a4f4b13074" title="This is set to defaults from the configuration file The certs are set to NULL because they need the p...">ShadowParametersDefault</a>;
85<a name="l00065"></a>00065
86<a name="l00066"></a>00066
87<a name="l00075"></a>00075 IoT_Error_t aws_iot_shadow_init(<a class="code" href="structMQTTClient__t.html" title="MQTT Client Type Definition.">MQTTClient_t</a> *pClient);
88<a name="l00085"></a>00085 IoT_Error_t aws_iot_shadow_connect(<a class="code" href="structMQTTClient__t.html" title="MQTT Client Type Definition.">MQTTClient_t</a> *pClient, <a class="code" href="structShadowParameters__t.html" title="Shadow Connect parameters.">ShadowParameters_t</a> *pParams);
89<a name="l00097"></a>00097 IoT_Error_t aws_iot_shadow_yield(<a class="code" href="structMQTTClient__t.html" title="MQTT Client Type Definition.">MQTTClient_t</a> *pClient, <span class="keywordtype">int</span> timeout);
90<a name="l00106"></a>00106 IoT_Error_t aws_iot_shadow_disconnect(<a class="code" href="structMQTTClient__t.html" title="MQTT Client Type Definition.">MQTTClient_t</a> *pClient);
91<a name="l00107"></a>00107
92<a name="l00114"></a><a class="code" href="aws__iot__shadow__interface_8h.html#ad946163c2ac5df0aa896520949d47956">00114</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
93<a name="l00115"></a>00115 SHADOW_ACK_TIMEOUT, SHADOW_ACK_REJECTED, SHADOW_ACK_ACCEPTED
94<a name="l00116"></a>00116 } <a class="code" href="aws__iot__shadow__interface_8h.html#ad946163c2ac5df0aa896520949d47956" title="Thing Shadow Acknowledgment enum.">Shadow_Ack_Status_t</a>;
95<a name="l00117"></a>00117
96<a name="l00124"></a><a class="code" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c">00124</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
97<a name="l00125"></a>00125 SHADOW_GET, SHADOW_UPDATE, SHADOW_DELETE
98<a name="l00126"></a>00126 } <a class="code" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c" title="Thing Shadow Action type enum.">ShadowActions_t</a>;
99<a name="l00127"></a>00127
100<a name="l00128"></a>00128
101<a name="l00141"></a><a class="code" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445">00141</a> <span class="keyword">typedef</span> void (*<a class="code" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445" title="Function Pointer typedef used as the callback for every action.">fpActionCallback_t</a>)(<span class="keyword">const</span> <span class="keywordtype">char</span> *pThingName, <a class="code" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c" title="Thing Shadow Action type enum.">ShadowActions_t</a> action, <a class="code" href="aws__iot__shadow__interface_8h.html#ad946163c2ac5df0aa896520949d47956" title="Thing Shadow Acknowledgment enum.">Shadow_Ack_Status_t</a> status,
102<a name="l00142"></a>00142 <span class="keyword">const</span> <span class="keywordtype">char</span> *pReceivedJsonDocument, <span class="keywordtype">void</span> *pContextData);
103<a name="l00143"></a>00143
104<a name="l00167"></a>00167 IoT_Error_t aws_iot_shadow_update(<a class="code" href="structMQTTClient__t.html" title="MQTT Client Type Definition.">MQTTClient_t</a> *pClient, <span class="keyword">const</span> <span class="keywordtype">char</span> *pThingName, <span class="keywordtype">char</span> *pJsonString,
105<a name="l00168"></a>00168 <a class="code" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445" title="Function Pointer typedef used as the callback for every action.">fpActionCallback_t</a> callback, <span class="keywordtype">void</span> *pContextData, uint8_t timeout_seconds, <span class="keywordtype">bool</span> isPersistentSubscribe);
106<a name="l00169"></a>00169
107<a name="l00184"></a>00184 IoT_Error_t aws_iot_shadow_get(<a class="code" href="structMQTTClient__t.html" title="MQTT Client Type Definition.">MQTTClient_t</a> *pClient, <span class="keyword">const</span> <span class="keywordtype">char</span> *pThingName, <a class="code" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445" title="Function Pointer typedef used as the callback for every action.">fpActionCallback_t</a> callback,
108<a name="l00185"></a>00185 <span class="keywordtype">void</span> *pContextData, uint8_t timeout_seconds, <span class="keywordtype">bool</span> isPersistentSubscribe);
109<a name="l00200"></a>00200 IoT_Error_t aws_iot_shadow_delete(<a class="code" href="structMQTTClient__t.html" title="MQTT Client Type Definition.">MQTTClient_t</a> *pClient, <span class="keyword">const</span> <span class="keywordtype">char</span> *pThingName, <a class="code" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445" title="Function Pointer typedef used as the callback for every action.">fpActionCallback_t</a> callback,
110<a name="l00201"></a>00201 <span class="keywordtype">void</span> *pContextData, uint8_t timeout_seconds, <span class="keywordtype">bool</span> isPersistentSubscriptions);
111<a name="l00202"></a>00202
112<a name="l00212"></a>00212 IoT_Error_t aws_iot_shadow_register_delta(<a class="code" href="structMQTTClient__t.html" title="MQTT Client Type Definition.">MQTTClient_t</a> *pClient, <a class="code" href="structjsonStruct.html">jsonStruct_t</a> *pStruct);
113<a name="l00213"></a>00213
114<a name="l00220"></a>00220 <span class="keywordtype">void</span> aws_iot_shadow_reset_last_received_version(<span class="keywordtype">void</span>);
115<a name="l00230"></a>00230 uint32_t aws_iot_shadow_get_last_received_version(<span class="keywordtype">void</span>);
116<a name="l00236"></a>00236 <span class="keywordtype">void</span> aws_iot_shadow_enable_discard_old_delta_msgs(<span class="keywordtype">void</span>);
117<a name="l00240"></a>00240 <span class="keywordtype">void</span> aws_iot_shadow_disable_discard_old_delta_msgs(<span class="keywordtype">void</span>);
118<a name="l00241"></a>00241
119<a name="l00242"></a>00242 <span class="preprocessor">#endif //AWS_IOT_SDK_SRC_IOT_SHADOW_H_</span>
120</pre></div></div>
121</div>
122<!--- window showing the filter options -->
123<div id="MSearchSelectWindow"
124 onmouseover="return searchBox.OnSearchSelectShow()"
125 onmouseout="return searchBox.OnSearchSelectHide()"
126 onkeydown="return searchBox.OnSearchSelectKey(event)">
127<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
128
129<!-- iframe showing the search results (closed by default) -->
130<div id="MSearchResultsWindow">
131<iframe src="" frameborder="0"
132 name="MSearchResults" id="MSearchResults">
133</iframe>
134</div>
135
136<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
137<a href="http://www.doxygen.org/index.html">
138<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
139</body>
140</html>
diff --git a/docs/html/aws__iot__shadow__json_8h_source.html b/docs/html/aws__iot__shadow__json_8h_source.html
new file mode 100644
index 0000000..aab03d4
--- /dev/null
+++ b/docs/html/aws__iot__shadow__json_8h_source.html
@@ -0,0 +1,112 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: aws_iot_shadow_json.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>aws_iot_shadow_json.h</h1> </div>
51</div>
52<div class="contents">
53<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
54<a name="l00002"></a>00002 <span class="comment"> * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span>
55<a name="l00003"></a>00003 <span class="comment"> *</span>
56<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span>
57<a name="l00005"></a>00005 <span class="comment"> * You may not use this file except in compliance with the License.</span>
58<a name="l00006"></a>00006 <span class="comment"> * A copy of the License is located at</span>
59<a name="l00007"></a>00007 <span class="comment"> *</span>
60<a name="l00008"></a>00008 <span class="comment"> * http://aws.amazon.com/apache2.0</span>
61<a name="l00009"></a>00009 <span class="comment"> *</span>
62<a name="l00010"></a>00010 <span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span>
63<a name="l00011"></a>00011 <span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span>
64<a name="l00012"></a>00012 <span class="comment"> * express or implied. See the License for the specific language governing</span>
65<a name="l00013"></a>00013 <span class="comment"> * permissions and limitations under the License.</span>
66<a name="l00014"></a>00014 <span class="comment"> */</span>
67<a name="l00015"></a>00015 <span class="preprocessor">#ifndef AWS_IOT_SDK_SRC_IOT_SHADOW_JSON_H_</span>
68<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define AWS_IOT_SDK_SRC_IOT_SHADOW_JSON_H_</span>
69<a name="l00017"></a>00017 <span class="preprocessor"></span>
70<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
71<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;stdbool.h&gt;</span>
72<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;stdarg.h&gt;</span>
73<a name="l00021"></a>00021
74<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;aws_iot_error.h&quot;</span>
75<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;aws_iot_shadow_json_data.h&quot;</span>
76<a name="l00024"></a>00024
77<a name="l00025"></a>00025
78<a name="l00026"></a>00026 <span class="keywordtype">bool</span> isJsonValidAndParse(<span class="keyword">const</span> <span class="keywordtype">char</span> *pJsonDocument, <span class="keywordtype">void</span> *pJsonHandler, int32_t *pTokenCount);
79<a name="l00027"></a>00027 <span class="keywordtype">bool</span> isJsonKeyMatchingAndUpdateValue(<span class="keyword">const</span> <span class="keywordtype">char</span> *pJsonDocument, <span class="keywordtype">void</span> *pJsonHandler, int32_t tokenCount,
80<a name="l00028"></a>00028 <a class="code" href="structjsonStruct.html">jsonStruct_t</a> *pDataStruct, uint32_t *pDataLength, int32_t *pDataPosition);
81<a name="l00029"></a>00029
82<a name="l00030"></a>00030 <span class="keywordtype">void</span> iot_shadow_get_request_json(<span class="keywordtype">char</span> *pJsonDocument);
83<a name="l00031"></a>00031 <span class="keywordtype">void</span> iot_shadow_delete_request_json(<span class="keywordtype">char</span> *pJsonDocument);
84<a name="l00032"></a>00032 <span class="keywordtype">void</span> resetClientTokenSequenceNum(<span class="keywordtype">void</span>);
85<a name="l00033"></a>00033
86<a name="l00034"></a>00034
87<a name="l00035"></a>00035 <span class="keywordtype">bool</span> isReceivedJsonValid(<span class="keyword">const</span> <span class="keywordtype">char</span> *pJsonDocument);
88<a name="l00036"></a>00036 <span class="keywordtype">void</span> FillWithClientToken(<span class="keywordtype">char</span> *pStringToUpdateClientToken);
89<a name="l00037"></a>00037 <span class="keywordtype">bool</span> extractClientToken(<span class="keyword">const</span> <span class="keywordtype">char</span> *pJsonDocumentToBeSent, <span class="keywordtype">char</span> *pExtractedClientToken);
90<a name="l00038"></a>00038 <span class="keywordtype">bool</span> extractVersionNumber(<span class="keyword">const</span> <span class="keywordtype">char</span> *pJsonDocument, <span class="keywordtype">void</span> *pJsonHandler, int32_t tokenCount, uint32_t *pVersionNumber);
91<a name="l00039"></a>00039 <span class="preprocessor">#endif // AWS_IOT_SDK_SRC_IOT_SHADOW_JSON_H_</span>
92</pre></div></div>
93</div>
94<!--- window showing the filter options -->
95<div id="MSearchSelectWindow"
96 onmouseover="return searchBox.OnSearchSelectShow()"
97 onmouseout="return searchBox.OnSearchSelectHide()"
98 onkeydown="return searchBox.OnSearchSelectKey(event)">
99<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
100
101<!-- iframe showing the search results (closed by default) -->
102<div id="MSearchResultsWindow">
103<iframe src="" frameborder="0"
104 name="MSearchResults" id="MSearchResults">
105</iframe>
106</div>
107
108<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
109<a href="http://www.doxygen.org/index.html">
110<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
111</body>
112</html>
diff --git a/docs/html/aws__iot__shadow__json__data_8h_source.html b/docs/html/aws__iot__shadow__json__data_8h_source.html
new file mode 100644
index 0000000..e4ebc3d
--- /dev/null
+++ b/docs/html/aws__iot__shadow__json__data_8h_source.html
@@ -0,0 +1,128 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: aws_iot_shadow_json_data.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>aws_iot_shadow_json_data.h</h1> </div>
51</div>
52<div class="contents">
53<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
54<a name="l00002"></a>00002 <span class="comment"> * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span>
55<a name="l00003"></a>00003 <span class="comment"> *</span>
56<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span>
57<a name="l00005"></a>00005 <span class="comment"> * You may not use this file except in compliance with the License.</span>
58<a name="l00006"></a>00006 <span class="comment"> * A copy of the License is located at</span>
59<a name="l00007"></a>00007 <span class="comment"> *</span>
60<a name="l00008"></a>00008 <span class="comment"> * http://aws.amazon.com/apache2.0</span>
61<a name="l00009"></a>00009 <span class="comment"> *</span>
62<a name="l00010"></a>00010 <span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span>
63<a name="l00011"></a>00011 <span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span>
64<a name="l00012"></a>00012 <span class="comment"> * express or implied. See the License for the specific language governing</span>
65<a name="l00013"></a>00013 <span class="comment"> * permissions and limitations under the License.</span>
66<a name="l00014"></a>00014 <span class="comment"> */</span>
67<a name="l00015"></a>00015
68<a name="l00016"></a>00016 <span class="preprocessor">#ifndef SRC_SHADOW_AWS_IOT_SHADOW_JSON_DATA_H_</span>
69<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define SRC_SHADOW_AWS_IOT_SHADOW_JSON_DATA_H_</span>
70<a name="l00018"></a>00018 <span class="preprocessor"></span>
71<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;stddef.h&gt;</span>
72<a name="l00020"></a>00020
73<a name="l00025"></a>00025 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structjsonStruct.html">jsonStruct</a> <a class="code" href="structjsonStruct.html">jsonStruct_t</a>;
74<a name="l00029"></a>00029 <span class="keyword">typedef</span> void (*jsonStructCallback_t)(<span class="keyword">const</span> <span class="keywordtype">char</span> *pJsonValueBuffer, uint32_t valueLength, <a class="code" href="structjsonStruct.html">jsonStruct_t</a> *pJsonStruct_t);
75<a name="l00030"></a>00030
76<a name="l00036"></a>00036 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
77<a name="l00037"></a>00037 SHADOW_JSON_INT32,
78<a name="l00038"></a>00038 SHADOW_JSON_INT16,
79<a name="l00039"></a>00039 SHADOW_JSON_INT8,
80<a name="l00040"></a>00040 SHADOW_JSON_UINT32,
81<a name="l00041"></a>00041 SHADOW_JSON_UINT16,
82<a name="l00042"></a>00042 SHADOW_JSON_UINT8,
83<a name="l00043"></a>00043 SHADOW_JSON_FLOAT,
84<a name="l00044"></a>00044 SHADOW_JSON_DOUBLE,
85<a name="l00045"></a>00045 SHADOW_JSON_BOOL,
86<a name="l00046"></a>00046 SHADOW_JSON_STRING,
87<a name="l00047"></a>00047 SHADOW_JSON_OBJECT
88<a name="l00048"></a>00048 } JsonPrimitiveType;
89<a name="l00049"></a>00049
90<a name="l00050"></a><a class="code" href="structjsonStruct.html">00050</a> <span class="keyword">struct </span><a class="code" href="structjsonStruct.html">jsonStruct</a> {
91<a name="l00051"></a>00051 <span class="keyword">const</span> <span class="keywordtype">char</span> *pKey;
92<a name="l00052"></a>00052 <span class="keywordtype">void</span> *pData;
93<a name="l00053"></a>00053 JsonPrimitiveType type;
94<a name="l00054"></a>00054 jsonStructCallback_t cb;
95<a name="l00055"></a>00055 };
96<a name="l00056"></a>00056
97<a name="l00071"></a>00071 IoT_Error_t aws_iot_shadow_init_json_document(<span class="keywordtype">char</span> *pJsonDocument, <span class="keywordtype">size_t</span> maxSizeOfJsonDocument);
98<a name="l00072"></a>00072
99<a name="l00087"></a>00087 IoT_Error_t aws_iot_shadow_add_reported(<span class="keywordtype">char</span> *pJsonDocument, <span class="keywordtype">size_t</span> maxSizeOfJsonDocument, uint8_t count, ...);
100<a name="l00088"></a>00088
101<a name="l00103"></a>00103 IoT_Error_t aws_iot_shadow_add_desired(<span class="keywordtype">char</span> *pJsonDocument, <span class="keywordtype">size_t</span> maxSizeOfJsonDocument, uint8_t count, ...);
102<a name="l00104"></a>00104
103<a name="l00117"></a>00117 IoT_Error_t aws_iot_finalize_json_document(<span class="keywordtype">char</span> *pJsonDocument, <span class="keywordtype">size_t</span> maxSizeOfJsonDocument);
104<a name="l00118"></a>00118
105<a name="l00130"></a>00130 IoT_Error_t aws_iot_fill_with_client_token(<span class="keywordtype">char</span> *pBufferToBeUpdatedWithClientToken, <span class="keywordtype">size_t</span> maxSizeOfJsonDocument);
106<a name="l00131"></a>00131
107<a name="l00132"></a>00132 <span class="preprocessor">#endif </span><span class="comment">/* SRC_SHADOW_AWS_IOT_SHADOW_JSON_DATA_H_ */</span>
108</pre></div></div>
109</div>
110<!--- window showing the filter options -->
111<div id="MSearchSelectWindow"
112 onmouseover="return searchBox.OnSearchSelectShow()"
113 onmouseout="return searchBox.OnSearchSelectHide()"
114 onkeydown="return searchBox.OnSearchSelectKey(event)">
115<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
116
117<!-- iframe showing the search results (closed by default) -->
118<div id="MSearchResultsWindow">
119<iframe src="" frameborder="0"
120 name="MSearchResults" id="MSearchResults">
121</iframe>
122</div>
123
124<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
125<a href="http://www.doxygen.org/index.html">
126<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
127</body>
128</html>
diff --git a/docs/html/aws__iot__shadow__key_8h_source.html b/docs/html/aws__iot__shadow__key_8h_source.html
new file mode 100644
index 0000000..afd85cf
--- /dev/null
+++ b/docs/html/aws__iot__shadow__key_8h_source.html
@@ -0,0 +1,95 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: aws_iot_shadow_key.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>aws_iot_shadow_key.h</h1> </div>
51</div>
52<div class="contents">
53<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
54<a name="l00002"></a>00002 <span class="comment"> * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span>
55<a name="l00003"></a>00003 <span class="comment"> *</span>
56<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span>
57<a name="l00005"></a>00005 <span class="comment"> * You may not use this file except in compliance with the License.</span>
58<a name="l00006"></a>00006 <span class="comment"> * A copy of the License is located at</span>
59<a name="l00007"></a>00007 <span class="comment"> *</span>
60<a name="l00008"></a>00008 <span class="comment"> * http://aws.amazon.com/apache2.0</span>
61<a name="l00009"></a>00009 <span class="comment"> *</span>
62<a name="l00010"></a>00010 <span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span>
63<a name="l00011"></a>00011 <span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span>
64<a name="l00012"></a>00012 <span class="comment"> * express or implied. See the License for the specific language governing</span>
65<a name="l00013"></a>00013 <span class="comment"> * permissions and limitations under the License.</span>
66<a name="l00014"></a>00014 <span class="comment"> */</span>
67<a name="l00015"></a>00015
68<a name="l00016"></a>00016 <span class="preprocessor">#ifndef SRC_SHADOW_AWS_IOT_SHADOW_KEY_H_</span>
69<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define SRC_SHADOW_AWS_IOT_SHADOW_KEY_H_</span>
70<a name="l00018"></a>00018 <span class="preprocessor"></span>
71<a name="l00019"></a>00019 <span class="preprocessor">#define SHADOW_CLIENT_TOKEN_STRING &quot;clientToken&quot;</span>
72<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define SHADOW_VERSION_STRING &quot;version&quot;</span>
73<a name="l00021"></a>00021 <span class="preprocessor"></span>
74<a name="l00022"></a>00022 <span class="preprocessor">#endif </span><span class="comment">/* SRC_SHADOW_AWS_IOT_SHADOW_KEY_H_ */</span>
75</pre></div></div>
76</div>
77<!--- window showing the filter options -->
78<div id="MSearchSelectWindow"
79 onmouseover="return searchBox.OnSearchSelectShow()"
80 onmouseout="return searchBox.OnSearchSelectHide()"
81 onkeydown="return searchBox.OnSearchSelectKey(event)">
82<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
83
84<!-- iframe showing the search results (closed by default) -->
85<div id="MSearchResultsWindow">
86<iframe src="" frameborder="0"
87 name="MSearchResults" id="MSearchResults">
88</iframe>
89</div>
90
91<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
92<a href="http://www.doxygen.org/index.html">
93<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
94</body>
95</html>
diff --git a/docs/html/aws__iot__shadow__records_8h_source.html b/docs/html/aws__iot__shadow__records_8h_source.html
new file mode 100644
index 0000000..a7824df
--- /dev/null
+++ b/docs/html/aws__iot__shadow__records_8h_source.html
@@ -0,0 +1,115 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: aws_iot_shadow_records.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>aws_iot_shadow_records.h</h1> </div>
51</div>
52<div class="contents">
53<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
54<a name="l00002"></a>00002 <span class="comment"> * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span>
55<a name="l00003"></a>00003 <span class="comment"> *</span>
56<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span>
57<a name="l00005"></a>00005 <span class="comment"> * You may not use this file except in compliance with the License.</span>
58<a name="l00006"></a>00006 <span class="comment"> * A copy of the License is located at</span>
59<a name="l00007"></a>00007 <span class="comment"> *</span>
60<a name="l00008"></a>00008 <span class="comment"> * http://aws.amazon.com/apache2.0</span>
61<a name="l00009"></a>00009 <span class="comment"> *</span>
62<a name="l00010"></a>00010 <span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span>
63<a name="l00011"></a>00011 <span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span>
64<a name="l00012"></a>00012 <span class="comment"> * express or implied. See the License for the specific language governing</span>
65<a name="l00013"></a>00013 <span class="comment"> * permissions and limitations under the License.</span>
66<a name="l00014"></a>00014 <span class="comment"> */</span>
67<a name="l00015"></a>00015
68<a name="l00016"></a>00016 <span class="preprocessor">#ifndef SRC_SHADOW_AWS_IOT_SHADOW_RECORDS_H_</span>
69<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define SRC_SHADOW_AWS_IOT_SHADOW_RECORDS_H_</span>
70<a name="l00018"></a>00018 <span class="preprocessor"></span>
71<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;stdbool.h&gt;</span>
72<a name="l00020"></a>00020
73<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;<a class="code" href="aws__iot__shadow__interface_8h.html" title="Interface for thing shadow.">aws_iot_shadow_interface.h</a>&quot;</span>
74<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;<a class="code" href="aws__iot__config_8h.html" title="AWS IoT specific configuration file.">aws_iot_config.h</a>&quot;</span>
75<a name="l00023"></a>00023
76<a name="l00024"></a>00024
77<a name="l00025"></a>00025 <span class="keyword">extern</span> uint32_t shadowJsonVersionNum;
78<a name="l00026"></a>00026 <span class="keyword">extern</span> <span class="keywordtype">bool</span> shadowDiscardOldDeltaFlag;
79<a name="l00027"></a>00027
80<a name="l00028"></a>00028 <span class="keywordtype">void</span> initializeRecords(<a class="code" href="structMQTTClient__t.html" title="MQTT Client Type Definition.">MQTTClient_t</a> *pClient);
81<a name="l00029"></a>00029 <span class="keywordtype">bool</span> isSubscriptionPresent(<span class="keyword">const</span> <span class="keywordtype">char</span> *pThingName, <a class="code" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c" title="Thing Shadow Action type enum.">ShadowActions_t</a> action);
82<a name="l00030"></a>00030 IoT_Error_t subscribeToShadowActionAcks(<span class="keyword">const</span> <span class="keywordtype">char</span> *pThingName, <a class="code" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c" title="Thing Shadow Action type enum.">ShadowActions_t</a> action, <span class="keywordtype">bool</span> isSticky);
83<a name="l00031"></a>00031 <span class="keywordtype">void</span> incrementSubscriptionCnt(<span class="keyword">const</span> <span class="keywordtype">char</span> *pThingName, <a class="code" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c" title="Thing Shadow Action type enum.">ShadowActions_t</a> action, <span class="keywordtype">bool</span> isSticky);
84<a name="l00032"></a>00032
85<a name="l00033"></a>00033 IoT_Error_t publishToShadowAction(<span class="keyword">const</span> <span class="keywordtype">char</span> * pThingName, <a class="code" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c" title="Thing Shadow Action type enum.">ShadowActions_t</a> action, <span class="keyword">const</span> <span class="keywordtype">char</span> *pJsonDocumentToBeSent);
86<a name="l00034"></a>00034 <span class="keywordtype">void</span> addToAckWaitList(uint8_t indexAckWaitList, <span class="keyword">const</span> <span class="keywordtype">char</span> *pThingName, <a class="code" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c" title="Thing Shadow Action type enum.">ShadowActions_t</a> action,
87<a name="l00035"></a>00035 <span class="keyword">const</span> <span class="keywordtype">char</span> *pExtractedClientToken, <a class="code" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445" title="Function Pointer typedef used as the callback for every action.">fpActionCallback_t</a> callback, <span class="keywordtype">void</span> *pCallbackContext,
88<a name="l00036"></a>00036 uint32_t timeout_seconds);
89<a name="l00037"></a>00037 <span class="keywordtype">bool</span> getNextFreeIndexOfAckWaitList(uint8_t *pIndex);
90<a name="l00038"></a>00038 <span class="keywordtype">void</span> HandleExpiredResponseCallbacks(<span class="keywordtype">void</span>);
91<a name="l00039"></a>00039 <span class="keywordtype">void</span> initDeltaTokens(<span class="keywordtype">void</span>);
92<a name="l00040"></a>00040 IoT_Error_t registerJsonTokenOnDelta(<a class="code" href="structjsonStruct.html">jsonStruct_t</a> *pStruct);
93<a name="l00041"></a>00041
94<a name="l00042"></a>00042 <span class="preprocessor">#endif </span><span class="comment">/* SRC_SHADOW_AWS_IOT_SHADOW_RECORDS_H_ */</span>
95</pre></div></div>
96</div>
97<!--- window showing the filter options -->
98<div id="MSearchSelectWindow"
99 onmouseover="return searchBox.OnSearchSelectShow()"
100 onmouseout="return searchBox.OnSearchSelectHide()"
101 onkeydown="return searchBox.OnSearchSelectKey(event)">
102<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
103
104<!-- iframe showing the search results (closed by default) -->
105<div id="MSearchResultsWindow">
106<iframe src="" frameborder="0"
107 name="MSearchResults" id="MSearchResults">
108</iframe>
109</div>
110
111<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
112<a href="http://www.doxygen.org/index.html">
113<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
114</body>
115</html>
diff --git a/docs/html/aws__iot__version_8h_source.html b/docs/html/aws__iot__version_8h_source.html
new file mode 100644
index 0000000..c8cdb3c
--- /dev/null
+++ b/docs/html/aws__iot__version_8h_source.html
@@ -0,0 +1,100 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: aws_iot_version.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>aws_iot_version.h</h1> </div>
51</div>
52<div class="contents">
53<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
54<a name="l00002"></a>00002 <span class="comment"> * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span>
55<a name="l00003"></a>00003 <span class="comment"> *</span>
56<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span>
57<a name="l00005"></a>00005 <span class="comment"> * You may not use this file except in compliance with the License.</span>
58<a name="l00006"></a>00006 <span class="comment"> * A copy of the License is located at</span>
59<a name="l00007"></a>00007 <span class="comment"> *</span>
60<a name="l00008"></a>00008 <span class="comment"> * http://aws.amazon.com/apache2.0</span>
61<a name="l00009"></a>00009 <span class="comment"> *</span>
62<a name="l00010"></a>00010 <span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span>
63<a name="l00011"></a>00011 <span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span>
64<a name="l00012"></a>00012 <span class="comment"> * express or implied. See the License for the specific language governing</span>
65<a name="l00013"></a>00013 <span class="comment"> * permissions and limitations under the License.</span>
66<a name="l00014"></a>00014 <span class="comment"> */</span>
67<a name="l00015"></a>00015
68<a name="l00028"></a>00028 <span class="preprocessor">#ifndef SRC_UTILS_AWS_IOT_VERSION_H_</span>
69<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define SRC_UTILS_AWS_IOT_VERSION_H_</span>
70<a name="l00030"></a>00030 <span class="preprocessor"></span>
71<a name="l00034"></a>00034 <span class="preprocessor">#define VERSION_MAJOR 0</span>
72<a name="l00035"></a>00035 <span class="preprocessor"></span>
73<a name="l00038"></a>00038 <span class="preprocessor">#define VERSION_MINOR 4</span>
74<a name="l00039"></a>00039 <span class="preprocessor"></span>
75<a name="l00042"></a>00042 <span class="preprocessor">#define VERSION_PATCH 0</span>
76<a name="l00043"></a>00043 <span class="preprocessor"></span>
77<a name="l00046"></a>00046 <span class="preprocessor">#define VERSION_TAG &quot;BETA&quot;</span>
78<a name="l00047"></a>00047 <span class="preprocessor"></span>
79<a name="l00048"></a>00048 <span class="preprocessor">#endif </span><span class="comment">/* SRC_UTILS_AWS_IOT_VERSION_H_ */</span>
80</pre></div></div>
81</div>
82<!--- window showing the filter options -->
83<div id="MSearchSelectWindow"
84 onmouseover="return searchBox.OnSearchSelectShow()"
85 onmouseout="return searchBox.OnSearchSelectHide()"
86 onkeydown="return searchBox.OnSearchSelectKey(event)">
87<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
88
89<!-- iframe showing the search results (closed by default) -->
90<div id="MSearchResultsWindow">
91<iframe src="" frameborder="0"
92 name="MSearchResults" id="MSearchResults">
93</iframe>
94</div>
95
96<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
97<a href="http://www.doxygen.org/index.html">
98<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
99</body>
100</html>
diff --git a/docs/html/bc_s.png b/docs/html/bc_s.png
new file mode 100644
index 0000000..e401862
--- /dev/null
+++ b/docs/html/bc_s.png
Binary files differ
diff --git a/docs/html/classes.html b/docs/html/classes.html
new file mode 100644
index 0000000..5e7c4fc
--- /dev/null
+++ b/docs/html/classes.html
@@ -0,0 +1,82 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: Alphabetical List</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li class="current"><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="headertitle">
52<h1>Data Structure Index</h1> </div>
53</div>
54<div class="contents">
55<div class="qindex"><a class="qindex" href="#letter_J">J</a>&#160;|&#160;<a class="qindex" href="#letter_M">M</a>&#160;|&#160;<a class="qindex" href="#letter_N">N</a>&#160;|&#160;<a class="qindex" href="#letter_S">S</a>&#160;|&#160;<a class="qindex" href="#letter_T">T</a></div>
56<table align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
57<tr><td><a name="letter_J"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;J&#160;&#160;</div></td></tr></table>
58</td><td><a name="letter_M"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;M&#160;&#160;</div></td></tr></table>
59</td><td><a class="el" href="structMQTTPublishParams.html">MQTTPublishParams</a>&#160;&#160;&#160;</td><td><a class="el" href="structNetwork.html">Network</a>&#160;&#160;&#160;</td><td><a name="letter_T"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;T&#160;&#160;</div></td></tr></table>
60</td></tr><tr><td><a class="el" href="structjsmn__parser.html">jsmn_parser</a>&#160;&#160;&#160;</td><td><a class="el" href="structMQTTCallbackParams.html">MQTTCallbackParams</a>&#160;&#160;&#160;</td><td><a class="el" href="structMQTTSubscribeParams.html">MQTTSubscribeParams</a>&#160;&#160;&#160;</td><td><a name="letter_S"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;S&#160;&#160;</div></td></tr></table>
61</td><td><a class="el" href="structTimer.html">Timer</a>&#160;&#160;&#160;</td></tr><tr><td><a class="el" href="structjsmntok__t.html">jsmntok_t</a>&#160;&#160;&#160;</td><td><a class="el" href="structMQTTClient__t.html">MQTTClient_t</a>&#160;&#160;&#160;</td><td><a class="el" href="structMQTTwillOptions.html">MQTTwillOptions</a>&#160;&#160;&#160;</td><td><a class="el" href="structShadowParameters__t.html">ShadowParameters_t</a>&#160;&#160;&#160;</td><td><a class="el" href="structTLSConnectParams.html">TLSConnectParams</a>&#160;&#160;&#160;</td></tr><tr><td><a class="el" href="structjsonStruct.html">jsonStruct</a>&#160;&#160;&#160;</td><td><a class="el" href="structMQTTConnectParams.html">MQTTConnectParams</a>&#160;&#160;&#160;</td><td><a name="letter_N"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;N&#160;&#160;</div></td></tr></table>
62</td><td><a class="el" href="structSubscriptionRecord__t.html">SubscriptionRecord_t</a>&#160;&#160;&#160;</td><td><a class="el" href="structToBeReceivedAckRecord__t.html">ToBeReceivedAckRecord_t</a>&#160;&#160;&#160;</td></tr><tr><td><a class="el" href="structJsonTokenTable__t.html">JsonTokenTable_t</a>&#160;&#160;&#160;</td><td><a class="el" href="structMQTTMessageParams.html">MQTTMessageParams</a>&#160;&#160;&#160;</td></tr></table><div class="qindex"><a class="qindex" href="#letter_J">J</a>&#160;|&#160;<a class="qindex" href="#letter_M">M</a>&#160;|&#160;<a class="qindex" href="#letter_N">N</a>&#160;|&#160;<a class="qindex" href="#letter_S">S</a>&#160;|&#160;<a class="qindex" href="#letter_T">T</a></div>
63</div>
64<!--- window showing the filter options -->
65<div id="MSearchSelectWindow"
66 onmouseover="return searchBox.OnSearchSelectShow()"
67 onmouseout="return searchBox.OnSearchSelectHide()"
68 onkeydown="return searchBox.OnSearchSelectKey(event)">
69<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
70
71<!-- iframe showing the search results (closed by default) -->
72<div id="MSearchResultsWindow">
73<iframe src="" frameborder="0"
74 name="MSearchResults" id="MSearchResults">
75</iframe>
76</div>
77
78<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
79<a href="http://www.doxygen.org/index.html">
80<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
81</body>
82</html>
diff --git a/docs/html/closed.png b/docs/html/closed.png
new file mode 100644
index 0000000..b7d4bd9
--- /dev/null
+++ b/docs/html/closed.png
Binary files differ
diff --git a/docs/html/docs__main_8h.html b/docs/html/docs__main_8h.html
new file mode 100644
index 0000000..0330750
--- /dev/null
+++ b/docs/html/docs__main_8h.html
@@ -0,0 +1,79 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: docs_main.h File Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48</div>
49<div class="header">
50 <div class="headertitle">
51<h1>docs_main.h File Reference</h1> </div>
52</div>
53<div class="contents">
54
55<p><a href="docs__main_8h_source.html">Go to the source code of this file.</a></p>
56<table class="memberdecls">
57</table>
58<hr/><a name="_details"></a><h2>Detailed Description</h2>
59<p>C SDK Main Documentation Page </p>
60</div>
61<!--- window showing the filter options -->
62<div id="MSearchSelectWindow"
63 onmouseover="return searchBox.OnSearchSelectShow()"
64 onmouseout="return searchBox.OnSearchSelectHide()"
65 onkeydown="return searchBox.OnSearchSelectKey(event)">
66<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
67
68<!-- iframe showing the search results (closed by default) -->
69<div id="MSearchResultsWindow">
70<iframe src="" frameborder="0"
71 name="MSearchResults" id="MSearchResults">
72</iframe>
73</div>
74
75<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
76<a href="http://www.doxygen.org/index.html">
77<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
78</body>
79</html>
diff --git a/docs/html/docs__main_8h_source.html b/docs/html/docs__main_8h_source.html
new file mode 100644
index 0000000..ad64433
--- /dev/null
+++ b/docs/html/docs__main_8h_source.html
@@ -0,0 +1,74 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: docs_main.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>docs_main.h</h1> </div>
51</div>
52<div class="contents">
53<a href="docs__main_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
54</pre></div></div>
55</div>
56<!--- window showing the filter options -->
57<div id="MSearchSelectWindow"
58 onmouseover="return searchBox.OnSearchSelectShow()"
59 onmouseout="return searchBox.OnSearchSelectHide()"
60 onkeydown="return searchBox.OnSearchSelectKey(event)">
61<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
62
63<!-- iframe showing the search results (closed by default) -->
64<div id="MSearchResultsWindow">
65<iframe src="" frameborder="0"
66 name="MSearchResults" id="MSearchResults">
67</iframe>
68</div>
69
70<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
71<a href="http://www.doxygen.org/index.html">
72<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
73</body>
74</html>
diff --git a/docs/html/docs__related__page_8h_source.html b/docs/html/docs__related__page_8h_source.html
new file mode 100644
index 0000000..1c84095
--- /dev/null
+++ b/docs/html/docs__related__page_8h_source.html
@@ -0,0 +1,74 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: docs_related_page.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>docs_related_page.h</h1> </div>
51</div>
52<div class="contents">
53<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
54</pre></div></div>
55</div>
56<!--- window showing the filter options -->
57<div id="MSearchSelectWindow"
58 onmouseover="return searchBox.OnSearchSelectShow()"
59 onmouseout="return searchBox.OnSearchSelectHide()"
60 onkeydown="return searchBox.OnSearchSelectKey(event)">
61<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
62
63<!-- iframe showing the search results (closed by default) -->
64<div id="MSearchResultsWindow">
65<iframe src="" frameborder="0"
66 name="MSearchResults" id="MSearchResults">
67</iframe>
68</div>
69
70<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
71<a href="http://www.doxygen.org/index.html">
72<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
73</body>
74</html>
diff --git a/docs/html/docs__shadow__module_8h_source.html b/docs/html/docs__shadow__module_8h_source.html
new file mode 100644
index 0000000..ddcb995
--- /dev/null
+++ b/docs/html/docs__shadow__module_8h_source.html
@@ -0,0 +1,74 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: docs_shadow_module.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>docs_shadow_module.h</h1> </div>
51</div>
52<div class="contents">
53<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
54</pre></div></div>
55</div>
56<!--- window showing the filter options -->
57<div id="MSearchSelectWindow"
58 onmouseover="return searchBox.OnSearchSelectShow()"
59 onmouseout="return searchBox.OnSearchSelectHide()"
60 onkeydown="return searchBox.OnSearchSelectKey(event)">
61<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
62
63<!-- iframe showing the search results (closed by default) -->
64<div id="MSearchResultsWindow">
65<iframe src="" frameborder="0"
66 name="MSearchResults" id="MSearchResults">
67</iframe>
68</div>
69
70<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
71<a href="http://www.doxygen.org/index.html">
72<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
73</body>
74</html>
diff --git a/docs/html/doxygen.css b/docs/html/doxygen.css
new file mode 100644
index 0000000..1d22bd0
--- /dev/null
+++ b/docs/html/doxygen.css
@@ -0,0 +1,686 @@
1/* The standard CSS for doxygen */
2
3body, table, div, p, dl {
4 font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
5 font-size: 12px;
6}
7
8/* @group Heading Levels */
9
10h1 {
11 font-size: 150%;
12}
13
14h2 {
15 font-size: 120%;
16}
17
18h3 {
19 font-size: 100%;
20}
21
22dt {
23 font-weight: bold;
24}
25
26div.multicol {
27 -moz-column-gap: 1em;
28 -webkit-column-gap: 1em;
29 -moz-column-count: 3;
30 -webkit-column-count: 3;
31}
32
33p.startli, p.startdd, p.starttd {
34 margin-top: 2px;
35}
36
37p.endli {
38 margin-bottom: 0px;
39}
40
41p.enddd {
42 margin-bottom: 4px;
43}
44
45p.endtd {
46 margin-bottom: 2px;
47}
48
49/* @end */
50
51caption {
52 font-weight: bold;
53}
54
55span.legend {
56 font-size: 70%;
57 text-align: center;
58}
59
60h3.version {
61 font-size: 90%;
62 text-align: center;
63}
64
65div.qindex, div.navtab{
66 background-color: #EBEFF6;
67 border: 1px solid #A3B4D7;
68 text-align: center;
69 margin: 2px;
70 padding: 2px;
71}
72
73div.qindex, div.navpath {
74 width: 100%;
75 line-height: 140%;
76}
77
78div.navtab {
79 margin-right: 15px;
80}
81
82/* @group Link Styling */
83
84a {
85 color: #3D578C;
86 font-weight: normal;
87 text-decoration: none;
88}
89
90.contents a:visited {
91 color: #4665A2;
92}
93
94a:hover {
95 text-decoration: underline;
96}
97
98a.qindex {
99 font-weight: bold;
100}
101
102a.qindexHL {
103 font-weight: bold;
104 background-color: #9CAFD4;
105 color: #ffffff;
106 border: 1px double #869DCA;
107}
108
109.contents a.qindexHL:visited {
110 color: #ffffff;
111}
112
113a.el {
114 font-weight: bold;
115}
116
117a.elRef {
118}
119
120a.code {
121 color: #4665A2;
122}
123
124a.codeRef {
125 color: #4665A2;
126}
127
128/* @end */
129
130dl.el {
131 margin-left: -1cm;
132}
133
134.fragment {
135 font-family: monospace, fixed;
136 font-size: 105%;
137}
138
139pre.fragment {
140 border: 1px solid #C4CFE5;
141 background-color: #FBFCFD;
142 padding: 4px 6px;
143 margin: 4px 8px 4px 2px;
144 overflow: auto;
145 word-wrap: break-word;
146 font-size: 9pt;
147 line-height: 125%;
148}
149
150div.ah {
151 background-color: black;
152 font-weight: bold;
153 color: #ffffff;
154 margin-bottom: 3px;
155 margin-top: 3px;
156 padding: 0.2em;
157 border: solid thin #333;
158 border-radius: 0.5em;
159 -webkit-border-radius: .5em;
160 -moz-border-radius: .5em;
161 box-shadow: 2px 2px 3px #999;
162 -webkit-box-shadow: 2px 2px 3px #999;
163 -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
164 background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
165 background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
166}
167
168div.groupHeader {
169 margin-left: 16px;
170 margin-top: 12px;
171 font-weight: bold;
172}
173
174div.groupText {
175 margin-left: 16px;
176 font-style: italic;
177}
178
179body {
180 background: white;
181 color: black;
182 margin: 0;
183}
184
185div.contents {
186 margin-top: 10px;
187 margin-left: 10px;
188 margin-right: 10px;
189}
190
191td.indexkey {
192 background-color: #EBEFF6;
193 font-weight: bold;
194 border: 1px solid #C4CFE5;
195 margin: 2px 0px 2px 0;
196 padding: 2px 10px;
197}
198
199td.indexvalue {
200 background-color: #EBEFF6;
201 border: 1px solid #C4CFE5;
202 padding: 2px 10px;
203 margin: 2px 0px;
204}
205
206tr.memlist {
207 background-color: #EEF1F7;
208}
209
210p.formulaDsp {
211 text-align: center;
212}
213
214img.formulaDsp {
215
216}
217
218img.formulaInl {
219 vertical-align: middle;
220}
221
222div.center {
223 text-align: center;
224 margin-top: 0px;
225 margin-bottom: 0px;
226 padding: 0px;
227}
228
229div.center img {
230 border: 0px;
231}
232
233address.footer {
234 text-align: right;
235 padding-right: 12px;
236}
237
238img.footer {
239 border: 0px;
240 vertical-align: middle;
241}
242
243/* @group Code Colorization */
244
245span.keyword {
246 color: #008000
247}
248
249span.keywordtype {
250 color: #604020
251}
252
253span.keywordflow {
254 color: #e08000
255}
256
257span.comment {
258 color: #800000
259}
260
261span.preprocessor {
262 color: #806020
263}
264
265span.stringliteral {
266 color: #002080
267}
268
269span.charliteral {
270 color: #008080
271}
272
273span.vhdldigit {
274 color: #ff00ff
275}
276
277span.vhdlchar {
278 color: #000000
279}
280
281span.vhdlkeyword {
282 color: #700070
283}
284
285span.vhdllogic {
286 color: #ff0000
287}
288
289/* @end */
290
291/*
292.search {
293 color: #003399;
294 font-weight: bold;
295}
296
297form.search {
298 margin-bottom: 0px;
299 margin-top: 0px;
300}
301
302input.search {
303 font-size: 75%;
304 color: #000080;
305 font-weight: normal;
306 background-color: #e8eef2;
307}
308*/
309
310td.tiny {
311 font-size: 75%;
312}
313
314.dirtab {
315 padding: 4px;
316 border-collapse: collapse;
317 border: 1px solid #A3B4D7;
318}
319
320th.dirtab {
321 background: #EBEFF6;
322 font-weight: bold;
323}
324
325hr {
326 height: 0px;
327 border: none;
328 border-top: 1px solid #4A6AAA;
329}
330
331hr.footer {
332 height: 1px;
333}
334
335/* @group Member Descriptions */
336
337table.memberdecls {
338 border-spacing: 0px;
339 padding: 0px;
340}
341
342.mdescLeft, .mdescRight,
343.memItemLeft, .memItemRight,
344.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
345 background-color: #F9FAFC;
346 border: none;
347 margin: 4px;
348 padding: 1px 0 0 8px;
349}
350
351.mdescLeft, .mdescRight {
352 padding: 0px 8px 4px 8px;
353 color: #555;
354}
355
356.memItemLeft, .memItemRight, .memTemplParams {
357 border-top: 1px solid #C4CFE5;
358}
359
360.memItemLeft, .memTemplItemLeft {
361 white-space: nowrap;
362}
363
364.memTemplParams {
365 color: #4665A2;
366 white-space: nowrap;
367}
368
369/* @end */
370
371/* @group Member Details */
372
373/* Styles for detailed member documentation */
374
375.memtemplate {
376 font-size: 80%;
377 color: #4665A2;
378 font-weight: normal;
379 margin-left: 9px;
380}
381
382.memnav {
383 background-color: #EBEFF6;
384 border: 1px solid #A3B4D7;
385 text-align: center;
386 margin: 2px;
387 margin-right: 15px;
388 padding: 2px;
389}
390
391.memitem {
392 padding: 0;
393 margin-bottom: 10px;
394}
395
396.memname {
397 white-space: nowrap;
398 font-weight: bold;
399 margin-left: 6px;
400}
401
402.memproto {
403 border-top: 1px solid #A8B8D9;
404 border-left: 1px solid #A8B8D9;
405 border-right: 1px solid #A8B8D9;
406 padding: 6px 0px 6px 0px;
407 color: #253555;
408 font-weight: bold;
409 text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
410 /* opera specific markup */
411 box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
412 border-top-right-radius: 8px;
413 border-top-left-radius: 8px;
414 /* firefox specific markup */
415 -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
416 -moz-border-radius-topright: 8px;
417 -moz-border-radius-topleft: 8px;
418 /* webkit specific markup */
419 -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
420 -webkit-border-top-right-radius: 8px;
421 -webkit-border-top-left-radius: 8px;
422 background-image:url('nav_f.png');
423 background-repeat:repeat-x;
424 background-color: #E2E8F2;
425
426}
427
428.memdoc {
429 border-bottom: 1px solid #A8B8D9;
430 border-left: 1px solid #A8B8D9;
431 border-right: 1px solid #A8B8D9;
432 padding: 2px 5px;
433 background-color: #FBFCFD;
434 border-top-width: 0;
435 /* opera specific markup */
436 border-bottom-left-radius: 8px;
437 border-bottom-right-radius: 8px;
438 box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
439 /* firefox specific markup */
440 -moz-border-radius-bottomleft: 8px;
441 -moz-border-radius-bottomright: 8px;
442 -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
443 background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7);
444 /* webkit specific markup */
445 -webkit-border-bottom-left-radius: 8px;
446 -webkit-border-bottom-right-radius: 8px;
447 -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
448 background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7));
449}
450
451.paramkey {
452 text-align: right;
453}
454
455.paramtype {
456 white-space: nowrap;
457}
458
459.paramname {
460 color: #602020;
461 white-space: nowrap;
462}
463.paramname em {
464 font-style: normal;
465}
466
467.params, .retval, .exception, .tparams {
468 border-spacing: 6px 2px;
469}
470
471.params .paramname, .retval .paramname {
472 font-weight: bold;
473 vertical-align: top;
474}
475
476.params .paramtype {
477 font-style: italic;
478 vertical-align: top;
479}
480
481.params .paramdir {
482 font-family: "courier new",courier,monospace;
483 vertical-align: top;
484}
485
486
487
488
489/* @end */
490
491/* @group Directory (tree) */
492
493/* for the tree view */
494
495.ftvtree {
496 font-family: sans-serif;
497 margin: 0px;
498}
499
500/* these are for tree view when used as main index */
501
502.directory {
503 font-size: 9pt;
504 font-weight: bold;
505 margin: 5px;
506}
507
508.directory h3 {
509 margin: 0px;
510 margin-top: 1em;
511 font-size: 11pt;
512}
513
514/*
515The following two styles can be used to replace the root node title
516with an image of your choice. Simply uncomment the next two styles,
517specify the name of your image and be sure to set 'height' to the
518proper pixel height of your image.
519*/
520
521/*
522.directory h3.swap {
523 height: 61px;
524 background-repeat: no-repeat;
525 background-image: url("yourimage.gif");
526}
527.directory h3.swap span {
528 display: none;
529}
530*/
531
532.directory > h3 {
533 margin-top: 0;
534}
535
536.directory p {
537 margin: 0px;
538 white-space: nowrap;
539}
540
541.directory div {
542 display: none;
543 margin: 0px;
544}
545
546.directory img {
547 vertical-align: -30%;
548}
549
550/* these are for tree view when not used as main index */
551
552.directory-alt {
553 font-size: 100%;
554 font-weight: bold;
555}
556
557.directory-alt h3 {
558 margin: 0px;
559 margin-top: 1em;
560 font-size: 11pt;
561}
562
563.directory-alt > h3 {
564 margin-top: 0;
565}
566
567.directory-alt p {
568 margin: 0px;
569 white-space: nowrap;
570}
571
572.directory-alt div {
573 display: none;
574 margin: 0px;
575}
576
577.directory-alt img {
578 vertical-align: -30%;
579}
580
581/* @end */
582
583div.dynheader {
584 margin-top: 8px;
585}
586
587address {
588 font-style: normal;
589 color: #2A3D61;
590}
591
592table.doxtable {
593 border-collapse:collapse;
594}
595
596table.doxtable td, table.doxtable th {
597 border: 1px solid #2D4068;
598 padding: 3px 7px 2px;
599}
600
601table.doxtable th {
602 background-color: #374F7F;
603 color: #FFFFFF;
604 font-size: 110%;
605 padding-bottom: 4px;
606 padding-top: 5px;
607 text-align:left;
608}
609
610.tabsearch {
611 top: 0px;
612 left: 10px;
613 height: 36px;
614 background-image: url('tab_b.png');
615 z-index: 101;
616 overflow: hidden;
617 font-size: 13px;
618}
619
620.navpath ul
621{
622 font-size: 11px;
623 background-image:url('tab_b.png');
624 background-repeat:repeat-x;
625 height:30px;
626 line-height:30px;
627 color:#8AA0CC;
628 border:solid 1px #C2CDE4;
629 overflow:hidden;
630 margin:0px;
631 padding:0px;
632}
633
634.navpath li
635{
636 list-style-type:none;
637 float:left;
638 padding-left:10px;
639 padding-right: 15px;
640 background-image:url('bc_s.png');
641 background-repeat:no-repeat;
642 background-position:right;
643 color:#364D7C;
644}
645
646.navpath a
647{
648 height:32px;
649 display:block;
650 text-decoration: none;
651 outline: none;
652}
653
654.navpath a:hover
655{
656 color:#6884BD;
657}
658
659div.summary
660{
661 float: right;
662 font-size: 8pt;
663 padding-right: 5px;
664 width: 50%;
665 text-align: right;
666}
667
668div.summary a
669{
670 white-space: nowrap;
671}
672
673div.header
674{
675 background-image:url('nav_h.png');
676 background-repeat:repeat-x;
677 background-color: #F9FAFC;
678 margin: 0px;
679 border-bottom: 1px solid #C4CFE5;
680}
681
682div.headertitle
683{
684 padding: 5px 5px 5px 10px;
685}
686
diff --git a/docs/html/doxygen.png b/docs/html/doxygen.png
new file mode 100644
index 0000000..635ed52
--- /dev/null
+++ b/docs/html/doxygen.png
Binary files differ
diff --git a/docs/html/files.html b/docs/html/files.html
new file mode 100644
index 0000000..6c4356f
--- /dev/null
+++ b/docs/html/files.html
@@ -0,0 +1,100 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: File Index</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li class="current"><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48</div>
49<div class="header">
50 <div class="headertitle">
51<h1>File List</h1> </div>
52</div>
53<div class="contents">
54Here is a list of all documented files with brief descriptions:<table>
55 <tr><td class="indexkey"><a class="el" href="aws__iot__config_8h.html">aws_iot_config.h</a> <a href="aws__iot__config_8h_source.html">[code]</a></td><td class="indexvalue">AWS IoT specific configuration file </td></tr>
56 <tr><td class="indexkey"><b>aws_iot_error.h</b> <a href="aws__iot__error_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
57 <tr><td class="indexkey"><b>aws_iot_json_utils.h</b> <a href="aws__iot__json__utils_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
58 <tr><td class="indexkey"><b>aws_iot_log.h</b> <a href="aws__iot__log_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
59 <tr><td class="indexkey"><b>aws_iot_mqtt_interface.h</b> <a href="aws__iot__mqtt__interface_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
60 <tr><td class="indexkey"><b>aws_iot_shadow_actions.h</b> <a href="aws__iot__shadow__actions_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
61 <tr><td class="indexkey"><a class="el" href="aws__iot__shadow__interface_8h.html">aws_iot_shadow_interface.h</a> <a href="aws__iot__shadow__interface_8h_source.html">[code]</a></td><td class="indexvalue">Interface for thing shadow </td></tr>
62 <tr><td class="indexkey"><b>aws_iot_shadow_json.h</b> <a href="aws__iot__shadow__json_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
63 <tr><td class="indexkey"><b>aws_iot_shadow_json_data.h</b> <a href="aws__iot__shadow__json__data_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
64 <tr><td class="indexkey"><b>aws_iot_shadow_key.h</b> <a href="aws__iot__shadow__key_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
65 <tr><td class="indexkey"><b>aws_iot_shadow_records.h</b> <a href="aws__iot__shadow__records_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
66 <tr><td class="indexkey"><b>aws_iot_version.h</b> <a href="aws__iot__version_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
67 <tr><td class="indexkey"><a class="el" href="docs__main_8h.html">docs_main.h</a> <a href="docs__main_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
68 <tr><td class="indexkey"><b>docs_related_page.h</b> <a href="docs__related__page_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
69 <tr><td class="indexkey"><b>docs_shadow_module.h</b> <a href="docs__shadow__module_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
70 <tr><td class="indexkey"><b>hostname_compare.h</b> <a href="hostname__compare_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
71 <tr><td class="indexkey"><a class="el" href="jsmn_8c.html">jsmn.c</a></td><td class="indexvalue">Implementation of the JSMN (Jasmine) JSON parser </td></tr>
72 <tr><td class="indexkey"><a class="el" href="jsmn_8h.html">jsmn.h</a> <a href="jsmn_8h_source.html">[code]</a></td><td class="indexvalue">Definition of the JSMN (Jasmine) JSON parser </td></tr>
73 <tr><td class="indexkey"><a class="el" href="network__interface_8h.html">network_interface.h</a> <a href="network__interface_8h_source.html">[code]</a></td><td class="indexvalue"><a class="el" href="structNetwork.html" title="Network Structure.">Network</a> interface definition for MQTT client </td></tr>
74 <tr><td class="indexkey"><b>openssl_hostname_validation.h</b> <a href="openssl__hostname__validation_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
75 <tr><td class="indexkey"><b>rawstr.h</b> <a href="rawstr_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
76 <tr><td class="indexkey"><a class="el" href="shadow__sample_8c.html">shadow_sample.c</a></td><td class="indexvalue">A simple connected window example demonstrating the use of Thing Shadow </td></tr>
77 <tr><td class="indexkey"><a class="el" href="timer_8c.html">timer.c</a></td><td class="indexvalue">Linux implementation of the timer interface </td></tr>
78 <tr><td class="indexkey"><a class="el" href="timer__interface_8h.html">timer_interface.h</a> <a href="timer__interface_8h_source.html">[code]</a></td><td class="indexvalue"><a class="el" href="structTimer.html">Timer</a> interface definition for MQTT client </td></tr>
79 <tr><td class="indexkey"><b>timer_linux.h</b> <a href="timer__linux_8h_source.html">[code]</a></td><td class="indexvalue"></td></tr>
80</table>
81</div>
82<!--- window showing the filter options -->
83<div id="MSearchSelectWindow"
84 onmouseover="return searchBox.OnSearchSelectShow()"
85 onmouseout="return searchBox.OnSearchSelectHide()"
86 onkeydown="return searchBox.OnSearchSelectKey(event)">
87<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
88
89<!-- iframe showing the search results (closed by default) -->
90<div id="MSearchResultsWindow">
91<iframe src="" frameborder="0"
92 name="MSearchResults" id="MSearchResults">
93</iframe>
94</div>
95
96<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
97<a href="http://www.doxygen.org/index.html">
98<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
99</body>
100</html>
diff --git a/docs/html/functions.html b/docs/html/functions.html
new file mode 100644
index 0000000..8e6b727
--- /dev/null
+++ b/docs/html/functions.html
@@ -0,0 +1,301 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: Data Fields</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li class="current"><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49 <div class="tabs2">
50 <ul class="tablist">
51 <li class="current"><a href="functions.html"><span>All</span></a></li>
52 <li><a href="functions_vars.html"><span>Variables</span></a></li>
53 </ul>
54 </div>
55 <div class="tabs3">
56 <ul class="tablist">
57 <li><a href="#index_c"><span>c</span></a></li>
58 <li><a href="#index_d"><span>d</span></a></li>
59 <li><a href="#index_i"><span>i</span></a></li>
60 <li><a href="#index_k"><span>k</span></a></li>
61 <li><a href="#index_m"><span>m</span></a></li>
62 <li><a href="#index_p"><span>p</span></a></li>
63 <li><a href="#index_q"><span>q</span></a></li>
64 <li><a href="#index_s"><span>s</span></a></li>
65 <li><a href="#index_t"><span>t</span></a></li>
66 <li><a href="#index_u"><span>u</span></a></li>
67 <li><a href="#index_w"><span>w</span></a></li>
68 <li><a href="#index_y"><span>y</span></a></li>
69 </ul>
70 </div>
71</div>
72<div class="contents">
73Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
74
75<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
76<li>connect
77: <a class="el" href="structMQTTClient__t.html#aaa8b9c7c1d9e3205095c400ca54bf3fc">MQTTClient_t</a>
78</li>
79</ul>
80
81
82<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
83<li>DestinationPort
84: <a class="el" href="structTLSConnectParams.html#a98310c27d56c9856270e0c7ba02dde36">TLSConnectParams</a>
85</li>
86<li>disconnect
87: <a class="el" href="structNetwork.html#a0f1dce0927b86b72bf1d5e33b609b385">Network</a>
88, <a class="el" href="structMQTTClient__t.html#a6b466b3c30e2f81dc2c8bdcc1477ea10">MQTTClient_t</a>
89</li>
90<li>disconnectHandler
91: <a class="el" href="structMQTTConnectParams.html#a770dfb57d9cc24f2f7048275d134350b">MQTTConnectParams</a>
92</li>
93</ul>
94
95
96<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
97<li>id
98: <a class="el" href="structMQTTMessageParams.html#a9faad31a60f5d4c26d0765832af8552e">MQTTMessageParams</a>
99</li>
100<li>isCleansession
101: <a class="el" href="structMQTTConnectParams.html#a4ed3fb7b2aad72c7f33b39494c04eee7">MQTTConnectParams</a>
102</li>
103<li>isConnected
104: <a class="el" href="structMQTTClient__t.html#a5ff9ec93a1e65a90c2f3b2f14bc3193a">MQTTClient_t</a>
105</li>
106<li>isDuplicate
107: <a class="el" href="structMQTTMessageParams.html#a4df7a8f21af28a9982483282b5ed65f2">MQTTMessageParams</a>
108</li>
109<li>isRetained
110: <a class="el" href="structMQTTwillOptions.html#a5a056c3e21c3ba7b7825b601d4eb8ec4">MQTTwillOptions</a>
111, <a class="el" href="structMQTTMessageParams.html#a6d0ac76d1a77b4369160b462214abe81">MQTTMessageParams</a>
112</li>
113<li>isSSLHostnameVerify
114: <a class="el" href="structMQTTConnectParams.html#a11d7d74c185dabcafa71c938c7a6bdb8">MQTTConnectParams</a>
115</li>
116<li>isWillMsgPresent
117: <a class="el" href="structMQTTConnectParams.html#ae5bed52bd50304de0d06795fac5502e6">MQTTConnectParams</a>
118</li>
119</ul>
120
121
122<h3><a class="anchor" id="index_k"></a>- k -</h3><ul>
123<li>KeepAliveInterval_sec
124: <a class="el" href="structMQTTConnectParams.html#a8ae47bfc9025dafc49e80605317e7232">MQTTConnectParams</a>
125</li>
126</ul>
127
128
129<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
130<li>MessageParams
131: <a class="el" href="structMQTTCallbackParams.html#ac350fbe59e29d1f9c08d61340bdb9170">MQTTCallbackParams</a>
132, <a class="el" href="structMQTTPublishParams.html#a7ac4d0b9e84808a07e0036f9a0e4b369">MQTTPublishParams</a>
133</li>
134<li>mHandler
135: <a class="el" href="structMQTTSubscribeParams.html#a5d21b3e72ac4530110cd43ccdc2245b1">MQTTSubscribeParams</a>
136</li>
137<li>mqttCommandTimeout_ms
138: <a class="el" href="structMQTTConnectParams.html#ac2d24e342b29b7f3ea4777732fd6988a">MQTTConnectParams</a>
139</li>
140<li>mqttread
141: <a class="el" href="structNetwork.html#aabf2c7305c36a7858b471cef6d98de0e">Network</a>
142</li>
143<li>MQTTVersion
144: <a class="el" href="structMQTTConnectParams.html#a25577733f870ba683b7f44e2288036a7">MQTTConnectParams</a>
145</li>
146<li>mqttwrite
147: <a class="el" href="structNetwork.html#a00ed168a988784ecb64c8a07da2e04bd">Network</a>
148</li>
149<li>my_socket
150: <a class="el" href="structNetwork.html#ad7b36ded416243b20d0d5924dba8385e">Network</a>
151</li>
152</ul>
153
154
155<h3><a class="anchor" id="index_p"></a>- p -</h3><ul>
156<li>PayloadLen
157: <a class="el" href="structMQTTMessageParams.html#a41d4499e625695a8682eb2f51c0fddf9">MQTTMessageParams</a>
158</li>
159<li>pClientCRT
160: <a class="el" href="structShadowParameters__t.html#a9ba70adf7b2553a574d0c493815c3fde">ShadowParameters_t</a>
161</li>
162<li>pClientID
163: <a class="el" href="structMQTTConnectParams.html#ae089333563f566afdb36caa82e5375bf">MQTTConnectParams</a>
164</li>
165<li>pClientKey
166: <a class="el" href="structShadowParameters__t.html#af0a34f1265930aec7023f625af80df7f">ShadowParameters_t</a>
167</li>
168<li>pDestinationURL
169: <a class="el" href="structTLSConnectParams.html#a4deae89cd9ba3f3b2e75c27e1b80cdc0">TLSConnectParams</a>
170</li>
171<li>pDeviceCertLocation
172: <a class="el" href="structTLSConnectParams.html#aa8a37f66a9473f554b92f0944e1baa3e">TLSConnectParams</a>
173, <a class="el" href="structMQTTConnectParams.html#a0ff5b27384df86ae50caac0b4bb8a429">MQTTConnectParams</a>
174</li>
175<li>pDevicePrivateKeyLocation
176: <a class="el" href="structTLSConnectParams.html#aaca0411311eb106ca6c48bd788de9fdf">TLSConnectParams</a>
177, <a class="el" href="structMQTTConnectParams.html#a99ce9a0fe10c70ef3e445cf7612be919">MQTTConnectParams</a>
178</li>
179<li>pHost
180: <a class="el" href="structShadowParameters__t.html#abebf2ba2657ead7718385f2406730cc0">ShadowParameters_t</a>
181</li>
182<li>pHostURL
183: <a class="el" href="structMQTTConnectParams.html#afe7a9782130dab062a9b27aabcade48d">MQTTConnectParams</a>
184</li>
185<li>pMessage
186: <a class="el" href="structMQTTwillOptions.html#a3113cbbc7701ed62735a7fc0635e8d2f">MQTTwillOptions</a>
187</li>
188<li>pMqttClientId
189: <a class="el" href="structShadowParameters__t.html#a27619390335abf973719645b8f31a277">ShadowParameters_t</a>
190</li>
191<li>pMyThingName
192: <a class="el" href="structShadowParameters__t.html#adb78403e35dd900410d5d26ef0fa315d">ShadowParameters_t</a>
193</li>
194<li>port
195: <a class="el" href="structShadowParameters__t.html#a3243eeb13c8bad2cf78dcd7003b1d665">ShadowParameters_t</a>
196, <a class="el" href="structMQTTConnectParams.html#a03eed7f477e9f834294d0891d125ad5c">MQTTConnectParams</a>
197</li>
198<li>pPassword
199: <a class="el" href="structMQTTConnectParams.html#a09497a2124f8021a70bde9d713350611">MQTTConnectParams</a>
200</li>
201<li>pPayload
202: <a class="el" href="structMQTTMessageParams.html#ae0103a22ff8338af06553f3403b4b916">MQTTMessageParams</a>
203</li>
204<li>pRootCA
205: <a class="el" href="structShadowParameters__t.html#afa3bbe30735094046913d645b6d2ae50">ShadowParameters_t</a>
206</li>
207<li>pRootCALocation
208: <a class="el" href="structMQTTConnectParams.html#ac8128e06c4135460050acf220bee7297">MQTTConnectParams</a>
209, <a class="el" href="structTLSConnectParams.html#a62e797f55d038c78739a2af11d03b6ff">TLSConnectParams</a>
210</li>
211<li>pTopic
212: <a class="el" href="structMQTTPublishParams.html#ad8b1bb06e8bd823de87b00b912d8b6e1">MQTTPublishParams</a>
213, <a class="el" href="structMQTTSubscribeParams.html#a8bbbc1a4a96d1270e11a58d3aa31521e">MQTTSubscribeParams</a>
214</li>
215<li>pTopicName
216: <a class="el" href="structMQTTCallbackParams.html#af6b4ccd3c4cab157b93c3d0c1d8f1dc9">MQTTCallbackParams</a>
217, <a class="el" href="structMQTTwillOptions.html#aa27c5b47d2f848ac32cd2180d97dd8e3">MQTTwillOptions</a>
218</li>
219<li>publish
220: <a class="el" href="structMQTTClient__t.html#accddc5560b9d33e8d7556c336847c584">MQTTClient_t</a>
221</li>
222<li>pUserName
223: <a class="el" href="structMQTTConnectParams.html#a2efa006d6305a8c6bea31cbbfb20cbfe">MQTTConnectParams</a>
224</li>
225</ul>
226
227
228<h3><a class="anchor" id="index_q"></a>- q -</h3><ul>
229<li>qos
230: <a class="el" href="structMQTTwillOptions.html#a6c5ff6dad1a3487cd131bb6eaa990a3f">MQTTwillOptions</a>
231, <a class="el" href="structMQTTSubscribeParams.html#adcfb4d6691c3d68818b49b996addf4fa">MQTTSubscribeParams</a>
232, <a class="el" href="structMQTTMessageParams.html#aef06a771fecb653893f75ee74b5067aa">MQTTMessageParams</a>
233</li>
234</ul>
235
236
237<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
238<li>ServerVerificationFlag
239: <a class="el" href="structTLSConnectParams.html#ad81e67d8b722a28af4abdbeb89aa58e7">TLSConnectParams</a>
240</li>
241<li>ShadowParametersDefault
242: <a class="el" href="structShadowParameters__t.html#adc225bbde6004034d41899a4f4b13074">ShadowParameters_t</a>
243</li>
244<li>subscribe
245: <a class="el" href="structMQTTClient__t.html#a7053d0cd48d1c22a217d847babe372c4">MQTTClient_t</a>
246</li>
247</ul>
248
249
250<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
251<li>timeout_ms
252: <a class="el" href="structTLSConnectParams.html#a60800f6a6a6bc138e5b0a3e016d0be8f">TLSConnectParams</a>
253</li>
254<li>tlsHandshakeTimeout_ms
255: <a class="el" href="structMQTTConnectParams.html#aa870d2df978a54f739214ee888c67171">MQTTConnectParams</a>
256</li>
257<li>TopicNameLen
258: <a class="el" href="structMQTTCallbackParams.html#acb1088787c038d920c2f24fca3aecd3c">MQTTCallbackParams</a>
259</li>
260</ul>
261
262
263<h3><a class="anchor" id="index_u"></a>- u -</h3><ul>
264<li>unsubscribe
265: <a class="el" href="structMQTTClient__t.html#ad4fca46f97db56c20667c4245d0bdea1">MQTTClient_t</a>
266</li>
267</ul>
268
269
270<h3><a class="anchor" id="index_w"></a>- w -</h3><ul>
271<li>will
272: <a class="el" href="structMQTTConnectParams.html#abd5a646508c84aa7445822855969eaf6">MQTTConnectParams</a>
273</li>
274</ul>
275
276
277<h3><a class="anchor" id="index_y"></a>- y -</h3><ul>
278<li>yield
279: <a class="el" href="structMQTTClient__t.html#accaa6a8595048819c8629a80a398bc54">MQTTClient_t</a>
280</li>
281</ul>
282</div>
283<!--- window showing the filter options -->
284<div id="MSearchSelectWindow"
285 onmouseover="return searchBox.OnSearchSelectShow()"
286 onmouseout="return searchBox.OnSearchSelectHide()"
287 onkeydown="return searchBox.OnSearchSelectKey(event)">
288<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
289
290<!-- iframe showing the search results (closed by default) -->
291<div id="MSearchResultsWindow">
292<iframe src="" frameborder="0"
293 name="MSearchResults" id="MSearchResults">
294</iframe>
295</div>
296
297<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
298<a href="http://www.doxygen.org/index.html">
299<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
300</body>
301</html>
diff --git a/docs/html/functions_vars.html b/docs/html/functions_vars.html
new file mode 100644
index 0000000..0c3372a
--- /dev/null
+++ b/docs/html/functions_vars.html
@@ -0,0 +1,301 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: Data Fields - Variables</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li class="current"><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49 <div class="tabs2">
50 <ul class="tablist">
51 <li><a href="functions.html"><span>All</span></a></li>
52 <li class="current"><a href="functions_vars.html"><span>Variables</span></a></li>
53 </ul>
54 </div>
55 <div class="tabs3">
56 <ul class="tablist">
57 <li><a href="#index_c"><span>c</span></a></li>
58 <li><a href="#index_d"><span>d</span></a></li>
59 <li><a href="#index_i"><span>i</span></a></li>
60 <li><a href="#index_k"><span>k</span></a></li>
61 <li><a href="#index_m"><span>m</span></a></li>
62 <li><a href="#index_p"><span>p</span></a></li>
63 <li><a href="#index_q"><span>q</span></a></li>
64 <li><a href="#index_s"><span>s</span></a></li>
65 <li><a href="#index_t"><span>t</span></a></li>
66 <li><a href="#index_u"><span>u</span></a></li>
67 <li><a href="#index_w"><span>w</span></a></li>
68 <li><a href="#index_y"><span>y</span></a></li>
69 </ul>
70 </div>
71</div>
72<div class="contents">
73&#160;
74
75<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
76<li>connect
77: <a class="el" href="structMQTTClient__t.html#aaa8b9c7c1d9e3205095c400ca54bf3fc">MQTTClient_t</a>
78</li>
79</ul>
80
81
82<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
83<li>DestinationPort
84: <a class="el" href="structTLSConnectParams.html#a98310c27d56c9856270e0c7ba02dde36">TLSConnectParams</a>
85</li>
86<li>disconnect
87: <a class="el" href="structNetwork.html#a0f1dce0927b86b72bf1d5e33b609b385">Network</a>
88, <a class="el" href="structMQTTClient__t.html#a6b466b3c30e2f81dc2c8bdcc1477ea10">MQTTClient_t</a>
89</li>
90<li>disconnectHandler
91: <a class="el" href="structMQTTConnectParams.html#a770dfb57d9cc24f2f7048275d134350b">MQTTConnectParams</a>
92</li>
93</ul>
94
95
96<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
97<li>id
98: <a class="el" href="structMQTTMessageParams.html#a9faad31a60f5d4c26d0765832af8552e">MQTTMessageParams</a>
99</li>
100<li>isCleansession
101: <a class="el" href="structMQTTConnectParams.html#a4ed3fb7b2aad72c7f33b39494c04eee7">MQTTConnectParams</a>
102</li>
103<li>isConnected
104: <a class="el" href="structMQTTClient__t.html#a5ff9ec93a1e65a90c2f3b2f14bc3193a">MQTTClient_t</a>
105</li>
106<li>isDuplicate
107: <a class="el" href="structMQTTMessageParams.html#a4df7a8f21af28a9982483282b5ed65f2">MQTTMessageParams</a>
108</li>
109<li>isRetained
110: <a class="el" href="structMQTTwillOptions.html#a5a056c3e21c3ba7b7825b601d4eb8ec4">MQTTwillOptions</a>
111, <a class="el" href="structMQTTMessageParams.html#a6d0ac76d1a77b4369160b462214abe81">MQTTMessageParams</a>
112</li>
113<li>isSSLHostnameVerify
114: <a class="el" href="structMQTTConnectParams.html#a11d7d74c185dabcafa71c938c7a6bdb8">MQTTConnectParams</a>
115</li>
116<li>isWillMsgPresent
117: <a class="el" href="structMQTTConnectParams.html#ae5bed52bd50304de0d06795fac5502e6">MQTTConnectParams</a>
118</li>
119</ul>
120
121
122<h3><a class="anchor" id="index_k"></a>- k -</h3><ul>
123<li>KeepAliveInterval_sec
124: <a class="el" href="structMQTTConnectParams.html#a8ae47bfc9025dafc49e80605317e7232">MQTTConnectParams</a>
125</li>
126</ul>
127
128
129<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
130<li>MessageParams
131: <a class="el" href="structMQTTCallbackParams.html#ac350fbe59e29d1f9c08d61340bdb9170">MQTTCallbackParams</a>
132, <a class="el" href="structMQTTPublishParams.html#a7ac4d0b9e84808a07e0036f9a0e4b369">MQTTPublishParams</a>
133</li>
134<li>mHandler
135: <a class="el" href="structMQTTSubscribeParams.html#a5d21b3e72ac4530110cd43ccdc2245b1">MQTTSubscribeParams</a>
136</li>
137<li>mqttCommandTimeout_ms
138: <a class="el" href="structMQTTConnectParams.html#ac2d24e342b29b7f3ea4777732fd6988a">MQTTConnectParams</a>
139</li>
140<li>mqttread
141: <a class="el" href="structNetwork.html#aabf2c7305c36a7858b471cef6d98de0e">Network</a>
142</li>
143<li>MQTTVersion
144: <a class="el" href="structMQTTConnectParams.html#a25577733f870ba683b7f44e2288036a7">MQTTConnectParams</a>
145</li>
146<li>mqttwrite
147: <a class="el" href="structNetwork.html#a00ed168a988784ecb64c8a07da2e04bd">Network</a>
148</li>
149<li>my_socket
150: <a class="el" href="structNetwork.html#ad7b36ded416243b20d0d5924dba8385e">Network</a>
151</li>
152</ul>
153
154
155<h3><a class="anchor" id="index_p"></a>- p -</h3><ul>
156<li>PayloadLen
157: <a class="el" href="structMQTTMessageParams.html#a41d4499e625695a8682eb2f51c0fddf9">MQTTMessageParams</a>
158</li>
159<li>pClientCRT
160: <a class="el" href="structShadowParameters__t.html#a9ba70adf7b2553a574d0c493815c3fde">ShadowParameters_t</a>
161</li>
162<li>pClientID
163: <a class="el" href="structMQTTConnectParams.html#ae089333563f566afdb36caa82e5375bf">MQTTConnectParams</a>
164</li>
165<li>pClientKey
166: <a class="el" href="structShadowParameters__t.html#af0a34f1265930aec7023f625af80df7f">ShadowParameters_t</a>
167</li>
168<li>pDestinationURL
169: <a class="el" href="structTLSConnectParams.html#a4deae89cd9ba3f3b2e75c27e1b80cdc0">TLSConnectParams</a>
170</li>
171<li>pDeviceCertLocation
172: <a class="el" href="structTLSConnectParams.html#aa8a37f66a9473f554b92f0944e1baa3e">TLSConnectParams</a>
173, <a class="el" href="structMQTTConnectParams.html#a0ff5b27384df86ae50caac0b4bb8a429">MQTTConnectParams</a>
174</li>
175<li>pDevicePrivateKeyLocation
176: <a class="el" href="structTLSConnectParams.html#aaca0411311eb106ca6c48bd788de9fdf">TLSConnectParams</a>
177, <a class="el" href="structMQTTConnectParams.html#a99ce9a0fe10c70ef3e445cf7612be919">MQTTConnectParams</a>
178</li>
179<li>pHost
180: <a class="el" href="structShadowParameters__t.html#abebf2ba2657ead7718385f2406730cc0">ShadowParameters_t</a>
181</li>
182<li>pHostURL
183: <a class="el" href="structMQTTConnectParams.html#afe7a9782130dab062a9b27aabcade48d">MQTTConnectParams</a>
184</li>
185<li>pMessage
186: <a class="el" href="structMQTTwillOptions.html#a3113cbbc7701ed62735a7fc0635e8d2f">MQTTwillOptions</a>
187</li>
188<li>pMqttClientId
189: <a class="el" href="structShadowParameters__t.html#a27619390335abf973719645b8f31a277">ShadowParameters_t</a>
190</li>
191<li>pMyThingName
192: <a class="el" href="structShadowParameters__t.html#adb78403e35dd900410d5d26ef0fa315d">ShadowParameters_t</a>
193</li>
194<li>port
195: <a class="el" href="structShadowParameters__t.html#a3243eeb13c8bad2cf78dcd7003b1d665">ShadowParameters_t</a>
196, <a class="el" href="structMQTTConnectParams.html#a03eed7f477e9f834294d0891d125ad5c">MQTTConnectParams</a>
197</li>
198<li>pPassword
199: <a class="el" href="structMQTTConnectParams.html#a09497a2124f8021a70bde9d713350611">MQTTConnectParams</a>
200</li>
201<li>pPayload
202: <a class="el" href="structMQTTMessageParams.html#ae0103a22ff8338af06553f3403b4b916">MQTTMessageParams</a>
203</li>
204<li>pRootCA
205: <a class="el" href="structShadowParameters__t.html#afa3bbe30735094046913d645b6d2ae50">ShadowParameters_t</a>
206</li>
207<li>pRootCALocation
208: <a class="el" href="structMQTTConnectParams.html#ac8128e06c4135460050acf220bee7297">MQTTConnectParams</a>
209, <a class="el" href="structTLSConnectParams.html#a62e797f55d038c78739a2af11d03b6ff">TLSConnectParams</a>
210</li>
211<li>pTopic
212: <a class="el" href="structMQTTPublishParams.html#ad8b1bb06e8bd823de87b00b912d8b6e1">MQTTPublishParams</a>
213, <a class="el" href="structMQTTSubscribeParams.html#a8bbbc1a4a96d1270e11a58d3aa31521e">MQTTSubscribeParams</a>
214</li>
215<li>pTopicName
216: <a class="el" href="structMQTTCallbackParams.html#af6b4ccd3c4cab157b93c3d0c1d8f1dc9">MQTTCallbackParams</a>
217, <a class="el" href="structMQTTwillOptions.html#aa27c5b47d2f848ac32cd2180d97dd8e3">MQTTwillOptions</a>
218</li>
219<li>publish
220: <a class="el" href="structMQTTClient__t.html#accddc5560b9d33e8d7556c336847c584">MQTTClient_t</a>
221</li>
222<li>pUserName
223: <a class="el" href="structMQTTConnectParams.html#a2efa006d6305a8c6bea31cbbfb20cbfe">MQTTConnectParams</a>
224</li>
225</ul>
226
227
228<h3><a class="anchor" id="index_q"></a>- q -</h3><ul>
229<li>qos
230: <a class="el" href="structMQTTwillOptions.html#a6c5ff6dad1a3487cd131bb6eaa990a3f">MQTTwillOptions</a>
231, <a class="el" href="structMQTTSubscribeParams.html#adcfb4d6691c3d68818b49b996addf4fa">MQTTSubscribeParams</a>
232, <a class="el" href="structMQTTMessageParams.html#aef06a771fecb653893f75ee74b5067aa">MQTTMessageParams</a>
233</li>
234</ul>
235
236
237<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
238<li>ServerVerificationFlag
239: <a class="el" href="structTLSConnectParams.html#ad81e67d8b722a28af4abdbeb89aa58e7">TLSConnectParams</a>
240</li>
241<li>ShadowParametersDefault
242: <a class="el" href="structShadowParameters__t.html#adc225bbde6004034d41899a4f4b13074">ShadowParameters_t</a>
243</li>
244<li>subscribe
245: <a class="el" href="structMQTTClient__t.html#a7053d0cd48d1c22a217d847babe372c4">MQTTClient_t</a>
246</li>
247</ul>
248
249
250<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
251<li>timeout_ms
252: <a class="el" href="structTLSConnectParams.html#a60800f6a6a6bc138e5b0a3e016d0be8f">TLSConnectParams</a>
253</li>
254<li>tlsHandshakeTimeout_ms
255: <a class="el" href="structMQTTConnectParams.html#aa870d2df978a54f739214ee888c67171">MQTTConnectParams</a>
256</li>
257<li>TopicNameLen
258: <a class="el" href="structMQTTCallbackParams.html#acb1088787c038d920c2f24fca3aecd3c">MQTTCallbackParams</a>
259</li>
260</ul>
261
262
263<h3><a class="anchor" id="index_u"></a>- u -</h3><ul>
264<li>unsubscribe
265: <a class="el" href="structMQTTClient__t.html#ad4fca46f97db56c20667c4245d0bdea1">MQTTClient_t</a>
266</li>
267</ul>
268
269
270<h3><a class="anchor" id="index_w"></a>- w -</h3><ul>
271<li>will
272: <a class="el" href="structMQTTConnectParams.html#abd5a646508c84aa7445822855969eaf6">MQTTConnectParams</a>
273</li>
274</ul>
275
276
277<h3><a class="anchor" id="index_y"></a>- y -</h3><ul>
278<li>yield
279: <a class="el" href="structMQTTClient__t.html#accaa6a8595048819c8629a80a398bc54">MQTTClient_t</a>
280</li>
281</ul>
282</div>
283<!--- window showing the filter options -->
284<div id="MSearchSelectWindow"
285 onmouseover="return searchBox.OnSearchSelectShow()"
286 onmouseout="return searchBox.OnSearchSelectHide()"
287 onkeydown="return searchBox.OnSearchSelectKey(event)">
288<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
289
290<!-- iframe showing the search results (closed by default) -->
291<div id="MSearchResultsWindow">
292<iframe src="" frameborder="0"
293 name="MSearchResults" id="MSearchResults">
294</iframe>
295</div>
296
297<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
298<a href="http://www.doxygen.org/index.html">
299<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
300</body>
301</html>
diff --git a/docs/html/globals.html b/docs/html/globals.html
new file mode 100644
index 0000000..12948bf
--- /dev/null
+++ b/docs/html/globals.html
@@ -0,0 +1,264 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: Data Fields</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li class="current"><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48 <div class="tabs2">
49 <ul class="tablist">
50 <li class="current"><a href="globals.html"><span>All</span></a></li>
51 <li><a href="globals_func.html"><span>Functions</span></a></li>
52 <li><a href="globals_type.html"><span>Typedefs</span></a></li>
53 <li><a href="globals_enum.html"><span>Enumerations</span></a></li>
54 <li><a href="globals_defs.html"><span>Defines</span></a></li>
55 </ul>
56 </div>
57 <div class="tabs3">
58 <ul class="tablist">
59 <li><a href="#index_a"><span>a</span></a></li>
60 <li><a href="#index_c"><span>c</span></a></li>
61 <li><a href="#index_e"><span>e</span></a></li>
62 <li><a href="#index_f"><span>f</span></a></li>
63 <li><a href="#index_i"><span>i</span></a></li>
64 <li><a href="#index_j"><span>j</span></a></li>
65 <li><a href="#index_l"><span>l</span></a></li>
66 <li><a href="#index_n"><span>n</span></a></li>
67 <li><a href="#index_r"><span>r</span></a></li>
68 <li><a href="#index_s"><span>s</span></a></li>
69 <li><a href="#index_t"><span>t</span></a></li>
70 </ul>
71 </div>
72</div>
73<div class="contents">
74Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:
75
76<h3><a class="anchor" id="index_a"></a>- a -</h3><ul>
77<li>AWS_IOT_CERTIFICATE_FILENAME
78: <a class="el" href="aws__iot__config_8h.html#a990de7fbd70659dafba8a982326e8644">aws_iot_config.h</a>
79</li>
80<li>AWS_IOT_MQTT_CLIENT_ID
81: <a class="el" href="aws__iot__config_8h.html#a508462ce0da61fccdc537b70d50778aa">aws_iot_config.h</a>
82</li>
83<li>AWS_IOT_MQTT_HOST
84: <a class="el" href="aws__iot__config_8h.html#a2e4c4f825443b5ae37e5a34e309cec72">aws_iot_config.h</a>
85</li>
86<li>AWS_IOT_MQTT_PORT
87: <a class="el" href="aws__iot__config_8h.html#a231b4a87bce653b0d31172501de89fdb">aws_iot_config.h</a>
88</li>
89<li>AWS_IOT_MQTT_TX_BUF_LEN
90: <a class="el" href="aws__iot__config_8h.html#a69d749cf372e4b6e0e5f202cdb645fee">aws_iot_config.h</a>
91</li>
92<li>AWS_IOT_MY_THING_NAME
93: <a class="el" href="aws__iot__config_8h.html#ae5283c01e3f612fd5eb92dbc3e446d38">aws_iot_config.h</a>
94</li>
95<li>AWS_IOT_PRIVATE_KEY_FILENAME
96: <a class="el" href="aws__iot__config_8h.html#aa6c6d979225eb348ab07054a8d3db6c6">aws_iot_config.h</a>
97</li>
98<li>AWS_IOT_ROOT_CA_FILENAME
99: <a class="el" href="aws__iot__config_8h.html#aed5cda81bc7b006dd0803809b6474a67">aws_iot_config.h</a>
100</li>
101<li>aws_iot_shadow_connect()
102: <a class="el" href="aws__iot__shadow__interface_8h.html#a2c923cc396a5e82f0c7d3468400fea2c">aws_iot_shadow_interface.h</a>
103</li>
104<li>aws_iot_shadow_delete()
105: <a class="el" href="aws__iot__shadow__interface_8h.html#a826d6fd7d28b753d8cef2cc4ed717f7a">aws_iot_shadow_interface.h</a>
106</li>
107<li>aws_iot_shadow_disable_discard_old_delta_msgs()
108: <a class="el" href="aws__iot__shadow__interface_8h.html#af539707306365d92f333efdb5b4d0046">aws_iot_shadow_interface.h</a>
109</li>
110<li>aws_iot_shadow_disconnect()
111: <a class="el" href="aws__iot__shadow__interface_8h.html#afdd8ea8d0677badf06b2765b5ec27109">aws_iot_shadow_interface.h</a>
112</li>
113<li>aws_iot_shadow_enable_discard_old_delta_msgs()
114: <a class="el" href="aws__iot__shadow__interface_8h.html#a764d85d53cff3f15f8a3d8047002a487">aws_iot_shadow_interface.h</a>
115</li>
116<li>aws_iot_shadow_get()
117: <a class="el" href="aws__iot__shadow__interface_8h.html#adf3d2ab4117b6061aeb756a6ec639966">aws_iot_shadow_interface.h</a>
118</li>
119<li>aws_iot_shadow_get_last_received_version()
120: <a class="el" href="aws__iot__shadow__interface_8h.html#a416a959f46ab39f97ca4e137e8d8ed71">aws_iot_shadow_interface.h</a>
121</li>
122<li>aws_iot_shadow_init()
123: <a class="el" href="aws__iot__shadow__interface_8h.html#a79596d860d0f30ece4d2ee167784a2aa">aws_iot_shadow_interface.h</a>
124</li>
125<li>aws_iot_shadow_register_delta()
126: <a class="el" href="aws__iot__shadow__interface_8h.html#a2018994362d1ecc99af2151227d5bb41">aws_iot_shadow_interface.h</a>
127</li>
128<li>aws_iot_shadow_reset_last_received_version()
129: <a class="el" href="aws__iot__shadow__interface_8h.html#a2885a09ae8254c80f9db61c50c3018ca">aws_iot_shadow_interface.h</a>
130</li>
131<li>aws_iot_shadow_update()
132: <a class="el" href="aws__iot__shadow__interface_8h.html#ab762304e44b7315a39e9f1ed5462a498">aws_iot_shadow_interface.h</a>
133</li>
134<li>aws_iot_shadow_yield()
135: <a class="el" href="aws__iot__shadow__interface_8h.html#a0c5d153544c57027f0f802bf29376f87">aws_iot_shadow_interface.h</a>
136</li>
137</ul>
138
139
140<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
141<li>countdown()
142: <a class="el" href="timer_8c.html#ab9b6a721d03b085959a0f66907822629">timer.c</a>
143, <a class="el" href="timer__interface_8h.html#acc8817569e64e1d4193b08ca2570517a">timer_interface.h</a>
144</li>
145<li>countdown_ms()
146: <a class="el" href="timer_8c.html#a75af8f6d4820a905276fae6bac80212a">timer.c</a>
147, <a class="el" href="timer__interface_8h.html#a346afafb170b78f813bf7a15e4f2aede">timer_interface.h</a>
148</li>
149</ul>
150
151
152<h3><a class="anchor" id="index_e"></a>- e -</h3><ul>
153<li>expired()
154: <a class="el" href="timer_8c.html#a9e1050bfa919aca1978cffb051cc7ee9">timer.c</a>
155, <a class="el" href="timer__interface_8h.html#adf4838ca0d96f6dbf45c99756731542d">timer_interface.h</a>
156</li>
157</ul>
158
159
160<h3><a class="anchor" id="index_f"></a>- f -</h3><ul>
161<li>fpActionCallback_t
162: <a class="el" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445">aws_iot_shadow_interface.h</a>
163</li>
164</ul>
165
166
167<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
168<li>InitTimer()
169: <a class="el" href="timer_8c.html#a0ff0436566be2657b87044a108a1f4bf">timer.c</a>
170, <a class="el" href="timer__interface_8h.html#a79820bfaea999f86b108701af73dd68e">timer_interface.h</a>
171</li>
172<li>iot_tls_connect()
173: <a class="el" href="network__interface_8h.html#af3b017dbd1b7f3c84815dc6211c60284">network_interface.h</a>
174</li>
175<li>iot_tls_destroy()
176: <a class="el" href="network__interface_8h.html#a4d1624f588b2b18cd6d0d6974cb741d4">network_interface.h</a>
177</li>
178<li>iot_tls_disconnect()
179: <a class="el" href="network__interface_8h.html#ad85769916d75a8bb778cdf2126dd4f02">network_interface.h</a>
180</li>
181<li>iot_tls_init()
182: <a class="el" href="network__interface_8h.html#ab17c9e7cec3c8d74bf338d18dd77fe83">network_interface.h</a>
183</li>
184<li>iot_tls_read()
185: <a class="el" href="network__interface_8h.html#a5ff537ba2223e211242e82e6582ab103">network_interface.h</a>
186</li>
187<li>iot_tls_write()
188: <a class="el" href="network__interface_8h.html#affa29ed55e598ac01574f863ddceae66">network_interface.h</a>
189</li>
190</ul>
191
192
193<h3><a class="anchor" id="index_j"></a>- j -</h3><ul>
194<li>jsmn_init()
195: <a class="el" href="jsmn_8c.html#a8d4a8b3ce5c3d600feea38615b5f9aa6">jsmn.c</a>
196, <a class="el" href="jsmn_8h.html#a8d4a8b3ce5c3d600feea38615b5f9aa6">jsmn.h</a>
197</li>
198<li>jsmn_parse()
199: <a class="el" href="jsmn_8h.html#a64734cb1fc006fba5fd237e80a58ef40">jsmn.h</a>
200, <a class="el" href="jsmn_8c.html#a64734cb1fc006fba5fd237e80a58ef40">jsmn.c</a>
201</li>
202<li>jsmntype_t
203: <a class="el" href="jsmn_8h.html#a065320719769f9dc1fbe30094e52802f">jsmn.h</a>
204</li>
205</ul>
206
207
208<h3><a class="anchor" id="index_l"></a>- l -</h3><ul>
209<li>left_ms()
210: <a class="el" href="timer_8c.html#a9057a416766ddfe329756bc83cf969d0">timer.c</a>
211, <a class="el" href="timer__interface_8h.html#a81352d29dba5f9e360b6f551b33475c6">timer_interface.h</a>
212</li>
213</ul>
214
215
216<h3><a class="anchor" id="index_n"></a>- n -</h3><ul>
217<li>Network
218: <a class="el" href="network__interface_8h.html#a5e783e42eddc16b9eb807fe441e845e9">network_interface.h</a>
219</li>
220</ul>
221
222
223<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
224<li>ROOMTEMPERATURE_UPPERLIMIT
225: <a class="el" href="shadow__sample_8c.html#a6dbd1724187439bfaa80cafa7517cdfd">shadow_sample.c</a>
226</li>
227</ul>
228
229
230<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
231<li>Shadow_Ack_Status_t
232: <a class="el" href="aws__iot__shadow__interface_8h.html#ad946163c2ac5df0aa896520949d47956">aws_iot_shadow_interface.h</a>
233</li>
234<li>ShadowActions_t
235: <a class="el" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c">aws_iot_shadow_interface.h</a>
236</li>
237</ul>
238
239
240<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
241<li>Timer
242: <a class="el" href="timer__interface_8h.html#a9809d52f988a8dba9cd5d8e129cebadd">timer_interface.h</a>
243</li>
244</ul>
245</div>
246<!--- window showing the filter options -->
247<div id="MSearchSelectWindow"
248 onmouseover="return searchBox.OnSearchSelectShow()"
249 onmouseout="return searchBox.OnSearchSelectHide()"
250 onkeydown="return searchBox.OnSearchSelectKey(event)">
251<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
252
253<!-- iframe showing the search results (closed by default) -->
254<div id="MSearchResultsWindow">
255<iframe src="" frameborder="0"
256 name="MSearchResults" id="MSearchResults">
257</iframe>
258</div>
259
260<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
261<a href="http://www.doxygen.org/index.html">
262<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
263</body>
264</html>
diff --git a/docs/html/globals_defs.html b/docs/html/globals_defs.html
new file mode 100644
index 0000000..dc95324
--- /dev/null
+++ b/docs/html/globals_defs.html
@@ -0,0 +1,107 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: Data Fields</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li class="current"><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48 <div class="tabs2">
49 <ul class="tablist">
50 <li><a href="globals.html"><span>All</span></a></li>
51 <li><a href="globals_func.html"><span>Functions</span></a></li>
52 <li><a href="globals_type.html"><span>Typedefs</span></a></li>
53 <li><a href="globals_enum.html"><span>Enumerations</span></a></li>
54 <li class="current"><a href="globals_defs.html"><span>Defines</span></a></li>
55 </ul>
56 </div>
57</div>
58<div class="contents">
59&#160;<ul>
60<li>AWS_IOT_CERTIFICATE_FILENAME
61: <a class="el" href="aws__iot__config_8h.html#a990de7fbd70659dafba8a982326e8644">aws_iot_config.h</a>
62</li>
63<li>AWS_IOT_MQTT_CLIENT_ID
64: <a class="el" href="aws__iot__config_8h.html#a508462ce0da61fccdc537b70d50778aa">aws_iot_config.h</a>
65</li>
66<li>AWS_IOT_MQTT_HOST
67: <a class="el" href="aws__iot__config_8h.html#a2e4c4f825443b5ae37e5a34e309cec72">aws_iot_config.h</a>
68</li>
69<li>AWS_IOT_MQTT_PORT
70: <a class="el" href="aws__iot__config_8h.html#a231b4a87bce653b0d31172501de89fdb">aws_iot_config.h</a>
71</li>
72<li>AWS_IOT_MQTT_TX_BUF_LEN
73: <a class="el" href="aws__iot__config_8h.html#a69d749cf372e4b6e0e5f202cdb645fee">aws_iot_config.h</a>
74</li>
75<li>AWS_IOT_MY_THING_NAME
76: <a class="el" href="aws__iot__config_8h.html#ae5283c01e3f612fd5eb92dbc3e446d38">aws_iot_config.h</a>
77</li>
78<li>AWS_IOT_PRIVATE_KEY_FILENAME
79: <a class="el" href="aws__iot__config_8h.html#aa6c6d979225eb348ab07054a8d3db6c6">aws_iot_config.h</a>
80</li>
81<li>AWS_IOT_ROOT_CA_FILENAME
82: <a class="el" href="aws__iot__config_8h.html#aed5cda81bc7b006dd0803809b6474a67">aws_iot_config.h</a>
83</li>
84<li>ROOMTEMPERATURE_UPPERLIMIT
85: <a class="el" href="shadow__sample_8c.html#a6dbd1724187439bfaa80cafa7517cdfd">shadow_sample.c</a>
86</li>
87</ul>
88</div>
89<!--- window showing the filter options -->
90<div id="MSearchSelectWindow"
91 onmouseover="return searchBox.OnSearchSelectShow()"
92 onmouseout="return searchBox.OnSearchSelectHide()"
93 onkeydown="return searchBox.OnSearchSelectKey(event)">
94<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
95
96<!-- iframe showing the search results (closed by default) -->
97<div id="MSearchResultsWindow">
98<iframe src="" frameborder="0"
99 name="MSearchResults" id="MSearchResults">
100</iframe>
101</div>
102
103<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
104<a href="http://www.doxygen.org/index.html">
105<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
106</body>
107</html>
diff --git a/docs/html/globals_enum.html b/docs/html/globals_enum.html
new file mode 100644
index 0000000..4b23533
--- /dev/null
+++ b/docs/html/globals_enum.html
@@ -0,0 +1,89 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: Data Fields</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li class="current"><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48 <div class="tabs2">
49 <ul class="tablist">
50 <li><a href="globals.html"><span>All</span></a></li>
51 <li><a href="globals_func.html"><span>Functions</span></a></li>
52 <li><a href="globals_type.html"><span>Typedefs</span></a></li>
53 <li class="current"><a href="globals_enum.html"><span>Enumerations</span></a></li>
54 <li><a href="globals_defs.html"><span>Defines</span></a></li>
55 </ul>
56 </div>
57</div>
58<div class="contents">
59&#160;<ul>
60<li>jsmntype_t
61: <a class="el" href="jsmn_8h.html#a065320719769f9dc1fbe30094e52802f">jsmn.h</a>
62</li>
63<li>Shadow_Ack_Status_t
64: <a class="el" href="aws__iot__shadow__interface_8h.html#ad946163c2ac5df0aa896520949d47956">aws_iot_shadow_interface.h</a>
65</li>
66<li>ShadowActions_t
67: <a class="el" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c">aws_iot_shadow_interface.h</a>
68</li>
69</ul>
70</div>
71<!--- window showing the filter options -->
72<div id="MSearchSelectWindow"
73 onmouseover="return searchBox.OnSearchSelectShow()"
74 onmouseout="return searchBox.OnSearchSelectHide()"
75 onkeydown="return searchBox.OnSearchSelectKey(event)">
76<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
77
78<!-- iframe showing the search results (closed by default) -->
79<div id="MSearchResultsWindow">
80<iframe src="" frameborder="0"
81 name="MSearchResults" id="MSearchResults">
82</iframe>
83</div>
84
85<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
86<a href="http://www.doxygen.org/index.html">
87<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
88</body>
89</html>
diff --git a/docs/html/globals_func.html b/docs/html/globals_func.html
new file mode 100644
index 0000000..679b622
--- /dev/null
+++ b/docs/html/globals_func.html
@@ -0,0 +1,194 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: Data Fields</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li class="current"><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48 <div class="tabs2">
49 <ul class="tablist">
50 <li><a href="globals.html"><span>All</span></a></li>
51 <li class="current"><a href="globals_func.html"><span>Functions</span></a></li>
52 <li><a href="globals_type.html"><span>Typedefs</span></a></li>
53 <li><a href="globals_enum.html"><span>Enumerations</span></a></li>
54 <li><a href="globals_defs.html"><span>Defines</span></a></li>
55 </ul>
56 </div>
57 <div class="tabs3">
58 <ul class="tablist">
59 <li><a href="#index_a"><span>a</span></a></li>
60 <li><a href="#index_c"><span>c</span></a></li>
61 <li><a href="#index_e"><span>e</span></a></li>
62 <li><a href="#index_i"><span>i</span></a></li>
63 <li><a href="#index_j"><span>j</span></a></li>
64 <li><a href="#index_l"><span>l</span></a></li>
65 </ul>
66 </div>
67</div>
68<div class="contents">
69&#160;
70
71<h3><a class="anchor" id="index_a"></a>- a -</h3><ul>
72<li>aws_iot_shadow_connect()
73: <a class="el" href="aws__iot__shadow__interface_8h.html#a2c923cc396a5e82f0c7d3468400fea2c">aws_iot_shadow_interface.h</a>
74</li>
75<li>aws_iot_shadow_delete()
76: <a class="el" href="aws__iot__shadow__interface_8h.html#a826d6fd7d28b753d8cef2cc4ed717f7a">aws_iot_shadow_interface.h</a>
77</li>
78<li>aws_iot_shadow_disable_discard_old_delta_msgs()
79: <a class="el" href="aws__iot__shadow__interface_8h.html#af539707306365d92f333efdb5b4d0046">aws_iot_shadow_interface.h</a>
80</li>
81<li>aws_iot_shadow_disconnect()
82: <a class="el" href="aws__iot__shadow__interface_8h.html#afdd8ea8d0677badf06b2765b5ec27109">aws_iot_shadow_interface.h</a>
83</li>
84<li>aws_iot_shadow_enable_discard_old_delta_msgs()
85: <a class="el" href="aws__iot__shadow__interface_8h.html#a764d85d53cff3f15f8a3d8047002a487">aws_iot_shadow_interface.h</a>
86</li>
87<li>aws_iot_shadow_get()
88: <a class="el" href="aws__iot__shadow__interface_8h.html#adf3d2ab4117b6061aeb756a6ec639966">aws_iot_shadow_interface.h</a>
89</li>
90<li>aws_iot_shadow_get_last_received_version()
91: <a class="el" href="aws__iot__shadow__interface_8h.html#a416a959f46ab39f97ca4e137e8d8ed71">aws_iot_shadow_interface.h</a>
92</li>
93<li>aws_iot_shadow_init()
94: <a class="el" href="aws__iot__shadow__interface_8h.html#a79596d860d0f30ece4d2ee167784a2aa">aws_iot_shadow_interface.h</a>
95</li>
96<li>aws_iot_shadow_register_delta()
97: <a class="el" href="aws__iot__shadow__interface_8h.html#a2018994362d1ecc99af2151227d5bb41">aws_iot_shadow_interface.h</a>
98</li>
99<li>aws_iot_shadow_reset_last_received_version()
100: <a class="el" href="aws__iot__shadow__interface_8h.html#a2885a09ae8254c80f9db61c50c3018ca">aws_iot_shadow_interface.h</a>
101</li>
102<li>aws_iot_shadow_update()
103: <a class="el" href="aws__iot__shadow__interface_8h.html#ab762304e44b7315a39e9f1ed5462a498">aws_iot_shadow_interface.h</a>
104</li>
105<li>aws_iot_shadow_yield()
106: <a class="el" href="aws__iot__shadow__interface_8h.html#a0c5d153544c57027f0f802bf29376f87">aws_iot_shadow_interface.h</a>
107</li>
108</ul>
109
110
111<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
112<li>countdown()
113: <a class="el" href="timer_8c.html#ab9b6a721d03b085959a0f66907822629">timer.c</a>
114, <a class="el" href="timer__interface_8h.html#acc8817569e64e1d4193b08ca2570517a">timer_interface.h</a>
115</li>
116<li>countdown_ms()
117: <a class="el" href="timer_8c.html#a75af8f6d4820a905276fae6bac80212a">timer.c</a>
118, <a class="el" href="timer__interface_8h.html#a346afafb170b78f813bf7a15e4f2aede">timer_interface.h</a>
119</li>
120</ul>
121
122
123<h3><a class="anchor" id="index_e"></a>- e -</h3><ul>
124<li>expired()
125: <a class="el" href="timer_8c.html#a9e1050bfa919aca1978cffb051cc7ee9">timer.c</a>
126, <a class="el" href="timer__interface_8h.html#adf4838ca0d96f6dbf45c99756731542d">timer_interface.h</a>
127</li>
128</ul>
129
130
131<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
132<li>InitTimer()
133: <a class="el" href="timer_8c.html#a0ff0436566be2657b87044a108a1f4bf">timer.c</a>
134, <a class="el" href="timer__interface_8h.html#a79820bfaea999f86b108701af73dd68e">timer_interface.h</a>
135</li>
136<li>iot_tls_connect()
137: <a class="el" href="network__interface_8h.html#af3b017dbd1b7f3c84815dc6211c60284">network_interface.h</a>
138</li>
139<li>iot_tls_destroy()
140: <a class="el" href="network__interface_8h.html#a4d1624f588b2b18cd6d0d6974cb741d4">network_interface.h</a>
141</li>
142<li>iot_tls_disconnect()
143: <a class="el" href="network__interface_8h.html#ad85769916d75a8bb778cdf2126dd4f02">network_interface.h</a>
144</li>
145<li>iot_tls_init()
146: <a class="el" href="network__interface_8h.html#ab17c9e7cec3c8d74bf338d18dd77fe83">network_interface.h</a>
147</li>
148<li>iot_tls_read()
149: <a class="el" href="network__interface_8h.html#a5ff537ba2223e211242e82e6582ab103">network_interface.h</a>
150</li>
151<li>iot_tls_write()
152: <a class="el" href="network__interface_8h.html#affa29ed55e598ac01574f863ddceae66">network_interface.h</a>
153</li>
154</ul>
155
156
157<h3><a class="anchor" id="index_j"></a>- j -</h3><ul>
158<li>jsmn_init()
159: <a class="el" href="jsmn_8c.html#a8d4a8b3ce5c3d600feea38615b5f9aa6">jsmn.c</a>
160, <a class="el" href="jsmn_8h.html#a8d4a8b3ce5c3d600feea38615b5f9aa6">jsmn.h</a>
161</li>
162<li>jsmn_parse()
163: <a class="el" href="jsmn_8c.html#a64734cb1fc006fba5fd237e80a58ef40">jsmn.c</a>
164, <a class="el" href="jsmn_8h.html#a64734cb1fc006fba5fd237e80a58ef40">jsmn.h</a>
165</li>
166</ul>
167
168
169<h3><a class="anchor" id="index_l"></a>- l -</h3><ul>
170<li>left_ms()
171: <a class="el" href="timer_8c.html#a9057a416766ddfe329756bc83cf969d0">timer.c</a>
172, <a class="el" href="timer__interface_8h.html#a81352d29dba5f9e360b6f551b33475c6">timer_interface.h</a>
173</li>
174</ul>
175</div>
176<!--- window showing the filter options -->
177<div id="MSearchSelectWindow"
178 onmouseover="return searchBox.OnSearchSelectShow()"
179 onmouseout="return searchBox.OnSearchSelectHide()"
180 onkeydown="return searchBox.OnSearchSelectKey(event)">
181<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
182
183<!-- iframe showing the search results (closed by default) -->
184<div id="MSearchResultsWindow">
185<iframe src="" frameborder="0"
186 name="MSearchResults" id="MSearchResults">
187</iframe>
188</div>
189
190<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
191<a href="http://www.doxygen.org/index.html">
192<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
193</body>
194</html>
diff --git a/docs/html/globals_type.html b/docs/html/globals_type.html
new file mode 100644
index 0000000..9ae4f83
--- /dev/null
+++ b/docs/html/globals_type.html
@@ -0,0 +1,89 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: Data Fields</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li class="current"><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48 <div class="tabs2">
49 <ul class="tablist">
50 <li><a href="globals.html"><span>All</span></a></li>
51 <li><a href="globals_func.html"><span>Functions</span></a></li>
52 <li class="current"><a href="globals_type.html"><span>Typedefs</span></a></li>
53 <li><a href="globals_enum.html"><span>Enumerations</span></a></li>
54 <li><a href="globals_defs.html"><span>Defines</span></a></li>
55 </ul>
56 </div>
57</div>
58<div class="contents">
59&#160;<ul>
60<li>fpActionCallback_t
61: <a class="el" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445">aws_iot_shadow_interface.h</a>
62</li>
63<li>Network
64: <a class="el" href="network__interface_8h.html#a5e783e42eddc16b9eb807fe441e845e9">network_interface.h</a>
65</li>
66<li>Timer
67: <a class="el" href="timer__interface_8h.html#a9809d52f988a8dba9cd5d8e129cebadd">timer_interface.h</a>
68</li>
69</ul>
70</div>
71<!--- window showing the filter options -->
72<div id="MSearchSelectWindow"
73 onmouseover="return searchBox.OnSearchSelectShow()"
74 onmouseout="return searchBox.OnSearchSelectHide()"
75 onkeydown="return searchBox.OnSearchSelectKey(event)">
76<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
77
78<!-- iframe showing the search results (closed by default) -->
79<div id="MSearchResultsWindow">
80<iframe src="" frameborder="0"
81 name="MSearchResults" id="MSearchResults">
82</iframe>
83</div>
84
85<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
86<a href="http://www.doxygen.org/index.html">
87<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
88</body>
89</html>
diff --git a/docs/html/graph_legend.dot b/docs/html/graph_legend.dot
new file mode 100644
index 0000000..0629b6c
--- /dev/null
+++ b/docs/html/graph_legend.dot
@@ -0,0 +1,22 @@
1digraph G
2{
3 edge [fontname="FreeSans.ttf",fontsize="10",labelfontname="FreeSans.ttf",labelfontsize="10"];
4 node [fontname="FreeSans.ttf",fontsize="10",shape=record];
5 Node9 [shape="box",label="Inherited",fontsize="10",height=0.2,width=0.4,fontname="FreeSans.ttf",fillcolor="grey75",style="filled" fontcolor="black"];
6 Node10 -> Node9 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
7 Node10 [shape="box",label="PublicBase",fontsize="10",height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classPublicBase.html"];
8 Node11 -> Node10 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
9 Node11 [shape="box",label="Truncated",fontsize="10",height=0.2,width=0.4,fontname="FreeSans.ttf",color="red",URL="$classTruncated.html"];
10 Node13 -> Node9 [dir=back,color="darkgreen",fontsize="10",style="solid",fontname="FreeSans.ttf"];
11 Node13 [shape="box",label="ProtectedBase",fontsize="10",height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classProtectedBase.html"];
12 Node14 -> Node9 [dir=back,color="firebrick4",fontsize="10",style="solid",fontname="FreeSans.ttf"];
13 Node14 [shape="box",label="PrivateBase",fontsize="10",height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classPrivateBase.html"];
14 Node15 -> Node9 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
15 Node15 [shape="box",label="Undocumented",fontsize="10",height=0.2,width=0.4,fontname="FreeSans.ttf",color="grey75"];
16 Node16 -> Node9 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
17 Node16 [shape="box",label="Templ< int >",fontsize="10",height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classTempl.html"];
18 Node17 -> Node16 [dir=back,color="orange",fontsize="10",style="dashed",label="< int >",fontname="FreeSans.ttf"];
19 Node17 [shape="box",label="Templ< T >",fontsize="10",height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classTempl.html"];
20 Node18 -> Node9 [dir=back,color="darkorchid3",fontsize="10",style="dashed",label="m_usedClass",fontname="FreeSans.ttf"];
21 Node18 [shape="box",label="Used",fontsize="10",height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classUsed.html"];
22}
diff --git a/docs/html/graph_legend.html b/docs/html/graph_legend.html
new file mode 100644
index 0000000..11a0ff3
--- /dev/null
+++ b/docs/html/graph_legend.html
@@ -0,0 +1,131 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: Graph Legend</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42</div>
43<div class="header">
44 <div class="headertitle">
45<h1>Graph Legend</h1> </div>
46</div>
47<div class="contents">
48<p>This page explains how to interpret the graphs that are generated by doxygen.</p>
49<p>Consider the following example: </p>
50<div class="fragment"><pre class="fragment"><span class="comment">/*! Invisible class because of truncation */</span>
51<span class="keyword">class </span>Invisible { };
52<span class="comment"></span>
53<span class="comment">/*! Truncated class, inheritance relation is hidden */</span>
54<span class="keyword">class </span>Truncated : <span class="keyword">public</span> Invisible { };
55
56<span class="comment">/* Class not documented with doxygen comments */</span>
57<span class="keyword">class </span>Undocumented { };
58<span class="comment"></span>
59<span class="comment">/*! Class that is inherited using public inheritance */</span>
60<span class="keyword">class </span>PublicBase : <span class="keyword">public</span> Truncated { };
61<span class="comment"></span>
62<span class="comment">/*! A template class */</span>
63<span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt; <span class="keyword">class </span>Templ { };
64<span class="comment"></span>
65<span class="comment">/*! Class that is inherited using protected inheritance */</span>
66<span class="keyword">class </span>ProtectedBase { };
67<span class="comment"></span>
68<span class="comment">/*! Class that is inherited using private inheritance */</span>
69<span class="keyword">class </span>PrivateBase { };
70<span class="comment"></span>
71<span class="comment">/*! Class that is used by the Inherited class */</span>
72<span class="keyword">class </span>Used { };
73<span class="comment"></span>
74<span class="comment">/*! Super class that inherits a number of other classes */</span>
75<span class="keyword">class </span>Inherited : <span class="keyword">public</span> PublicBase,
76 <span class="keyword">protected</span> ProtectedBase,
77 <span class="keyword">private</span> PrivateBase,
78 <span class="keyword">public</span> Undocumented,
79 <span class="keyword">public</span> Templ&lt;int&gt;
80{
81 <span class="keyword">private</span>:
82 Used *m_usedClass;
83};
84</pre></div><p> This will result in the following graph:</p>
85<center><div align="center">
86<img src="graph_legend.png" alt="graph_legend.png"/>
87</div>
88</center> <p>The boxes in the above graph have the following meaning: </p>
89<ul>
90<li>
91A filled gray box represents the struct or class for which the graph is generated. </li>
92<li>
93A box with a black border denotes a documented struct or class. </li>
94<li>
95A box with a grey border denotes an undocumented struct or class. </li>
96<li>
97A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries. </li>
98</ul>
99<p>The arrows have the following meaning: </p>
100<ul>
101<li>
102A dark blue arrow is used to visualize a public inheritance relation between two classes. </li>
103<li>
104A dark green arrow is used for protected inheritance. </li>
105<li>
106A dark red arrow is used for private inheritance. </li>
107<li>
108A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible. </li>
109<li>
110A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance. </li>
111</ul>
112</div>
113<!--- window showing the filter options -->
114<div id="MSearchSelectWindow"
115 onmouseover="return searchBox.OnSearchSelectShow()"
116 onmouseout="return searchBox.OnSearchSelectHide()"
117 onkeydown="return searchBox.OnSearchSelectKey(event)">
118<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
119
120<!-- iframe showing the search results (closed by default) -->
121<div id="MSearchResultsWindow">
122<iframe src="" frameborder="0"
123 name="MSearchResults" id="MSearchResults">
124</iframe>
125</div>
126
127<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
128<a href="http://www.doxygen.org/index.html">
129<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
130</body>
131</html>
diff --git a/docs/html/graph_legend.md5 b/docs/html/graph_legend.md5
new file mode 100644
index 0000000..c8d3250
--- /dev/null
+++ b/docs/html/graph_legend.md5
@@ -0,0 +1 @@
c43a1e38a88c7de97805a9273dc43584 \ No newline at end of file
diff --git a/docs/html/group__shadow__module.html b/docs/html/group__shadow__module.html
new file mode 100644
index 0000000..f3fd3a0
--- /dev/null
+++ b/docs/html/group__shadow__module.html
@@ -0,0 +1,70 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: AWS IoT Thing Shadow</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42</div>
43<div class="header">
44 <div class="headertitle">
45<h1>AWS IoT Thing Shadow</h1> </div>
46</div>
47<div class="contents">
48<table class="memberdecls">
49</table>
50<p>This module contains all the functions related to the handling of thing shadows in the cloud. <code><a class="el" href="aws__iot__shadow__interface_8h.html#a79596d860d0f30ece4d2ee167784a2aa" title="Initialize the Thing Shadow before use.">aws_iot_shadow_init()</a></code> </p>
51</div>
52<!--- window showing the filter options -->
53<div id="MSearchSelectWindow"
54 onmouseover="return searchBox.OnSearchSelectShow()"
55 onmouseout="return searchBox.OnSearchSelectHide()"
56 onkeydown="return searchBox.OnSearchSelectKey(event)">
57<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
58
59<!-- iframe showing the search results (closed by default) -->
60<div id="MSearchResultsWindow">
61<iframe src="" frameborder="0"
62 name="MSearchResults" id="MSearchResults">
63</iframe>
64</div>
65
66<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
67<a href="http://www.doxygen.org/index.html">
68<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
69</body>
70</html>
diff --git a/docs/html/hostname__compare_8h_source.html b/docs/html/hostname__compare_8h_source.html
new file mode 100644
index 0000000..506ca5f
--- /dev/null
+++ b/docs/html/hostname__compare_8h_source.html
@@ -0,0 +1,97 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: hostname_compare.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>hostname_compare.h</h1> </div>
51</div>
52<div class="contents">
53<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
54<a name="l00002"></a>00002 <span class="comment"> * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span>
55<a name="l00003"></a>00003 <span class="comment"> *</span>
56<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span>
57<a name="l00005"></a>00005 <span class="comment"> * You may not use this file except in compliance with the License.</span>
58<a name="l00006"></a>00006 <span class="comment"> * A copy of the License is located at</span>
59<a name="l00007"></a>00007 <span class="comment"> *</span>
60<a name="l00008"></a>00008 <span class="comment"> * http://aws.amazon.com/apache2.0</span>
61<a name="l00009"></a>00009 <span class="comment"> *</span>
62<a name="l00010"></a>00010 <span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span>
63<a name="l00011"></a>00011 <span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span>
64<a name="l00012"></a>00012 <span class="comment"> * express or implied. See the License for the specific language governing</span>
65<a name="l00013"></a>00013 <span class="comment"> * permissions and limitations under the License.</span>
66<a name="l00014"></a>00014 <span class="comment"> */</span>
67<a name="l00015"></a>00015
68<a name="l00016"></a>00016 <span class="preprocessor">#ifndef SRC_PROTOCOL_MQTT_PAHO_EMBEDDEDC_PLATFORM_LINUX_HOSTNAME_COMPARE_H_</span>
69<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define SRC_PROTOCOL_MQTT_PAHO_EMBEDDEDC_PLATFORM_LINUX_HOSTNAME_COMPARE_H_</span>
70<a name="l00018"></a>00018 <span class="preprocessor"></span>
71<a name="l00019"></a>00019 <span class="preprocessor">#define CURL_HOST_MATCH 1</span>
72<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define CURL_HOST_NOMATCH 0</span>
73<a name="l00021"></a>00021 <span class="preprocessor"></span>
74<a name="l00022"></a>00022 <span class="keywordtype">int</span> hostmatch(<span class="keyword">const</span> <span class="keywordtype">char</span> *hostname, <span class="keyword">const</span> <span class="keywordtype">char</span> *pattern);
75<a name="l00023"></a>00023
76<a name="l00024"></a>00024 <span class="preprocessor">#endif </span><span class="comment">/* SRC_PROTOCOL_MQTT_PAHO_EMBEDDEDC_PLATFORM_LINUX_HOSTNAME_COMPARE_H_ */</span>
77</pre></div></div>
78</div>
79<!--- window showing the filter options -->
80<div id="MSearchSelectWindow"
81 onmouseover="return searchBox.OnSearchSelectShow()"
82 onmouseout="return searchBox.OnSearchSelectHide()"
83 onkeydown="return searchBox.OnSearchSelectKey(event)">
84<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
85
86<!-- iframe showing the search results (closed by default) -->
87<div id="MSearchResultsWindow">
88<iframe src="" frameborder="0"
89 name="MSearchResults" id="MSearchResults">
90</iframe>
91</div>
92
93<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
94<a href="http://www.doxygen.org/index.html">
95<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
96</body>
97</html>
diff --git a/docs/html/index.html b/docs/html/index.html
new file mode 100644
index 0000000..8e67fb1
--- /dev/null
+++ b/docs/html/index.html
@@ -0,0 +1,122 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: AWS IoT C SDK Documentation</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42</div>
43<div class="header">
44 <div class="headertitle">
45<h1>AWS IoT C SDK Documentation </h1> </div>
46</div>
47<div class="contents">
48<h2><a class="anchor" id="mainpage_what_is"></a>
49What is the C SDK?</h2>
50<p>The C SDK is a collection of C source files which can be used in embedded applications when connecting and using the AWS IoT service. It will include transport clients (MQTT), TLS implementations and examples on their use. It also includes AWS IoT specific features such as Thing Shadow. It is distributed in source form and intended to be built into customer firmware along with application code, other libraries and OS.</p>
51<h2><a class="anchor" id="mainpage_why_do"></a>
52Why Do I Need the SDK?</h2>
53<p>Strictly speaking the SDK is not required to connect to and use the AWS IoT Service. The service will accept a TLS client authenticated MQTT connection from any client. However it is the goal of this SDK significantly streamline this task for device developers. As mentioned above it will also include functionality specific to the AWS IoT Service. The SDK will be optimized to work with AWS IoT service to save resource and setup time.</p>
54<h2><a class="anchor" id="mainpage_how_do_i_get"></a>
55How Do I Get the SDK?</h2>
56<p>The SDK is available on GitHub &lt;LINK&gt; as well as direct download from S3 &lt;LINK&gt;.</p>
57<h2><a class="anchor" id="mainpage_getting_started"></a>
58How Do I Get Started?</h2>
59<p>Out of the box the SDK is available with sample applications ready to be built and run on a Linux platform. This allows for a quick getting started experience to test the service and get a feel for the SDK's functions and capabilities. These examples will also build on embedded Linux platforms such as the BeagleBone Green, Raspberry Pi, Arrow Dragonboard, and Intel Edison.</p>
60<p>Steps:</p>
61<ul>
62<li>Create a directory to hold your application e.g. (/home/&lt;user&gt;/aws_iot/my_app)</li>
63<li>Change directory to this new directory</li>
64<li>Download SDK to device and place in the newly created directory</li>
65<li>Expand the tarball (tar -xf &lt;tarball.tar&gt;). This will create 4 directories:<ul>
66<li>iot_src - the AWS IoT SDK source files</li>
67<li>sample_apps - the sample applications</li>
68<li>mqtt_paho_emb - the Paho MQTT Embedded C client</li>
69<li>tls - TLS certificates directory</li>
70</ul>
71</li>
72<li>Change directory to sample_apps. The following sample applications are included:<ul>
73<li>subscribe_publish_sample.c - a simple pub/sub MQTT example</li>
74<li><a class="el" href="shadow__sample_8c.html" title="A simple connected window example demonstrating the use of Thing Shadow.">shadow_sample.c</a> - a simple device shadow example</li>
75</ul>
76</li>
77<li>For each sample:<ul>
78<li>Explore the example. It connects to AWS IoT Service using MQTT, subscribes to a topic and then loops publishing messages to a publish topic</li>
79<li>Build the example using make. (''make'')</li>
80<li>Place device identity cert and private key in locations referenced in the example (tls/certs/). Alternatively, you can run the sample application with the ''-c'' flag to point to a specific certificate directory.</li>
81<li>Download certificate authority CA file and place in location referenced in the example (tls/certs/).</li>
82<li>Run sample application (./subscribe_publish_sample). The sample will print status messages to stdout.</li>
83</ul>
84</li>
85</ul>
86<h2><a class="anchor" id="mainpage_porting"></a>
87Porting</h2>
88<p>The SDK has been constructed in a way to aid porting to your specific platform. The steps above on Linux are a good start to experiment with the service before developing service-specific device code. Porting to your specific device will involve providing a few functionality pieces to the SDK. Assumptions about device hardware/drivers for the following functionality cannot be assumed and required some degree of porting/driver code to bridge between the AWS SDK and your particular hardware:</p>
89<ul>
90<li>TCP/IP networking (including TLS implementation) (found in <a class="el" href="network__interface_8h.html" title="Network interface definition for MQTT client.">network_interface.h</a>)</li>
91<li><a class="el" href="structTimer.html">Timer</a> mechanisms (found in timer.h) Included with the SDK are implementations of these interfaces on Linux. These can be used as a guide when porting to a specific platform.</li>
92</ul>
93<p>A porting guide document can be found online </p>
94<dl class="see"><dt><b>See also:</b></dt><dd><a href="https://not_the_porting_guide.amazonaws.com.">https://not_the_porting_guide.amazonaws.com.</a></dd></dl>
95<h2><a class="anchor" id="mainpage_getting_help"></a>
96How Can I Get Help?</h2>
97<ul>
98<li>Check the AWS IoT forum <dl class="see"><dt><b>See also:</b></dt><dd><a href="https://not_a_forum.iot.aws.amazon.com.">https://not_a_forum.iot.aws.amazon.com.</a></dd></dl>
99</li>
100<li>Create a support request with AWS IoT SDK Team <dl class="see"><dt><b>See also:</b></dt><dd><a href="https://not_support.iot.aws.amazon.com.">https://not_support.iot.aws.amazon.com.</a> </dd></dl>
101</li>
102</ul>
103</div>
104<!--- window showing the filter options -->
105<div id="MSearchSelectWindow"
106 onmouseover="return searchBox.OnSearchSelectShow()"
107 onmouseout="return searchBox.OnSearchSelectHide()"
108 onkeydown="return searchBox.OnSearchSelectKey(event)">
109<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
110
111<!-- iframe showing the search results (closed by default) -->
112<div id="MSearchResultsWindow">
113<iframe src="" frameborder="0"
114 name="MSearchResults" id="MSearchResults">
115</iframe>
116</div>
117
118<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
119<a href="http://www.doxygen.org/index.html">
120<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
121</body>
122</html>
diff --git a/docs/html/installdox b/docs/html/installdox
new file mode 100644
index 0000000..2697a81
--- /dev/null
+++ b/docs/html/installdox
@@ -0,0 +1,117 @@
1#!/usr/bin/perl
2
3%subst = ( );
4$quiet = 0;
5
6if (open(F,"search.cfg"))
7{
8 $_=<F> ; s/[ \t\n]*$//g ; $subst{"_doc"} = $_;
9 $_=<F> ; s/[ \t\n]*$//g ; $subst{"_cgi"} = $_;
10}
11
12while ( @ARGV ) {
13 $_ = shift @ARGV;
14 if ( s/^-// ) {
15 if ( /^l(.*)/ ) {
16 $v = ($1 eq "") ? shift @ARGV : $1;
17 ($v =~ /\/$/) || ($v .= "/");
18 $_ = $v;
19 if ( /(.+)\@(.+)/ ) {
20 if ( exists $subst{$1} ) {
21 $subst{$1} = $2;
22 } else {
23 print STDERR "Unknown tag file $1 given with option -l\n";
24 &usage();
25 }
26 } else {
27 print STDERR "Argument $_ is invalid for option -l\n";
28 &usage();
29 }
30 }
31 elsif ( /^q/ ) {
32 $quiet = 1;
33 }
34 elsif ( /^\?|^h/ ) {
35 &usage();
36 }
37 else {
38 print STDERR "Illegal option -$_\n";
39 &usage();
40 }
41 }
42 else {
43 push (@files, $_ );
44 }
45}
46
47foreach $sub (keys %subst)
48{
49 if ( $subst{$sub} eq "" )
50 {
51 print STDERR "No substitute given for tag file `$sub'\n";
52 &usage();
53 }
54 elsif ( ! $quiet && $sub ne "_doc" && $sub ne "_cgi" )
55 {
56 print "Substituting $subst{$sub} for each occurrence of tag file $sub\n";
57 }
58}
59
60if ( ! @files ) {
61 if (opendir(D,".")) {
62 foreach $file ( readdir(D) ) {
63 $match = ".html";
64 next if ( $file =~ /^\.\.?$/ );
65 ($file =~ /$match/) && (push @files, $file);
66 ($file =~ "tree.js") && (push @files, $file);
67 }
68 closedir(D);
69 }
70}
71
72if ( ! @files ) {
73 print STDERR "Warning: No input files given and none found!\n";
74}
75
76foreach $f (@files)
77{
78 if ( ! $quiet ) {
79 print "Editing: $f...\n";
80 }
81 $oldf = $f;
82 $f .= ".bak";
83 unless (rename $oldf,$f) {
84 print STDERR "Error: cannot rename file $oldf\n";
85 exit 1;
86 }
87 if (open(F,"<$f")) {
88 unless (open(G,">$oldf")) {
89 print STDERR "Error: opening file $oldf for writing\n";
90 exit 1;
91 }
92 if ($oldf ne "tree.js") {
93 while (<F>) {
94 s/doxygen\=\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\" (href|src)=\"\2/doxygen\=\"$1:$subst{$1}\" \3=\"$subst{$1}/g;
95 print G "$_";
96 }
97 }
98 else {
99 while (<F>) {
100 s/\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\", \"\2/\"$1:$subst{$1}\" ,\"$subst{$1}/g;
101 print G "$_";
102 }
103 }
104 }
105 else {
106 print STDERR "Warning file $f does not exist\n";
107 }
108 unlink $f;
109}
110
111sub usage {
112 print STDERR "Usage: installdox [options] [html-file [html-file ...]]\n";
113 print STDERR "Options:\n";
114 print STDERR " -l tagfile\@linkName tag file + URL or directory \n";
115 print STDERR " -q Quiet mode\n\n";
116 exit 1;
117}
diff --git a/docs/html/jsmn_8c.html b/docs/html/jsmn_8c.html
new file mode 100644
index 0000000..1131cf6
--- /dev/null
+++ b/docs/html/jsmn_8c.html
@@ -0,0 +1,161 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: jsmn.c File Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48</div>
49<div class="header">
50 <div class="summary">
51<a href="#func-members">Functions</a> </div>
52 <div class="headertitle">
53<h1>jsmn.c File Reference</h1> </div>
54</div>
55<div class="contents">
56
57<p>Implementation of the JSMN (Jasmine) JSON parser.
58<a href="#_details">More...</a></p>
59<code>#include &lt;stdlib.h&gt;</code><br/>
60<code>#include &quot;<a class="el" href="jsmn_8h_source.html">jsmn.h</a>&quot;</code><br/>
61<!-- startSectionHeader --><div class="dynheader">
62Include dependency graph for jsmn.c:<!-- endSectionHeader --></div>
63<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
64<div class="center"><img src="jsmn_8c__incl.png" border="0" usemap="#jsmn_8c" alt=""/></div>
65<map name="jsmn_8c" id="jsmn_8c">
66</map>
67<!-- endSectionContent --></div>
68<table class="memberdecls">
69<tr><td colspan="2"><h2><a name="func-members"></a>
70Functions</h2></td></tr>
71<tr><td class="memItemLeft" align="right" valign="top">jsmnerr_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="jsmn_8c.html#a64734cb1fc006fba5fd237e80a58ef40">jsmn_parse</a> (<a class="el" href="structjsmn__parser.html">jsmn_parser</a> *parser, const char *js, size_t len, <a class="el" href="structjsmntok__t.html">jsmntok_t</a> *tokens, unsigned int num_tokens)</td></tr>
72<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="jsmn_8c.html#a8d4a8b3ce5c3d600feea38615b5f9aa6">jsmn_init</a> (<a class="el" href="structjsmn__parser.html">jsmn_parser</a> *parser)</td></tr>
73</table>
74<hr/><a name="_details"></a><h2>Detailed Description</h2>
75<p>For more information on JSMN: </p>
76<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://zserge.com/jsmn.html">http://zserge.com/jsmn.html</a> </dd></dl>
77<hr/><h2>Function Documentation</h2>
78<a class="anchor" id="a8d4a8b3ce5c3d600feea38615b5f9aa6"></a><!-- doxytag: member="jsmn.c::jsmn_init" ref="a8d4a8b3ce5c3d600feea38615b5f9aa6" args="(jsmn_parser *parser)" -->
79<div class="memitem">
80<div class="memproto">
81 <table class="memname">
82 <tr>
83 <td class="memname">void jsmn_init </td>
84 <td>(</td>
85 <td class="paramtype"><a class="el" href="structjsmn__parser.html">jsmn_parser</a> *&#160;</td>
86 <td class="paramname"> <em>parser</em>&#160;)</td>
87 <td></td>
88 </tr>
89 </table>
90</div>
91<div class="memdoc">
92<p>Creates a new parser based over a given buffer with an array of tokens available. </p>
93
94</div>
95</div>
96<a class="anchor" id="a64734cb1fc006fba5fd237e80a58ef40"></a><!-- doxytag: member="jsmn.c::jsmn_parse" ref="a64734cb1fc006fba5fd237e80a58ef40" args="(jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, unsigned int num_tokens)" -->
97<div class="memitem">
98<div class="memproto">
99 <table class="memname">
100 <tr>
101 <td class="memname">jsmnerr_t jsmn_parse </td>
102 <td>(</td>
103 <td class="paramtype"><a class="el" href="structjsmn__parser.html">jsmn_parser</a> *&#160;</td>
104 <td class="paramname"> <em>parser</em>, </td>
105 </tr>
106 <tr>
107 <td class="paramkey"></td>
108 <td></td>
109 <td class="paramtype">const char *&#160;</td>
110 <td class="paramname"> <em>js</em>, </td>
111 </tr>
112 <tr>
113 <td class="paramkey"></td>
114 <td></td>
115 <td class="paramtype">size_t&#160;</td>
116 <td class="paramname"> <em>len</em>, </td>
117 </tr>
118 <tr>
119 <td class="paramkey"></td>
120 <td></td>
121 <td class="paramtype"><a class="el" href="structjsmntok__t.html">jsmntok_t</a> *&#160;</td>
122 <td class="paramname"> <em>tokens</em>, </td>
123 </tr>
124 <tr>
125 <td class="paramkey"></td>
126 <td></td>
127 <td class="paramtype">unsigned int&#160;</td>
128 <td class="paramname"> <em>num_tokens</em>&#160;</td>
129 </tr>
130 <tr>
131 <td></td>
132 <td>)</td>
133 <td></td><td></td>
134 </tr>
135 </table>
136</div>
137<div class="memdoc">
138<p>Parse JSON string and fill tokens. </p>
139
140</div>
141</div>
142</div>
143<!--- window showing the filter options -->
144<div id="MSearchSelectWindow"
145 onmouseover="return searchBox.OnSearchSelectShow()"
146 onmouseout="return searchBox.OnSearchSelectHide()"
147 onkeydown="return searchBox.OnSearchSelectKey(event)">
148<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
149
150<!-- iframe showing the search results (closed by default) -->
151<div id="MSearchResultsWindow">
152<iframe src="" frameborder="0"
153 name="MSearchResults" id="MSearchResults">
154</iframe>
155</div>
156
157<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
158<a href="http://www.doxygen.org/index.html">
159<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
160</body>
161</html>
diff --git a/docs/html/jsmn_8c__incl.dot b/docs/html/jsmn_8c__incl.dot
new file mode 100644
index 0000000..78d8497
--- /dev/null
+++ b/docs/html/jsmn_8c__incl.dot
@@ -0,0 +1,12 @@
1digraph G
2{
3 edge [fontname="FreeSans.ttf",fontsize="10",labelfontname="FreeSans.ttf",labelfontsize="10"];
4 node [fontname="FreeSans.ttf",fontsize="10",shape=record];
5 Node1 [label="jsmn.c",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
6 Node1 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
7 Node2 [label="stdlib.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
8 Node1 -> Node3 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
9 Node3 [label="jsmn.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$jsmn_8h.html",tooltip="Definition of the JSMN (Jasmine) JSON parser."];
10 Node3 -> Node4 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
11 Node4 [label="stddef.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
12}
diff --git a/docs/html/jsmn_8c__incl.md5 b/docs/html/jsmn_8c__incl.md5
new file mode 100644
index 0000000..9dd2292
--- /dev/null
+++ b/docs/html/jsmn_8c__incl.md5
@@ -0,0 +1 @@
df9a3d71984e1b7ae6f5ae3c4dc489ba \ No newline at end of file
diff --git a/docs/html/jsmn_8h.html b/docs/html/jsmn_8h.html
new file mode 100644
index 0000000..f712b22
--- /dev/null
+++ b/docs/html/jsmn_8h.html
@@ -0,0 +1,204 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: jsmn.h File Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48</div>
49<div class="header">
50 <div class="summary">
51<a href="#nested-classes">Data Structures</a> &#124;
52<a href="#define-members">Defines</a> &#124;
53<a href="#enum-members">Enumerations</a> &#124;
54<a href="#func-members">Functions</a> </div>
55 <div class="headertitle">
56<h1>jsmn.h File Reference</h1> </div>
57</div>
58<div class="contents">
59
60<p>Definition of the JSMN (Jasmine) JSON parser.
61<a href="#_details">More...</a></p>
62<code>#include &lt;stddef.h&gt;</code><br/>
63<!-- startSectionHeader --><div class="dynheader">
64Include dependency graph for jsmn.h:<!-- endSectionHeader --></div>
65<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
66<div class="center"><img src="jsmn_8h__incl.png" border="0" usemap="#jsmn_8h" alt=""/></div>
67<map name="jsmn_8h" id="jsmn_8h">
68</map>
69<!-- endSectionContent --></div>
70<!-- startSectionHeader --><div class="dynheader">
71This graph shows which files directly or indirectly include this file:<!-- endSectionHeader --></div>
72<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
73<div class="center"><img src="jsmn_8h__dep__incl.png" border="0" usemap="#jsmn_8hdep" alt=""/></div>
74<map name="jsmn_8hdep" id="jsmn_8hdep">
75</map>
76<!-- endSectionContent --></div>
77
78<p><a href="jsmn_8h_source.html">Go to the source code of this file.</a></p>
79<table class="memberdecls">
80<tr><td colspan="2"><h2><a name="nested-classes"></a>
81Data Structures</h2></td></tr>
82<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjsmntok__t.html">jsmntok_t</a></td></tr>
83<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjsmn__parser.html">jsmn_parser</a></td></tr>
84<tr><td colspan="2"><h2><a name="enum-members"></a>
85Enumerations</h2></td></tr>
86<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="jsmn_8h.html#a065320719769f9dc1fbe30094e52802f">jsmntype_t</a> { <b>JSMN_PRIMITIVE</b> = 0,
87<b>JSMN_OBJECT</b> = 1,
88<b>JSMN_ARRAY</b> = 2,
89<b>JSMN_STRING</b> = 3
90 }</td></tr>
91<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><b>jsmnerr_t</b> { <b>JSMN_ERROR_NOMEM</b> = -1,
92<b>JSMN_ERROR_INVAL</b> = -2,
93<b>JSMN_ERROR_PART</b> = -3
94 }</td></tr>
95<tr><td colspan="2"><h2><a name="func-members"></a>
96Functions</h2></td></tr>
97<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="jsmn_8h.html#a8d4a8b3ce5c3d600feea38615b5f9aa6">jsmn_init</a> (<a class="el" href="structjsmn__parser.html">jsmn_parser</a> *parser)</td></tr>
98<tr><td class="memItemLeft" align="right" valign="top">jsmnerr_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="jsmn_8h.html#a64734cb1fc006fba5fd237e80a58ef40">jsmn_parse</a> (<a class="el" href="structjsmn__parser.html">jsmn_parser</a> *parser, const char *js, size_t len, <a class="el" href="structjsmntok__t.html">jsmntok_t</a> *tokens, unsigned int num_tokens)</td></tr>
99</table>
100<hr/><a name="_details"></a><h2>Detailed Description</h2>
101<p>For more information on JSMN: </p>
102<dl class="see"><dt><b>See also:</b></dt><dd><a href="http://zserge.com/jsmn.html">http://zserge.com/jsmn.html</a> </dd></dl>
103<hr/><h2>Enumeration Type Documentation</h2>
104<a class="anchor" id="a065320719769f9dc1fbe30094e52802f"></a><!-- doxytag: member="jsmn.h::jsmntype_t" ref="a065320719769f9dc1fbe30094e52802f" args="" -->
105<div class="memitem">
106<div class="memproto">
107 <table class="memname">
108 <tr>
109 <td class="memname">enum <a class="el" href="jsmn_8h.html#a065320719769f9dc1fbe30094e52802f">jsmntype_t</a></td>
110 </tr>
111 </table>
112</div>
113<div class="memdoc">
114<p>JSON type identifier. Basic types are: o Object o Array o String o Other primitive: number, boolean (true/false) or null </p>
115
116</div>
117</div>
118<hr/><h2>Function Documentation</h2>
119<a class="anchor" id="a8d4a8b3ce5c3d600feea38615b5f9aa6"></a><!-- doxytag: member="jsmn.h::jsmn_init" ref="a8d4a8b3ce5c3d600feea38615b5f9aa6" args="(jsmn_parser *parser)" -->
120<div class="memitem">
121<div class="memproto">
122 <table class="memname">
123 <tr>
124 <td class="memname">void jsmn_init </td>
125 <td>(</td>
126 <td class="paramtype"><a class="el" href="structjsmn__parser.html">jsmn_parser</a> *&#160;</td>
127 <td class="paramname"> <em>parser</em>&#160;)</td>
128 <td></td>
129 </tr>
130 </table>
131</div>
132<div class="memdoc">
133<p>Create JSON parser over an array of tokens</p>
134<p>Creates a new parser based over a given buffer with an array of tokens available. </p>
135
136</div>
137</div>
138<a class="anchor" id="a64734cb1fc006fba5fd237e80a58ef40"></a><!-- doxytag: member="jsmn.h::jsmn_parse" ref="a64734cb1fc006fba5fd237e80a58ef40" args="(jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, unsigned int num_tokens)" -->
139<div class="memitem">
140<div class="memproto">
141 <table class="memname">
142 <tr>
143 <td class="memname">jsmnerr_t jsmn_parse </td>
144 <td>(</td>
145 <td class="paramtype"><a class="el" href="structjsmn__parser.html">jsmn_parser</a> *&#160;</td>
146 <td class="paramname"> <em>parser</em>, </td>
147 </tr>
148 <tr>
149 <td class="paramkey"></td>
150 <td></td>
151 <td class="paramtype">const char *&#160;</td>
152 <td class="paramname"> <em>js</em>, </td>
153 </tr>
154 <tr>
155 <td class="paramkey"></td>
156 <td></td>
157 <td class="paramtype">size_t&#160;</td>
158 <td class="paramname"> <em>len</em>, </td>
159 </tr>
160 <tr>
161 <td class="paramkey"></td>
162 <td></td>
163 <td class="paramtype"><a class="el" href="structjsmntok__t.html">jsmntok_t</a> *&#160;</td>
164 <td class="paramname"> <em>tokens</em>, </td>
165 </tr>
166 <tr>
167 <td class="paramkey"></td>
168 <td></td>
169 <td class="paramtype">unsigned int&#160;</td>
170 <td class="paramname"> <em>num_tokens</em>&#160;</td>
171 </tr>
172 <tr>
173 <td></td>
174 <td>)</td>
175 <td></td><td></td>
176 </tr>
177 </table>
178</div>
179<div class="memdoc">
180<p>Run JSON parser. It parses a JSON data string into and array of tokens, each describing a single JSON object.</p>
181<p>Parse JSON string and fill tokens. </p>
182
183</div>
184</div>
185</div>
186<!--- window showing the filter options -->
187<div id="MSearchSelectWindow"
188 onmouseover="return searchBox.OnSearchSelectShow()"
189 onmouseout="return searchBox.OnSearchSelectHide()"
190 onkeydown="return searchBox.OnSearchSelectKey(event)">
191<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
192
193<!-- iframe showing the search results (closed by default) -->
194<div id="MSearchResultsWindow">
195<iframe src="" frameborder="0"
196 name="MSearchResults" id="MSearchResults">
197</iframe>
198</div>
199
200<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
201<a href="http://www.doxygen.org/index.html">
202<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
203</body>
204</html>
diff --git a/docs/html/jsmn_8h__dep__incl.dot b/docs/html/jsmn_8h__dep__incl.dot
new file mode 100644
index 0000000..782d209
--- /dev/null
+++ b/docs/html/jsmn_8h__dep__incl.dot
@@ -0,0 +1,10 @@
1digraph G
2{
3 edge [fontname="FreeSans.ttf",fontsize="10",labelfontname="FreeSans.ttf",labelfontsize="10"];
4 node [fontname="FreeSans.ttf",fontsize="10",shape=record];
5 Node1 [label="jsmn.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
6 Node1 -> Node2 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
7 Node2 [label="aws_iot_json_utils.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$aws__iot__json__utils_8h_source.html"];
8 Node1 -> Node3 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
9 Node3 [label="jsmn.c",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$jsmn_8c.html",tooltip="Implementation of the JSMN (Jasmine) JSON parser."];
10}
diff --git a/docs/html/jsmn_8h__dep__incl.md5 b/docs/html/jsmn_8h__dep__incl.md5
new file mode 100644
index 0000000..e7ad3ef
--- /dev/null
+++ b/docs/html/jsmn_8h__dep__incl.md5
@@ -0,0 +1 @@
3b4e7506620d5ebeab6ac90dc99a875f \ No newline at end of file
diff --git a/docs/html/jsmn_8h__incl.dot b/docs/html/jsmn_8h__incl.dot
new file mode 100644
index 0000000..c5892a9
--- /dev/null
+++ b/docs/html/jsmn_8h__incl.dot
@@ -0,0 +1,8 @@
1digraph G
2{
3 edge [fontname="FreeSans.ttf",fontsize="10",labelfontname="FreeSans.ttf",labelfontsize="10"];
4 node [fontname="FreeSans.ttf",fontsize="10",shape=record];
5 Node1 [label="jsmn.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
6 Node1 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
7 Node2 [label="stddef.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
8}
diff --git a/docs/html/jsmn_8h__incl.md5 b/docs/html/jsmn_8h__incl.md5
new file mode 100644
index 0000000..e120a58
--- /dev/null
+++ b/docs/html/jsmn_8h__incl.md5
@@ -0,0 +1 @@
11b6a0690adf162e5cdb240d5517381d \ No newline at end of file
diff --git a/docs/html/jsmn_8h_source.html b/docs/html/jsmn_8h_source.html
new file mode 100644
index 0000000..3510c21
--- /dev/null
+++ b/docs/html/jsmn_8h_source.html
@@ -0,0 +1,142 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: jsmn.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>jsmn.h</h1> </div>
51</div>
52<div class="contents">
53<a href="jsmn_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
54<a name="l00002"></a>00002 <span class="comment"> * Copyright (c) 2010 Serge A. Zaitsev</span>
55<a name="l00003"></a>00003 <span class="comment"> *</span>
56<a name="l00004"></a>00004 <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span>
57<a name="l00005"></a>00005 <span class="comment"> * of this software and associated documentation files (the &quot;Software&quot;), to deal</span>
58<a name="l00006"></a>00006 <span class="comment"> * in the Software without restriction, including without limitation the rights</span>
59<a name="l00007"></a>00007 <span class="comment"> * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span>
60<a name="l00008"></a>00008 <span class="comment"> * copies of the Software, and to permit persons to whom the Software is</span>
61<a name="l00009"></a>00009 <span class="comment"> * furnished to do so, subject to the following conditions:</span>
62<a name="l00010"></a>00010 <span class="comment"> *</span>
63<a name="l00011"></a>00011 <span class="comment"> * The above copyright notice and this permission notice shall be included in</span>
64<a name="l00012"></a>00012 <span class="comment"> * all copies or substantial portions of the Software.</span>
65<a name="l00013"></a>00013 <span class="comment"> *</span>
66<a name="l00014"></a>00014 <span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span>
67<a name="l00015"></a>00015 <span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
68<a name="l00016"></a>00016 <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span>
69<a name="l00017"></a>00017 <span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
70<a name="l00018"></a>00018 <span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span>
71<a name="l00019"></a>00019 <span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN</span>
72<a name="l00020"></a>00020 <span class="comment"> * THE SOFTWARE.</span>
73<a name="l00021"></a>00021 <span class="comment"> */</span>
74<a name="l00022"></a>00022
75<a name="l00031"></a>00031 <span class="preprocessor">#ifndef __JSMN_H_</span>
76<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define __JSMN_H_</span>
77<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#include &lt;stddef.h&gt;</span>
78<a name="l00034"></a>00034 <span class="preprocessor">#define JSMN_STRICT</span>
79<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#ifdef __cplusplus</span>
80<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
81<a name="l00037"></a>00037 <span class="preprocessor">#endif</span>
82<a name="l00038"></a>00038 <span class="preprocessor"></span>
83<a name="l00046"></a><a class="code" href="jsmn_8h.html#a065320719769f9dc1fbe30094e52802f">00046</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
84<a name="l00047"></a>00047 JSMN_PRIMITIVE = 0, JSMN_OBJECT = 1, JSMN_ARRAY = 2, JSMN_STRING = 3
85<a name="l00048"></a>00048 } <a class="code" href="jsmn_8h.html#a065320719769f9dc1fbe30094e52802f">jsmntype_t</a>;
86<a name="l00049"></a>00049
87<a name="l00050"></a>00050 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
88<a name="l00051"></a>00051 <span class="comment">/* Not enough tokens were provided */</span>
89<a name="l00052"></a>00052 JSMN_ERROR_NOMEM = -1,
90<a name="l00053"></a>00053 <span class="comment">/* Invalid character inside JSON string */</span>
91<a name="l00054"></a>00054 JSMN_ERROR_INVAL = -2,
92<a name="l00055"></a>00055 <span class="comment">/* The string is not a full JSON packet, more bytes expected */</span>
93<a name="l00056"></a>00056 JSMN_ERROR_PART = -3,
94<a name="l00057"></a>00057 } jsmnerr_t;
95<a name="l00058"></a>00058
96<a name="l00065"></a><a class="code" href="structjsmntok__t.html">00065</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
97<a name="l00066"></a>00066 <a class="code" href="jsmn_8h.html#a065320719769f9dc1fbe30094e52802f">jsmntype_t</a> type;
98<a name="l00067"></a>00067 <span class="keywordtype">int</span> start;
99<a name="l00068"></a>00068 <span class="keywordtype">int</span> end;
100<a name="l00069"></a>00069 <span class="keywordtype">int</span> size;
101<a name="l00070"></a>00070 <span class="preprocessor">#ifdef JSMN_PARENT_LINKS</span>
102<a name="l00071"></a>00071 <span class="preprocessor"></span> <span class="keywordtype">int</span> parent;
103<a name="l00072"></a>00072 <span class="preprocessor">#endif</span>
104<a name="l00073"></a>00073 <span class="preprocessor"></span>} <a class="code" href="structjsmntok__t.html">jsmntok_t</a>;
105<a name="l00074"></a>00074
106<a name="l00079"></a><a class="code" href="structjsmn__parser.html">00079</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
107<a name="l00080"></a>00080 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pos; <span class="comment">/* offset in the JSON string */</span>
108<a name="l00081"></a>00081 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> toknext; <span class="comment">/* next token to allocate */</span>
109<a name="l00082"></a>00082 <span class="keywordtype">int</span> toksuper; <span class="comment">/* superior token node, e.g parent object or array */</span>
110<a name="l00083"></a>00083 } <a class="code" href="structjsmn__parser.html">jsmn_parser</a>;
111<a name="l00084"></a>00084
112<a name="l00088"></a>00088 <span class="keywordtype">void</span> <a class="code" href="jsmn_8c.html#a8d4a8b3ce5c3d600feea38615b5f9aa6">jsmn_init</a>(<a class="code" href="structjsmn__parser.html">jsmn_parser</a> *parser);
113<a name="l00089"></a>00089
114<a name="l00094"></a>00094 jsmnerr_t <a class="code" href="jsmn_8c.html#a64734cb1fc006fba5fd237e80a58ef40">jsmn_parse</a>(<a class="code" href="structjsmn__parser.html">jsmn_parser</a> *parser, <span class="keyword">const</span> <span class="keywordtype">char</span> *js, <span class="keywordtype">size_t</span> len,
115<a name="l00095"></a>00095 <a class="code" href="structjsmntok__t.html">jsmntok_t</a> *tokens, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num_tokens);
116<a name="l00096"></a>00096
117<a name="l00097"></a>00097 <span class="preprocessor">#ifdef __cplusplus</span>
118<a name="l00098"></a>00098 <span class="preprocessor"></span>}
119<a name="l00099"></a>00099 <span class="preprocessor">#endif</span>
120<a name="l00100"></a>00100 <span class="preprocessor"></span>
121<a name="l00101"></a>00101 <span class="preprocessor">#endif </span><span class="comment">/* __JSMN_H_ */</span>
122</pre></div></div>
123</div>
124<!--- window showing the filter options -->
125<div id="MSearchSelectWindow"
126 onmouseover="return searchBox.OnSearchSelectShow()"
127 onmouseout="return searchBox.OnSearchSelectHide()"
128 onkeydown="return searchBox.OnSearchSelectKey(event)">
129<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
130
131<!-- iframe showing the search results (closed by default) -->
132<div id="MSearchResultsWindow">
133<iframe src="" frameborder="0"
134 name="MSearchResults" id="MSearchResults">
135</iframe>
136</div>
137
138<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
139<a href="http://www.doxygen.org/index.html">
140<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
141</body>
142</html>
diff --git a/docs/html/modules.html b/docs/html/modules.html
new file mode 100644
index 0000000..1087b35
--- /dev/null
+++ b/docs/html/modules.html
@@ -0,0 +1,70 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: Module Index</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li class="current"><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42</div>
43<div class="header">
44 <div class="headertitle">
45<h1>Modules</h1> </div>
46</div>
47<div class="contents">
48Here is a list of all modules:<ul>
49<li><a class="el" href="group__shadow__module.html">AWS IoT Thing Shadow</a></li>
50</ul>
51</div>
52<!--- window showing the filter options -->
53<div id="MSearchSelectWindow"
54 onmouseover="return searchBox.OnSearchSelectShow()"
55 onmouseout="return searchBox.OnSearchSelectHide()"
56 onkeydown="return searchBox.OnSearchSelectKey(event)">
57<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
58
59<!-- iframe showing the search results (closed by default) -->
60<div id="MSearchResultsWindow">
61<iframe src="" frameborder="0"
62 name="MSearchResults" id="MSearchResults">
63</iframe>
64</div>
65
66<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
67<a href="http://www.doxygen.org/index.html">
68<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
69</body>
70</html>
diff --git a/docs/html/nav_f.png b/docs/html/nav_f.png
new file mode 100644
index 0000000..1b07a16
--- /dev/null
+++ b/docs/html/nav_f.png
Binary files differ
diff --git a/docs/html/nav_h.png b/docs/html/nav_h.png
new file mode 100644
index 0000000..01f5fa6
--- /dev/null
+++ b/docs/html/nav_h.png
Binary files differ
diff --git a/docs/html/network__interface_8h.html b/docs/html/network__interface_8h.html
new file mode 100644
index 0000000..61c7c2a
--- /dev/null
+++ b/docs/html/network__interface_8h.html
@@ -0,0 +1,333 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: network_interface.h File Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48</div>
49<div class="header">
50 <div class="summary">
51<a href="#nested-classes">Data Structures</a> &#124;
52<a href="#typedef-members">Typedefs</a> &#124;
53<a href="#func-members">Functions</a> </div>
54 <div class="headertitle">
55<h1>network_interface.h File Reference</h1> </div>
56</div>
57<div class="contents">
58
59<p><a class="el" href="structNetwork.html" title="Network Structure.">Network</a> interface definition for MQTT client.
60<a href="#_details">More...</a></p>
61
62<p><a href="network__interface_8h_source.html">Go to the source code of this file.</a></p>
63<table class="memberdecls">
64<tr><td colspan="2"><h2><a name="nested-classes"></a>
65Data Structures</h2></td></tr>
66<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structTLSConnectParams.html">TLSConnectParams</a></td></tr>
67<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">TLS Connection Parameters. <a href="structTLSConnectParams.html#_details">More...</a><br/></td></tr>
68<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structNetwork.html">Network</a></td></tr>
69<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="structNetwork.html" title="Network Structure.">Network</a> Structure. <a href="structNetwork.html#_details">More...</a><br/></td></tr>
70<tr><td colspan="2"><h2><a name="typedef-members"></a>
71Typedefs</h2></td></tr>
72<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structNetwork.html">Network</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="network__interface_8h.html#a5e783e42eddc16b9eb807fe441e845e9">Network</a></td></tr>
73<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="structNetwork.html" title="Network Structure.">Network</a> Type. <a href="#a5e783e42eddc16b9eb807fe441e845e9"></a><br/></td></tr>
74<tr><td colspan="2"><h2><a name="func-members"></a>
75Functions</h2></td></tr>
76<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="network__interface_8h.html#ab17c9e7cec3c8d74bf338d18dd77fe83">iot_tls_init</a> (<a class="el" href="structNetwork.html">Network</a> *pNetwork)</td></tr>
77<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the TLS implementation. <a href="#ab17c9e7cec3c8d74bf338d18dd77fe83"></a><br/></td></tr>
78<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="network__interface_8h.html#af3b017dbd1b7f3c84815dc6211c60284">iot_tls_connect</a> (<a class="el" href="structNetwork.html">Network</a> *pNetwork, <a class="el" href="structTLSConnectParams.html">TLSConnectParams</a> TLSParams)</td></tr>
79<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a TLS socket and open the connection. <a href="#af3b017dbd1b7f3c84815dc6211c60284"></a><br/></td></tr>
80<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="network__interface_8h.html#affa29ed55e598ac01574f863ddceae66">iot_tls_write</a> (<a class="el" href="structNetwork.html">Network</a> *, unsigned char *, int, int)</td></tr>
81<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write bytes to the network socket. <a href="#affa29ed55e598ac01574f863ddceae66"></a><br/></td></tr>
82<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="network__interface_8h.html#a5ff537ba2223e211242e82e6582ab103">iot_tls_read</a> (<a class="el" href="structNetwork.html">Network</a> *, unsigned char *, int, int)</td></tr>
83<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Read bytes from the network socket. <a href="#a5ff537ba2223e211242e82e6582ab103"></a><br/></td></tr>
84<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="network__interface_8h.html#ad85769916d75a8bb778cdf2126dd4f02">iot_tls_disconnect</a> (<a class="el" href="structNetwork.html">Network</a> *pNetwork)</td></tr>
85<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnect from network socket. <a href="#ad85769916d75a8bb778cdf2126dd4f02"></a><br/></td></tr>
86<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="network__interface_8h.html#a4d1624f588b2b18cd6d0d6974cb741d4">iot_tls_destroy</a> (<a class="el" href="structNetwork.html">Network</a> *pNetwork)</td></tr>
87<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform any tear-down or cleanup of TLS layer. <a href="#a4d1624f588b2b18cd6d0d6974cb741d4"></a><br/></td></tr>
88</table>
89<hr/><a name="_details"></a><h2>Detailed Description</h2>
90<p>Defines an interface to the TLS layer to be used by the MQTT client. Starting point for porting the SDK to the networking layer of a new platform. </p>
91<hr/><h2>Typedef Documentation</h2>
92<a class="anchor" id="a5e783e42eddc16b9eb807fe441e845e9"></a><!-- doxytag: member="network_interface.h::Network" ref="a5e783e42eddc16b9eb807fe441e845e9" args="" -->
93<div class="memitem">
94<div class="memproto">
95 <table class="memname">
96 <tr>
97 <td class="memname">typedef struct <a class="el" href="structNetwork.html">Network</a> <a class="el" href="structNetwork.html">Network</a></td>
98 </tr>
99 </table>
100</div>
101<div class="memdoc">
102<p>Defines a type for the network struct. See structure definition below. </p>
103
104</div>
105</div>
106<hr/><h2>Function Documentation</h2>
107<a class="anchor" id="af3b017dbd1b7f3c84815dc6211c60284"></a><!-- doxytag: member="network_interface.h::iot_tls_connect" ref="af3b017dbd1b7f3c84815dc6211c60284" args="(Network *pNetwork, TLSConnectParams TLSParams)" -->
108<div class="memitem">
109<div class="memproto">
110 <table class="memname">
111 <tr>
112 <td class="memname">int iot_tls_connect </td>
113 <td>(</td>
114 <td class="paramtype"><a class="el" href="structNetwork.html">Network</a> *&#160;</td>
115 <td class="paramname"> <em>pNetwork</em>, </td>
116 </tr>
117 <tr>
118 <td class="paramkey"></td>
119 <td></td>
120 <td class="paramtype"><a class="el" href="structTLSConnectParams.html">TLSConnectParams</a>&#160;</td>
121 <td class="paramname"> <em>TLSParams</em>&#160;</td>
122 </tr>
123 <tr>
124 <td></td>
125 <td>)</td>
126 <td></td><td></td>
127 </tr>
128 </table>
129</div>
130<div class="memdoc">
131<p>Creates an open socket connection including TLS handshake.</p>
132<dl><dt><b>Parameters:</b></dt><dd>
133 <table class="params">
134 <tr><td class="paramname">pNetwork</td><td>- Pointer to a <a class="el" href="structNetwork.html" title="Network Structure.">Network</a> struct defining the network interface. </td></tr>
135 <tr><td class="paramname">TLSParams</td><td>- <a class="el" href="structTLSConnectParams.html" title="TLS Connection Parameters.">TLSConnectParams</a> defines the properties of the TLS connection. </td></tr>
136 </table>
137 </dd>
138</dl>
139<dl class="return"><dt><b>Returns:</b></dt><dd>integer - successful connection or TLS error </dd></dl>
140
141</div>
142</div>
143<a class="anchor" id="a4d1624f588b2b18cd6d0d6974cb741d4"></a><!-- doxytag: member="network_interface.h::iot_tls_destroy" ref="a4d1624f588b2b18cd6d0d6974cb741d4" args="(Network *pNetwork)" -->
144<div class="memitem">
145<div class="memproto">
146 <table class="memname">
147 <tr>
148 <td class="memname">int iot_tls_destroy </td>
149 <td>(</td>
150 <td class="paramtype"><a class="el" href="structNetwork.html">Network</a> *&#160;</td>
151 <td class="paramname"> <em>pNetwork</em>&#160;)</td>
152 <td></td>
153 </tr>
154 </table>
155</div>
156<div class="memdoc">
157<p>Called to cleanup any resources required for the TLS layer.</p>
158<dl><dt><b>Parameters:</b></dt><dd>
159 <table class="params">
160 <tr><td class="paramname"><a class="el" href="structNetwork.html" title="Network Structure.">Network</a></td><td>- Pointer to a <a class="el" href="structNetwork.html" title="Network Structure.">Network</a> struct defining the network interface. </td></tr>
161 </table>
162 </dd>
163</dl>
164<dl class="return"><dt><b>Returns:</b></dt><dd>integer - successful cleanup or TLS error </dd></dl>
165
166</div>
167</div>
168<a class="anchor" id="ad85769916d75a8bb778cdf2126dd4f02"></a><!-- doxytag: member="network_interface.h::iot_tls_disconnect" ref="ad85769916d75a8bb778cdf2126dd4f02" args="(Network *pNetwork)" -->
169<div class="memitem">
170<div class="memproto">
171 <table class="memname">
172 <tr>
173 <td class="memname">void iot_tls_disconnect </td>
174 <td>(</td>
175 <td class="paramtype"><a class="el" href="structNetwork.html">Network</a> *&#160;</td>
176 <td class="paramname"> <em>pNetwork</em>&#160;)</td>
177 <td></td>
178 </tr>
179 </table>
180</div>
181<div class="memdoc">
182<dl><dt><b>Parameters:</b></dt><dd>
183 <table class="params">
184 <tr><td class="paramname"><a class="el" href="structNetwork.html" title="Network Structure.">Network</a></td><td>- Pointer to a <a class="el" href="structNetwork.html" title="Network Structure.">Network</a> struct defining the network interface. </td></tr>
185 </table>
186 </dd>
187</dl>
188
189</div>
190</div>
191<a class="anchor" id="ab17c9e7cec3c8d74bf338d18dd77fe83"></a><!-- doxytag: member="network_interface.h::iot_tls_init" ref="ab17c9e7cec3c8d74bf338d18dd77fe83" args="(Network *pNetwork)" -->
192<div class="memitem">
193<div class="memproto">
194 <table class="memname">
195 <tr>
196 <td class="memname">int iot_tls_init </td>
197 <td>(</td>
198 <td class="paramtype"><a class="el" href="structNetwork.html">Network</a> *&#160;</td>
199 <td class="paramname"> <em>pNetwork</em>&#160;)</td>
200 <td></td>
201 </tr>
202 </table>
203</div>
204<div class="memdoc">
205<p>Perform any initialization required by the TLS layer. Connects the interface to implementation by setting up the network layer function pointers to platform implementations.</p>
206<dl><dt><b>Parameters:</b></dt><dd>
207 <table class="params">
208 <tr><td class="paramname">pNetwork</td><td>- Pointer to a <a class="el" href="structNetwork.html" title="Network Structure.">Network</a> struct defining the network interface. </td></tr>
209 </table>
210 </dd>
211</dl>
212<dl class="return"><dt><b>Returns:</b></dt><dd>integer defining successful initialization or TLS error </dd></dl>
213
214</div>
215</div>
216<a class="anchor" id="a5ff537ba2223e211242e82e6582ab103"></a><!-- doxytag: member="network_interface.h::iot_tls_read" ref="a5ff537ba2223e211242e82e6582ab103" args="(Network *, unsigned char *, int, int)" -->
217<div class="memitem">
218<div class="memproto">
219 <table class="memname">
220 <tr>
221 <td class="memname">int iot_tls_read </td>
222 <td>(</td>
223 <td class="paramtype"><a class="el" href="structNetwork.html">Network</a> *&#160;</td>
224 <td class="paramname">, </td>
225 </tr>
226 <tr>
227 <td class="paramkey"></td>
228 <td></td>
229 <td class="paramtype">unsigned char *&#160;</td>
230 <td class="paramname">, </td>
231 </tr>
232 <tr>
233 <td class="paramkey"></td>
234 <td></td>
235 <td class="paramtype">int&#160;</td>
236 <td class="paramname">, </td>
237 </tr>
238 <tr>
239 <td class="paramkey"></td>
240 <td></td>
241 <td class="paramtype">int&#160;</td>
242 <td class="paramname">&#160;</td>
243 </tr>
244 <tr>
245 <td></td>
246 <td>)</td>
247 <td></td><td></td>
248 </tr>
249 </table>
250</div>
251<div class="memdoc">
252<dl><dt><b>Parameters:</b></dt><dd>
253 <table class="params">
254 <tr><td class="paramname"><a class="el" href="structNetwork.html" title="Network Structure.">Network</a></td><td>- Pointer to a <a class="el" href="structNetwork.html" title="Network Structure.">Network</a> struct defining the network interface. </td></tr>
255 <tr><td class="paramname">unsigned</td><td>char pointer - pointer to buffer where read bytes should be copied </td></tr>
256 <tr><td class="paramname">integer</td><td>- number of bytes to read </td></tr>
257 <tr><td class="paramname">integer</td><td>- read timeout value in milliseconds </td></tr>
258 </table>
259 </dd>
260</dl>
261<dl class="return"><dt><b>Returns:</b></dt><dd>integer - number of bytes read or TLS error </dd></dl>
262
263</div>
264</div>
265<a class="anchor" id="affa29ed55e598ac01574f863ddceae66"></a><!-- doxytag: member="network_interface.h::iot_tls_write" ref="affa29ed55e598ac01574f863ddceae66" args="(Network *, unsigned char *, int, int)" -->
266<div class="memitem">
267<div class="memproto">
268 <table class="memname">
269 <tr>
270 <td class="memname">int iot_tls_write </td>
271 <td>(</td>
272 <td class="paramtype"><a class="el" href="structNetwork.html">Network</a> *&#160;</td>
273 <td class="paramname">, </td>
274 </tr>
275 <tr>
276 <td class="paramkey"></td>
277 <td></td>
278 <td class="paramtype">unsigned char *&#160;</td>
279 <td class="paramname">, </td>
280 </tr>
281 <tr>
282 <td class="paramkey"></td>
283 <td></td>
284 <td class="paramtype">int&#160;</td>
285 <td class="paramname">, </td>
286 </tr>
287 <tr>
288 <td class="paramkey"></td>
289 <td></td>
290 <td class="paramtype">int&#160;</td>
291 <td class="paramname">&#160;</td>
292 </tr>
293 <tr>
294 <td></td>
295 <td>)</td>
296 <td></td><td></td>
297 </tr>
298 </table>
299</div>
300<div class="memdoc">
301<dl><dt><b>Parameters:</b></dt><dd>
302 <table class="params">
303 <tr><td class="paramname"><a class="el" href="structNetwork.html" title="Network Structure.">Network</a></td><td>- Pointer to a <a class="el" href="structNetwork.html" title="Network Structure.">Network</a> struct defining the network interface. </td></tr>
304 <tr><td class="paramname">unsigned</td><td>char pointer - buffer to write to socket </td></tr>
305 <tr><td class="paramname">integer</td><td>- number of bytes to write </td></tr>
306 <tr><td class="paramname">integer</td><td>- write timeout value in milliseconds </td></tr>
307 </table>
308 </dd>
309</dl>
310<dl class="return"><dt><b>Returns:</b></dt><dd>integer - number of bytes written or TLS error </dd></dl>
311
312</div>
313</div>
314</div>
315<!--- window showing the filter options -->
316<div id="MSearchSelectWindow"
317 onmouseover="return searchBox.OnSearchSelectShow()"
318 onmouseout="return searchBox.OnSearchSelectHide()"
319 onkeydown="return searchBox.OnSearchSelectKey(event)">
320<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
321
322<!-- iframe showing the search results (closed by default) -->
323<div id="MSearchResultsWindow">
324<iframe src="" frameborder="0"
325 name="MSearchResults" id="MSearchResults">
326</iframe>
327</div>
328
329<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
330<a href="http://www.doxygen.org/index.html">
331<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
332</body>
333</html>
diff --git a/docs/html/network__interface_8h_source.html b/docs/html/network__interface_8h_source.html
new file mode 100644
index 0000000..6f38f1b
--- /dev/null
+++ b/docs/html/network__interface_8h_source.html
@@ -0,0 +1,123 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: network_interface.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>network_interface.h</h1> </div>
51</div>
52<div class="contents">
53<a href="network__interface_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
54<a name="l00002"></a>00002 <span class="comment"> * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span>
55<a name="l00003"></a>00003 <span class="comment"> *</span>
56<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span>
57<a name="l00005"></a>00005 <span class="comment"> * You may not use this file except in compliance with the License.</span>
58<a name="l00006"></a>00006 <span class="comment"> * A copy of the License is located at</span>
59<a name="l00007"></a>00007 <span class="comment"> *</span>
60<a name="l00008"></a>00008 <span class="comment"> * http://aws.amazon.com/apache2.0</span>
61<a name="l00009"></a>00009 <span class="comment"> *</span>
62<a name="l00010"></a>00010 <span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span>
63<a name="l00011"></a>00011 <span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span>
64<a name="l00012"></a>00012 <span class="comment"> * express or implied. See the License for the specific language governing</span>
65<a name="l00013"></a>00013 <span class="comment"> * permissions and limitations under the License.</span>
66<a name="l00014"></a>00014 <span class="comment"> */</span>
67<a name="l00015"></a>00015
68<a name="l00024"></a>00024 <span class="preprocessor">#ifndef __NETWORK_INTERFACE_H_</span>
69<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define __NETWORK_INTERFACE_H_</span>
70<a name="l00026"></a>00026 <span class="preprocessor"></span>
71<a name="l00032"></a><a class="code" href="network__interface_8h.html#a5e783e42eddc16b9eb807fe441e845e9">00032</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structNetwork.html" title="Network Structure.">Network</a> <a class="code" href="structNetwork.html" title="Network Structure.">Network</a>;
72<a name="l00033"></a>00033
73<a name="l00040"></a><a class="code" href="structTLSConnectParams.html">00040</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>{
74<a name="l00041"></a><a class="code" href="structTLSConnectParams.html#a62e797f55d038c78739a2af11d03b6ff">00041</a> <span class="keywordtype">char</span>* <a class="code" href="structTLSConnectParams.html#a62e797f55d038c78739a2af11d03b6ff" title="Pointer to string containing the filename (including path) of the root CA file.">pRootCALocation</a>;
75<a name="l00042"></a><a class="code" href="structTLSConnectParams.html#aa8a37f66a9473f554b92f0944e1baa3e">00042</a> <span class="keywordtype">char</span>* <a class="code" href="structTLSConnectParams.html#aa8a37f66a9473f554b92f0944e1baa3e" title="Pointer to string containing the filename (including path) of the device certificate.">pDeviceCertLocation</a>;
76<a name="l00043"></a><a class="code" href="structTLSConnectParams.html#aaca0411311eb106ca6c48bd788de9fdf">00043</a> <span class="keywordtype">char</span>* <a class="code" href="structTLSConnectParams.html#aaca0411311eb106ca6c48bd788de9fdf" title="Pointer to string containing the filename (including path) of the device private key file...">pDevicePrivateKeyLocation</a>;
77<a name="l00044"></a><a class="code" href="structTLSConnectParams.html#a4deae89cd9ba3f3b2e75c27e1b80cdc0">00044</a> <span class="keywordtype">char</span>* <a class="code" href="structTLSConnectParams.html#a4deae89cd9ba3f3b2e75c27e1b80cdc0" title="Pointer to string containing the endpoint of the MQTT service.">pDestinationURL</a>;
78<a name="l00045"></a><a class="code" href="structTLSConnectParams.html#a98310c27d56c9856270e0c7ba02dde36">00045</a> <span class="keywordtype">int</span> <a class="code" href="structTLSConnectParams.html#a98310c27d56c9856270e0c7ba02dde36" title="Integer defining the connection port of the MQTT service.">DestinationPort</a>;
79<a name="l00046"></a><a class="code" href="structTLSConnectParams.html#a60800f6a6a6bc138e5b0a3e016d0be8f">00046</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structTLSConnectParams.html#a60800f6a6a6bc138e5b0a3e016d0be8f" title="Unsigned integer defining the TLS handshake timeout value in milliseconds.">timeout_ms</a>;
80<a name="l00047"></a><a class="code" href="structTLSConnectParams.html#ad81e67d8b722a28af4abdbeb89aa58e7">00047</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structTLSConnectParams.html#ad81e67d8b722a28af4abdbeb89aa58e7" title="Boolean. True = perform server certificate hostname validation. False = skip validation NOT recommend...">ServerVerificationFlag</a>;
81<a name="l00048"></a>00048 }<a class="code" href="structTLSConnectParams.html" title="TLS Connection Parameters.">TLSConnectParams</a>;
82<a name="l00049"></a>00049
83<a name="l00055"></a><a class="code" href="structNetwork.html">00055</a> <span class="keyword">struct </span><a class="code" href="structNetwork.html" title="Network Structure.">Network</a>{
84<a name="l00056"></a><a class="code" href="structNetwork.html#ad7b36ded416243b20d0d5924dba8385e">00056</a> <span class="keywordtype">int</span> <a class="code" href="structNetwork.html#ad7b36ded416243b20d0d5924dba8385e" title="Integer holding the socket file descriptor.">my_socket</a>;
85<a name="l00057"></a><a class="code" href="structNetwork.html#aabf2c7305c36a7858b471cef6d98de0e">00057</a> int (*<a class="code" href="structNetwork.html#aabf2c7305c36a7858b471cef6d98de0e" title="Function pointer pointing to the network function to read from the network.">mqttread</a>) (<a class="code" href="structNetwork.html" title="Network Structure.">Network</a>*, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>*, int, int);
86<a name="l00058"></a><a class="code" href="structNetwork.html#a00ed168a988784ecb64c8a07da2e04bd">00058</a> int (*<a class="code" href="structNetwork.html#a00ed168a988784ecb64c8a07da2e04bd" title="Function pointer pointing to the network function to write to the network.">mqttwrite</a>) (<a class="code" href="structNetwork.html" title="Network Structure.">Network</a>*, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>*, int, int);
87<a name="l00059"></a><a class="code" href="structNetwork.html#a0f1dce0927b86b72bf1d5e33b609b385">00059</a> void (*<a class="code" href="structNetwork.html#a0f1dce0927b86b72bf1d5e33b609b385" title="Function pointer pointing to the network function to disconnect from the network.">disconnect</a>) (<a class="code" href="structNetwork.html" title="Network Structure.">Network</a>*);
88<a name="l00060"></a>00060 };
89<a name="l00061"></a>00061
90<a name="l00072"></a>00072 <span class="keywordtype">int</span> <a class="code" href="network__interface_8h.html#ab17c9e7cec3c8d74bf338d18dd77fe83" title="Initialize the TLS implementation.">iot_tls_init</a>(<a class="code" href="structNetwork.html" title="Network Structure.">Network</a> *pNetwork);
91<a name="l00073"></a>00073
92<a name="l00083"></a>00083 <span class="keywordtype">int</span> <a class="code" href="network__interface_8h.html#af3b017dbd1b7f3c84815dc6211c60284" title="Create a TLS socket and open the connection.">iot_tls_connect</a>(<a class="code" href="structNetwork.html" title="Network Structure.">Network</a> *pNetwork, <a class="code" href="structTLSConnectParams.html" title="TLS Connection Parameters.">TLSConnectParams</a> TLSParams);
93<a name="l00084"></a>00084
94<a name="l00094"></a>00094 <span class="keywordtype">int</span> <a class="code" href="network__interface_8h.html#affa29ed55e598ac01574f863ddceae66" title="Write bytes to the network socket.">iot_tls_write</a>(<a class="code" href="structNetwork.html" title="Network Structure.">Network</a>*, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>*, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>);
95<a name="l00095"></a>00095
96<a name="l00105"></a>00105 <span class="keywordtype">int</span> <a class="code" href="network__interface_8h.html#a5ff537ba2223e211242e82e6582ab103" title="Read bytes from the network socket.">iot_tls_read</a>(<a class="code" href="structNetwork.html" title="Network Structure.">Network</a>*, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>*, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>);
97<a name="l00106"></a>00106
98<a name="l00112"></a>00112 <span class="keywordtype">void</span> <a class="code" href="network__interface_8h.html#ad85769916d75a8bb778cdf2126dd4f02" title="Disconnect from network socket.">iot_tls_disconnect</a>(<a class="code" href="structNetwork.html" title="Network Structure.">Network</a> *pNetwork);
99<a name="l00113"></a>00113
100<a name="l00122"></a>00122 <span class="keywordtype">int</span> <a class="code" href="network__interface_8h.html#a4d1624f588b2b18cd6d0d6974cb741d4" title="Perform any tear-down or cleanup of TLS layer.">iot_tls_destroy</a>(<a class="code" href="structNetwork.html" title="Network Structure.">Network</a> *pNetwork);
101<a name="l00123"></a>00123
102<a name="l00124"></a>00124 <span class="preprocessor">#endif //__NETWORK_INTERFACE_H_</span>
103</pre></div></div>
104</div>
105<!--- window showing the filter options -->
106<div id="MSearchSelectWindow"
107 onmouseover="return searchBox.OnSearchSelectShow()"
108 onmouseout="return searchBox.OnSearchSelectHide()"
109 onkeydown="return searchBox.OnSearchSelectKey(event)">
110<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
111
112<!-- iframe showing the search results (closed by default) -->
113<div id="MSearchResultsWindow">
114<iframe src="" frameborder="0"
115 name="MSearchResults" id="MSearchResults">
116</iframe>
117</div>
118
119<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
120<a href="http://www.doxygen.org/index.html">
121<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
122</body>
123</html>
diff --git a/docs/html/open.png b/docs/html/open.png
new file mode 100644
index 0000000..7b35d2c
--- /dev/null
+++ b/docs/html/open.png
Binary files differ
diff --git a/docs/html/openssl__hostname__validation_8h_source.html b/docs/html/openssl__hostname__validation_8h_source.html
new file mode 100644
index 0000000..4f100a7
--- /dev/null
+++ b/docs/html/openssl__hostname__validation_8h_source.html
@@ -0,0 +1,107 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: openssl_hostname_validation.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>openssl_hostname_validation.h</h1> </div>
51</div>
52<div class="contents">
53<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*Copyright (C) 2012, iSEC Partners.</span>
54<a name="l00002"></a>00002 <span class="comment"> *</span>
55<a name="l00003"></a>00003 <span class="comment"> *Permission is hereby granted, free of charge, to any person obtaining a copy of</span>
56<a name="l00004"></a>00004 <span class="comment"> *this software and associated documentation files (the &quot;Software&quot;), to deal in</span>
57<a name="l00005"></a>00005 <span class="comment"> *the Software without restriction, including without limitation the rights to</span>
58<a name="l00006"></a>00006 <span class="comment"> *use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies</span>
59<a name="l00007"></a>00007 <span class="comment"> *of the Software, and to permit persons to whom the Software is furnished to do</span>
60<a name="l00008"></a>00008 <span class="comment"> *so, subject to the following conditions:</span>
61<a name="l00009"></a>00009 <span class="comment"> *</span>
62<a name="l00010"></a>00010 <span class="comment"> *The above copyright notice and this permission notice shall be included in all</span>
63<a name="l00011"></a>00011 <span class="comment"> *copies or substantial portions of the Software.</span>
64<a name="l00012"></a>00012 <span class="comment"> *</span>
65<a name="l00013"></a>00013 <span class="comment"> *THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span>
66<a name="l00014"></a>00014 <span class="comment"> *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
67<a name="l00015"></a>00015 <span class="comment"> *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span>
68<a name="l00016"></a>00016 <span class="comment"> *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
69<a name="l00017"></a>00017 <span class="comment"> *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span>
70<a name="l00018"></a>00018 <span class="comment"> *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span>
71<a name="l00019"></a>00019 <span class="comment"> *SOFTWARE.</span>
72<a name="l00020"></a>00020 <span class="comment"> *</span>
73<a name="l00021"></a>00021 <span class="comment"> */</span>
74<a name="l00022"></a>00022
75<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;openssl/x509v3.h&gt;</span>
76<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;openssl/ssl.h&gt;</span>
77<a name="l00025"></a>00025
78<a name="l00026"></a>00026 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
79<a name="l00027"></a>00027 MatchFound,
80<a name="l00028"></a>00028 MatchNotFound,
81<a name="l00029"></a>00029 NoSANPresent,
82<a name="l00030"></a>00030 MalformedCertificate,
83<a name="l00031"></a>00031 Error
84<a name="l00032"></a>00032 } HostnameValidationResult;
85<a name="l00033"></a>00033
86<a name="l00045"></a>00045 HostnameValidationResult validate_hostname(<span class="keyword">const</span> <span class="keywordtype">char</span> *hostname, <span class="keyword">const</span> X509 *server_cert);
87</pre></div></div>
88</div>
89<!--- window showing the filter options -->
90<div id="MSearchSelectWindow"
91 onmouseover="return searchBox.OnSearchSelectShow()"
92 onmouseout="return searchBox.OnSearchSelectHide()"
93 onkeydown="return searchBox.OnSearchSelectKey(event)">
94<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
95
96<!-- iframe showing the search results (closed by default) -->
97<div id="MSearchResultsWindow">
98<iframe src="" frameborder="0"
99 name="MSearchResults" id="MSearchResults">
100</iframe>
101</div>
102
103<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
104<a href="http://www.doxygen.org/index.html">
105<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
106</body>
107</html>
diff --git a/docs/html/pages.html b/docs/html/pages.html
new file mode 100644
index 0000000..364f75c
--- /dev/null
+++ b/docs/html/pages.html
@@ -0,0 +1,71 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: Page Index</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42</div>
43<div class="header">
44 <div class="headertitle">
45<h1>Related Pages</h1> </div>
46</div>
47<div class="contents">
48Here is a list of all related documentation pages:<ul>
49<li><a class="el" href="MQTTSubPub.html">MQTT Publish and Subscribe</a>
50</li>
51</ul>
52</div>
53<!--- window showing the filter options -->
54<div id="MSearchSelectWindow"
55 onmouseover="return searchBox.OnSearchSelectShow()"
56 onmouseout="return searchBox.OnSearchSelectHide()"
57 onkeydown="return searchBox.OnSearchSelectKey(event)">
58<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
59
60<!-- iframe showing the search results (closed by default) -->
61<div id="MSearchResultsWindow">
62<iframe src="" frameborder="0"
63 name="MSearchResults" id="MSearchResults">
64</iframe>
65</div>
66
67<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
68<a href="http://www.doxygen.org/index.html">
69<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
70</body>
71</html>
diff --git a/docs/html/rawstr_8h_source.html b/docs/html/rawstr_8h_source.html
new file mode 100644
index 0000000..2cf7bdd
--- /dev/null
+++ b/docs/html/rawstr_8h_source.html
@@ -0,0 +1,119 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: rawstr.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>rawstr.h</h1> </div>
51</div>
52<div class="contents">
53<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef HEADER_CURL_RAWSTR_H</span>
54<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define HEADER_CURL_RAWSTR_H</span>
55<a name="l00003"></a>00003 <span class="preprocessor"></span><span class="comment">/***************************************************************************</span>
56<a name="l00004"></a>00004 <span class="comment"> * _ _ ____ _</span>
57<a name="l00005"></a>00005 <span class="comment"> * Project ___| | | | _ \| |</span>
58<a name="l00006"></a>00006 <span class="comment"> * / __| | | | |_) | |</span>
59<a name="l00007"></a>00007 <span class="comment"> * | (__| |_| | _ &lt;| |___</span>
60<a name="l00008"></a>00008 <span class="comment"> * \___|\___/|_| \_\_____|</span>
61<a name="l00009"></a>00009 <span class="comment"> *</span>
62<a name="l00010"></a>00010 <span class="comment"> * Copyright (C) 1998 - 2011, Daniel Stenberg, &lt;daniel@haxx.se&gt;, et al.</span>
63<a name="l00011"></a>00011 <span class="comment"> *</span>
64<a name="l00012"></a>00012 <span class="comment"> * This software is licensed as described in the file COPYING, which</span>
65<a name="l00013"></a>00013 <span class="comment"> * you should have received as part of this distribution. The terms</span>
66<a name="l00014"></a>00014 <span class="comment"> * are also available at http://curl.haxx.se/docs/copyright.html.</span>
67<a name="l00015"></a>00015 <span class="comment"> *</span>
68<a name="l00016"></a>00016 <span class="comment"> * You may opt to use, copy, modify, merge, publish, distribute and/or sell</span>
69<a name="l00017"></a>00017 <span class="comment"> * copies of the Software, and permit persons to whom the Software is</span>
70<a name="l00018"></a>00018 <span class="comment"> * furnished to do so, under the terms of the COPYING file.</span>
71<a name="l00019"></a>00019 <span class="comment"> *</span>
72<a name="l00020"></a>00020 <span class="comment"> * This software is distributed on an &quot;AS IS&quot; basis, WITHOUT WARRANTY OF ANY</span>
73<a name="l00021"></a>00021 <span class="comment"> * KIND, either express or implied.</span>
74<a name="l00022"></a>00022 <span class="comment"> *</span>
75<a name="l00023"></a>00023 <span class="comment"> ***************************************************************************/</span>
76<a name="l00024"></a>00024
77<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;stddef.h&quot;</span>
78<a name="l00026"></a>00026 <span class="comment">/*</span>
79<a name="l00027"></a>00027 <span class="comment"> * Curl_raw_equal() is for doing &quot;raw&quot; case insensitive strings. This is meant</span>
80<a name="l00028"></a>00028 <span class="comment"> * to be locale independent and only compare strings we know are safe for</span>
81<a name="l00029"></a>00029 <span class="comment"> * this.</span>
82<a name="l00030"></a>00030 <span class="comment"> *</span>
83<a name="l00031"></a>00031 <span class="comment"> * The function is capable of comparing a-z case insensitively even for</span>
84<a name="l00032"></a>00032 <span class="comment"> * non-ascii.</span>
85<a name="l00033"></a>00033 <span class="comment"> */</span>
86<a name="l00034"></a>00034 <span class="keywordtype">int</span> Curl_raw_equal(<span class="keyword">const</span> <span class="keywordtype">char</span> *first, <span class="keyword">const</span> <span class="keywordtype">char</span> *second);
87<a name="l00035"></a>00035 <span class="keywordtype">int</span> Curl_raw_nequal(<span class="keyword">const</span> <span class="keywordtype">char</span> *first, <span class="keyword">const</span> <span class="keywordtype">char</span> *second, <span class="keywordtype">size_t</span> max);
88<a name="l00036"></a>00036
89<a name="l00037"></a>00037 <span class="keywordtype">char</span> Curl_raw_toupper(<span class="keywordtype">char</span> in);
90<a name="l00038"></a>00038
91<a name="l00039"></a>00039 <span class="comment">/* checkprefix() is a shorter version of the above, used when the first</span>
92<a name="l00040"></a>00040 <span class="comment"> argument is zero-byte terminated */</span>
93<a name="l00041"></a>00041 <span class="preprocessor">#define checkprefix(a,b) Curl_raw_nequal(a,b,strlen(a))</span>
94<a name="l00042"></a>00042 <span class="preprocessor"></span>
95<a name="l00043"></a>00043 <span class="keywordtype">void</span> Curl_strntoupper(<span class="keywordtype">char</span> *dest, <span class="keyword">const</span> <span class="keywordtype">char</span> *src, <span class="keywordtype">size_t</span> n);
96<a name="l00044"></a>00044
97<a name="l00045"></a>00045 <span class="preprocessor">#endif </span><span class="comment">/* HEADER_CURL_RAWSTR_H */</span>
98<a name="l00046"></a>00046
99</pre></div></div>
100</div>
101<!--- window showing the filter options -->
102<div id="MSearchSelectWindow"
103 onmouseover="return searchBox.OnSearchSelectShow()"
104 onmouseout="return searchBox.OnSearchSelectHide()"
105 onkeydown="return searchBox.OnSearchSelectKey(event)">
106<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
107
108<!-- iframe showing the search results (closed by default) -->
109<div id="MSearchResultsWindow">
110<iframe src="" frameborder="0"
111 name="MSearchResults" id="MSearchResults">
112</iframe>
113</div>
114
115<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
116<a href="http://www.doxygen.org/index.html">
117<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
118</body>
119</html>
diff --git a/docs/html/search/all_61.html b/docs/html/search/all_61.html
new file mode 100644
index 0000000..0e5d3ed
--- /dev/null
+++ b/docs/html/search/all_61.html
@@ -0,0 +1,150 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_aws_5fiot_5fcertificate_5ffilename">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../aws__iot__config_8h.html#a990de7fbd70659dafba8a982326e8644" target="_parent">AWS_IOT_CERTIFICATE_FILENAME</a>
13 <span class="SRScope">aws_iot_config.h</span>
14 </div>
15</div>
16<div class="SRResult" id="SR_aws_5fiot_5fconfig_2eh">
17 <div class="SREntry">
18 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../aws__iot__config_8h.html" target="_parent">aws_iot_config.h</a>
19 </div>
20</div>
21<div class="SRResult" id="SR_aws_5fiot_5fmqtt_5fclient_5fid">
22 <div class="SREntry">
23 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../aws__iot__config_8h.html#a508462ce0da61fccdc537b70d50778aa" target="_parent">AWS_IOT_MQTT_CLIENT_ID</a>
24 <span class="SRScope">aws_iot_config.h</span>
25 </div>
26</div>
27<div class="SRResult" id="SR_aws_5fiot_5fmqtt_5fhost">
28 <div class="SREntry">
29 <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../aws__iot__config_8h.html#a2e4c4f825443b5ae37e5a34e309cec72" target="_parent">AWS_IOT_MQTT_HOST</a>
30 <span class="SRScope">aws_iot_config.h</span>
31 </div>
32</div>
33<div class="SRResult" id="SR_aws_5fiot_5fmqtt_5fport">
34 <div class="SREntry">
35 <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="../aws__iot__config_8h.html#a231b4a87bce653b0d31172501de89fdb" target="_parent">AWS_IOT_MQTT_PORT</a>
36 <span class="SRScope">aws_iot_config.h</span>
37 </div>
38</div>
39<div class="SRResult" id="SR_aws_5fiot_5fmqtt_5ftx_5fbuf_5flen">
40 <div class="SREntry">
41 <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="../aws__iot__config_8h.html#a69d749cf372e4b6e0e5f202cdb645fee" target="_parent">AWS_IOT_MQTT_TX_BUF_LEN</a>
42 <span class="SRScope">aws_iot_config.h</span>
43 </div>
44</div>
45<div class="SRResult" id="SR_aws_5fiot_5fmy_5fthing_5fname">
46 <div class="SREntry">
47 <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="../aws__iot__config_8h.html#ae5283c01e3f612fd5eb92dbc3e446d38" target="_parent">AWS_IOT_MY_THING_NAME</a>
48 <span class="SRScope">aws_iot_config.h</span>
49 </div>
50</div>
51<div class="SRResult" id="SR_aws_5fiot_5fprivate_5fkey_5ffilename">
52 <div class="SREntry">
53 <a id="Item7" onkeydown="return searchResults.Nav(event,7)" onkeypress="return searchResults.Nav(event,7)" onkeyup="return searchResults.Nav(event,7)" class="SRSymbol" href="../aws__iot__config_8h.html#aa6c6d979225eb348ab07054a8d3db6c6" target="_parent">AWS_IOT_PRIVATE_KEY_FILENAME</a>
54 <span class="SRScope">aws_iot_config.h</span>
55 </div>
56</div>
57<div class="SRResult" id="SR_aws_5fiot_5froot_5fca_5ffilename">
58 <div class="SREntry">
59 <a id="Item8" onkeydown="return searchResults.Nav(event,8)" onkeypress="return searchResults.Nav(event,8)" onkeyup="return searchResults.Nav(event,8)" class="SRSymbol" href="../aws__iot__config_8h.html#aed5cda81bc7b006dd0803809b6474a67" target="_parent">AWS_IOT_ROOT_CA_FILENAME</a>
60 <span class="SRScope">aws_iot_config.h</span>
61 </div>
62</div>
63<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fconnect">
64 <div class="SREntry">
65 <a id="Item9" onkeydown="return searchResults.Nav(event,9)" onkeypress="return searchResults.Nav(event,9)" onkeyup="return searchResults.Nav(event,9)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a2c923cc396a5e82f0c7d3468400fea2c" target="_parent">aws_iot_shadow_connect</a>
66 <span class="SRScope">aws_iot_shadow.c</span>
67 </div>
68</div>
69<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fdelete">
70 <div class="SREntry">
71 <a id="Item10" onkeydown="return searchResults.Nav(event,10)" onkeypress="return searchResults.Nav(event,10)" onkeyup="return searchResults.Nav(event,10)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a826d6fd7d28b753d8cef2cc4ed717f7a" target="_parent">aws_iot_shadow_delete</a>
72 <span class="SRScope">aws_iot_shadow.c</span>
73 </div>
74</div>
75<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fdisable_5fdiscard_5fold_5fdelta_5fmsgs">
76 <div class="SREntry">
77 <a id="Item11" onkeydown="return searchResults.Nav(event,11)" onkeypress="return searchResults.Nav(event,11)" onkeyup="return searchResults.Nav(event,11)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#af539707306365d92f333efdb5b4d0046" target="_parent">aws_iot_shadow_disable_discard_old_delta_msgs</a>
78 <span class="SRScope">aws_iot_shadow.c</span>
79 </div>
80</div>
81<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fdisconnect">
82 <div class="SREntry">
83 <a id="Item12" onkeydown="return searchResults.Nav(event,12)" onkeypress="return searchResults.Nav(event,12)" onkeyup="return searchResults.Nav(event,12)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#afdd8ea8d0677badf06b2765b5ec27109" target="_parent">aws_iot_shadow_disconnect</a>
84 <span class="SRScope">aws_iot_shadow.c</span>
85 </div>
86</div>
87<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fenable_5fdiscard_5fold_5fdelta_5fmsgs">
88 <div class="SREntry">
89 <a id="Item13" onkeydown="return searchResults.Nav(event,13)" onkeypress="return searchResults.Nav(event,13)" onkeyup="return searchResults.Nav(event,13)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a764d85d53cff3f15f8a3d8047002a487" target="_parent">aws_iot_shadow_enable_discard_old_delta_msgs</a>
90 <span class="SRScope">aws_iot_shadow.c</span>
91 </div>
92</div>
93<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fget">
94 <div class="SREntry">
95 <a id="Item14" onkeydown="return searchResults.Nav(event,14)" onkeypress="return searchResults.Nav(event,14)" onkeyup="return searchResults.Nav(event,14)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#adf3d2ab4117b6061aeb756a6ec639966" target="_parent">aws_iot_shadow_get</a>
96 <span class="SRScope">aws_iot_shadow.c</span>
97 </div>
98</div>
99<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fget_5flast_5freceived_5fversion">
100 <div class="SREntry">
101 <a id="Item15" onkeydown="return searchResults.Nav(event,15)" onkeypress="return searchResults.Nav(event,15)" onkeyup="return searchResults.Nav(event,15)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a416a959f46ab39f97ca4e137e8d8ed71" target="_parent">aws_iot_shadow_get_last_received_version</a>
102 <span class="SRScope">aws_iot_shadow.c</span>
103 </div>
104</div>
105<div class="SRResult" id="SR_aws_5fiot_5fshadow_5finit">
106 <div class="SREntry">
107 <a id="Item16" onkeydown="return searchResults.Nav(event,16)" onkeypress="return searchResults.Nav(event,16)" onkeyup="return searchResults.Nav(event,16)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a79596d860d0f30ece4d2ee167784a2aa" target="_parent">aws_iot_shadow_init</a>
108 <span class="SRScope">aws_iot_shadow.c</span>
109 </div>
110</div>
111<div class="SRResult" id="SR_aws_5fiot_5fshadow_5finterface_2eh">
112 <div class="SREntry">
113 <a id="Item17" onkeydown="return searchResults.Nav(event,17)" onkeypress="return searchResults.Nav(event,17)" onkeyup="return searchResults.Nav(event,17)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html" target="_parent">aws_iot_shadow_interface.h</a>
114 </div>
115</div>
116<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fregister_5fdelta">
117 <div class="SREntry">
118 <a id="Item18" onkeydown="return searchResults.Nav(event,18)" onkeypress="return searchResults.Nav(event,18)" onkeyup="return searchResults.Nav(event,18)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a2018994362d1ecc99af2151227d5bb41" target="_parent">aws_iot_shadow_register_delta</a>
119 <span class="SRScope">aws_iot_shadow.c</span>
120 </div>
121</div>
122<div class="SRResult" id="SR_aws_5fiot_5fshadow_5freset_5flast_5freceived_5fversion">
123 <div class="SREntry">
124 <a id="Item19" onkeydown="return searchResults.Nav(event,19)" onkeypress="return searchResults.Nav(event,19)" onkeyup="return searchResults.Nav(event,19)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a2885a09ae8254c80f9db61c50c3018ca" target="_parent">aws_iot_shadow_reset_last_received_version</a>
125 <span class="SRScope">aws_iot_shadow.c</span>
126 </div>
127</div>
128<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fupdate">
129 <div class="SREntry">
130 <a id="Item20" onkeydown="return searchResults.Nav(event,20)" onkeypress="return searchResults.Nav(event,20)" onkeyup="return searchResults.Nav(event,20)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#ab762304e44b7315a39e9f1ed5462a498" target="_parent">aws_iot_shadow_update</a>
131 <span class="SRScope">aws_iot_shadow.c</span>
132 </div>
133</div>
134<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fyield">
135 <div class="SREntry">
136 <a id="Item21" onkeydown="return searchResults.Nav(event,21)" onkeypress="return searchResults.Nav(event,21)" onkeyup="return searchResults.Nav(event,21)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a0c5d153544c57027f0f802bf29376f87" target="_parent">aws_iot_shadow_yield</a>
137 <span class="SRScope">aws_iot_shadow.c</span>
138 </div>
139</div>
140<div class="SRStatus" id="Searching">Searching...</div>
141<div class="SRStatus" id="NoMatches">No Matches</div>
142<script type="text/javascript"><!--
143document.getElementById("Loading").style.display="none";
144document.getElementById("NoMatches").style.display="none";
145var searchResults = new SearchResults("searchResults");
146searchResults.Search();
147--></script>
148</div>
149</body>
150</html>
diff --git a/docs/html/search/all_63.html b/docs/html/search/all_63.html
new file mode 100644
index 0000000..00c95f3
--- /dev/null
+++ b/docs/html/search/all_63.html
@@ -0,0 +1,44 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_connect">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structMQTTClient__t.html#aaa8b9c7c1d9e3205095c400ca54bf3fc" target="_parent">connect</a>
13 <span class="SRScope">MQTTClient_t</span>
14 </div>
15</div>
16<div class="SRResult" id="SR_countdown">
17 <div class="SREntry">
18 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_countdown')">countdown</a>
19 <div class="SRChildren">
20 <a id="Item1_c0" onkeydown="return searchResults.NavChild(event,1,0)" onkeypress="return searchResults.NavChild(event,1,0)" onkeyup="return searchResults.NavChild(event,1,0)" class="SRScope" href="../timer_8c.html#ab9b6a721d03b085959a0f66907822629" target="_parent">countdown(Timer *timer, unsigned int timeout):&#160;timer.c</a>
21 <a id="Item1_c1" onkeydown="return searchResults.NavChild(event,1,1)" onkeypress="return searchResults.NavChild(event,1,1)" onkeyup="return searchResults.NavChild(event,1,1)" class="SRScope" href="../timer__interface_8h.html#acc8817569e64e1d4193b08ca2570517a" target="_parent">countdown(Timer *, unsigned int):&#160;timer.c</a>
22 </div>
23 </div>
24</div>
25<div class="SRResult" id="SR_countdown_5fms">
26 <div class="SREntry">
27 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_countdown_5fms')">countdown_ms</a>
28 <div class="SRChildren">
29 <a id="Item2_c0" onkeydown="return searchResults.NavChild(event,2,0)" onkeypress="return searchResults.NavChild(event,2,0)" onkeyup="return searchResults.NavChild(event,2,0)" class="SRScope" href="../timer_8c.html#a75af8f6d4820a905276fae6bac80212a" target="_parent">countdown_ms(Timer *timer, unsigned int timeout):&#160;timer.c</a>
30 <a id="Item2_c1" onkeydown="return searchResults.NavChild(event,2,1)" onkeypress="return searchResults.NavChild(event,2,1)" onkeyup="return searchResults.NavChild(event,2,1)" class="SRScope" href="../timer__interface_8h.html#a346afafb170b78f813bf7a15e4f2aede" target="_parent">countdown_ms(Timer *, unsigned int):&#160;timer.c</a>
31 </div>
32 </div>
33</div>
34<div class="SRStatus" id="Searching">Searching...</div>
35<div class="SRStatus" id="NoMatches">No Matches</div>
36<script type="text/javascript"><!--
37document.getElementById("Loading").style.display="none";
38document.getElementById("NoMatches").style.display="none";
39var searchResults = new SearchResults("searchResults");
40searchResults.Search();
41--></script>
42</div>
43</body>
44</html>
diff --git a/docs/html/search/all_64.html b/docs/html/search/all_64.html
new file mode 100644
index 0000000..6d7224d
--- /dev/null
+++ b/docs/html/search/all_64.html
@@ -0,0 +1,46 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_destinationport">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structTLSConnectParams.html#a98310c27d56c9856270e0c7ba02dde36" target="_parent">DestinationPort</a>
13 <span class="SRScope">TLSConnectParams</span>
14 </div>
15</div>
16<div class="SRResult" id="SR_disconnect">
17 <div class="SREntry">
18 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_disconnect')">disconnect</a>
19 <div class="SRChildren">
20 <a id="Item1_c0" onkeydown="return searchResults.NavChild(event,1,0)" onkeypress="return searchResults.NavChild(event,1,0)" onkeyup="return searchResults.NavChild(event,1,0)" class="SRScope" href="../structNetwork.html#a0f1dce0927b86b72bf1d5e33b609b385" target="_parent">Network::disconnect()</a>
21 <a id="Item1_c1" onkeydown="return searchResults.NavChild(event,1,1)" onkeypress="return searchResults.NavChild(event,1,1)" onkeyup="return searchResults.NavChild(event,1,1)" class="SRScope" href="../structMQTTClient__t.html#a6b466b3c30e2f81dc2c8bdcc1477ea10" target="_parent">MQTTClient_t::disconnect()</a>
22 </div>
23 </div>
24</div>
25<div class="SRResult" id="SR_disconnecthandler">
26 <div class="SREntry">
27 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../structMQTTConnectParams.html#a770dfb57d9cc24f2f7048275d134350b" target="_parent">disconnectHandler</a>
28 <span class="SRScope">MQTTConnectParams</span>
29 </div>
30</div>
31<div class="SRResult" id="SR_docs_5fmain_2eh">
32 <div class="SREntry">
33 <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../docs__main_8h.html" target="_parent">docs_main.h</a>
34 </div>
35</div>
36<div class="SRStatus" id="Searching">Searching...</div>
37<div class="SRStatus" id="NoMatches">No Matches</div>
38<script type="text/javascript"><!--
39document.getElementById("Loading").style.display="none";
40document.getElementById("NoMatches").style.display="none";
41var searchResults = new SearchResults("searchResults");
42searchResults.Search();
43--></script>
44</div>
45</body>
46</html>
diff --git a/docs/html/search/all_65.html b/docs/html/search/all_65.html
new file mode 100644
index 0000000..5544584
--- /dev/null
+++ b/docs/html/search/all_65.html
@@ -0,0 +1,29 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_expired">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_expired')">expired</a>
13 <div class="SRChildren">
14 <a id="Item0_c0" onkeydown="return searchResults.NavChild(event,0,0)" onkeypress="return searchResults.NavChild(event,0,0)" onkeyup="return searchResults.NavChild(event,0,0)" class="SRScope" href="../timer_8c.html#a9e1050bfa919aca1978cffb051cc7ee9" target="_parent">expired(Timer *timer):&#160;timer.c</a>
15 <a id="Item0_c1" onkeydown="return searchResults.NavChild(event,0,1)" onkeypress="return searchResults.NavChild(event,0,1)" onkeyup="return searchResults.NavChild(event,0,1)" class="SRScope" href="../timer__interface_8h.html#adf4838ca0d96f6dbf45c99756731542d" target="_parent">expired(Timer *):&#160;timer.c</a>
16 </div>
17 </div>
18</div>
19<div class="SRStatus" id="Searching">Searching...</div>
20<div class="SRStatus" id="NoMatches">No Matches</div>
21<script type="text/javascript"><!--
22document.getElementById("Loading").style.display="none";
23document.getElementById("NoMatches").style.display="none";
24var searchResults = new SearchResults("searchResults");
25searchResults.Search();
26--></script>
27</div>
28</body>
29</html>
diff --git a/docs/html/search/all_66.html b/docs/html/search/all_66.html
new file mode 100644
index 0000000..45945fb
--- /dev/null
+++ b/docs/html/search/all_66.html
@@ -0,0 +1,26 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_fpactioncallback_5ft">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445" target="_parent">fpActionCallback_t</a>
13 <span class="SRScope">aws_iot_shadow_interface.h</span>
14 </div>
15</div>
16<div class="SRStatus" id="Searching">Searching...</div>
17<div class="SRStatus" id="NoMatches">No Matches</div>
18<script type="text/javascript"><!--
19document.getElementById("Loading").style.display="none";
20document.getElementById("NoMatches").style.display="none";
21var searchResults = new SearchResults("searchResults");
22searchResults.Search();
23--></script>
24</div>
25</body>
26</html>
diff --git a/docs/html/search/all_69.html b/docs/html/search/all_69.html
new file mode 100644
index 0000000..c263baf
--- /dev/null
+++ b/docs/html/search/all_69.html
@@ -0,0 +1,110 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_id">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structMQTTMessageParams.html#a9faad31a60f5d4c26d0765832af8552e" target="_parent">id</a>
13 <span class="SRScope">MQTTMessageParams</span>
14 </div>
15</div>
16<div class="SRResult" id="SR_inittimer">
17 <div class="SREntry">
18 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_inittimer')">InitTimer</a>
19 <div class="SRChildren">
20 <a id="Item1_c0" onkeydown="return searchResults.NavChild(event,1,0)" onkeypress="return searchResults.NavChild(event,1,0)" onkeyup="return searchResults.NavChild(event,1,0)" class="SRScope" href="../timer_8c.html#a0ff0436566be2657b87044a108a1f4bf" target="_parent">InitTimer(Timer *timer):&#160;timer.c</a>
21 <a id="Item1_c1" onkeydown="return searchResults.NavChild(event,1,1)" onkeypress="return searchResults.NavChild(event,1,1)" onkeyup="return searchResults.NavChild(event,1,1)" class="SRScope" href="../timer__interface_8h.html#a79820bfaea999f86b108701af73dd68e" target="_parent">InitTimer(Timer *):&#160;timer.c</a>
22 </div>
23 </div>
24</div>
25<div class="SRResult" id="SR_iot_5ftls_5fconnect">
26 <div class="SREntry">
27 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../network__interface_8h.html#af3b017dbd1b7f3c84815dc6211c60284" target="_parent">iot_tls_connect</a>
28 <span class="SRScope">network_mbedtls_wrapper.c</span>
29 </div>
30</div>
31<div class="SRResult" id="SR_iot_5ftls_5fdestroy">
32 <div class="SREntry">
33 <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../network__interface_8h.html#a4d1624f588b2b18cd6d0d6974cb741d4" target="_parent">iot_tls_destroy</a>
34 <span class="SRScope">network_mbedtls_wrapper.c</span>
35 </div>
36</div>
37<div class="SRResult" id="SR_iot_5ftls_5fdisconnect">
38 <div class="SREntry">
39 <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="../network__interface_8h.html#ad85769916d75a8bb778cdf2126dd4f02" target="_parent">iot_tls_disconnect</a>
40 <span class="SRScope">network_mbedtls_wrapper.c</span>
41 </div>
42</div>
43<div class="SRResult" id="SR_iot_5ftls_5finit">
44 <div class="SREntry">
45 <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="../network__interface_8h.html#ab17c9e7cec3c8d74bf338d18dd77fe83" target="_parent">iot_tls_init</a>
46 <span class="SRScope">network_mbedtls_wrapper.c</span>
47 </div>
48</div>
49<div class="SRResult" id="SR_iot_5ftls_5fread">
50 <div class="SREntry">
51 <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="../network__interface_8h.html#a5ff537ba2223e211242e82e6582ab103" target="_parent">iot_tls_read</a>
52 <span class="SRScope">network_mbedtls_wrapper.c</span>
53 </div>
54</div>
55<div class="SRResult" id="SR_iot_5ftls_5fwrite">
56 <div class="SREntry">
57 <a id="Item7" onkeydown="return searchResults.Nav(event,7)" onkeypress="return searchResults.Nav(event,7)" onkeyup="return searchResults.Nav(event,7)" class="SRSymbol" href="../network__interface_8h.html#affa29ed55e598ac01574f863ddceae66" target="_parent">iot_tls_write</a>
58 <span class="SRScope">network_mbedtls_wrapper.c</span>
59 </div>
60</div>
61<div class="SRResult" id="SR_iscleansession">
62 <div class="SREntry">
63 <a id="Item8" onkeydown="return searchResults.Nav(event,8)" onkeypress="return searchResults.Nav(event,8)" onkeyup="return searchResults.Nav(event,8)" class="SRSymbol" href="../structMQTTConnectParams.html#a4ed3fb7b2aad72c7f33b39494c04eee7" target="_parent">isCleansession</a>
64 <span class="SRScope">MQTTConnectParams</span>
65 </div>
66</div>
67<div class="SRResult" id="SR_isconnected">
68 <div class="SREntry">
69 <a id="Item9" onkeydown="return searchResults.Nav(event,9)" onkeypress="return searchResults.Nav(event,9)" onkeyup="return searchResults.Nav(event,9)" class="SRSymbol" href="../structMQTTClient__t.html#a5ff9ec93a1e65a90c2f3b2f14bc3193a" target="_parent">isConnected</a>
70 <span class="SRScope">MQTTClient_t</span>
71 </div>
72</div>
73<div class="SRResult" id="SR_isduplicate">
74 <div class="SREntry">
75 <a id="Item10" onkeydown="return searchResults.Nav(event,10)" onkeypress="return searchResults.Nav(event,10)" onkeyup="return searchResults.Nav(event,10)" class="SRSymbol" href="../structMQTTMessageParams.html#a4df7a8f21af28a9982483282b5ed65f2" target="_parent">isDuplicate</a>
76 <span class="SRScope">MQTTMessageParams</span>
77 </div>
78</div>
79<div class="SRResult" id="SR_isretained">
80 <div class="SREntry">
81 <a id="Item11" onkeydown="return searchResults.Nav(event,11)" onkeypress="return searchResults.Nav(event,11)" onkeyup="return searchResults.Nav(event,11)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_isretained')">isRetained</a>
82 <div class="SRChildren">
83 <a id="Item11_c0" onkeydown="return searchResults.NavChild(event,11,0)" onkeypress="return searchResults.NavChild(event,11,0)" onkeyup="return searchResults.NavChild(event,11,0)" class="SRScope" href="../structMQTTwillOptions.html#a5a056c3e21c3ba7b7825b601d4eb8ec4" target="_parent">MQTTwillOptions::isRetained()</a>
84 <a id="Item11_c1" onkeydown="return searchResults.NavChild(event,11,1)" onkeypress="return searchResults.NavChild(event,11,1)" onkeyup="return searchResults.NavChild(event,11,1)" class="SRScope" href="../structMQTTMessageParams.html#a6d0ac76d1a77b4369160b462214abe81" target="_parent">MQTTMessageParams::isRetained()</a>
85 </div>
86 </div>
87</div>
88<div class="SRResult" id="SR_issslhostnameverify">
89 <div class="SREntry">
90 <a id="Item12" onkeydown="return searchResults.Nav(event,12)" onkeypress="return searchResults.Nav(event,12)" onkeyup="return searchResults.Nav(event,12)" class="SRSymbol" href="../structMQTTConnectParams.html#a11d7d74c185dabcafa71c938c7a6bdb8" target="_parent">isSSLHostnameVerify</a>
91 <span class="SRScope">MQTTConnectParams</span>
92 </div>
93</div>
94<div class="SRResult" id="SR_iswillmsgpresent">
95 <div class="SREntry">
96 <a id="Item13" onkeydown="return searchResults.Nav(event,13)" onkeypress="return searchResults.Nav(event,13)" onkeyup="return searchResults.Nav(event,13)" class="SRSymbol" href="../structMQTTConnectParams.html#ae5bed52bd50304de0d06795fac5502e6" target="_parent">isWillMsgPresent</a>
97 <span class="SRScope">MQTTConnectParams</span>
98 </div>
99</div>
100<div class="SRStatus" id="Searching">Searching...</div>
101<div class="SRStatus" id="NoMatches">No Matches</div>
102<script type="text/javascript"><!--
103document.getElementById("Loading").style.display="none";
104document.getElementById("NoMatches").style.display="none";
105var searchResults = new SearchResults("searchResults");
106searchResults.Search();
107--></script>
108</div>
109</body>
110</html>
diff --git a/docs/html/search/all_6a.html b/docs/html/search/all_6a.html
new file mode 100644
index 0000000..d5d96d9
--- /dev/null
+++ b/docs/html/search/all_6a.html
@@ -0,0 +1,74 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_jsmn_2ec">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../jsmn_8c.html" target="_parent">jsmn.c</a>
13 </div>
14</div>
15<div class="SRResult" id="SR_jsmn_2eh">
16 <div class="SREntry">
17 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../jsmn_8h.html" target="_parent">jsmn.h</a>
18 </div>
19</div>
20<div class="SRResult" id="SR_jsmn_5finit">
21 <div class="SREntry">
22 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_jsmn_5finit')">jsmn_init</a>
23 <div class="SRChildren">
24 <a id="Item2_c0" onkeydown="return searchResults.NavChild(event,2,0)" onkeypress="return searchResults.NavChild(event,2,0)" onkeyup="return searchResults.NavChild(event,2,0)" class="SRScope" href="../jsmn_8c.html#a8d4a8b3ce5c3d600feea38615b5f9aa6" target="_parent">jsmn_init(jsmn_parser *parser):&#160;jsmn.c</a>
25 <a id="Item2_c1" onkeydown="return searchResults.NavChild(event,2,1)" onkeypress="return searchResults.NavChild(event,2,1)" onkeyup="return searchResults.NavChild(event,2,1)" class="SRScope" href="../jsmn_8h.html#a8d4a8b3ce5c3d600feea38615b5f9aa6" target="_parent">jsmn_init(jsmn_parser *parser):&#160;jsmn.c</a>
26 </div>
27 </div>
28</div>
29<div class="SRResult" id="SR_jsmn_5fparse">
30 <div class="SREntry">
31 <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_jsmn_5fparse')">jsmn_parse</a>
32 <div class="SRChildren">
33 <a id="Item3_c0" onkeydown="return searchResults.NavChild(event,3,0)" onkeypress="return searchResults.NavChild(event,3,0)" onkeyup="return searchResults.NavChild(event,3,0)" class="SRScope" href="../jsmn_8c.html#a64734cb1fc006fba5fd237e80a58ef40" target="_parent">jsmn_parse(jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, unsigned int num_tokens):&#160;jsmn.c</a>
34 <a id="Item3_c1" onkeydown="return searchResults.NavChild(event,3,1)" onkeypress="return searchResults.NavChild(event,3,1)" onkeyup="return searchResults.NavChild(event,3,1)" class="SRScope" href="../jsmn_8h.html#a64734cb1fc006fba5fd237e80a58ef40" target="_parent">jsmn_parse(jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, unsigned int num_tokens):&#160;jsmn.c</a>
35 </div>
36 </div>
37</div>
38<div class="SRResult" id="SR_jsmn_5fparser">
39 <div class="SREntry">
40 <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="../structjsmn__parser.html" target="_parent">jsmn_parser</a>
41 </div>
42</div>
43<div class="SRResult" id="SR_jsmntok_5ft">
44 <div class="SREntry">
45 <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="../structjsmntok__t.html" target="_parent">jsmntok_t</a>
46 </div>
47</div>
48<div class="SRResult" id="SR_jsmntype_5ft">
49 <div class="SREntry">
50 <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="../jsmn_8h.html#a065320719769f9dc1fbe30094e52802f" target="_parent">jsmntype_t</a>
51 <span class="SRScope">jsmn.h</span>
52 </div>
53</div>
54<div class="SRResult" id="SR_jsonstruct">
55 <div class="SREntry">
56 <a id="Item7" onkeydown="return searchResults.Nav(event,7)" onkeypress="return searchResults.Nav(event,7)" onkeyup="return searchResults.Nav(event,7)" class="SRSymbol" href="../structjsonStruct.html" target="_parent">jsonStruct</a>
57 </div>
58</div>
59<div class="SRResult" id="SR_jsontokentable_5ft">
60 <div class="SREntry">
61 <a id="Item8" onkeydown="return searchResults.Nav(event,8)" onkeypress="return searchResults.Nav(event,8)" onkeyup="return searchResults.Nav(event,8)" class="SRSymbol" href="../structJsonTokenTable__t.html" target="_parent">JsonTokenTable_t</a>
62 </div>
63</div>
64<div class="SRStatus" id="Searching">Searching...</div>
65<div class="SRStatus" id="NoMatches">No Matches</div>
66<script type="text/javascript"><!--
67document.getElementById("Loading").style.display="none";
68document.getElementById("NoMatches").style.display="none";
69var searchResults = new SearchResults("searchResults");
70searchResults.Search();
71--></script>
72</div>
73</body>
74</html>
diff --git a/docs/html/search/all_6b.html b/docs/html/search/all_6b.html
new file mode 100644
index 0000000..09c07c0
--- /dev/null
+++ b/docs/html/search/all_6b.html
@@ -0,0 +1,26 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_keepaliveinterval_5fsec">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structMQTTConnectParams.html#a8ae47bfc9025dafc49e80605317e7232" target="_parent">KeepAliveInterval_sec</a>
13 <span class="SRScope">MQTTConnectParams</span>
14 </div>
15</div>
16<div class="SRStatus" id="Searching">Searching...</div>
17<div class="SRStatus" id="NoMatches">No Matches</div>
18<script type="text/javascript"><!--
19document.getElementById("Loading").style.display="none";
20document.getElementById("NoMatches").style.display="none";
21var searchResults = new SearchResults("searchResults");
22searchResults.Search();
23--></script>
24</div>
25</body>
26</html>
diff --git a/docs/html/search/all_6c.html b/docs/html/search/all_6c.html
new file mode 100644
index 0000000..c977e60
--- /dev/null
+++ b/docs/html/search/all_6c.html
@@ -0,0 +1,29 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_left_5fms">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_left_5fms')">left_ms</a>
13 <div class="SRChildren">
14 <a id="Item0_c0" onkeydown="return searchResults.NavChild(event,0,0)" onkeypress="return searchResults.NavChild(event,0,0)" onkeyup="return searchResults.NavChild(event,0,0)" class="SRScope" href="../timer_8c.html#a9057a416766ddfe329756bc83cf969d0" target="_parent">left_ms(Timer *timer):&#160;timer.c</a>
15 <a id="Item0_c1" onkeydown="return searchResults.NavChild(event,0,1)" onkeypress="return searchResults.NavChild(event,0,1)" onkeyup="return searchResults.NavChild(event,0,1)" class="SRScope" href="../timer__interface_8h.html#a81352d29dba5f9e360b6f551b33475c6" target="_parent">left_ms(Timer *):&#160;timer.c</a>
16 </div>
17 </div>
18</div>
19<div class="SRStatus" id="Searching">Searching...</div>
20<div class="SRStatus" id="NoMatches">No Matches</div>
21<script type="text/javascript"><!--
22document.getElementById("Loading").style.display="none";
23document.getElementById("NoMatches").style.display="none";
24var searchResults = new SearchResults("searchResults");
25searchResults.Search();
26--></script>
27</div>
28</body>
29</html>
diff --git a/docs/html/search/all_6d.html b/docs/html/search/all_6d.html
new file mode 100644
index 0000000..9c6dcb3
--- /dev/null
+++ b/docs/html/search/all_6d.html
@@ -0,0 +1,100 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_messageparams">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_messageparams')">MessageParams</a>
13 <div class="SRChildren">
14 <a id="Item0_c0" onkeydown="return searchResults.NavChild(event,0,0)" onkeypress="return searchResults.NavChild(event,0,0)" onkeyup="return searchResults.NavChild(event,0,0)" class="SRScope" href="../structMQTTCallbackParams.html#ac350fbe59e29d1f9c08d61340bdb9170" target="_parent">MQTTCallbackParams::MessageParams()</a>
15 <a id="Item0_c1" onkeydown="return searchResults.NavChild(event,0,1)" onkeypress="return searchResults.NavChild(event,0,1)" onkeyup="return searchResults.NavChild(event,0,1)" class="SRScope" href="../structMQTTPublishParams.html#a7ac4d0b9e84808a07e0036f9a0e4b369" target="_parent">MQTTPublishParams::MessageParams()</a>
16 </div>
17 </div>
18</div>
19<div class="SRResult" id="SR_mhandler">
20 <div class="SREntry">
21 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../structMQTTSubscribeParams.html#a5d21b3e72ac4530110cd43ccdc2245b1" target="_parent">mHandler</a>
22 <span class="SRScope">MQTTSubscribeParams</span>
23 </div>
24</div>
25<div class="SRResult" id="SR_mqttcallbackparams">
26 <div class="SREntry">
27 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../structMQTTCallbackParams.html" target="_parent">MQTTCallbackParams</a>
28 </div>
29</div>
30<div class="SRResult" id="SR_mqttclient_5ft">
31 <div class="SREntry">
32 <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../structMQTTClient__t.html" target="_parent">MQTTClient_t</a>
33 </div>
34</div>
35<div class="SRResult" id="SR_mqttcommandtimeout_5fms">
36 <div class="SREntry">
37 <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="../structMQTTConnectParams.html#ac2d24e342b29b7f3ea4777732fd6988a" target="_parent">mqttCommandTimeout_ms</a>
38 <span class="SRScope">MQTTConnectParams</span>
39 </div>
40</div>
41<div class="SRResult" id="SR_mqttconnectparams">
42 <div class="SREntry">
43 <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="../structMQTTConnectParams.html" target="_parent">MQTTConnectParams</a>
44 </div>
45</div>
46<div class="SRResult" id="SR_mqttmessageparams">
47 <div class="SREntry">
48 <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="../structMQTTMessageParams.html" target="_parent">MQTTMessageParams</a>
49 </div>
50</div>
51<div class="SRResult" id="SR_mqttpublishparams">
52 <div class="SREntry">
53 <a id="Item7" onkeydown="return searchResults.Nav(event,7)" onkeypress="return searchResults.Nav(event,7)" onkeyup="return searchResults.Nav(event,7)" class="SRSymbol" href="../structMQTTPublishParams.html" target="_parent">MQTTPublishParams</a>
54 </div>
55</div>
56<div class="SRResult" id="SR_mqttread">
57 <div class="SREntry">
58 <a id="Item8" onkeydown="return searchResults.Nav(event,8)" onkeypress="return searchResults.Nav(event,8)" onkeyup="return searchResults.Nav(event,8)" class="SRSymbol" href="../structNetwork.html#aabf2c7305c36a7858b471cef6d98de0e" target="_parent">mqttread</a>
59 <span class="SRScope">Network</span>
60 </div>
61</div>
62<div class="SRResult" id="SR_mqttsubscribeparams">
63 <div class="SREntry">
64 <a id="Item9" onkeydown="return searchResults.Nav(event,9)" onkeypress="return searchResults.Nav(event,9)" onkeyup="return searchResults.Nav(event,9)" class="SRSymbol" href="../structMQTTSubscribeParams.html" target="_parent">MQTTSubscribeParams</a>
65 </div>
66</div>
67<div class="SRResult" id="SR_mqttversion">
68 <div class="SREntry">
69 <a id="Item10" onkeydown="return searchResults.Nav(event,10)" onkeypress="return searchResults.Nav(event,10)" onkeyup="return searchResults.Nav(event,10)" class="SRSymbol" href="../structMQTTConnectParams.html#a25577733f870ba683b7f44e2288036a7" target="_parent">MQTTVersion</a>
70 <span class="SRScope">MQTTConnectParams</span>
71 </div>
72</div>
73<div class="SRResult" id="SR_mqttwilloptions">
74 <div class="SREntry">
75 <a id="Item11" onkeydown="return searchResults.Nav(event,11)" onkeypress="return searchResults.Nav(event,11)" onkeyup="return searchResults.Nav(event,11)" class="SRSymbol" href="../structMQTTwillOptions.html" target="_parent">MQTTwillOptions</a>
76 </div>
77</div>
78<div class="SRResult" id="SR_mqttwrite">
79 <div class="SREntry">
80 <a id="Item12" onkeydown="return searchResults.Nav(event,12)" onkeypress="return searchResults.Nav(event,12)" onkeyup="return searchResults.Nav(event,12)" class="SRSymbol" href="../structNetwork.html#a00ed168a988784ecb64c8a07da2e04bd" target="_parent">mqttwrite</a>
81 <span class="SRScope">Network</span>
82 </div>
83</div>
84<div class="SRResult" id="SR_my_5fsocket">
85 <div class="SREntry">
86 <a id="Item13" onkeydown="return searchResults.Nav(event,13)" onkeypress="return searchResults.Nav(event,13)" onkeyup="return searchResults.Nav(event,13)" class="SRSymbol" href="../structNetwork.html#ad7b36ded416243b20d0d5924dba8385e" target="_parent">my_socket</a>
87 <span class="SRScope">Network</span>
88 </div>
89</div>
90<div class="SRStatus" id="Searching">Searching...</div>
91<div class="SRStatus" id="NoMatches">No Matches</div>
92<script type="text/javascript"><!--
93document.getElementById("Loading").style.display="none";
94document.getElementById("NoMatches").style.display="none";
95var searchResults = new SearchResults("searchResults");
96searchResults.Search();
97--></script>
98</div>
99</body>
100</html>
diff --git a/docs/html/search/all_6e.html b/docs/html/search/all_6e.html
new file mode 100644
index 0000000..ff4e321
--- /dev/null
+++ b/docs/html/search/all_6e.html
@@ -0,0 +1,34 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_network">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_network')">Network</a>
13 <div class="SRChildren">
14 <a id="Item0_c0" onkeydown="return searchResults.NavChild(event,0,0)" onkeypress="return searchResults.NavChild(event,0,0)" onkeyup="return searchResults.NavChild(event,0,0)" class="SRScope" href="../structNetwork.html" target="_parent">Network</a>
15 <a id="Item0_c1" onkeydown="return searchResults.NavChild(event,0,1)" onkeypress="return searchResults.NavChild(event,0,1)" onkeyup="return searchResults.NavChild(event,0,1)" class="SRScope" href="../network__interface_8h.html#a5e783e42eddc16b9eb807fe441e845e9" target="_parent">Network():&#160;network_interface.h</a>
16 </div>
17 </div>
18</div>
19<div class="SRResult" id="SR_network_5finterface_2eh">
20 <div class="SREntry">
21 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../network__interface_8h.html" target="_parent">network_interface.h</a>
22 </div>
23</div>
24<div class="SRStatus" id="Searching">Searching...</div>
25<div class="SRStatus" id="NoMatches">No Matches</div>
26<script type="text/javascript"><!--
27document.getElementById("Loading").style.display="none";
28document.getElementById("NoMatches").style.display="none";
29var searchResults = new SearchResults("searchResults");
30searchResults.Search();
31--></script>
32</div>
33</body>
34</html>
diff --git a/docs/html/search/all_70.html b/docs/html/search/all_70.html
new file mode 100644
index 0000000..770bf4d
--- /dev/null
+++ b/docs/html/search/all_70.html
@@ -0,0 +1,164 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_payloadlen">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structMQTTMessageParams.html#a41d4499e625695a8682eb2f51c0fddf9" target="_parent">PayloadLen</a>
13 <span class="SRScope">MQTTMessageParams</span>
14 </div>
15</div>
16<div class="SRResult" id="SR_pclientcrt">
17 <div class="SREntry">
18 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../structShadowParameters__t.html#a9ba70adf7b2553a574d0c493815c3fde" target="_parent">pClientCRT</a>
19 <span class="SRScope">ShadowParameters_t</span>
20 </div>
21</div>
22<div class="SRResult" id="SR_pclientid">
23 <div class="SREntry">
24 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../structMQTTConnectParams.html#ae089333563f566afdb36caa82e5375bf" target="_parent">pClientID</a>
25 <span class="SRScope">MQTTConnectParams</span>
26 </div>
27</div>
28<div class="SRResult" id="SR_pclientkey">
29 <div class="SREntry">
30 <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../structShadowParameters__t.html#af0a34f1265930aec7023f625af80df7f" target="_parent">pClientKey</a>
31 <span class="SRScope">ShadowParameters_t</span>
32 </div>
33</div>
34<div class="SRResult" id="SR_pdestinationurl">
35 <div class="SREntry">
36 <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="../structTLSConnectParams.html#a4deae89cd9ba3f3b2e75c27e1b80cdc0" target="_parent">pDestinationURL</a>
37 <span class="SRScope">TLSConnectParams</span>
38 </div>
39</div>
40<div class="SRResult" id="SR_pdevicecertlocation">
41 <div class="SREntry">
42 <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_pdevicecertlocation')">pDeviceCertLocation</a>
43 <div class="SRChildren">
44 <a id="Item5_c0" onkeydown="return searchResults.NavChild(event,5,0)" onkeypress="return searchResults.NavChild(event,5,0)" onkeyup="return searchResults.NavChild(event,5,0)" class="SRScope" href="../structTLSConnectParams.html#aa8a37f66a9473f554b92f0944e1baa3e" target="_parent">TLSConnectParams::pDeviceCertLocation()</a>
45 <a id="Item5_c1" onkeydown="return searchResults.NavChild(event,5,1)" onkeypress="return searchResults.NavChild(event,5,1)" onkeyup="return searchResults.NavChild(event,5,1)" class="SRScope" href="../structMQTTConnectParams.html#a0ff5b27384df86ae50caac0b4bb8a429" target="_parent">MQTTConnectParams::pDeviceCertLocation()</a>
46 </div>
47 </div>
48</div>
49<div class="SRResult" id="SR_pdeviceprivatekeylocation">
50 <div class="SREntry">
51 <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_pdeviceprivatekeylocation')">pDevicePrivateKeyLocation</a>
52 <div class="SRChildren">
53 <a id="Item6_c0" onkeydown="return searchResults.NavChild(event,6,0)" onkeypress="return searchResults.NavChild(event,6,0)" onkeyup="return searchResults.NavChild(event,6,0)" class="SRScope" href="../structTLSConnectParams.html#aaca0411311eb106ca6c48bd788de9fdf" target="_parent">TLSConnectParams::pDevicePrivateKeyLocation()</a>
54 <a id="Item6_c1" onkeydown="return searchResults.NavChild(event,6,1)" onkeypress="return searchResults.NavChild(event,6,1)" onkeyup="return searchResults.NavChild(event,6,1)" class="SRScope" href="../structMQTTConnectParams.html#a99ce9a0fe10c70ef3e445cf7612be919" target="_parent">MQTTConnectParams::pDevicePrivateKeyLocation()</a>
55 </div>
56 </div>
57</div>
58<div class="SRResult" id="SR_phost">
59 <div class="SREntry">
60 <a id="Item7" onkeydown="return searchResults.Nav(event,7)" onkeypress="return searchResults.Nav(event,7)" onkeyup="return searchResults.Nav(event,7)" class="SRSymbol" href="../structShadowParameters__t.html#abebf2ba2657ead7718385f2406730cc0" target="_parent">pHost</a>
61 <span class="SRScope">ShadowParameters_t</span>
62 </div>
63</div>
64<div class="SRResult" id="SR_phosturl">
65 <div class="SREntry">
66 <a id="Item8" onkeydown="return searchResults.Nav(event,8)" onkeypress="return searchResults.Nav(event,8)" onkeyup="return searchResults.Nav(event,8)" class="SRSymbol" href="../structMQTTConnectParams.html#afe7a9782130dab062a9b27aabcade48d" target="_parent">pHostURL</a>
67 <span class="SRScope">MQTTConnectParams</span>
68 </div>
69</div>
70<div class="SRResult" id="SR_pmessage">
71 <div class="SREntry">
72 <a id="Item9" onkeydown="return searchResults.Nav(event,9)" onkeypress="return searchResults.Nav(event,9)" onkeyup="return searchResults.Nav(event,9)" class="SRSymbol" href="../structMQTTwillOptions.html#a3113cbbc7701ed62735a7fc0635e8d2f" target="_parent">pMessage</a>
73 <span class="SRScope">MQTTwillOptions</span>
74 </div>
75</div>
76<div class="SRResult" id="SR_pmqttclientid">
77 <div class="SREntry">
78 <a id="Item10" onkeydown="return searchResults.Nav(event,10)" onkeypress="return searchResults.Nav(event,10)" onkeyup="return searchResults.Nav(event,10)" class="SRSymbol" href="../structShadowParameters__t.html#a27619390335abf973719645b8f31a277" target="_parent">pMqttClientId</a>
79 <span class="SRScope">ShadowParameters_t</span>
80 </div>
81</div>
82<div class="SRResult" id="SR_pmythingname">
83 <div class="SREntry">
84 <a id="Item11" onkeydown="return searchResults.Nav(event,11)" onkeypress="return searchResults.Nav(event,11)" onkeyup="return searchResults.Nav(event,11)" class="SRSymbol" href="../structShadowParameters__t.html#adb78403e35dd900410d5d26ef0fa315d" target="_parent">pMyThingName</a>
85 <span class="SRScope">ShadowParameters_t</span>
86 </div>
87</div>
88<div class="SRResult" id="SR_port">
89 <div class="SREntry">
90 <a id="Item12" onkeydown="return searchResults.Nav(event,12)" onkeypress="return searchResults.Nav(event,12)" onkeyup="return searchResults.Nav(event,12)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_port')">port</a>
91 <div class="SRChildren">
92 <a id="Item12_c0" onkeydown="return searchResults.NavChild(event,12,0)" onkeypress="return searchResults.NavChild(event,12,0)" onkeyup="return searchResults.NavChild(event,12,0)" class="SRScope" href="../structMQTTConnectParams.html#a03eed7f477e9f834294d0891d125ad5c" target="_parent">MQTTConnectParams::port()</a>
93 <a id="Item12_c1" onkeydown="return searchResults.NavChild(event,12,1)" onkeypress="return searchResults.NavChild(event,12,1)" onkeyup="return searchResults.NavChild(event,12,1)" class="SRScope" href="../structShadowParameters__t.html#a3243eeb13c8bad2cf78dcd7003b1d665" target="_parent">ShadowParameters_t::port()</a>
94 </div>
95 </div>
96</div>
97<div class="SRResult" id="SR_ppassword">
98 <div class="SREntry">
99 <a id="Item13" onkeydown="return searchResults.Nav(event,13)" onkeypress="return searchResults.Nav(event,13)" onkeyup="return searchResults.Nav(event,13)" class="SRSymbol" href="../structMQTTConnectParams.html#a09497a2124f8021a70bde9d713350611" target="_parent">pPassword</a>
100 <span class="SRScope">MQTTConnectParams</span>
101 </div>
102</div>
103<div class="SRResult" id="SR_ppayload">
104 <div class="SREntry">
105 <a id="Item14" onkeydown="return searchResults.Nav(event,14)" onkeypress="return searchResults.Nav(event,14)" onkeyup="return searchResults.Nav(event,14)" class="SRSymbol" href="../structMQTTMessageParams.html#ae0103a22ff8338af06553f3403b4b916" target="_parent">pPayload</a>
106 <span class="SRScope">MQTTMessageParams</span>
107 </div>
108</div>
109<div class="SRResult" id="SR_prootca">
110 <div class="SREntry">
111 <a id="Item15" onkeydown="return searchResults.Nav(event,15)" onkeypress="return searchResults.Nav(event,15)" onkeyup="return searchResults.Nav(event,15)" class="SRSymbol" href="../structShadowParameters__t.html#afa3bbe30735094046913d645b6d2ae50" target="_parent">pRootCA</a>
112 <span class="SRScope">ShadowParameters_t</span>
113 </div>
114</div>
115<div class="SRResult" id="SR_prootcalocation">
116 <div class="SREntry">
117 <a id="Item16" onkeydown="return searchResults.Nav(event,16)" onkeypress="return searchResults.Nav(event,16)" onkeyup="return searchResults.Nav(event,16)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_prootcalocation')">pRootCALocation</a>
118 <div class="SRChildren">
119 <a id="Item16_c0" onkeydown="return searchResults.NavChild(event,16,0)" onkeypress="return searchResults.NavChild(event,16,0)" onkeyup="return searchResults.NavChild(event,16,0)" class="SRScope" href="../structTLSConnectParams.html#a62e797f55d038c78739a2af11d03b6ff" target="_parent">TLSConnectParams::pRootCALocation()</a>
120 <a id="Item16_c1" onkeydown="return searchResults.NavChild(event,16,1)" onkeypress="return searchResults.NavChild(event,16,1)" onkeyup="return searchResults.NavChild(event,16,1)" class="SRScope" href="../structMQTTConnectParams.html#ac8128e06c4135460050acf220bee7297" target="_parent">MQTTConnectParams::pRootCALocation()</a>
121 </div>
122 </div>
123</div>
124<div class="SRResult" id="SR_ptopic">
125 <div class="SREntry">
126 <a id="Item17" onkeydown="return searchResults.Nav(event,17)" onkeypress="return searchResults.Nav(event,17)" onkeyup="return searchResults.Nav(event,17)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ptopic')">pTopic</a>
127 <div class="SRChildren">
128 <a id="Item17_c0" onkeydown="return searchResults.NavChild(event,17,0)" onkeypress="return searchResults.NavChild(event,17,0)" onkeyup="return searchResults.NavChild(event,17,0)" class="SRScope" href="../structMQTTSubscribeParams.html#a8bbbc1a4a96d1270e11a58d3aa31521e" target="_parent">MQTTSubscribeParams::pTopic()</a>
129 <a id="Item17_c1" onkeydown="return searchResults.NavChild(event,17,1)" onkeypress="return searchResults.NavChild(event,17,1)" onkeyup="return searchResults.NavChild(event,17,1)" class="SRScope" href="../structMQTTPublishParams.html#ad8b1bb06e8bd823de87b00b912d8b6e1" target="_parent">MQTTPublishParams::pTopic()</a>
130 </div>
131 </div>
132</div>
133<div class="SRResult" id="SR_ptopicname">
134 <div class="SREntry">
135 <a id="Item18" onkeydown="return searchResults.Nav(event,18)" onkeypress="return searchResults.Nav(event,18)" onkeyup="return searchResults.Nav(event,18)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ptopicname')">pTopicName</a>
136 <div class="SRChildren">
137 <a id="Item18_c0" onkeydown="return searchResults.NavChild(event,18,0)" onkeypress="return searchResults.NavChild(event,18,0)" onkeyup="return searchResults.NavChild(event,18,0)" class="SRScope" href="../structMQTTwillOptions.html#aa27c5b47d2f848ac32cd2180d97dd8e3" target="_parent">MQTTwillOptions::pTopicName()</a>
138 <a id="Item18_c1" onkeydown="return searchResults.NavChild(event,18,1)" onkeypress="return searchResults.NavChild(event,18,1)" onkeyup="return searchResults.NavChild(event,18,1)" class="SRScope" href="../structMQTTCallbackParams.html#af6b4ccd3c4cab157b93c3d0c1d8f1dc9" target="_parent">MQTTCallbackParams::pTopicName()</a>
139 </div>
140 </div>
141</div>
142<div class="SRResult" id="SR_publish">
143 <div class="SREntry">
144 <a id="Item19" onkeydown="return searchResults.Nav(event,19)" onkeypress="return searchResults.Nav(event,19)" onkeyup="return searchResults.Nav(event,19)" class="SRSymbol" href="../structMQTTClient__t.html#accddc5560b9d33e8d7556c336847c584" target="_parent">publish</a>
145 <span class="SRScope">MQTTClient_t</span>
146 </div>
147</div>
148<div class="SRResult" id="SR_pusername">
149 <div class="SREntry">
150 <a id="Item20" onkeydown="return searchResults.Nav(event,20)" onkeypress="return searchResults.Nav(event,20)" onkeyup="return searchResults.Nav(event,20)" class="SRSymbol" href="../structMQTTConnectParams.html#a2efa006d6305a8c6bea31cbbfb20cbfe" target="_parent">pUserName</a>
151 <span class="SRScope">MQTTConnectParams</span>
152 </div>
153</div>
154<div class="SRStatus" id="Searching">Searching...</div>
155<div class="SRStatus" id="NoMatches">No Matches</div>
156<script type="text/javascript"><!--
157document.getElementById("Loading").style.display="none";
158document.getElementById("NoMatches").style.display="none";
159var searchResults = new SearchResults("searchResults");
160searchResults.Search();
161--></script>
162</div>
163</body>
164</html>
diff --git a/docs/html/search/all_71.html b/docs/html/search/all_71.html
new file mode 100644
index 0000000..5cd2934
--- /dev/null
+++ b/docs/html/search/all_71.html
@@ -0,0 +1,30 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_qos">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_qos')">qos</a>
13 <div class="SRChildren">
14 <a id="Item0_c0" onkeydown="return searchResults.NavChild(event,0,0)" onkeypress="return searchResults.NavChild(event,0,0)" onkeyup="return searchResults.NavChild(event,0,0)" class="SRScope" href="../structMQTTwillOptions.html#a6c5ff6dad1a3487cd131bb6eaa990a3f" target="_parent">MQTTwillOptions::qos()</a>
15 <a id="Item0_c1" onkeydown="return searchResults.NavChild(event,0,1)" onkeypress="return searchResults.NavChild(event,0,1)" onkeyup="return searchResults.NavChild(event,0,1)" class="SRScope" href="../structMQTTMessageParams.html#aef06a771fecb653893f75ee74b5067aa" target="_parent">MQTTMessageParams::qos()</a>
16 <a id="Item0_c2" onkeydown="return searchResults.NavChild(event,0,2)" onkeypress="return searchResults.NavChild(event,0,2)" onkeyup="return searchResults.NavChild(event,0,2)" class="SRScope" href="../structMQTTSubscribeParams.html#adcfb4d6691c3d68818b49b996addf4fa" target="_parent">MQTTSubscribeParams::qos()</a>
17 </div>
18 </div>
19</div>
20<div class="SRStatus" id="Searching">Searching...</div>
21<div class="SRStatus" id="NoMatches">No Matches</div>
22<script type="text/javascript"><!--
23document.getElementById("Loading").style.display="none";
24document.getElementById("NoMatches").style.display="none";
25var searchResults = new SearchResults("searchResults");
26searchResults.Search();
27--></script>
28</div>
29</body>
30</html>
diff --git a/docs/html/search/all_72.html b/docs/html/search/all_72.html
new file mode 100644
index 0000000..d33c787
--- /dev/null
+++ b/docs/html/search/all_72.html
@@ -0,0 +1,26 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_roomtemperature_5fupperlimit">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../shadow__sample_8c.html#a6dbd1724187439bfaa80cafa7517cdfd" target="_parent">ROOMTEMPERATURE_UPPERLIMIT</a>
13 <span class="SRScope">shadow_sample.c</span>
14 </div>
15</div>
16<div class="SRStatus" id="Searching">Searching...</div>
17<div class="SRStatus" id="NoMatches">No Matches</div>
18<script type="text/javascript"><!--
19document.getElementById("Loading").style.display="none";
20document.getElementById("NoMatches").style.display="none";
21var searchResults = new SearchResults("searchResults");
22searchResults.Search();
23--></script>
24</div>
25</body>
26</html>
diff --git a/docs/html/search/all_73.html b/docs/html/search/all_73.html
new file mode 100644
index 0000000..ef3e84d
--- /dev/null
+++ b/docs/html/search/all_73.html
@@ -0,0 +1,65 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_serververificationflag">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structTLSConnectParams.html#ad81e67d8b722a28af4abdbeb89aa58e7" target="_parent">ServerVerificationFlag</a>
13 <span class="SRScope">TLSConnectParams</span>
14 </div>
15</div>
16<div class="SRResult" id="SR_shadow_5fack_5fstatus_5ft">
17 <div class="SREntry">
18 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#ad946163c2ac5df0aa896520949d47956" target="_parent">Shadow_Ack_Status_t</a>
19 <span class="SRScope">aws_iot_shadow_interface.h</span>
20 </div>
21</div>
22<div class="SRResult" id="SR_shadow_5fsample_2ec">
23 <div class="SREntry">
24 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../shadow__sample_8c.html" target="_parent">shadow_sample.c</a>
25 </div>
26</div>
27<div class="SRResult" id="SR_shadowactions_5ft">
28 <div class="SREntry">
29 <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c" target="_parent">ShadowActions_t</a>
30 <span class="SRScope">aws_iot_shadow_interface.h</span>
31 </div>
32</div>
33<div class="SRResult" id="SR_shadowparameters_5ft">
34 <div class="SREntry">
35 <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="../structShadowParameters__t.html" target="_parent">ShadowParameters_t</a>
36 </div>
37</div>
38<div class="SRResult" id="SR_shadowparametersdefault">
39 <div class="SREntry">
40 <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="../structShadowParameters__t.html#adc225bbde6004034d41899a4f4b13074" target="_parent">ShadowParametersDefault</a>
41 <span class="SRScope">ShadowParameters_t</span>
42 </div>
43</div>
44<div class="SRResult" id="SR_subscribe">
45 <div class="SREntry">
46 <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="../structMQTTClient__t.html#a7053d0cd48d1c22a217d847babe372c4" target="_parent">subscribe</a>
47 <span class="SRScope">MQTTClient_t</span>
48 </div>
49</div>
50<div class="SRResult" id="SR_subscriptionrecord_5ft">
51 <div class="SREntry">
52 <a id="Item7" onkeydown="return searchResults.Nav(event,7)" onkeypress="return searchResults.Nav(event,7)" onkeyup="return searchResults.Nav(event,7)" class="SRSymbol" href="../structSubscriptionRecord__t.html" target="_parent">SubscriptionRecord_t</a>
53 </div>
54</div>
55<div class="SRStatus" id="Searching">Searching...</div>
56<div class="SRStatus" id="NoMatches">No Matches</div>
57<script type="text/javascript"><!--
58document.getElementById("Loading").style.display="none";
59document.getElementById("NoMatches").style.display="none";
60var searchResults = new SearchResults("searchResults");
61searchResults.Search();
62--></script>
63</div>
64</body>
65</html>
diff --git a/docs/html/search/all_74.html b/docs/html/search/all_74.html
new file mode 100644
index 0000000..a0cf570
--- /dev/null
+++ b/docs/html/search/all_74.html
@@ -0,0 +1,67 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_timeout_5fms">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structTLSConnectParams.html#a60800f6a6a6bc138e5b0a3e016d0be8f" target="_parent">timeout_ms</a>
13 <span class="SRScope">TLSConnectParams</span>
14 </div>
15</div>
16<div class="SRResult" id="SR_timer">
17 <div class="SREntry">
18 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_timer')">Timer</a>
19 <div class="SRChildren">
20 <a id="Item1_c0" onkeydown="return searchResults.NavChild(event,1,0)" onkeypress="return searchResults.NavChild(event,1,0)" onkeyup="return searchResults.NavChild(event,1,0)" class="SRScope" href="../structTimer.html" target="_parent">Timer</a>
21 <a id="Item1_c1" onkeydown="return searchResults.NavChild(event,1,1)" onkeypress="return searchResults.NavChild(event,1,1)" onkeyup="return searchResults.NavChild(event,1,1)" class="SRScope" href="../timer__interface_8h.html#a9809d52f988a8dba9cd5d8e129cebadd" target="_parent">Timer():&#160;timer_interface.h</a>
22 </div>
23 </div>
24</div>
25<div class="SRResult" id="SR_timer_2ec">
26 <div class="SREntry">
27 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../timer_8c.html" target="_parent">timer.c</a>
28 </div>
29</div>
30<div class="SRResult" id="SR_timer_5finterface_2eh">
31 <div class="SREntry">
32 <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../timer__interface_8h.html" target="_parent">timer_interface.h</a>
33 </div>
34</div>
35<div class="SRResult" id="SR_tlsconnectparams">
36 <div class="SREntry">
37 <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="../structTLSConnectParams.html" target="_parent">TLSConnectParams</a>
38 </div>
39</div>
40<div class="SRResult" id="SR_tlshandshaketimeout_5fms">
41 <div class="SREntry">
42 <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="../structMQTTConnectParams.html#aa870d2df978a54f739214ee888c67171" target="_parent">tlsHandshakeTimeout_ms</a>
43 <span class="SRScope">MQTTConnectParams</span>
44 </div>
45</div>
46<div class="SRResult" id="SR_tobereceivedackrecord_5ft">
47 <div class="SREntry">
48 <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="../structToBeReceivedAckRecord__t.html" target="_parent">ToBeReceivedAckRecord_t</a>
49 </div>
50</div>
51<div class="SRResult" id="SR_topicnamelen">
52 <div class="SREntry">
53 <a id="Item7" onkeydown="return searchResults.Nav(event,7)" onkeypress="return searchResults.Nav(event,7)" onkeyup="return searchResults.Nav(event,7)" class="SRSymbol" href="../structMQTTCallbackParams.html#acb1088787c038d920c2f24fca3aecd3c" target="_parent">TopicNameLen</a>
54 <span class="SRScope">MQTTCallbackParams</span>
55 </div>
56</div>
57<div class="SRStatus" id="Searching">Searching...</div>
58<div class="SRStatus" id="NoMatches">No Matches</div>
59<script type="text/javascript"><!--
60document.getElementById("Loading").style.display="none";
61document.getElementById("NoMatches").style.display="none";
62var searchResults = new SearchResults("searchResults");
63searchResults.Search();
64--></script>
65</div>
66</body>
67</html>
diff --git a/docs/html/search/all_75.html b/docs/html/search/all_75.html
new file mode 100644
index 0000000..2af5eae
--- /dev/null
+++ b/docs/html/search/all_75.html
@@ -0,0 +1,26 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_unsubscribe">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structMQTTClient__t.html#ad4fca46f97db56c20667c4245d0bdea1" target="_parent">unsubscribe</a>
13 <span class="SRScope">MQTTClient_t</span>
14 </div>
15</div>
16<div class="SRStatus" id="Searching">Searching...</div>
17<div class="SRStatus" id="NoMatches">No Matches</div>
18<script type="text/javascript"><!--
19document.getElementById("Loading").style.display="none";
20document.getElementById("NoMatches").style.display="none";
21var searchResults = new SearchResults("searchResults");
22searchResults.Search();
23--></script>
24</div>
25</body>
26</html>
diff --git a/docs/html/search/all_77.html b/docs/html/search/all_77.html
new file mode 100644
index 0000000..2b3ca3f
--- /dev/null
+++ b/docs/html/search/all_77.html
@@ -0,0 +1,26 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_will">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structMQTTConnectParams.html#abd5a646508c84aa7445822855969eaf6" target="_parent">will</a>
13 <span class="SRScope">MQTTConnectParams</span>
14 </div>
15</div>
16<div class="SRStatus" id="Searching">Searching...</div>
17<div class="SRStatus" id="NoMatches">No Matches</div>
18<script type="text/javascript"><!--
19document.getElementById("Loading").style.display="none";
20document.getElementById("NoMatches").style.display="none";
21var searchResults = new SearchResults("searchResults");
22searchResults.Search();
23--></script>
24</div>
25</body>
26</html>
diff --git a/docs/html/search/all_79.html b/docs/html/search/all_79.html
new file mode 100644
index 0000000..5466789
--- /dev/null
+++ b/docs/html/search/all_79.html
@@ -0,0 +1,26 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_yield">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structMQTTClient__t.html#accaa6a8595048819c8629a80a398bc54" target="_parent">yield</a>
13 <span class="SRScope">MQTTClient_t</span>
14 </div>
15</div>
16<div class="SRStatus" id="Searching">Searching...</div>
17<div class="SRStatus" id="NoMatches">No Matches</div>
18<script type="text/javascript"><!--
19document.getElementById("Loading").style.display="none";
20document.getElementById("NoMatches").style.display="none";
21var searchResults = new SearchResults("searchResults");
22searchResults.Search();
23--></script>
24</div>
25</body>
26</html>
diff --git a/docs/html/search/classes_6a.html b/docs/html/search/classes_6a.html
new file mode 100644
index 0000000..b1c53b2
--- /dev/null
+++ b/docs/html/search/classes_6a.html
@@ -0,0 +1,40 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_jsmn_5fparser">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structjsmn__parser.html" target="_parent">jsmn_parser</a>
13 </div>
14</div>
15<div class="SRResult" id="SR_jsmntok_5ft">
16 <div class="SREntry">
17 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../structjsmntok__t.html" target="_parent">jsmntok_t</a>
18 </div>
19</div>
20<div class="SRResult" id="SR_jsonstruct">
21 <div class="SREntry">
22 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../structjsonStruct.html" target="_parent">jsonStruct</a>
23 </div>
24</div>
25<div class="SRResult" id="SR_jsontokentable_5ft">
26 <div class="SREntry">
27 <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../structJsonTokenTable__t.html" target="_parent">JsonTokenTable_t</a>
28 </div>
29</div>
30<div class="SRStatus" id="Searching">Searching...</div>
31<div class="SRStatus" id="NoMatches">No Matches</div>
32<script type="text/javascript"><!--
33document.getElementById("Loading").style.display="none";
34document.getElementById("NoMatches").style.display="none";
35var searchResults = new SearchResults("searchResults");
36searchResults.Search();
37--></script>
38</div>
39</body>
40</html>
diff --git a/docs/html/search/classes_6d.html b/docs/html/search/classes_6d.html
new file mode 100644
index 0000000..4258cec
--- /dev/null
+++ b/docs/html/search/classes_6d.html
@@ -0,0 +1,55 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_mqttcallbackparams">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structMQTTCallbackParams.html" target="_parent">MQTTCallbackParams</a>
13 </div>
14</div>
15<div class="SRResult" id="SR_mqttclient_5ft">
16 <div class="SREntry">
17 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../structMQTTClient__t.html" target="_parent">MQTTClient_t</a>
18 </div>
19</div>
20<div class="SRResult" id="SR_mqttconnectparams">
21 <div class="SREntry">
22 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../structMQTTConnectParams.html" target="_parent">MQTTConnectParams</a>
23 </div>
24</div>
25<div class="SRResult" id="SR_mqttmessageparams">
26 <div class="SREntry">
27 <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../structMQTTMessageParams.html" target="_parent">MQTTMessageParams</a>
28 </div>
29</div>
30<div class="SRResult" id="SR_mqttpublishparams">
31 <div class="SREntry">
32 <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="../structMQTTPublishParams.html" target="_parent">MQTTPublishParams</a>
33 </div>
34</div>
35<div class="SRResult" id="SR_mqttsubscribeparams">
36 <div class="SREntry">
37 <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="../structMQTTSubscribeParams.html" target="_parent">MQTTSubscribeParams</a>
38 </div>
39</div>
40<div class="SRResult" id="SR_mqttwilloptions">
41 <div class="SREntry">
42 <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="../structMQTTwillOptions.html" target="_parent">MQTTwillOptions</a>
43 </div>
44</div>
45<div class="SRStatus" id="Searching">Searching...</div>
46<div class="SRStatus" id="NoMatches">No Matches</div>
47<script type="text/javascript"><!--
48document.getElementById("Loading").style.display="none";
49document.getElementById("NoMatches").style.display="none";
50var searchResults = new SearchResults("searchResults");
51searchResults.Search();
52--></script>
53</div>
54</body>
55</html>
diff --git a/docs/html/search/classes_6e.html b/docs/html/search/classes_6e.html
new file mode 100644
index 0000000..9c496bb
--- /dev/null
+++ b/docs/html/search/classes_6e.html
@@ -0,0 +1,25 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_network">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structNetwork.html" target="_parent">Network</a>
13 </div>
14</div>
15<div class="SRStatus" id="Searching">Searching...</div>
16<div class="SRStatus" id="NoMatches">No Matches</div>
17<script type="text/javascript"><!--
18document.getElementById("Loading").style.display="none";
19document.getElementById("NoMatches").style.display="none";
20var searchResults = new SearchResults("searchResults");
21searchResults.Search();
22--></script>
23</div>
24</body>
25</html>
diff --git a/docs/html/search/classes_73.html b/docs/html/search/classes_73.html
new file mode 100644
index 0000000..97947e3
--- /dev/null
+++ b/docs/html/search/classes_73.html
@@ -0,0 +1,30 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_shadowparameters_5ft">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structShadowParameters__t.html" target="_parent">ShadowParameters_t</a>
13 </div>
14</div>
15<div class="SRResult" id="SR_subscriptionrecord_5ft">
16 <div class="SREntry">
17 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../structSubscriptionRecord__t.html" target="_parent">SubscriptionRecord_t</a>
18 </div>
19</div>
20<div class="SRStatus" id="Searching">Searching...</div>
21<div class="SRStatus" id="NoMatches">No Matches</div>
22<script type="text/javascript"><!--
23document.getElementById("Loading").style.display="none";
24document.getElementById("NoMatches").style.display="none";
25var searchResults = new SearchResults("searchResults");
26searchResults.Search();
27--></script>
28</div>
29</body>
30</html>
diff --git a/docs/html/search/classes_74.html b/docs/html/search/classes_74.html
new file mode 100644
index 0000000..93c7813
--- /dev/null
+++ b/docs/html/search/classes_74.html
@@ -0,0 +1,35 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_timer">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structTimer.html" target="_parent">Timer</a>
13 </div>
14</div>
15<div class="SRResult" id="SR_tlsconnectparams">
16 <div class="SREntry">
17 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../structTLSConnectParams.html" target="_parent">TLSConnectParams</a>
18 </div>
19</div>
20<div class="SRResult" id="SR_tobereceivedackrecord_5ft">
21 <div class="SREntry">
22 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../structToBeReceivedAckRecord__t.html" target="_parent">ToBeReceivedAckRecord_t</a>
23 </div>
24</div>
25<div class="SRStatus" id="Searching">Searching...</div>
26<div class="SRStatus" id="NoMatches">No Matches</div>
27<script type="text/javascript"><!--
28document.getElementById("Loading").style.display="none";
29document.getElementById("NoMatches").style.display="none";
30var searchResults = new SearchResults("searchResults");
31searchResults.Search();
32--></script>
33</div>
34</body>
35</html>
diff --git a/docs/html/search/close.png b/docs/html/search/close.png
new file mode 100644
index 0000000..9342d3d
--- /dev/null
+++ b/docs/html/search/close.png
Binary files differ
diff --git a/docs/html/search/defines_61.html b/docs/html/search/defines_61.html
new file mode 100644
index 0000000..fcdf870
--- /dev/null
+++ b/docs/html/search/defines_61.html
@@ -0,0 +1,68 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_aws_5fiot_5fcertificate_5ffilename">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../aws__iot__config_8h.html#a990de7fbd70659dafba8a982326e8644" target="_parent">AWS_IOT_CERTIFICATE_FILENAME</a>
13 <span class="SRScope">aws_iot_config.h</span>
14 </div>
15</div>
16<div class="SRResult" id="SR_aws_5fiot_5fmqtt_5fclient_5fid">
17 <div class="SREntry">
18 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../aws__iot__config_8h.html#a508462ce0da61fccdc537b70d50778aa" target="_parent">AWS_IOT_MQTT_CLIENT_ID</a>
19 <span class="SRScope">aws_iot_config.h</span>
20 </div>
21</div>
22<div class="SRResult" id="SR_aws_5fiot_5fmqtt_5fhost">
23 <div class="SREntry">
24 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../aws__iot__config_8h.html#a2e4c4f825443b5ae37e5a34e309cec72" target="_parent">AWS_IOT_MQTT_HOST</a>
25 <span class="SRScope">aws_iot_config.h</span>
26 </div>
27</div>
28<div class="SRResult" id="SR_aws_5fiot_5fmqtt_5fport">
29 <div class="SREntry">
30 <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../aws__iot__config_8h.html#a231b4a87bce653b0d31172501de89fdb" target="_parent">AWS_IOT_MQTT_PORT</a>
31 <span class="SRScope">aws_iot_config.h</span>
32 </div>
33</div>
34<div class="SRResult" id="SR_aws_5fiot_5fmqtt_5ftx_5fbuf_5flen">
35 <div class="SREntry">
36 <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="../aws__iot__config_8h.html#a69d749cf372e4b6e0e5f202cdb645fee" target="_parent">AWS_IOT_MQTT_TX_BUF_LEN</a>
37 <span class="SRScope">aws_iot_config.h</span>
38 </div>
39</div>
40<div class="SRResult" id="SR_aws_5fiot_5fmy_5fthing_5fname">
41 <div class="SREntry">
42 <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="../aws__iot__config_8h.html#ae5283c01e3f612fd5eb92dbc3e446d38" target="_parent">AWS_IOT_MY_THING_NAME</a>
43 <span class="SRScope">aws_iot_config.h</span>
44 </div>
45</div>
46<div class="SRResult" id="SR_aws_5fiot_5fprivate_5fkey_5ffilename">
47 <div class="SREntry">
48 <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="../aws__iot__config_8h.html#aa6c6d979225eb348ab07054a8d3db6c6" target="_parent">AWS_IOT_PRIVATE_KEY_FILENAME</a>
49 <span class="SRScope">aws_iot_config.h</span>
50 </div>
51</div>
52<div class="SRResult" id="SR_aws_5fiot_5froot_5fca_5ffilename">
53 <div class="SREntry">
54 <a id="Item7" onkeydown="return searchResults.Nav(event,7)" onkeypress="return searchResults.Nav(event,7)" onkeyup="return searchResults.Nav(event,7)" class="SRSymbol" href="../aws__iot__config_8h.html#aed5cda81bc7b006dd0803809b6474a67" target="_parent">AWS_IOT_ROOT_CA_FILENAME</a>
55 <span class="SRScope">aws_iot_config.h</span>
56 </div>
57</div>
58<div class="SRStatus" id="Searching">Searching...</div>
59<div class="SRStatus" id="NoMatches">No Matches</div>
60<script type="text/javascript"><!--
61document.getElementById("Loading").style.display="none";
62document.getElementById("NoMatches").style.display="none";
63var searchResults = new SearchResults("searchResults");
64searchResults.Search();
65--></script>
66</div>
67</body>
68</html>
diff --git a/docs/html/search/defines_72.html b/docs/html/search/defines_72.html
new file mode 100644
index 0000000..d33c787
--- /dev/null
+++ b/docs/html/search/defines_72.html
@@ -0,0 +1,26 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_roomtemperature_5fupperlimit">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../shadow__sample_8c.html#a6dbd1724187439bfaa80cafa7517cdfd" target="_parent">ROOMTEMPERATURE_UPPERLIMIT</a>
13 <span class="SRScope">shadow_sample.c</span>
14 </div>
15</div>
16<div class="SRStatus" id="Searching">Searching...</div>
17<div class="SRStatus" id="NoMatches">No Matches</div>
18<script type="text/javascript"><!--
19document.getElementById("Loading").style.display="none";
20document.getElementById("NoMatches").style.display="none";
21var searchResults = new SearchResults("searchResults");
22searchResults.Search();
23--></script>
24</div>
25</body>
26</html>
diff --git a/docs/html/search/enums_6a.html b/docs/html/search/enums_6a.html
new file mode 100644
index 0000000..a778ddd
--- /dev/null
+++ b/docs/html/search/enums_6a.html
@@ -0,0 +1,26 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_jsmntype_5ft">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../jsmn_8h.html#a065320719769f9dc1fbe30094e52802f" target="_parent">jsmntype_t</a>
13 <span class="SRScope">jsmn.h</span>
14 </div>
15</div>
16<div class="SRStatus" id="Searching">Searching...</div>
17<div class="SRStatus" id="NoMatches">No Matches</div>
18<script type="text/javascript"><!--
19document.getElementById("Loading").style.display="none";
20document.getElementById("NoMatches").style.display="none";
21var searchResults = new SearchResults("searchResults");
22searchResults.Search();
23--></script>
24</div>
25</body>
26</html>
diff --git a/docs/html/search/enums_73.html b/docs/html/search/enums_73.html
new file mode 100644
index 0000000..32d35cf
--- /dev/null
+++ b/docs/html/search/enums_73.html
@@ -0,0 +1,32 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_shadow_5fack_5fstatus_5ft">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#ad946163c2ac5df0aa896520949d47956" target="_parent">Shadow_Ack_Status_t</a>
13 <span class="SRScope">aws_iot_shadow_interface.h</span>
14 </div>
15</div>
16<div class="SRResult" id="SR_shadowactions_5ft">
17 <div class="SREntry">
18 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c" target="_parent">ShadowActions_t</a>
19 <span class="SRScope">aws_iot_shadow_interface.h</span>
20 </div>
21</div>
22<div class="SRStatus" id="Searching">Searching...</div>
23<div class="SRStatus" id="NoMatches">No Matches</div>
24<script type="text/javascript"><!--
25document.getElementById("Loading").style.display="none";
26document.getElementById("NoMatches").style.display="none";
27var searchResults = new SearchResults("searchResults");
28searchResults.Search();
29--></script>
30</div>
31</body>
32</html>
diff --git a/docs/html/search/files_61.html b/docs/html/search/files_61.html
new file mode 100644
index 0000000..5adf170
--- /dev/null
+++ b/docs/html/search/files_61.html
@@ -0,0 +1,30 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_aws_5fiot_5fconfig_2eh">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../aws__iot__config_8h.html" target="_parent">aws_iot_config.h</a>
13 </div>
14</div>
15<div class="SRResult" id="SR_aws_5fiot_5fshadow_5finterface_2eh">
16 <div class="SREntry">
17 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html" target="_parent">aws_iot_shadow_interface.h</a>
18 </div>
19</div>
20<div class="SRStatus" id="Searching">Searching...</div>
21<div class="SRStatus" id="NoMatches">No Matches</div>
22<script type="text/javascript"><!--
23document.getElementById("Loading").style.display="none";
24document.getElementById("NoMatches").style.display="none";
25var searchResults = new SearchResults("searchResults");
26searchResults.Search();
27--></script>
28</div>
29</body>
30</html>
diff --git a/docs/html/search/files_64.html b/docs/html/search/files_64.html
new file mode 100644
index 0000000..aaa8ae9
--- /dev/null
+++ b/docs/html/search/files_64.html
@@ -0,0 +1,25 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_docs_5fmain_2eh">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../docs__main_8h.html" target="_parent">docs_main.h</a>
13 </div>
14</div>
15<div class="SRStatus" id="Searching">Searching...</div>
16<div class="SRStatus" id="NoMatches">No Matches</div>
17<script type="text/javascript"><!--
18document.getElementById("Loading").style.display="none";
19document.getElementById("NoMatches").style.display="none";
20var searchResults = new SearchResults("searchResults");
21searchResults.Search();
22--></script>
23</div>
24</body>
25</html>
diff --git a/docs/html/search/files_6a.html b/docs/html/search/files_6a.html
new file mode 100644
index 0000000..ae33784
--- /dev/null
+++ b/docs/html/search/files_6a.html
@@ -0,0 +1,30 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_jsmn_2ec">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../jsmn_8c.html" target="_parent">jsmn.c</a>
13 </div>
14</div>
15<div class="SRResult" id="SR_jsmn_2eh">
16 <div class="SREntry">
17 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../jsmn_8h.html" target="_parent">jsmn.h</a>
18 </div>
19</div>
20<div class="SRStatus" id="Searching">Searching...</div>
21<div class="SRStatus" id="NoMatches">No Matches</div>
22<script type="text/javascript"><!--
23document.getElementById("Loading").style.display="none";
24document.getElementById("NoMatches").style.display="none";
25var searchResults = new SearchResults("searchResults");
26searchResults.Search();
27--></script>
28</div>
29</body>
30</html>
diff --git a/docs/html/search/files_6e.html b/docs/html/search/files_6e.html
new file mode 100644
index 0000000..bd00cb1
--- /dev/null
+++ b/docs/html/search/files_6e.html
@@ -0,0 +1,25 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_network_5finterface_2eh">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../network__interface_8h.html" target="_parent">network_interface.h</a>
13 </div>
14</div>
15<div class="SRStatus" id="Searching">Searching...</div>
16<div class="SRStatus" id="NoMatches">No Matches</div>
17<script type="text/javascript"><!--
18document.getElementById("Loading").style.display="none";
19document.getElementById("NoMatches").style.display="none";
20var searchResults = new SearchResults("searchResults");
21searchResults.Search();
22--></script>
23</div>
24</body>
25</html>
diff --git a/docs/html/search/files_73.html b/docs/html/search/files_73.html
new file mode 100644
index 0000000..0569b44
--- /dev/null
+++ b/docs/html/search/files_73.html
@@ -0,0 +1,25 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_shadow_5fsample_2ec">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../shadow__sample_8c.html" target="_parent">shadow_sample.c</a>
13 </div>
14</div>
15<div class="SRStatus" id="Searching">Searching...</div>
16<div class="SRStatus" id="NoMatches">No Matches</div>
17<script type="text/javascript"><!--
18document.getElementById("Loading").style.display="none";
19document.getElementById("NoMatches").style.display="none";
20var searchResults = new SearchResults("searchResults");
21searchResults.Search();
22--></script>
23</div>
24</body>
25</html>
diff --git a/docs/html/search/files_74.html b/docs/html/search/files_74.html
new file mode 100644
index 0000000..b172f0a
--- /dev/null
+++ b/docs/html/search/files_74.html
@@ -0,0 +1,30 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_timer_2ec">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../timer_8c.html" target="_parent">timer.c</a>
13 </div>
14</div>
15<div class="SRResult" id="SR_timer_5finterface_2eh">
16 <div class="SREntry">
17 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../timer__interface_8h.html" target="_parent">timer_interface.h</a>
18 </div>
19</div>
20<div class="SRStatus" id="Searching">Searching...</div>
21<div class="SRStatus" id="NoMatches">No Matches</div>
22<script type="text/javascript"><!--
23document.getElementById("Loading").style.display="none";
24document.getElementById("NoMatches").style.display="none";
25var searchResults = new SearchResults("searchResults");
26searchResults.Search();
27--></script>
28</div>
29</body>
30</html>
diff --git a/docs/html/search/functions_61.html b/docs/html/search/functions_61.html
new file mode 100644
index 0000000..4bae86b
--- /dev/null
+++ b/docs/html/search/functions_61.html
@@ -0,0 +1,92 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fconnect">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a2c923cc396a5e82f0c7d3468400fea2c" target="_parent">aws_iot_shadow_connect</a>
13 <span class="SRScope">aws_iot_shadow.c</span>
14 </div>
15</div>
16<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fdelete">
17 <div class="SREntry">
18 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a826d6fd7d28b753d8cef2cc4ed717f7a" target="_parent">aws_iot_shadow_delete</a>
19 <span class="SRScope">aws_iot_shadow.c</span>
20 </div>
21</div>
22<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fdisable_5fdiscard_5fold_5fdelta_5fmsgs">
23 <div class="SREntry">
24 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#af539707306365d92f333efdb5b4d0046" target="_parent">aws_iot_shadow_disable_discard_old_delta_msgs</a>
25 <span class="SRScope">aws_iot_shadow.c</span>
26 </div>
27</div>
28<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fdisconnect">
29 <div class="SREntry">
30 <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#afdd8ea8d0677badf06b2765b5ec27109" target="_parent">aws_iot_shadow_disconnect</a>
31 <span class="SRScope">aws_iot_shadow.c</span>
32 </div>
33</div>
34<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fenable_5fdiscard_5fold_5fdelta_5fmsgs">
35 <div class="SREntry">
36 <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a764d85d53cff3f15f8a3d8047002a487" target="_parent">aws_iot_shadow_enable_discard_old_delta_msgs</a>
37 <span class="SRScope">aws_iot_shadow.c</span>
38 </div>
39</div>
40<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fget">
41 <div class="SREntry">
42 <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#adf3d2ab4117b6061aeb756a6ec639966" target="_parent">aws_iot_shadow_get</a>
43 <span class="SRScope">aws_iot_shadow.c</span>
44 </div>
45</div>
46<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fget_5flast_5freceived_5fversion">
47 <div class="SREntry">
48 <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a416a959f46ab39f97ca4e137e8d8ed71" target="_parent">aws_iot_shadow_get_last_received_version</a>
49 <span class="SRScope">aws_iot_shadow.c</span>
50 </div>
51</div>
52<div class="SRResult" id="SR_aws_5fiot_5fshadow_5finit">
53 <div class="SREntry">
54 <a id="Item7" onkeydown="return searchResults.Nav(event,7)" onkeypress="return searchResults.Nav(event,7)" onkeyup="return searchResults.Nav(event,7)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a79596d860d0f30ece4d2ee167784a2aa" target="_parent">aws_iot_shadow_init</a>
55 <span class="SRScope">aws_iot_shadow.c</span>
56 </div>
57</div>
58<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fregister_5fdelta">
59 <div class="SREntry">
60 <a id="Item8" onkeydown="return searchResults.Nav(event,8)" onkeypress="return searchResults.Nav(event,8)" onkeyup="return searchResults.Nav(event,8)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a2018994362d1ecc99af2151227d5bb41" target="_parent">aws_iot_shadow_register_delta</a>
61 <span class="SRScope">aws_iot_shadow.c</span>
62 </div>
63</div>
64<div class="SRResult" id="SR_aws_5fiot_5fshadow_5freset_5flast_5freceived_5fversion">
65 <div class="SREntry">
66 <a id="Item9" onkeydown="return searchResults.Nav(event,9)" onkeypress="return searchResults.Nav(event,9)" onkeyup="return searchResults.Nav(event,9)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a2885a09ae8254c80f9db61c50c3018ca" target="_parent">aws_iot_shadow_reset_last_received_version</a>
67 <span class="SRScope">aws_iot_shadow.c</span>
68 </div>
69</div>
70<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fupdate">
71 <div class="SREntry">
72 <a id="Item10" onkeydown="return searchResults.Nav(event,10)" onkeypress="return searchResults.Nav(event,10)" onkeyup="return searchResults.Nav(event,10)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#ab762304e44b7315a39e9f1ed5462a498" target="_parent">aws_iot_shadow_update</a>
73 <span class="SRScope">aws_iot_shadow.c</span>
74 </div>
75</div>
76<div class="SRResult" id="SR_aws_5fiot_5fshadow_5fyield">
77 <div class="SREntry">
78 <a id="Item11" onkeydown="return searchResults.Nav(event,11)" onkeypress="return searchResults.Nav(event,11)" onkeyup="return searchResults.Nav(event,11)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a0c5d153544c57027f0f802bf29376f87" target="_parent">aws_iot_shadow_yield</a>
79 <span class="SRScope">aws_iot_shadow.c</span>
80 </div>
81</div>
82<div class="SRStatus" id="Searching">Searching...</div>
83<div class="SRStatus" id="NoMatches">No Matches</div>
84<script type="text/javascript"><!--
85document.getElementById("Loading").style.display="none";
86document.getElementById("NoMatches").style.display="none";
87var searchResults = new SearchResults("searchResults");
88searchResults.Search();
89--></script>
90</div>
91</body>
92</html>
diff --git a/docs/html/search/functions_63.html b/docs/html/search/functions_63.html
new file mode 100644
index 0000000..d9a57c6
--- /dev/null
+++ b/docs/html/search/functions_63.html
@@ -0,0 +1,38 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_countdown">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_countdown')">countdown</a>
13 <div class="SRChildren">
14 <a id="Item0_c0" onkeydown="return searchResults.NavChild(event,0,0)" onkeypress="return searchResults.NavChild(event,0,0)" onkeyup="return searchResults.NavChild(event,0,0)" class="SRScope" href="../timer_8c.html#ab9b6a721d03b085959a0f66907822629" target="_parent">countdown(Timer *timer, unsigned int timeout):&#160;timer.c</a>
15 <a id="Item0_c1" onkeydown="return searchResults.NavChild(event,0,1)" onkeypress="return searchResults.NavChild(event,0,1)" onkeyup="return searchResults.NavChild(event,0,1)" class="SRScope" href="../timer__interface_8h.html#acc8817569e64e1d4193b08ca2570517a" target="_parent">countdown(Timer *, unsigned int):&#160;timer.c</a>
16 </div>
17 </div>
18</div>
19<div class="SRResult" id="SR_countdown_5fms">
20 <div class="SREntry">
21 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_countdown_5fms')">countdown_ms</a>
22 <div class="SRChildren">
23 <a id="Item1_c0" onkeydown="return searchResults.NavChild(event,1,0)" onkeypress="return searchResults.NavChild(event,1,0)" onkeyup="return searchResults.NavChild(event,1,0)" class="SRScope" href="../timer_8c.html#a75af8f6d4820a905276fae6bac80212a" target="_parent">countdown_ms(Timer *timer, unsigned int timeout):&#160;timer.c</a>
24 <a id="Item1_c1" onkeydown="return searchResults.NavChild(event,1,1)" onkeypress="return searchResults.NavChild(event,1,1)" onkeyup="return searchResults.NavChild(event,1,1)" class="SRScope" href="../timer__interface_8h.html#a346afafb170b78f813bf7a15e4f2aede" target="_parent">countdown_ms(Timer *, unsigned int):&#160;timer.c</a>
25 </div>
26 </div>
27</div>
28<div class="SRStatus" id="Searching">Searching...</div>
29<div class="SRStatus" id="NoMatches">No Matches</div>
30<script type="text/javascript"><!--
31document.getElementById("Loading").style.display="none";
32document.getElementById("NoMatches").style.display="none";
33var searchResults = new SearchResults("searchResults");
34searchResults.Search();
35--></script>
36</div>
37</body>
38</html>
diff --git a/docs/html/search/functions_65.html b/docs/html/search/functions_65.html
new file mode 100644
index 0000000..5544584
--- /dev/null
+++ b/docs/html/search/functions_65.html
@@ -0,0 +1,29 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_expired">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_expired')">expired</a>
13 <div class="SRChildren">
14 <a id="Item0_c0" onkeydown="return searchResults.NavChild(event,0,0)" onkeypress="return searchResults.NavChild(event,0,0)" onkeyup="return searchResults.NavChild(event,0,0)" class="SRScope" href="../timer_8c.html#a9e1050bfa919aca1978cffb051cc7ee9" target="_parent">expired(Timer *timer):&#160;timer.c</a>
15 <a id="Item0_c1" onkeydown="return searchResults.NavChild(event,0,1)" onkeypress="return searchResults.NavChild(event,0,1)" onkeyup="return searchResults.NavChild(event,0,1)" class="SRScope" href="../timer__interface_8h.html#adf4838ca0d96f6dbf45c99756731542d" target="_parent">expired(Timer *):&#160;timer.c</a>
16 </div>
17 </div>
18</div>
19<div class="SRStatus" id="Searching">Searching...</div>
20<div class="SRStatus" id="NoMatches">No Matches</div>
21<script type="text/javascript"><!--
22document.getElementById("Loading").style.display="none";
23document.getElementById("NoMatches").style.display="none";
24var searchResults = new SearchResults("searchResults");
25searchResults.Search();
26--></script>
27</div>
28</body>
29</html>
diff --git a/docs/html/search/functions_69.html b/docs/html/search/functions_69.html
new file mode 100644
index 0000000..61a7f5f
--- /dev/null
+++ b/docs/html/search/functions_69.html
@@ -0,0 +1,65 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_inittimer">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_inittimer')">InitTimer</a>
13 <div class="SRChildren">
14 <a id="Item0_c0" onkeydown="return searchResults.NavChild(event,0,0)" onkeypress="return searchResults.NavChild(event,0,0)" onkeyup="return searchResults.NavChild(event,0,0)" class="SRScope" href="../timer_8c.html#a0ff0436566be2657b87044a108a1f4bf" target="_parent">InitTimer(Timer *timer):&#160;timer.c</a>
15 <a id="Item0_c1" onkeydown="return searchResults.NavChild(event,0,1)" onkeypress="return searchResults.NavChild(event,0,1)" onkeyup="return searchResults.NavChild(event,0,1)" class="SRScope" href="../timer__interface_8h.html#a79820bfaea999f86b108701af73dd68e" target="_parent">InitTimer(Timer *):&#160;timer.c</a>
16 </div>
17 </div>
18</div>
19<div class="SRResult" id="SR_iot_5ftls_5fconnect">
20 <div class="SREntry">
21 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../network__interface_8h.html#af3b017dbd1b7f3c84815dc6211c60284" target="_parent">iot_tls_connect</a>
22 <span class="SRScope">network_mbedtls_wrapper.c</span>
23 </div>
24</div>
25<div class="SRResult" id="SR_iot_5ftls_5fdestroy">
26 <div class="SREntry">
27 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../network__interface_8h.html#a4d1624f588b2b18cd6d0d6974cb741d4" target="_parent">iot_tls_destroy</a>
28 <span class="SRScope">network_mbedtls_wrapper.c</span>
29 </div>
30</div>
31<div class="SRResult" id="SR_iot_5ftls_5fdisconnect">
32 <div class="SREntry">
33 <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../network__interface_8h.html#ad85769916d75a8bb778cdf2126dd4f02" target="_parent">iot_tls_disconnect</a>
34 <span class="SRScope">network_mbedtls_wrapper.c</span>
35 </div>
36</div>
37<div class="SRResult" id="SR_iot_5ftls_5finit">
38 <div class="SREntry">
39 <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="../network__interface_8h.html#ab17c9e7cec3c8d74bf338d18dd77fe83" target="_parent">iot_tls_init</a>
40 <span class="SRScope">network_mbedtls_wrapper.c</span>
41 </div>
42</div>
43<div class="SRResult" id="SR_iot_5ftls_5fread">
44 <div class="SREntry">
45 <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="../network__interface_8h.html#a5ff537ba2223e211242e82e6582ab103" target="_parent">iot_tls_read</a>
46 <span class="SRScope">network_mbedtls_wrapper.c</span>
47 </div>
48</div>
49<div class="SRResult" id="SR_iot_5ftls_5fwrite">
50 <div class="SREntry">
51 <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="../network__interface_8h.html#affa29ed55e598ac01574f863ddceae66" target="_parent">iot_tls_write</a>
52 <span class="SRScope">network_mbedtls_wrapper.c</span>
53 </div>
54</div>
55<div class="SRStatus" id="Searching">Searching...</div>
56<div class="SRStatus" id="NoMatches">No Matches</div>
57<script type="text/javascript"><!--
58document.getElementById("Loading").style.display="none";
59document.getElementById("NoMatches").style.display="none";
60var searchResults = new SearchResults("searchResults");
61searchResults.Search();
62--></script>
63</div>
64</body>
65</html>
diff --git a/docs/html/search/functions_6a.html b/docs/html/search/functions_6a.html
new file mode 100644
index 0000000..dc99181
--- /dev/null
+++ b/docs/html/search/functions_6a.html
@@ -0,0 +1,38 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_jsmn_5finit">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_jsmn_5finit')">jsmn_init</a>
13 <div class="SRChildren">
14 <a id="Item0_c0" onkeydown="return searchResults.NavChild(event,0,0)" onkeypress="return searchResults.NavChild(event,0,0)" onkeyup="return searchResults.NavChild(event,0,0)" class="SRScope" href="../jsmn_8c.html#a8d4a8b3ce5c3d600feea38615b5f9aa6" target="_parent">jsmn_init(jsmn_parser *parser):&#160;jsmn.c</a>
15 <a id="Item0_c1" onkeydown="return searchResults.NavChild(event,0,1)" onkeypress="return searchResults.NavChild(event,0,1)" onkeyup="return searchResults.NavChild(event,0,1)" class="SRScope" href="../jsmn_8h.html#a8d4a8b3ce5c3d600feea38615b5f9aa6" target="_parent">jsmn_init(jsmn_parser *parser):&#160;jsmn.c</a>
16 </div>
17 </div>
18</div>
19<div class="SRResult" id="SR_jsmn_5fparse">
20 <div class="SREntry">
21 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_jsmn_5fparse')">jsmn_parse</a>
22 <div class="SRChildren">
23 <a id="Item1_c0" onkeydown="return searchResults.NavChild(event,1,0)" onkeypress="return searchResults.NavChild(event,1,0)" onkeyup="return searchResults.NavChild(event,1,0)" class="SRScope" href="../jsmn_8c.html#a64734cb1fc006fba5fd237e80a58ef40" target="_parent">jsmn_parse(jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, unsigned int num_tokens):&#160;jsmn.c</a>
24 <a id="Item1_c1" onkeydown="return searchResults.NavChild(event,1,1)" onkeypress="return searchResults.NavChild(event,1,1)" onkeyup="return searchResults.NavChild(event,1,1)" class="SRScope" href="../jsmn_8h.html#a64734cb1fc006fba5fd237e80a58ef40" target="_parent">jsmn_parse(jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, unsigned int num_tokens):&#160;jsmn.c</a>
25 </div>
26 </div>
27</div>
28<div class="SRStatus" id="Searching">Searching...</div>
29<div class="SRStatus" id="NoMatches">No Matches</div>
30<script type="text/javascript"><!--
31document.getElementById("Loading").style.display="none";
32document.getElementById("NoMatches").style.display="none";
33var searchResults = new SearchResults("searchResults");
34searchResults.Search();
35--></script>
36</div>
37</body>
38</html>
diff --git a/docs/html/search/functions_6c.html b/docs/html/search/functions_6c.html
new file mode 100644
index 0000000..c977e60
--- /dev/null
+++ b/docs/html/search/functions_6c.html
@@ -0,0 +1,29 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_left_5fms">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_left_5fms')">left_ms</a>
13 <div class="SRChildren">
14 <a id="Item0_c0" onkeydown="return searchResults.NavChild(event,0,0)" onkeypress="return searchResults.NavChild(event,0,0)" onkeyup="return searchResults.NavChild(event,0,0)" class="SRScope" href="../timer_8c.html#a9057a416766ddfe329756bc83cf969d0" target="_parent">left_ms(Timer *timer):&#160;timer.c</a>
15 <a id="Item0_c1" onkeydown="return searchResults.NavChild(event,0,1)" onkeypress="return searchResults.NavChild(event,0,1)" onkeyup="return searchResults.NavChild(event,0,1)" class="SRScope" href="../timer__interface_8h.html#a81352d29dba5f9e360b6f551b33475c6" target="_parent">left_ms(Timer *):&#160;timer.c</a>
16 </div>
17 </div>
18</div>
19<div class="SRStatus" id="Searching">Searching...</div>
20<div class="SRStatus" id="NoMatches">No Matches</div>
21<script type="text/javascript"><!--
22document.getElementById("Loading").style.display="none";
23document.getElementById("NoMatches").style.display="none";
24var searchResults = new SearchResults("searchResults");
25searchResults.Search();
26--></script>
27</div>
28</body>
29</html>
diff --git a/docs/html/search/mag_sel.png b/docs/html/search/mag_sel.png
new file mode 100644
index 0000000..81f6040
--- /dev/null
+++ b/docs/html/search/mag_sel.png
Binary files differ
diff --git a/docs/html/search/nomatches.html b/docs/html/search/nomatches.html
new file mode 100644
index 0000000..b1ded27
--- /dev/null
+++ b/docs/html/search/nomatches.html
@@ -0,0 +1,12 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="NoMatches">No Matches</div>
10</div>
11</body>
12</html>
diff --git a/docs/html/search/search.css b/docs/html/search/search.css
new file mode 100644
index 0000000..50249e5
--- /dev/null
+++ b/docs/html/search/search.css
@@ -0,0 +1,240 @@
1/*---------------- Search Box */
2
3#FSearchBox {
4 float: left;
5}
6
7#searchli {
8 float: right;
9 display: block;
10 width: 170px;
11 height: 36px;
12}
13
14#MSearchBox {
15 white-space : nowrap;
16 position: absolute;
17 float: none;
18 display: inline;
19 margin-top: 8px;
20 right: 0px;
21 width: 170px;
22 z-index: 102;
23}
24
25#MSearchBox .left
26{
27 display:block;
28 position:absolute;
29 left:10px;
30 width:20px;
31 height:19px;
32 background:url('search_l.png') no-repeat;
33 background-position:right;
34}
35
36#MSearchSelect {
37 display:block;
38 position:absolute;
39 width:20px;
40 height:19px;
41}
42
43.left #MSearchSelect {
44 left:4px;
45}
46
47.right #MSearchSelect {
48 right:5px;
49}
50
51#MSearchField {
52 display:block;
53 position:absolute;
54 height:19px;
55 background:url('search_m.png') repeat-x;
56 border:none;
57 width:116px;
58 margin-left:20px;
59 padding-left:4px;
60 color: #909090;
61 outline: none;
62 font: 9pt Arial, Verdana, sans-serif;
63}
64
65#FSearchBox #MSearchField {
66 margin-left:15px;
67}
68
69#MSearchBox .right {
70 display:block;
71 position:absolute;
72 right:10px;
73 top:0px;
74 width:20px;
75 height:19px;
76 background:url('search_r.png') no-repeat;
77 background-position:left;
78}
79
80#MSearchClose {
81 display: none;
82 position: absolute;
83 top: 4px;
84 background : none;
85 border: none;
86 margin: 0px 4px 0px 0px;
87 padding: 0px 0px;
88 outline: none;
89}
90
91.left #MSearchClose {
92 left: 6px;
93}
94
95.right #MSearchClose {
96 right: 2px;
97}
98
99.MSearchBoxActive #MSearchField {
100 color: #000000;
101}
102
103/*---------------- Search filter selection */
104
105#MSearchSelectWindow {
106 display: none;
107 position: absolute;
108 left: 0; top: 0;
109 border: 1px solid #90A5CE;
110 background-color: #F9FAFC;
111 z-index: 1;
112 padding-top: 4px;
113 padding-bottom: 4px;
114 -moz-border-radius: 4px;
115 -webkit-border-top-left-radius: 4px;
116 -webkit-border-top-right-radius: 4px;
117 -webkit-border-bottom-left-radius: 4px;
118 -webkit-border-bottom-right-radius: 4px;
119 -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
120}
121
122.SelectItem {
123 font: 8pt Arial, Verdana, sans-serif;
124 padding-left: 2px;
125 padding-right: 12px;
126 border: 0px;
127}
128
129span.SelectionMark {
130 margin-right: 4px;
131 font-family: monospace;
132 outline-style: none;
133 text-decoration: none;
134}
135
136a.SelectItem {
137 display: block;
138 outline-style: none;
139 color: #000000;
140 text-decoration: none;
141 padding-left: 6px;
142 padding-right: 12px;
143}
144
145a.SelectItem:focus,
146a.SelectItem:active {
147 color: #000000;
148 outline-style: none;
149 text-decoration: none;
150}
151
152a.SelectItem:hover {
153 color: #FFFFFF;
154 background-color: #3D578C;
155 outline-style: none;
156 text-decoration: none;
157 cursor: pointer;
158 display: block;
159}
160
161/*---------------- Search results window */
162
163iframe#MSearchResults {
164 width: 60ex;
165 height: 15em;
166}
167
168#MSearchResultsWindow {
169 display: none;
170 position: absolute;
171 left: 0; top: 0;
172 border: 1px solid #000;
173 background-color: #EEF1F7;
174}
175
176/* ----------------------------------- */
177
178
179#SRIndex {
180 clear:both;
181 padding-bottom: 15px;
182}
183
184.SREntry {
185 font-size: 10pt;
186 padding-left: 1ex;
187}
188
189.SRPage .SREntry {
190 font-size: 8pt;
191 padding: 1px 5px;
192}
193
194body.SRPage {
195 margin: 5px 2px;
196}
197
198.SRChildren {
199 padding-left: 3ex; padding-bottom: .5em
200}
201
202.SRPage .SRChildren {
203 display: none;
204}
205
206.SRSymbol {
207 font-weight: bold;
208 color: #425E97;
209 font-family: Arial, Verdana, sans-serif;
210 text-decoration: none;
211 outline: none;
212}
213
214a.SRScope {
215 display: block;
216 color: #425E97;
217 font-family: Arial, Verdana, sans-serif;
218 text-decoration: none;
219 outline: none;
220}
221
222a.SRSymbol:focus, a.SRSymbol:active,
223a.SRScope:focus, a.SRScope:active {
224 text-decoration: underline;
225}
226
227.SRPage .SRStatus {
228 padding: 2px 5px;
229 font-size: 8pt;
230 font-style: italic;
231}
232
233.SRResult {
234 display: none;
235}
236
237DIV.searchresults {
238 margin-left: 10px;
239 margin-right: 10px;
240}
diff --git a/docs/html/search/search.js b/docs/html/search/search.js
new file mode 100644
index 0000000..5f096e9
--- /dev/null
+++ b/docs/html/search/search.js
@@ -0,0 +1,740 @@
1// Search script generated by doxygen
2// Copyright (C) 2009 by Dimitri van Heesch.
3
4// The code in this file is loosly based on main.js, part of Natural Docs,
5// which is Copyright (C) 2003-2008 Greg Valure
6// Natural Docs is licensed under the GPL.
7
8var indexSectionsWithContent =
9{
10 0: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101111001111110111111010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
11 1: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100110000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
12 2: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100100000100010000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
13 3: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010001101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
14 4: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100001010100110111010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
15 5: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000010000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
16 6: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
17 7: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
18};
19
20var indexSectionNames =
21{
22 0: "all",
23 1: "classes",
24 2: "files",
25 3: "functions",
26 4: "variables",
27 5: "typedefs",
28 6: "enums",
29 7: "defines"
30};
31
32function convertToId(search)
33{
34 var result = '';
35 for (i=0;i<search.length;i++)
36 {
37 var c = search.charAt(i);
38 var cn = c.charCodeAt(0);
39 if (c.match(/[a-z0-9]/))
40 {
41 result+=c;
42 }
43 else if (cn<16)
44 {
45 result+="_0"+cn.toString(16);
46 }
47 else
48 {
49 result+="_"+cn.toString(16);
50 }
51 }
52 return result;
53}
54
55function getXPos(item)
56{
57 var x = 0;
58 if (item.offsetWidth)
59 {
60 while (item && item!=document.body)
61 {
62 x += item.offsetLeft;
63 item = item.offsetParent;
64 }
65 }
66 return x;
67}
68
69function getYPos(item)
70{
71 var y = 0;
72 if (item.offsetWidth)
73 {
74 while (item && item!=document.body)
75 {
76 y += item.offsetTop;
77 item = item.offsetParent;
78 }
79 }
80 return y;
81}
82
83/* A class handling everything associated with the search panel.
84
85 Parameters:
86 name - The name of the global variable that will be
87 storing this instance. Is needed to be able to set timeouts.
88 resultPath - path to use for external files
89*/
90function SearchBox(name, resultsPath, inFrame, label)
91{
92 if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); }
93
94 // ---------- Instance variables
95 this.name = name;
96 this.resultsPath = resultsPath;
97 this.keyTimeout = 0;
98 this.keyTimeoutLength = 500;
99 this.closeSelectionTimeout = 300;
100 this.lastSearchValue = "";
101 this.lastResultsPage = "";
102 this.hideTimeout = 0;
103 this.searchIndex = 0;
104 this.searchActive = false;
105 this.insideFrame = inFrame;
106 this.searchLabel = label;
107
108 // ----------- DOM Elements
109
110 this.DOMSearchField = function()
111 { return document.getElementById("MSearchField"); }
112
113 this.DOMSearchSelect = function()
114 { return document.getElementById("MSearchSelect"); }
115
116 this.DOMSearchSelectWindow = function()
117 { return document.getElementById("MSearchSelectWindow"); }
118
119 this.DOMPopupSearchResults = function()
120 { return document.getElementById("MSearchResults"); }
121
122 this.DOMPopupSearchResultsWindow = function()
123 { return document.getElementById("MSearchResultsWindow"); }
124
125 this.DOMSearchClose = function()
126 { return document.getElementById("MSearchClose"); }
127
128 this.DOMSearchBox = function()
129 { return document.getElementById("MSearchBox"); }
130
131 // ------------ Event Handlers
132
133 // Called when focus is added or removed from the search field.
134 this.OnSearchFieldFocus = function(isActive)
135 {
136 this.Activate(isActive);
137 }
138
139 this.OnSearchSelectShow = function()
140 {
141 var searchSelectWindow = this.DOMSearchSelectWindow();
142 var searchField = this.DOMSearchSelect();
143
144 if (this.insideFrame)
145 {
146 var left = getXPos(searchField);
147 var top = getYPos(searchField);
148 left += searchField.offsetWidth + 6;
149 top += searchField.offsetHeight;
150
151 // show search selection popup
152 searchSelectWindow.style.display='block';
153 left -= searchSelectWindow.offsetWidth;
154 searchSelectWindow.style.left = left + 'px';
155 searchSelectWindow.style.top = top + 'px';
156 }
157 else
158 {
159 var left = getXPos(searchField);
160 var top = getYPos(searchField);
161 top += searchField.offsetHeight;
162
163 // show search selection popup
164 searchSelectWindow.style.display='block';
165 searchSelectWindow.style.left = left + 'px';
166 searchSelectWindow.style.top = top + 'px';
167 }
168
169 // stop selection hide timer
170 if (this.hideTimeout)
171 {
172 clearTimeout(this.hideTimeout);
173 this.hideTimeout=0;
174 }
175 return false; // to avoid "image drag" default event
176 }
177
178 this.OnSearchSelectHide = function()
179 {
180 this.hideTimeout = setTimeout(this.name +".CloseSelectionWindow()",
181 this.closeSelectionTimeout);
182 }
183
184 // Called when the content of the search field is changed.
185 this.OnSearchFieldChange = function(evt)
186 {
187 if (this.keyTimeout) // kill running timer
188 {
189 clearTimeout(this.keyTimeout);
190 this.keyTimeout = 0;
191 }
192
193 var e = (evt) ? evt : window.event; // for IE
194 if (e.keyCode==40 || e.keyCode==13)
195 {
196 if (e.shiftKey==1)
197 {
198 this.OnSearchSelectShow();
199 var win=this.DOMSearchSelectWindow();
200 for (i=0;i<win.childNodes.length;i++)
201 {
202 var child = win.childNodes[i]; // get span within a
203 if (child.className=='SelectItem')
204 {
205 child.focus();
206 return;
207 }
208 }
209 return;
210 }
211 else if (window.frames.MSearchResults.searchResults)
212 {
213 var elem = window.frames.MSearchResults.searchResults.NavNext(0);
214 if (elem) elem.focus();
215 }
216 }
217 else if (e.keyCode==27) // Escape out of the search field
218 {
219 this.DOMSearchField().blur();
220 this.DOMPopupSearchResultsWindow().style.display = 'none';
221 this.DOMSearchClose().style.display = 'none';
222 this.lastSearchValue = '';
223 this.Activate(false);
224 return;
225 }
226
227 // strip whitespaces
228 var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
229
230 if (searchValue != this.lastSearchValue) // search value has changed
231 {
232 if (searchValue != "") // non-empty search
233 {
234 // set timer for search update
235 this.keyTimeout = setTimeout(this.name + '.Search()',
236 this.keyTimeoutLength);
237 }
238 else // empty search field
239 {
240 this.DOMPopupSearchResultsWindow().style.display = 'none';
241 this.DOMSearchClose().style.display = 'none';
242 this.lastSearchValue = '';
243 }
244 }
245 }
246
247 this.SelectItemCount = function(id)
248 {
249 var count=0;
250 var win=this.DOMSearchSelectWindow();
251 for (i=0;i<win.childNodes.length;i++)
252 {
253 var child = win.childNodes[i]; // get span within a
254 if (child.className=='SelectItem')
255 {
256 count++;
257 }
258 }
259 return count;
260 }
261
262 this.SelectItemSet = function(id)
263 {
264 var i,j=0;
265 var win=this.DOMSearchSelectWindow();
266 for (i=0;i<win.childNodes.length;i++)
267 {
268 var child = win.childNodes[i]; // get span within a
269 if (child.className=='SelectItem')
270 {
271 var node = child.firstChild;
272 if (j==id)
273 {
274 node.innerHTML='&bull;';
275 }
276 else
277 {
278 node.innerHTML='&#160;';
279 }
280 j++;
281 }
282 }
283 }
284
285 // Called when an search filter selection is made.
286 // set item with index id as the active item
287 this.OnSelectItem = function(id)
288 {
289 this.searchIndex = id;
290 this.SelectItemSet(id);
291 var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
292 if (searchValue!="" && this.searchActive) // something was found -> do a search
293 {
294 this.Search();
295 }
296 }
297
298 this.OnSearchSelectKey = function(evt)
299 {
300 var e = (evt) ? evt : window.event; // for IE
301 if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down
302 {
303 this.searchIndex++;
304 this.OnSelectItem(this.searchIndex);
305 }
306 else if (e.keyCode==38 && this.searchIndex>0) // Up
307 {
308 this.searchIndex--;
309 this.OnSelectItem(this.searchIndex);
310 }
311 else if (e.keyCode==13 || e.keyCode==27)
312 {
313 this.OnSelectItem(this.searchIndex);
314 this.CloseSelectionWindow();
315 this.DOMSearchField().focus();
316 }
317 return false;
318 }
319
320 // --------- Actions
321
322 // Closes the results window.
323 this.CloseResultsWindow = function()
324 {
325 this.DOMPopupSearchResultsWindow().style.display = 'none';
326 this.DOMSearchClose().style.display = 'none';
327 this.Activate(false);
328 }
329
330 this.CloseSelectionWindow = function()
331 {
332 this.DOMSearchSelectWindow().style.display = 'none';
333 }
334
335 // Performs a search.
336 this.Search = function()
337 {
338 this.keyTimeout = 0;
339
340 // strip leading whitespace
341 var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
342
343 var code = searchValue.toLowerCase().charCodeAt(0);
344 var hexCode;
345 if (code<16)
346 {
347 hexCode="0"+code.toString(16);
348 }
349 else
350 {
351 hexCode=code.toString(16);
352 }
353
354 var resultsPage;
355 var resultsPageWithSearch;
356 var hasResultsPage;
357
358 if (indexSectionsWithContent[this.searchIndex].charAt(code) == '1')
359 {
360 resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html';
361 resultsPageWithSearch = resultsPage+'?'+escape(searchValue);
362 hasResultsPage = true;
363 }
364 else // nothing available for this search term
365 {
366 resultsPage = this.resultsPath + '/nomatches.html';
367 resultsPageWithSearch = resultsPage;
368 hasResultsPage = false;
369 }
370
371 window.frames.MSearchResults.location.href = resultsPageWithSearch;
372 var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
373
374 if (domPopupSearchResultsWindow.style.display!='block')
375 {
376 var domSearchBox = this.DOMSearchBox();
377 this.DOMSearchClose().style.display = 'inline';
378 if (this.insideFrame)
379 {
380 var domPopupSearchResults = this.DOMPopupSearchResults();
381 domPopupSearchResultsWindow.style.position = 'relative';
382 domPopupSearchResultsWindow.style.display = 'block';
383 var width = document.body.clientWidth - 8; // the -8 is for IE :-(
384 domPopupSearchResultsWindow.style.width = width + 'px';
385 domPopupSearchResults.style.width = width + 'px';
386 }
387 else
388 {
389 var domPopupSearchResults = this.DOMPopupSearchResults();
390 var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth;
391 var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1;
392 domPopupSearchResultsWindow.style.display = 'block';
393 left -= domPopupSearchResults.offsetWidth;
394 domPopupSearchResultsWindow.style.top = top + 'px';
395 domPopupSearchResultsWindow.style.left = left + 'px';
396 }
397 }
398
399 this.lastSearchValue = searchValue;
400 this.lastResultsPage = resultsPage;
401 }
402
403 // -------- Activation Functions
404
405 // Activates or deactivates the search panel, resetting things to
406 // their default values if necessary.
407 this.Activate = function(isActive)
408 {
409 if (isActive || // open it
410 this.DOMPopupSearchResultsWindow().style.display == 'block'
411 )
412 {
413 this.DOMSearchBox().className = 'MSearchBoxActive';
414
415 var searchField = this.DOMSearchField();
416
417 if (searchField.value == this.searchLabel) // clear "Search" term upon entry
418 {
419 searchField.value = '';
420 this.searchActive = true;
421 }
422 }
423 else if (!isActive) // directly remove the panel
424 {
425 this.DOMSearchBox().className = 'MSearchBoxInactive';
426 this.DOMSearchField().value = this.searchLabel;
427 this.searchActive = false;
428 this.lastSearchValue = ''
429 this.lastResultsPage = '';
430 }
431 }
432}
433
434// -----------------------------------------------------------------------
435
436// The class that handles everything on the search results page.
437function SearchResults(name)
438{
439 // The number of matches from the last run of <Search()>.
440 this.lastMatchCount = 0;
441 this.lastKey = 0;
442 this.repeatOn = false;
443
444 // Toggles the visibility of the passed element ID.
445 this.FindChildElement = function(id)
446 {
447 var parentElement = document.getElementById(id);
448 var element = parentElement.firstChild;
449
450 while (element && element!=parentElement)
451 {
452 if (element.nodeName == 'DIV' && element.className == 'SRChildren')
453 {
454 return element;
455 }
456
457 if (element.nodeName == 'DIV' && element.hasChildNodes())
458 {
459 element = element.firstChild;
460 }
461 else if (element.nextSibling)
462 {
463 element = element.nextSibling;
464 }
465 else
466 {
467 do
468 {
469 element = element.parentNode;
470 }
471 while (element && element!=parentElement && !element.nextSibling);
472
473 if (element && element!=parentElement)
474 {
475 element = element.nextSibling;
476 }
477 }
478 }
479 }
480
481 this.Toggle = function(id)
482 {
483 var element = this.FindChildElement(id);
484 if (element)
485 {
486 if (element.style.display == 'block')
487 {
488 element.style.display = 'none';
489 }
490 else
491 {
492 element.style.display = 'block';
493 }
494 }
495 }
496
497 // Searches for the passed string. If there is no parameter,
498 // it takes it from the URL query.
499 //
500 // Always returns true, since other documents may try to call it
501 // and that may or may not be possible.
502 this.Search = function(search)
503 {
504 if (!search) // get search word from URL
505 {
506 search = window.location.search;
507 search = search.substring(1); // Remove the leading '?'
508 search = unescape(search);
509 }
510
511 search = search.replace(/^ +/, ""); // strip leading spaces
512 search = search.replace(/ +$/, ""); // strip trailing spaces
513 search = search.toLowerCase();
514 search = convertToId(search);
515
516 var resultRows = document.getElementsByTagName("div");
517 var matches = 0;
518
519 var i = 0;
520 while (i < resultRows.length)
521 {
522 var row = resultRows.item(i);
523 if (row.className == "SRResult")
524 {
525 var rowMatchName = row.id.toLowerCase();
526 rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_'
527
528 if (search.length<=rowMatchName.length &&
529 rowMatchName.substr(0, search.length)==search)
530 {
531 row.style.display = 'block';
532 matches++;
533 }
534 else
535 {
536 row.style.display = 'none';
537 }
538 }
539 i++;
540 }
541 document.getElementById("Searching").style.display='none';
542 if (matches == 0) // no results
543 {
544 document.getElementById("NoMatches").style.display='block';
545 }
546 else // at least one result
547 {
548 document.getElementById("NoMatches").style.display='none';
549 }
550 this.lastMatchCount = matches;
551 return true;
552 }
553
554 // return the first item with index index or higher that is visible
555 this.NavNext = function(index)
556 {
557 var focusItem;
558 while (1)
559 {
560 var focusName = 'Item'+index;
561 focusItem = document.getElementById(focusName);
562 if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
563 {
564 break;
565 }
566 else if (!focusItem) // last element
567 {
568 break;
569 }
570 focusItem=null;
571 index++;
572 }
573 return focusItem;
574 }
575
576 this.NavPrev = function(index)
577 {
578 var focusItem;
579 while (1)
580 {
581 var focusName = 'Item'+index;
582 focusItem = document.getElementById(focusName);
583 if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
584 {
585 break;
586 }
587 else if (!focusItem) // last element
588 {
589 break;
590 }
591 focusItem=null;
592 index--;
593 }
594 return focusItem;
595 }
596
597 this.ProcessKeys = function(e)
598 {
599 if (e.type == "keydown")
600 {
601 this.repeatOn = false;
602 this.lastKey = e.keyCode;
603 }
604 else if (e.type == "keypress")
605 {
606 if (!this.repeatOn)
607 {
608 if (this.lastKey) this.repeatOn = true;
609 return false; // ignore first keypress after keydown
610 }
611 }
612 else if (e.type == "keyup")
613 {
614 this.lastKey = 0;
615 this.repeatOn = false;
616 }
617 return this.lastKey!=0;
618 }
619
620 this.Nav = function(evt,itemIndex)
621 {
622 var e = (evt) ? evt : window.event; // for IE
623 if (e.keyCode==13) return true;
624 if (!this.ProcessKeys(e)) return false;
625
626 if (this.lastKey==38) // Up
627 {
628 var newIndex = itemIndex-1;
629 var focusItem = this.NavPrev(newIndex);
630 if (focusItem)
631 {
632 var child = this.FindChildElement(focusItem.parentNode.parentNode.id);
633 if (child && child.style.display == 'block') // children visible
634 {
635 var n=0;
636 var tmpElem;
637 while (1) // search for last child
638 {
639 tmpElem = document.getElementById('Item'+newIndex+'_c'+n);
640 if (tmpElem)
641 {
642 focusItem = tmpElem;
643 }
644 else // found it!
645 {
646 break;
647 }
648 n++;
649 }
650 }
651 }
652 if (focusItem)
653 {
654 focusItem.focus();
655 }
656 else // return focus to search field
657 {
658 parent.document.getElementById("MSearchField").focus();
659 }
660 }
661 else if (this.lastKey==40) // Down
662 {
663 var newIndex = itemIndex+1;
664 var focusItem;
665 var item = document.getElementById('Item'+itemIndex);
666 var elem = this.FindChildElement(item.parentNode.parentNode.id);
667 if (elem && elem.style.display == 'block') // children visible
668 {
669 focusItem = document.getElementById('Item'+itemIndex+'_c0');
670 }
671 if (!focusItem) focusItem = this.NavNext(newIndex);
672 if (focusItem) focusItem.focus();
673 }
674 else if (this.lastKey==39) // Right
675 {
676 var item = document.getElementById('Item'+itemIndex);
677 var elem = this.FindChildElement(item.parentNode.parentNode.id);
678 if (elem) elem.style.display = 'block';
679 }
680 else if (this.lastKey==37) // Left
681 {
682 var item = document.getElementById('Item'+itemIndex);
683 var elem = this.FindChildElement(item.parentNode.parentNode.id);
684 if (elem) elem.style.display = 'none';
685 }
686 else if (this.lastKey==27) // Escape
687 {
688 parent.searchBox.CloseResultsWindow();
689 parent.document.getElementById("MSearchField").focus();
690 }
691 else if (this.lastKey==13) // Enter
692 {
693 return true;
694 }
695 return false;
696 }
697
698 this.NavChild = function(evt,itemIndex,childIndex)
699 {
700 var e = (evt) ? evt : window.event; // for IE
701 if (e.keyCode==13) return true;
702 if (!this.ProcessKeys(e)) return false;
703
704 if (this.lastKey==38) // Up
705 {
706 if (childIndex>0)
707 {
708 var newIndex = childIndex-1;
709 document.getElementById('Item'+itemIndex+'_c'+newIndex).focus();
710 }
711 else // already at first child, jump to parent
712 {
713 document.getElementById('Item'+itemIndex).focus();
714 }
715 }
716 else if (this.lastKey==40) // Down
717 {
718 var newIndex = childIndex+1;
719 var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex);
720 if (!elem) // last child, jump to parent next parent
721 {
722 elem = this.NavNext(itemIndex+1);
723 }
724 if (elem)
725 {
726 elem.focus();
727 }
728 }
729 else if (this.lastKey==27) // Escape
730 {
731 parent.searchBox.CloseResultsWindow();
732 parent.document.getElementById("MSearchField").focus();
733 }
734 else if (this.lastKey==13) // Enter
735 {
736 return true;
737 }
738 return false;
739 }
740}
diff --git a/docs/html/search/search_l.png b/docs/html/search/search_l.png
new file mode 100644
index 0000000..c872f4d
--- /dev/null
+++ b/docs/html/search/search_l.png
Binary files differ
diff --git a/docs/html/search/search_m.png b/docs/html/search/search_m.png
new file mode 100644
index 0000000..b429a16
--- /dev/null
+++ b/docs/html/search/search_m.png
Binary files differ
diff --git a/docs/html/search/search_r.png b/docs/html/search/search_r.png
new file mode 100644
index 0000000..97ee8b4
--- /dev/null
+++ b/docs/html/search/search_r.png
Binary files differ
diff --git a/docs/html/search/typedefs_66.html b/docs/html/search/typedefs_66.html
new file mode 100644
index 0000000..45945fb
--- /dev/null
+++ b/docs/html/search/typedefs_66.html
@@ -0,0 +1,26 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_fpactioncallback_5ft">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445" target="_parent">fpActionCallback_t</a>
13 <span class="SRScope">aws_iot_shadow_interface.h</span>
14 </div>
15</div>
16<div class="SRStatus" id="Searching">Searching...</div>
17<div class="SRStatus" id="NoMatches">No Matches</div>
18<script type="text/javascript"><!--
19document.getElementById("Loading").style.display="none";
20document.getElementById("NoMatches").style.display="none";
21var searchResults = new SearchResults("searchResults");
22searchResults.Search();
23--></script>
24</div>
25</body>
26</html>
diff --git a/docs/html/search/typedefs_6e.html b/docs/html/search/typedefs_6e.html
new file mode 100644
index 0000000..d0dd017
--- /dev/null
+++ b/docs/html/search/typedefs_6e.html
@@ -0,0 +1,26 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_network">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../network__interface_8h.html#a5e783e42eddc16b9eb807fe441e845e9" target="_parent">Network</a>
13 <span class="SRScope">network_interface.h</span>
14 </div>
15</div>
16<div class="SRStatus" id="Searching">Searching...</div>
17<div class="SRStatus" id="NoMatches">No Matches</div>
18<script type="text/javascript"><!--
19document.getElementById("Loading").style.display="none";
20document.getElementById("NoMatches").style.display="none";
21var searchResults = new SearchResults("searchResults");
22searchResults.Search();
23--></script>
24</div>
25</body>
26</html>
diff --git a/docs/html/search/typedefs_74.html b/docs/html/search/typedefs_74.html
new file mode 100644
index 0000000..b0f61c3
--- /dev/null
+++ b/docs/html/search/typedefs_74.html
@@ -0,0 +1,26 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_timer">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../timer__interface_8h.html#a9809d52f988a8dba9cd5d8e129cebadd" target="_parent">Timer</a>
13 <span class="SRScope">timer_interface.h</span>
14 </div>
15</div>
16<div class="SRStatus" id="Searching">Searching...</div>
17<div class="SRStatus" id="NoMatches">No Matches</div>
18<script type="text/javascript"><!--
19document.getElementById("Loading").style.display="none";
20document.getElementById("NoMatches").style.display="none";
21var searchResults = new SearchResults("searchResults");
22searchResults.Search();
23--></script>
24</div>
25</body>
26</html>
diff --git a/docs/html/search/variables_63.html b/docs/html/search/variables_63.html
new file mode 100644
index 0000000..dbae9a8
--- /dev/null
+++ b/docs/html/search/variables_63.html
@@ -0,0 +1,26 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_connect">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structMQTTClient__t.html#aaa8b9c7c1d9e3205095c400ca54bf3fc" target="_parent">connect</a>
13 <span class="SRScope">MQTTClient_t</span>
14 </div>
15</div>
16<div class="SRStatus" id="Searching">Searching...</div>
17<div class="SRStatus" id="NoMatches">No Matches</div>
18<script type="text/javascript"><!--
19document.getElementById("Loading").style.display="none";
20document.getElementById("NoMatches").style.display="none";
21var searchResults = new SearchResults("searchResults");
22searchResults.Search();
23--></script>
24</div>
25</body>
26</html>
diff --git a/docs/html/search/variables_64.html b/docs/html/search/variables_64.html
new file mode 100644
index 0000000..6ad01dd
--- /dev/null
+++ b/docs/html/search/variables_64.html
@@ -0,0 +1,41 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_destinationport">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structTLSConnectParams.html#a98310c27d56c9856270e0c7ba02dde36" target="_parent">DestinationPort</a>
13 <span class="SRScope">TLSConnectParams</span>
14 </div>
15</div>
16<div class="SRResult" id="SR_disconnect">
17 <div class="SREntry">
18 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_disconnect')">disconnect</a>
19 <div class="SRChildren">
20 <a id="Item1_c0" onkeydown="return searchResults.NavChild(event,1,0)" onkeypress="return searchResults.NavChild(event,1,0)" onkeyup="return searchResults.NavChild(event,1,0)" class="SRScope" href="../structNetwork.html#a0f1dce0927b86b72bf1d5e33b609b385" target="_parent">Network::disconnect()</a>
21 <a id="Item1_c1" onkeydown="return searchResults.NavChild(event,1,1)" onkeypress="return searchResults.NavChild(event,1,1)" onkeyup="return searchResults.NavChild(event,1,1)" class="SRScope" href="../structMQTTClient__t.html#a6b466b3c30e2f81dc2c8bdcc1477ea10" target="_parent">MQTTClient_t::disconnect()</a>
22 </div>
23 </div>
24</div>
25<div class="SRResult" id="SR_disconnecthandler">
26 <div class="SREntry">
27 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../structMQTTConnectParams.html#a770dfb57d9cc24f2f7048275d134350b" target="_parent">disconnectHandler</a>
28 <span class="SRScope">MQTTConnectParams</span>
29 </div>
30</div>
31<div class="SRStatus" id="Searching">Searching...</div>
32<div class="SRStatus" id="NoMatches">No Matches</div>
33<script type="text/javascript"><!--
34document.getElementById("Loading").style.display="none";
35document.getElementById("NoMatches").style.display="none";
36var searchResults = new SearchResults("searchResults");
37searchResults.Search();
38--></script>
39</div>
40</body>
41</html>
diff --git a/docs/html/search/variables_69.html b/docs/html/search/variables_69.html
new file mode 100644
index 0000000..d6186fa
--- /dev/null
+++ b/docs/html/search/variables_69.html
@@ -0,0 +1,65 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_id">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structMQTTMessageParams.html#a9faad31a60f5d4c26d0765832af8552e" target="_parent">id</a>
13 <span class="SRScope">MQTTMessageParams</span>
14 </div>
15</div>
16<div class="SRResult" id="SR_iscleansession">
17 <div class="SREntry">
18 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../structMQTTConnectParams.html#a4ed3fb7b2aad72c7f33b39494c04eee7" target="_parent">isCleansession</a>
19 <span class="SRScope">MQTTConnectParams</span>
20 </div>
21</div>
22<div class="SRResult" id="SR_isconnected">
23 <div class="SREntry">
24 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../structMQTTClient__t.html#a5ff9ec93a1e65a90c2f3b2f14bc3193a" target="_parent">isConnected</a>
25 <span class="SRScope">MQTTClient_t</span>
26 </div>
27</div>
28<div class="SRResult" id="SR_isduplicate">
29 <div class="SREntry">
30 <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../structMQTTMessageParams.html#a4df7a8f21af28a9982483282b5ed65f2" target="_parent">isDuplicate</a>
31 <span class="SRScope">MQTTMessageParams</span>
32 </div>
33</div>
34<div class="SRResult" id="SR_isretained">
35 <div class="SREntry">
36 <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_isretained')">isRetained</a>
37 <div class="SRChildren">
38 <a id="Item4_c0" onkeydown="return searchResults.NavChild(event,4,0)" onkeypress="return searchResults.NavChild(event,4,0)" onkeyup="return searchResults.NavChild(event,4,0)" class="SRScope" href="../structMQTTwillOptions.html#a5a056c3e21c3ba7b7825b601d4eb8ec4" target="_parent">MQTTwillOptions::isRetained()</a>
39 <a id="Item4_c1" onkeydown="return searchResults.NavChild(event,4,1)" onkeypress="return searchResults.NavChild(event,4,1)" onkeyup="return searchResults.NavChild(event,4,1)" class="SRScope" href="../structMQTTMessageParams.html#a6d0ac76d1a77b4369160b462214abe81" target="_parent">MQTTMessageParams::isRetained()</a>
40 </div>
41 </div>
42</div>
43<div class="SRResult" id="SR_issslhostnameverify">
44 <div class="SREntry">
45 <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="../structMQTTConnectParams.html#a11d7d74c185dabcafa71c938c7a6bdb8" target="_parent">isSSLHostnameVerify</a>
46 <span class="SRScope">MQTTConnectParams</span>
47 </div>
48</div>
49<div class="SRResult" id="SR_iswillmsgpresent">
50 <div class="SREntry">
51 <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="../structMQTTConnectParams.html#ae5bed52bd50304de0d06795fac5502e6" target="_parent">isWillMsgPresent</a>
52 <span class="SRScope">MQTTConnectParams</span>
53 </div>
54</div>
55<div class="SRStatus" id="Searching">Searching...</div>
56<div class="SRStatus" id="NoMatches">No Matches</div>
57<script type="text/javascript"><!--
58document.getElementById("Loading").style.display="none";
59document.getElementById("NoMatches").style.display="none";
60var searchResults = new SearchResults("searchResults");
61searchResults.Search();
62--></script>
63</div>
64</body>
65</html>
diff --git a/docs/html/search/variables_6b.html b/docs/html/search/variables_6b.html
new file mode 100644
index 0000000..09c07c0
--- /dev/null
+++ b/docs/html/search/variables_6b.html
@@ -0,0 +1,26 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_keepaliveinterval_5fsec">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structMQTTConnectParams.html#a8ae47bfc9025dafc49e80605317e7232" target="_parent">KeepAliveInterval_sec</a>
13 <span class="SRScope">MQTTConnectParams</span>
14 </div>
15</div>
16<div class="SRStatus" id="Searching">Searching...</div>
17<div class="SRStatus" id="NoMatches">No Matches</div>
18<script type="text/javascript"><!--
19document.getElementById("Loading").style.display="none";
20document.getElementById("NoMatches").style.display="none";
21var searchResults = new SearchResults("searchResults");
22searchResults.Search();
23--></script>
24</div>
25</body>
26</html>
diff --git a/docs/html/search/variables_6d.html b/docs/html/search/variables_6d.html
new file mode 100644
index 0000000..96c724a
--- /dev/null
+++ b/docs/html/search/variables_6d.html
@@ -0,0 +1,65 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_messageparams">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_messageparams')">MessageParams</a>
13 <div class="SRChildren">
14 <a id="Item0_c0" onkeydown="return searchResults.NavChild(event,0,0)" onkeypress="return searchResults.NavChild(event,0,0)" onkeyup="return searchResults.NavChild(event,0,0)" class="SRScope" href="../structMQTTCallbackParams.html#ac350fbe59e29d1f9c08d61340bdb9170" target="_parent">MQTTCallbackParams::MessageParams()</a>
15 <a id="Item0_c1" onkeydown="return searchResults.NavChild(event,0,1)" onkeypress="return searchResults.NavChild(event,0,1)" onkeyup="return searchResults.NavChild(event,0,1)" class="SRScope" href="../structMQTTPublishParams.html#a7ac4d0b9e84808a07e0036f9a0e4b369" target="_parent">MQTTPublishParams::MessageParams()</a>
16 </div>
17 </div>
18</div>
19<div class="SRResult" id="SR_mhandler">
20 <div class="SREntry">
21 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../structMQTTSubscribeParams.html#a5d21b3e72ac4530110cd43ccdc2245b1" target="_parent">mHandler</a>
22 <span class="SRScope">MQTTSubscribeParams</span>
23 </div>
24</div>
25<div class="SRResult" id="SR_mqttcommandtimeout_5fms">
26 <div class="SREntry">
27 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../structMQTTConnectParams.html#ac2d24e342b29b7f3ea4777732fd6988a" target="_parent">mqttCommandTimeout_ms</a>
28 <span class="SRScope">MQTTConnectParams</span>
29 </div>
30</div>
31<div class="SRResult" id="SR_mqttread">
32 <div class="SREntry">
33 <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../structNetwork.html#aabf2c7305c36a7858b471cef6d98de0e" target="_parent">mqttread</a>
34 <span class="SRScope">Network</span>
35 </div>
36</div>
37<div class="SRResult" id="SR_mqttversion">
38 <div class="SREntry">
39 <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="../structMQTTConnectParams.html#a25577733f870ba683b7f44e2288036a7" target="_parent">MQTTVersion</a>
40 <span class="SRScope">MQTTConnectParams</span>
41 </div>
42</div>
43<div class="SRResult" id="SR_mqttwrite">
44 <div class="SREntry">
45 <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="../structNetwork.html#a00ed168a988784ecb64c8a07da2e04bd" target="_parent">mqttwrite</a>
46 <span class="SRScope">Network</span>
47 </div>
48</div>
49<div class="SRResult" id="SR_my_5fsocket">
50 <div class="SREntry">
51 <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="../structNetwork.html#ad7b36ded416243b20d0d5924dba8385e" target="_parent">my_socket</a>
52 <span class="SRScope">Network</span>
53 </div>
54</div>
55<div class="SRStatus" id="Searching">Searching...</div>
56<div class="SRStatus" id="NoMatches">No Matches</div>
57<script type="text/javascript"><!--
58document.getElementById("Loading").style.display="none";
59document.getElementById("NoMatches").style.display="none";
60var searchResults = new SearchResults("searchResults");
61searchResults.Search();
62--></script>
63</div>
64</body>
65</html>
diff --git a/docs/html/search/variables_70.html b/docs/html/search/variables_70.html
new file mode 100644
index 0000000..770bf4d
--- /dev/null
+++ b/docs/html/search/variables_70.html
@@ -0,0 +1,164 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_payloadlen">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structMQTTMessageParams.html#a41d4499e625695a8682eb2f51c0fddf9" target="_parent">PayloadLen</a>
13 <span class="SRScope">MQTTMessageParams</span>
14 </div>
15</div>
16<div class="SRResult" id="SR_pclientcrt">
17 <div class="SREntry">
18 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../structShadowParameters__t.html#a9ba70adf7b2553a574d0c493815c3fde" target="_parent">pClientCRT</a>
19 <span class="SRScope">ShadowParameters_t</span>
20 </div>
21</div>
22<div class="SRResult" id="SR_pclientid">
23 <div class="SREntry">
24 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../structMQTTConnectParams.html#ae089333563f566afdb36caa82e5375bf" target="_parent">pClientID</a>
25 <span class="SRScope">MQTTConnectParams</span>
26 </div>
27</div>
28<div class="SRResult" id="SR_pclientkey">
29 <div class="SREntry">
30 <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../structShadowParameters__t.html#af0a34f1265930aec7023f625af80df7f" target="_parent">pClientKey</a>
31 <span class="SRScope">ShadowParameters_t</span>
32 </div>
33</div>
34<div class="SRResult" id="SR_pdestinationurl">
35 <div class="SREntry">
36 <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="../structTLSConnectParams.html#a4deae89cd9ba3f3b2e75c27e1b80cdc0" target="_parent">pDestinationURL</a>
37 <span class="SRScope">TLSConnectParams</span>
38 </div>
39</div>
40<div class="SRResult" id="SR_pdevicecertlocation">
41 <div class="SREntry">
42 <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_pdevicecertlocation')">pDeviceCertLocation</a>
43 <div class="SRChildren">
44 <a id="Item5_c0" onkeydown="return searchResults.NavChild(event,5,0)" onkeypress="return searchResults.NavChild(event,5,0)" onkeyup="return searchResults.NavChild(event,5,0)" class="SRScope" href="../structTLSConnectParams.html#aa8a37f66a9473f554b92f0944e1baa3e" target="_parent">TLSConnectParams::pDeviceCertLocation()</a>
45 <a id="Item5_c1" onkeydown="return searchResults.NavChild(event,5,1)" onkeypress="return searchResults.NavChild(event,5,1)" onkeyup="return searchResults.NavChild(event,5,1)" class="SRScope" href="../structMQTTConnectParams.html#a0ff5b27384df86ae50caac0b4bb8a429" target="_parent">MQTTConnectParams::pDeviceCertLocation()</a>
46 </div>
47 </div>
48</div>
49<div class="SRResult" id="SR_pdeviceprivatekeylocation">
50 <div class="SREntry">
51 <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_pdeviceprivatekeylocation')">pDevicePrivateKeyLocation</a>
52 <div class="SRChildren">
53 <a id="Item6_c0" onkeydown="return searchResults.NavChild(event,6,0)" onkeypress="return searchResults.NavChild(event,6,0)" onkeyup="return searchResults.NavChild(event,6,0)" class="SRScope" href="../structTLSConnectParams.html#aaca0411311eb106ca6c48bd788de9fdf" target="_parent">TLSConnectParams::pDevicePrivateKeyLocation()</a>
54 <a id="Item6_c1" onkeydown="return searchResults.NavChild(event,6,1)" onkeypress="return searchResults.NavChild(event,6,1)" onkeyup="return searchResults.NavChild(event,6,1)" class="SRScope" href="../structMQTTConnectParams.html#a99ce9a0fe10c70ef3e445cf7612be919" target="_parent">MQTTConnectParams::pDevicePrivateKeyLocation()</a>
55 </div>
56 </div>
57</div>
58<div class="SRResult" id="SR_phost">
59 <div class="SREntry">
60 <a id="Item7" onkeydown="return searchResults.Nav(event,7)" onkeypress="return searchResults.Nav(event,7)" onkeyup="return searchResults.Nav(event,7)" class="SRSymbol" href="../structShadowParameters__t.html#abebf2ba2657ead7718385f2406730cc0" target="_parent">pHost</a>
61 <span class="SRScope">ShadowParameters_t</span>
62 </div>
63</div>
64<div class="SRResult" id="SR_phosturl">
65 <div class="SREntry">
66 <a id="Item8" onkeydown="return searchResults.Nav(event,8)" onkeypress="return searchResults.Nav(event,8)" onkeyup="return searchResults.Nav(event,8)" class="SRSymbol" href="../structMQTTConnectParams.html#afe7a9782130dab062a9b27aabcade48d" target="_parent">pHostURL</a>
67 <span class="SRScope">MQTTConnectParams</span>
68 </div>
69</div>
70<div class="SRResult" id="SR_pmessage">
71 <div class="SREntry">
72 <a id="Item9" onkeydown="return searchResults.Nav(event,9)" onkeypress="return searchResults.Nav(event,9)" onkeyup="return searchResults.Nav(event,9)" class="SRSymbol" href="../structMQTTwillOptions.html#a3113cbbc7701ed62735a7fc0635e8d2f" target="_parent">pMessage</a>
73 <span class="SRScope">MQTTwillOptions</span>
74 </div>
75</div>
76<div class="SRResult" id="SR_pmqttclientid">
77 <div class="SREntry">
78 <a id="Item10" onkeydown="return searchResults.Nav(event,10)" onkeypress="return searchResults.Nav(event,10)" onkeyup="return searchResults.Nav(event,10)" class="SRSymbol" href="../structShadowParameters__t.html#a27619390335abf973719645b8f31a277" target="_parent">pMqttClientId</a>
79 <span class="SRScope">ShadowParameters_t</span>
80 </div>
81</div>
82<div class="SRResult" id="SR_pmythingname">
83 <div class="SREntry">
84 <a id="Item11" onkeydown="return searchResults.Nav(event,11)" onkeypress="return searchResults.Nav(event,11)" onkeyup="return searchResults.Nav(event,11)" class="SRSymbol" href="../structShadowParameters__t.html#adb78403e35dd900410d5d26ef0fa315d" target="_parent">pMyThingName</a>
85 <span class="SRScope">ShadowParameters_t</span>
86 </div>
87</div>
88<div class="SRResult" id="SR_port">
89 <div class="SREntry">
90 <a id="Item12" onkeydown="return searchResults.Nav(event,12)" onkeypress="return searchResults.Nav(event,12)" onkeyup="return searchResults.Nav(event,12)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_port')">port</a>
91 <div class="SRChildren">
92 <a id="Item12_c0" onkeydown="return searchResults.NavChild(event,12,0)" onkeypress="return searchResults.NavChild(event,12,0)" onkeyup="return searchResults.NavChild(event,12,0)" class="SRScope" href="../structMQTTConnectParams.html#a03eed7f477e9f834294d0891d125ad5c" target="_parent">MQTTConnectParams::port()</a>
93 <a id="Item12_c1" onkeydown="return searchResults.NavChild(event,12,1)" onkeypress="return searchResults.NavChild(event,12,1)" onkeyup="return searchResults.NavChild(event,12,1)" class="SRScope" href="../structShadowParameters__t.html#a3243eeb13c8bad2cf78dcd7003b1d665" target="_parent">ShadowParameters_t::port()</a>
94 </div>
95 </div>
96</div>
97<div class="SRResult" id="SR_ppassword">
98 <div class="SREntry">
99 <a id="Item13" onkeydown="return searchResults.Nav(event,13)" onkeypress="return searchResults.Nav(event,13)" onkeyup="return searchResults.Nav(event,13)" class="SRSymbol" href="../structMQTTConnectParams.html#a09497a2124f8021a70bde9d713350611" target="_parent">pPassword</a>
100 <span class="SRScope">MQTTConnectParams</span>
101 </div>
102</div>
103<div class="SRResult" id="SR_ppayload">
104 <div class="SREntry">
105 <a id="Item14" onkeydown="return searchResults.Nav(event,14)" onkeypress="return searchResults.Nav(event,14)" onkeyup="return searchResults.Nav(event,14)" class="SRSymbol" href="../structMQTTMessageParams.html#ae0103a22ff8338af06553f3403b4b916" target="_parent">pPayload</a>
106 <span class="SRScope">MQTTMessageParams</span>
107 </div>
108</div>
109<div class="SRResult" id="SR_prootca">
110 <div class="SREntry">
111 <a id="Item15" onkeydown="return searchResults.Nav(event,15)" onkeypress="return searchResults.Nav(event,15)" onkeyup="return searchResults.Nav(event,15)" class="SRSymbol" href="../structShadowParameters__t.html#afa3bbe30735094046913d645b6d2ae50" target="_parent">pRootCA</a>
112 <span class="SRScope">ShadowParameters_t</span>
113 </div>
114</div>
115<div class="SRResult" id="SR_prootcalocation">
116 <div class="SREntry">
117 <a id="Item16" onkeydown="return searchResults.Nav(event,16)" onkeypress="return searchResults.Nav(event,16)" onkeyup="return searchResults.Nav(event,16)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_prootcalocation')">pRootCALocation</a>
118 <div class="SRChildren">
119 <a id="Item16_c0" onkeydown="return searchResults.NavChild(event,16,0)" onkeypress="return searchResults.NavChild(event,16,0)" onkeyup="return searchResults.NavChild(event,16,0)" class="SRScope" href="../structTLSConnectParams.html#a62e797f55d038c78739a2af11d03b6ff" target="_parent">TLSConnectParams::pRootCALocation()</a>
120 <a id="Item16_c1" onkeydown="return searchResults.NavChild(event,16,1)" onkeypress="return searchResults.NavChild(event,16,1)" onkeyup="return searchResults.NavChild(event,16,1)" class="SRScope" href="../structMQTTConnectParams.html#ac8128e06c4135460050acf220bee7297" target="_parent">MQTTConnectParams::pRootCALocation()</a>
121 </div>
122 </div>
123</div>
124<div class="SRResult" id="SR_ptopic">
125 <div class="SREntry">
126 <a id="Item17" onkeydown="return searchResults.Nav(event,17)" onkeypress="return searchResults.Nav(event,17)" onkeyup="return searchResults.Nav(event,17)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ptopic')">pTopic</a>
127 <div class="SRChildren">
128 <a id="Item17_c0" onkeydown="return searchResults.NavChild(event,17,0)" onkeypress="return searchResults.NavChild(event,17,0)" onkeyup="return searchResults.NavChild(event,17,0)" class="SRScope" href="../structMQTTSubscribeParams.html#a8bbbc1a4a96d1270e11a58d3aa31521e" target="_parent">MQTTSubscribeParams::pTopic()</a>
129 <a id="Item17_c1" onkeydown="return searchResults.NavChild(event,17,1)" onkeypress="return searchResults.NavChild(event,17,1)" onkeyup="return searchResults.NavChild(event,17,1)" class="SRScope" href="../structMQTTPublishParams.html#ad8b1bb06e8bd823de87b00b912d8b6e1" target="_parent">MQTTPublishParams::pTopic()</a>
130 </div>
131 </div>
132</div>
133<div class="SRResult" id="SR_ptopicname">
134 <div class="SREntry">
135 <a id="Item18" onkeydown="return searchResults.Nav(event,18)" onkeypress="return searchResults.Nav(event,18)" onkeyup="return searchResults.Nav(event,18)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_ptopicname')">pTopicName</a>
136 <div class="SRChildren">
137 <a id="Item18_c0" onkeydown="return searchResults.NavChild(event,18,0)" onkeypress="return searchResults.NavChild(event,18,0)" onkeyup="return searchResults.NavChild(event,18,0)" class="SRScope" href="../structMQTTwillOptions.html#aa27c5b47d2f848ac32cd2180d97dd8e3" target="_parent">MQTTwillOptions::pTopicName()</a>
138 <a id="Item18_c1" onkeydown="return searchResults.NavChild(event,18,1)" onkeypress="return searchResults.NavChild(event,18,1)" onkeyup="return searchResults.NavChild(event,18,1)" class="SRScope" href="../structMQTTCallbackParams.html#af6b4ccd3c4cab157b93c3d0c1d8f1dc9" target="_parent">MQTTCallbackParams::pTopicName()</a>
139 </div>
140 </div>
141</div>
142<div class="SRResult" id="SR_publish">
143 <div class="SREntry">
144 <a id="Item19" onkeydown="return searchResults.Nav(event,19)" onkeypress="return searchResults.Nav(event,19)" onkeyup="return searchResults.Nav(event,19)" class="SRSymbol" href="../structMQTTClient__t.html#accddc5560b9d33e8d7556c336847c584" target="_parent">publish</a>
145 <span class="SRScope">MQTTClient_t</span>
146 </div>
147</div>
148<div class="SRResult" id="SR_pusername">
149 <div class="SREntry">
150 <a id="Item20" onkeydown="return searchResults.Nav(event,20)" onkeypress="return searchResults.Nav(event,20)" onkeyup="return searchResults.Nav(event,20)" class="SRSymbol" href="../structMQTTConnectParams.html#a2efa006d6305a8c6bea31cbbfb20cbfe" target="_parent">pUserName</a>
151 <span class="SRScope">MQTTConnectParams</span>
152 </div>
153</div>
154<div class="SRStatus" id="Searching">Searching...</div>
155<div class="SRStatus" id="NoMatches">No Matches</div>
156<script type="text/javascript"><!--
157document.getElementById("Loading").style.display="none";
158document.getElementById("NoMatches").style.display="none";
159var searchResults = new SearchResults("searchResults");
160searchResults.Search();
161--></script>
162</div>
163</body>
164</html>
diff --git a/docs/html/search/variables_71.html b/docs/html/search/variables_71.html
new file mode 100644
index 0000000..5cd2934
--- /dev/null
+++ b/docs/html/search/variables_71.html
@@ -0,0 +1,30 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_qos">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="javascript:searchResults.Toggle('SR_qos')">qos</a>
13 <div class="SRChildren">
14 <a id="Item0_c0" onkeydown="return searchResults.NavChild(event,0,0)" onkeypress="return searchResults.NavChild(event,0,0)" onkeyup="return searchResults.NavChild(event,0,0)" class="SRScope" href="../structMQTTwillOptions.html#a6c5ff6dad1a3487cd131bb6eaa990a3f" target="_parent">MQTTwillOptions::qos()</a>
15 <a id="Item0_c1" onkeydown="return searchResults.NavChild(event,0,1)" onkeypress="return searchResults.NavChild(event,0,1)" onkeyup="return searchResults.NavChild(event,0,1)" class="SRScope" href="../structMQTTMessageParams.html#aef06a771fecb653893f75ee74b5067aa" target="_parent">MQTTMessageParams::qos()</a>
16 <a id="Item0_c2" onkeydown="return searchResults.NavChild(event,0,2)" onkeypress="return searchResults.NavChild(event,0,2)" onkeyup="return searchResults.NavChild(event,0,2)" class="SRScope" href="../structMQTTSubscribeParams.html#adcfb4d6691c3d68818b49b996addf4fa" target="_parent">MQTTSubscribeParams::qos()</a>
17 </div>
18 </div>
19</div>
20<div class="SRStatus" id="Searching">Searching...</div>
21<div class="SRStatus" id="NoMatches">No Matches</div>
22<script type="text/javascript"><!--
23document.getElementById("Loading").style.display="none";
24document.getElementById("NoMatches").style.display="none";
25var searchResults = new SearchResults("searchResults");
26searchResults.Search();
27--></script>
28</div>
29</body>
30</html>
diff --git a/docs/html/search/variables_73.html b/docs/html/search/variables_73.html
new file mode 100644
index 0000000..b2e57ae
--- /dev/null
+++ b/docs/html/search/variables_73.html
@@ -0,0 +1,38 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_serververificationflag">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structTLSConnectParams.html#ad81e67d8b722a28af4abdbeb89aa58e7" target="_parent">ServerVerificationFlag</a>
13 <span class="SRScope">TLSConnectParams</span>
14 </div>
15</div>
16<div class="SRResult" id="SR_shadowparametersdefault">
17 <div class="SREntry">
18 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../structShadowParameters__t.html#adc225bbde6004034d41899a4f4b13074" target="_parent">ShadowParametersDefault</a>
19 <span class="SRScope">ShadowParameters_t</span>
20 </div>
21</div>
22<div class="SRResult" id="SR_subscribe">
23 <div class="SREntry">
24 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../structMQTTClient__t.html#a7053d0cd48d1c22a217d847babe372c4" target="_parent">subscribe</a>
25 <span class="SRScope">MQTTClient_t</span>
26 </div>
27</div>
28<div class="SRStatus" id="Searching">Searching...</div>
29<div class="SRStatus" id="NoMatches">No Matches</div>
30<script type="text/javascript"><!--
31document.getElementById("Loading").style.display="none";
32document.getElementById("NoMatches").style.display="none";
33var searchResults = new SearchResults("searchResults");
34searchResults.Search();
35--></script>
36</div>
37</body>
38</html>
diff --git a/docs/html/search/variables_74.html b/docs/html/search/variables_74.html
new file mode 100644
index 0000000..a3919bb
--- /dev/null
+++ b/docs/html/search/variables_74.html
@@ -0,0 +1,38 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_timeout_5fms">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structTLSConnectParams.html#a60800f6a6a6bc138e5b0a3e016d0be8f" target="_parent">timeout_ms</a>
13 <span class="SRScope">TLSConnectParams</span>
14 </div>
15</div>
16<div class="SRResult" id="SR_tlshandshaketimeout_5fms">
17 <div class="SREntry">
18 <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../structMQTTConnectParams.html#aa870d2df978a54f739214ee888c67171" target="_parent">tlsHandshakeTimeout_ms</a>
19 <span class="SRScope">MQTTConnectParams</span>
20 </div>
21</div>
22<div class="SRResult" id="SR_topicnamelen">
23 <div class="SREntry">
24 <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../structMQTTCallbackParams.html#acb1088787c038d920c2f24fca3aecd3c" target="_parent">TopicNameLen</a>
25 <span class="SRScope">MQTTCallbackParams</span>
26 </div>
27</div>
28<div class="SRStatus" id="Searching">Searching...</div>
29<div class="SRStatus" id="NoMatches">No Matches</div>
30<script type="text/javascript"><!--
31document.getElementById("Loading").style.display="none";
32document.getElementById("NoMatches").style.display="none";
33var searchResults = new SearchResults("searchResults");
34searchResults.Search();
35--></script>
36</div>
37</body>
38</html>
diff --git a/docs/html/search/variables_75.html b/docs/html/search/variables_75.html
new file mode 100644
index 0000000..2af5eae
--- /dev/null
+++ b/docs/html/search/variables_75.html
@@ -0,0 +1,26 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_unsubscribe">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structMQTTClient__t.html#ad4fca46f97db56c20667c4245d0bdea1" target="_parent">unsubscribe</a>
13 <span class="SRScope">MQTTClient_t</span>
14 </div>
15</div>
16<div class="SRStatus" id="Searching">Searching...</div>
17<div class="SRStatus" id="NoMatches">No Matches</div>
18<script type="text/javascript"><!--
19document.getElementById("Loading").style.display="none";
20document.getElementById("NoMatches").style.display="none";
21var searchResults = new SearchResults("searchResults");
22searchResults.Search();
23--></script>
24</div>
25</body>
26</html>
diff --git a/docs/html/search/variables_77.html b/docs/html/search/variables_77.html
new file mode 100644
index 0000000..2b3ca3f
--- /dev/null
+++ b/docs/html/search/variables_77.html
@@ -0,0 +1,26 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_will">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structMQTTConnectParams.html#abd5a646508c84aa7445822855969eaf6" target="_parent">will</a>
13 <span class="SRScope">MQTTConnectParams</span>
14 </div>
15</div>
16<div class="SRStatus" id="Searching">Searching...</div>
17<div class="SRStatus" id="NoMatches">No Matches</div>
18<script type="text/javascript"><!--
19document.getElementById("Loading").style.display="none";
20document.getElementById("NoMatches").style.display="none";
21var searchResults = new SearchResults("searchResults");
22searchResults.Search();
23--></script>
24</div>
25</body>
26</html>
diff --git a/docs/html/search/variables_79.html b/docs/html/search/variables_79.html
new file mode 100644
index 0000000..5466789
--- /dev/null
+++ b/docs/html/search/variables_79.html
@@ -0,0 +1,26 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title></title>
3<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
4<link rel="stylesheet" type="text/css" href="search.css"/>
5<script type="text/javascript" src="search.js"></script>
6</head>
7<body class="SRPage">
8<div id="SRIndex">
9<div class="SRStatus" id="Loading">Loading...</div>
10<div class="SRResult" id="SR_yield">
11 <div class="SREntry">
12 <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../structMQTTClient__t.html#accaa6a8595048819c8629a80a398bc54" target="_parent">yield</a>
13 <span class="SRScope">MQTTClient_t</span>
14 </div>
15</div>
16<div class="SRStatus" id="Searching">Searching...</div>
17<div class="SRStatus" id="NoMatches">No Matches</div>
18<script type="text/javascript"><!--
19document.getElementById("Loading").style.display="none";
20document.getElementById("NoMatches").style.display="none";
21var searchResults = new SearchResults("searchResults");
22searchResults.Search();
23--></script>
24</div>
25</body>
26</html>
diff --git a/docs/html/shadow__sample_8c.html b/docs/html/shadow__sample_8c.html
new file mode 100644
index 0000000..fc19693
--- /dev/null
+++ b/docs/html/shadow__sample_8c.html
@@ -0,0 +1,149 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: shadow_sample.c File Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48</div>
49<div class="header">
50 <div class="summary">
51<a href="#define-members">Defines</a> &#124;
52<a href="#func-members">Functions</a> &#124;
53<a href="#var-members">Variables</a> </div>
54 <div class="headertitle">
55<h1>shadow_sample.c File Reference</h1> </div>
56</div>
57<div class="contents">
58
59<p>A simple connected window example demonstrating the use of Thing Shadow.
60<a href="#_details">More...</a></p>
61<code>#include &lt;stdio.h&gt;</code><br/>
62<code>#include &lt;stdlib.h&gt;</code><br/>
63<code>#include &lt;ctype.h&gt;</code><br/>
64<code>#include &lt;unistd.h&gt;</code><br/>
65<code>#include &lt;signal.h&gt;</code><br/>
66<code>#include &lt;memory.h&gt;</code><br/>
67<code>#include &lt;sys/time.h&gt;</code><br/>
68<code>#include &lt;limits.h&gt;</code><br/>
69<code>#include &quot;aws_iot_log.h&quot;</code><br/>
70<code>#include &quot;aws_iot_version.h&quot;</code><br/>
71<code>#include &quot;<a class="el" href="aws__iot__shadow__interface_8h_source.html">aws_iot_shadow_interface.h</a>&quot;</code><br/>
72<code>#include &quot;aws_iot_shadow_json_data.h&quot;</code><br/>
73<code>#include &quot;<a class="el" href="aws__iot__config_8h_source.html">aws_iot_config.h</a>&quot;</code><br/>
74<code>#include &quot;aws_iot_mqtt_interface.h&quot;</code><br/>
75<!-- startSectionHeader --><div class="dynheader">
76Include dependency graph for shadow_sample.c:<!-- endSectionHeader --></div>
77<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
78<div class="center"><img src="shadow__sample_8c__incl.png" border="0" usemap="#shadow__sample_8c" alt=""/></div>
79<map name="shadow__sample_8c" id="shadow__sample_8c">
80</map>
81<!-- endSectionContent --></div>
82<table class="memberdecls">
83<tr><td colspan="2"><h2><a name="define-members"></a>
84Defines</h2></td></tr>
85<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="shadow__sample_8c.html#a6dbd1724187439bfaa80cafa7517cdfd">ROOMTEMPERATURE_UPPERLIMIT</a>&#160;&#160;&#160;32.0f</td></tr>
86<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aad36aa0f5654f5aa982080d7dec2f150"></a><!-- doxytag: member="shadow_sample.c::ROOMTEMPERATURE_LOWERLIMIT" ref="aad36aa0f5654f5aa982080d7dec2f150" args="" -->
87#define&#160;</td><td class="memItemRight" valign="bottom"><b>ROOMTEMPERATURE_LOWERLIMIT</b>&#160;&#160;&#160;25.0f</td></tr>
88<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a44e6443f66e95b1837b9332e549b0796"></a><!-- doxytag: member="shadow_sample.c::STARTING_ROOMTEMPERATURE" ref="a44e6443f66e95b1837b9332e549b0796" args="" -->
89#define&#160;</td><td class="memItemRight" valign="bottom"><b>STARTING_ROOMTEMPERATURE</b>&#160;&#160;&#160;ROOMTEMPERATURE_LOWERLIMIT</td></tr>
90<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3618839af2640c1a3b2112a62e3d3867"></a><!-- doxytag: member="shadow_sample.c::MAX_LENGTH_OF_UPDATE_JSON_BUFFER" ref="a3618839af2640c1a3b2112a62e3d3867" args="" -->
91#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_LENGTH_OF_UPDATE_JSON_BUFFER</b>&#160;&#160;&#160;200</td></tr>
92<tr><td colspan="2"><h2><a name="func-members"></a>
93Functions</h2></td></tr>
94<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7558615133e9df9a915675a12cab6ff4"></a><!-- doxytag: member="shadow_sample.c::ShadowUpdateStatusCallback" ref="a7558615133e9df9a915675a12cab6ff4" args="(const char *pThingName, ShadowActions_t action, Shadow_Ack_Status_t status, const char *pReceivedJsonDocument, void *pContextData)" -->
95void&#160;</td><td class="memItemRight" valign="bottom"><b>ShadowUpdateStatusCallback</b> (const char *pThingName, <a class="el" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c">ShadowActions_t</a> action, <a class="el" href="aws__iot__shadow__interface_8h.html#ad946163c2ac5df0aa896520949d47956">Shadow_Ack_Status_t</a> status, const char *pReceivedJsonDocument, void *pContextData)</td></tr>
96<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9b5422d39eab6f9e7dee85e6cbb73635"></a><!-- doxytag: member="shadow_sample.c::windowActuate_Callback" ref="a9b5422d39eab6f9e7dee85e6cbb73635" args="(const char *pJsonString, uint32_t JsonStringDataLen, jsonStruct_t *pContext)" -->
97void&#160;</td><td class="memItemRight" valign="bottom"><b>windowActuate_Callback</b> (const char *pJsonString, uint32_t JsonStringDataLen, <a class="el" href="structjsonStruct.html">jsonStruct_t</a> *pContext)</td></tr>
98<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a28eab4b612aa32ddd89326949dca9538"></a><!-- doxytag: member="shadow_sample.c::parseInputArgsForConnectParams" ref="a28eab4b612aa32ddd89326949dca9538" args="(int argc, char **argv)" -->
99void&#160;</td><td class="memItemRight" valign="bottom"><b>parseInputArgsForConnectParams</b> (int argc, char **argv)</td></tr>
100<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3c04138a5bfe5d72780bb7e82a18e627"></a><!-- doxytag: member="shadow_sample.c::main" ref="a3c04138a5bfe5d72780bb7e82a18e627" args="(int argc, char **argv)" -->
101int&#160;</td><td class="memItemRight" valign="bottom"><b>main</b> (int argc, char **argv)</td></tr>
102<tr><td colspan="2"><h2><a name="var-members"></a>
103Variables</h2></td></tr>
104<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad0d9ab8c8f3ba0b4a3dd629f20950ff2"></a><!-- doxytag: member="shadow_sample.c::certDirectory" ref="ad0d9ab8c8f3ba0b4a3dd629f20950ff2" args="[PATH_MAX+1]" -->
105char&#160;</td><td class="memItemRight" valign="bottom"><b>certDirectory</b> [PATH_MAX+1] = &quot;../../certs&quot;</td></tr>
106<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a76f8e71d1d244043e57787fc33ea0c21"></a><!-- doxytag: member="shadow_sample.c::HostAddress" ref="a76f8e71d1d244043e57787fc33ea0c21" args="[255]" -->
107char&#160;</td><td class="memItemRight" valign="bottom"><b>HostAddress</b> [255] = AWS_IOT_MQTT_HOST</td></tr>
108<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a83a04ad582de2b7d36b96f9db429c2c6"></a><!-- doxytag: member="shadow_sample.c::port" ref="a83a04ad582de2b7d36b96f9db429c2c6" args="" -->
109uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>port</b> = AWS_IOT_MQTT_PORT</td></tr>
110<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a624468032913e496e0d7bb16a6c11c30"></a><!-- doxytag: member="shadow_sample.c::numPubs" ref="a624468032913e496e0d7bb16a6c11c30" args="" -->
111uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>numPubs</b> = 5</td></tr>
112</table>
113<hr/><a name="_details"></a><h2>Detailed Description</h2>
114<hr/><h2>Define Documentation</h2>
115<a class="anchor" id="a6dbd1724187439bfaa80cafa7517cdfd"></a><!-- doxytag: member="shadow_sample.c::ROOMTEMPERATURE_UPPERLIMIT" ref="a6dbd1724187439bfaa80cafa7517cdfd" args="" -->
116<div class="memitem">
117<div class="memproto">
118 <table class="memname">
119 <tr>
120 <td class="memname">#define ROOMTEMPERATURE_UPPERLIMIT&#160;&#160;&#160;32.0f</td>
121 </tr>
122 </table>
123</div>
124<div class="memdoc">
125<p>The goal of this sample application is to demonstrate the capabilities of shadow. This device(say Connected Window) will open the window of a room based on temperature It can report to the Shadow the following parameters: 1. temperature of the room (double) 2. status of the window (open or close) It can act on commands from the cloud. In this case it will open or close the window based on the json object "windowOpen" data[open/close]</p>
126<p>The two variables from a device's perspective are double temperature and bool windowOpen The device needs to act on only on windowOpen variable, so we will create a primitiveJson_t object with callback The Json Document in the cloud will be { "reported": { "temperature": 0, "windowOpen": false }, "desired": { "windowOpen": false } } </p>
127
128</div>
129</div>
130</div>
131<!--- window showing the filter options -->
132<div id="MSearchSelectWindow"
133 onmouseover="return searchBox.OnSearchSelectShow()"
134 onmouseout="return searchBox.OnSearchSelectHide()"
135 onkeydown="return searchBox.OnSearchSelectKey(event)">
136<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
137
138<!-- iframe showing the search results (closed by default) -->
139<div id="MSearchResultsWindow">
140<iframe src="" frameborder="0"
141 name="MSearchResults" id="MSearchResults">
142</iframe>
143</div>
144
145<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
146<a href="http://www.doxygen.org/index.html">
147<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
148</body>
149</html>
diff --git a/docs/html/shadow__sample_8c__incl.dot b/docs/html/shadow__sample_8c__incl.dot
new file mode 100644
index 0000000..62081cf
--- /dev/null
+++ b/docs/html/shadow__sample_8c__incl.dot
@@ -0,0 +1,47 @@
1digraph G
2{
3 edge [fontname="FreeSans.ttf",fontsize="10",labelfontname="FreeSans.ttf",labelfontsize="10"];
4 node [fontname="FreeSans.ttf",fontsize="10",shape=record];
5 Node1 [label="shadow_sample.c",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
6 Node1 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
7 Node2 [label="stdio.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
8 Node1 -> Node3 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
9 Node3 [label="stdlib.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
10 Node1 -> Node4 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
11 Node4 [label="ctype.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
12 Node1 -> Node5 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
13 Node5 [label="unistd.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
14 Node1 -> Node6 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
15 Node6 [label="signal.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
16 Node1 -> Node7 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
17 Node7 [label="memory.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
18 Node1 -> Node8 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
19 Node8 [label="sys/time.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
20 Node1 -> Node9 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
21 Node9 [label="limits.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
22 Node1 -> Node10 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
23 Node10 [label="aws_iot_log.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$aws__iot__log_8h_source.html"];
24 Node10 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
25 Node10 -> Node3 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
26 Node1 -> Node11 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
27 Node11 [label="aws_iot_version.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$aws__iot__version_8h_source.html"];
28 Node1 -> Node12 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
29 Node12 [label="aws_iot_shadow_interface.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$aws__iot__shadow__interface_8h.html",tooltip="Interface for thing shadow."];
30 Node12 -> Node13 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
31 Node13 [label="aws_iot_mqtt_interface.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$aws__iot__mqtt__interface_8h_source.html"];
32 Node13 -> Node14 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
33 Node14 [label="stddef.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
34 Node13 -> Node15 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
35 Node15 [label="stdbool.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
36 Node13 -> Node16 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
37 Node16 [label="stdint.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
38 Node13 -> Node17 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
39 Node17 [label="aws_iot_error.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$aws__iot__error_8h_source.html"];
40 Node12 -> Node18 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
41 Node18 [label="aws_iot_shadow_json_data.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$aws__iot__shadow__json__data_8h_source.html"];
42 Node18 -> Node14 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
43 Node1 -> Node18 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
44 Node1 -> Node19 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
45 Node19 [label="aws_iot_config.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$aws__iot__config_8h.html",tooltip="AWS IoT specific configuration file."];
46 Node1 -> Node13 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
47}
diff --git a/docs/html/shadow__sample_8c__incl.md5 b/docs/html/shadow__sample_8c__incl.md5
new file mode 100644
index 0000000..54712bc
--- /dev/null
+++ b/docs/html/shadow__sample_8c__incl.md5
@@ -0,0 +1 @@
d5965d20f38e0e03954eb21bec23230f \ No newline at end of file
diff --git a/docs/html/structJsonTokenTable__t.html b/docs/html/structJsonTokenTable__t.html
new file mode 100644
index 0000000..02b25f1
--- /dev/null
+++ b/docs/html/structJsonTokenTable__t.html
@@ -0,0 +1,88 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: JsonTokenTable_t Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> </div>
53 <div class="headertitle">
54<h1>JsonTokenTable_t Struct Reference</h1> </div>
55</div>
56<div class="contents">
57<!-- doxytag: class="JsonTokenTable_t" --><table class="memberdecls">
58<tr><td colspan="2"><h2><a name="pub-attribs"></a>
59Data Fields</h2></td></tr>
60<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a86cedeb355d79ea1c03fd948dcb4fc48"></a><!-- doxytag: member="JsonTokenTable_t::pKey" ref="a86cedeb355d79ea1c03fd948dcb4fc48" args="" -->
61const char *&#160;</td><td class="memItemRight" valign="bottom"><b>pKey</b></td></tr>
62<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a85b460a4ca5b7c374e12346e2104dbd5"></a><!-- doxytag: member="JsonTokenTable_t::pStruct" ref="a85b460a4ca5b7c374e12346e2104dbd5" args="" -->
63void *&#160;</td><td class="memItemRight" valign="bottom"><b>pStruct</b></td></tr>
64<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3293040de24ed0e05b5bcc8d27ec2d1d"></a><!-- doxytag: member="JsonTokenTable_t::callback" ref="a3293040de24ed0e05b5bcc8d27ec2d1d" args="" -->
65jsonStructCallback_t&#160;</td><td class="memItemRight" valign="bottom"><b>callback</b></td></tr>
66<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab30deb2ceeec6e023295b29672d482b4"></a><!-- doxytag: member="JsonTokenTable_t::isFree" ref="ab30deb2ceeec6e023295b29672d482b4" args="" -->
67bool&#160;</td><td class="memItemRight" valign="bottom"><b>isFree</b></td></tr>
68</table>
69</div>
70<!--- window showing the filter options -->
71<div id="MSearchSelectWindow"
72 onmouseover="return searchBox.OnSearchSelectShow()"
73 onmouseout="return searchBox.OnSearchSelectHide()"
74 onkeydown="return searchBox.OnSearchSelectKey(event)">
75<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
76
77<!-- iframe showing the search results (closed by default) -->
78<div id="MSearchResultsWindow">
79<iframe src="" frameborder="0"
80 name="MSearchResults" id="MSearchResults">
81</iframe>
82</div>
83
84<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
85<a href="http://www.doxygen.org/index.html">
86<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
87</body>
88</html>
diff --git a/docs/html/structMQTTCallbackParams.html b/docs/html/structMQTTCallbackParams.html
new file mode 100644
index 0000000..138bdc6
--- /dev/null
+++ b/docs/html/structMQTTCallbackParams.html
@@ -0,0 +1,103 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: MQTTCallbackParams Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> </div>
53 <div class="headertitle">
54<h1>MQTTCallbackParams Struct Reference</h1> </div>
55</div>
56<div class="contents">
57<!-- doxytag: class="MQTTCallbackParams" -->
58<p>MQTT Callback Function Parameters.
59<a href="#_details">More...</a></p>
60
61<p><code>#include &lt;<a class="el" href="aws__iot__mqtt__interface_8h_source.html">aws_iot_mqtt_interface.h</a>&gt;</code></p>
62<!-- startSectionHeader --><div class="dynheader">
63Collaboration diagram for MQTTCallbackParams:<!-- endSectionHeader --></div>
64<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
65<div class="center"><img src="structMQTTCallbackParams__coll__graph.png" border="0" usemap="#MQTTCallbackParams_coll__map" alt="Collaboration graph"/></div>
66<map name="MQTTCallbackParams_coll__map" id="MQTTCallbackParams_coll__map">
67</map>
68<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center><!-- endSectionContent --></div>
69<table class="memberdecls">
70<tr><td colspan="2"><h2><a name="pub-attribs"></a>
71Data Fields</h2></td></tr>
72<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af6b4ccd3c4cab157b93c3d0c1d8f1dc9"></a><!-- doxytag: member="MQTTCallbackParams::pTopicName" ref="af6b4ccd3c4cab157b93c3d0c1d8f1dc9" args="" -->
73char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTCallbackParams.html#af6b4ccd3c4cab157b93c3d0c1d8f1dc9">pTopicName</a></td></tr>
74<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to the topic string on which the message was delivered. In the case of a wildcard subscription this is the actual topic, not the wildcard filter. <br/></td></tr>
75<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acb1088787c038d920c2f24fca3aecd3c"></a><!-- doxytag: member="MQTTCallbackParams::TopicNameLen" ref="acb1088787c038d920c2f24fca3aecd3c" args="" -->
76uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTCallbackParams.html#acb1088787c038d920c2f24fca3aecd3c">TopicNameLen</a></td></tr>
77<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Length of the topic string. <br/></td></tr>
78<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac350fbe59e29d1f9c08d61340bdb9170"></a><!-- doxytag: member="MQTTCallbackParams::MessageParams" ref="ac350fbe59e29d1f9c08d61340bdb9170" args="" -->
79<a class="el" href="structMQTTMessageParams.html">MQTTMessageParams</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTCallbackParams.html#ac350fbe59e29d1f9c08d61340bdb9170">MessageParams</a></td></tr>
80<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Message parameters structure. <br/></td></tr>
81</table>
82<hr/><a name="_details"></a><h2>Detailed Description</h2>
83<p>Defines a type for parameters returned to the user upon receipt of a publish message on a subscribed topic. </p>
84</div>
85<!--- window showing the filter options -->
86<div id="MSearchSelectWindow"
87 onmouseover="return searchBox.OnSearchSelectShow()"
88 onmouseout="return searchBox.OnSearchSelectHide()"
89 onkeydown="return searchBox.OnSearchSelectKey(event)">
90<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
91
92<!-- iframe showing the search results (closed by default) -->
93<div id="MSearchResultsWindow">
94<iframe src="" frameborder="0"
95 name="MSearchResults" id="MSearchResults">
96</iframe>
97</div>
98
99<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
100<a href="http://www.doxygen.org/index.html">
101<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
102</body>
103</html>
diff --git a/docs/html/structMQTTCallbackParams__coll__graph.dot b/docs/html/structMQTTCallbackParams__coll__graph.dot
new file mode 100644
index 0000000..f2965c1
--- /dev/null
+++ b/docs/html/structMQTTCallbackParams__coll__graph.dot
@@ -0,0 +1,8 @@
1digraph G
2{
3 edge [fontname="FreeSans.ttf",fontsize="10",labelfontname="FreeSans.ttf",labelfontsize="10"];
4 node [fontname="FreeSans.ttf",fontsize="10",shape=record];
5 Node1 [label="MQTTCallbackParams",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
6 Node2 -> Node1 [dir=back,color="darkorchid3",fontsize="10",style="dashed",label="MessageParams",fontname="FreeSans.ttf"];
7 Node2 [label="MQTTMessageParams",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$structMQTTMessageParams.html",tooltip="MQTT Message Parameters."];
8}
diff --git a/docs/html/structMQTTCallbackParams__coll__graph.md5 b/docs/html/structMQTTCallbackParams__coll__graph.md5
new file mode 100644
index 0000000..e21b3c8
--- /dev/null
+++ b/docs/html/structMQTTCallbackParams__coll__graph.md5
@@ -0,0 +1 @@
01d8063f7793377613209e5cb37c42f8 \ No newline at end of file
diff --git a/docs/html/structMQTTClient__t.html b/docs/html/structMQTTClient__t.html
new file mode 100644
index 0000000..030395b
--- /dev/null
+++ b/docs/html/structMQTTClient__t.html
@@ -0,0 +1,108 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: MQTTClient_t Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> </div>
53 <div class="headertitle">
54<h1>MQTTClient_t Struct Reference</h1> </div>
55</div>
56<div class="contents">
57<!-- doxytag: class="MQTTClient_t" -->
58<p>MQTT Client Type Definition.
59<a href="#_details">More...</a></p>
60
61<p><code>#include &lt;<a class="el" href="aws__iot__mqtt__interface_8h_source.html">aws_iot_mqtt_interface.h</a>&gt;</code></p>
62<table class="memberdecls">
63<tr><td colspan="2"><h2><a name="pub-attribs"></a>
64Data Fields</h2></td></tr>
65<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaa8b9c7c1d9e3205095c400ca54bf3fc"></a><!-- doxytag: member="MQTTClient_t::connect" ref="aaa8b9c7c1d9e3205095c400ca54bf3fc" args="" -->
66pConnectFunc_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClient__t.html#aaa8b9c7c1d9e3205095c400ca54bf3fc">connect</a></td></tr>
67<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">function implementing the iot_mqtt_connect function <br/></td></tr>
68<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="accddc5560b9d33e8d7556c336847c584"></a><!-- doxytag: member="MQTTClient_t::publish" ref="accddc5560b9d33e8d7556c336847c584" args="" -->
69pPublishFunc_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClient__t.html#accddc5560b9d33e8d7556c336847c584">publish</a></td></tr>
70<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">function implementing the iot_mqtt_publish function <br/></td></tr>
71<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7053d0cd48d1c22a217d847babe372c4"></a><!-- doxytag: member="MQTTClient_t::subscribe" ref="a7053d0cd48d1c22a217d847babe372c4" args="" -->
72pSubscribeFunc_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClient__t.html#a7053d0cd48d1c22a217d847babe372c4">subscribe</a></td></tr>
73<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">function implementing the iot_mqtt_subscribe function <br/></td></tr>
74<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad4fca46f97db56c20667c4245d0bdea1"></a><!-- doxytag: member="MQTTClient_t::unsubscribe" ref="ad4fca46f97db56c20667c4245d0bdea1" args="" -->
75pUnsubscribeFunc_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClient__t.html#ad4fca46f97db56c20667c4245d0bdea1">unsubscribe</a></td></tr>
76<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">function implementing the iot_mqtt_unsubscribe function <br/></td></tr>
77<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6b466b3c30e2f81dc2c8bdcc1477ea10"></a><!-- doxytag: member="MQTTClient_t::disconnect" ref="a6b466b3c30e2f81dc2c8bdcc1477ea10" args="" -->
78pDisconnectFunc_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClient__t.html#a6b466b3c30e2f81dc2c8bdcc1477ea10">disconnect</a></td></tr>
79<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">function implementing the iot_mqtt_disconnect function <br/></td></tr>
80<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="accaa6a8595048819c8629a80a398bc54"></a><!-- doxytag: member="MQTTClient_t::yield" ref="accaa6a8595048819c8629a80a398bc54" args="" -->
81pYieldFunc_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClient__t.html#accaa6a8595048819c8629a80a398bc54">yield</a></td></tr>
82<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">function implementing the iot_mqtt_yield function <br/></td></tr>
83<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ff9ec93a1e65a90c2f3b2f14bc3193a"></a><!-- doxytag: member="MQTTClient_t::isConnected" ref="a5ff9ec93a1e65a90c2f3b2f14bc3193a" args="" -->
84pIsConnectedFunc_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTClient__t.html#a5ff9ec93a1e65a90c2f3b2f14bc3193a">isConnected</a></td></tr>
85<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">function implementing the iot_is_mqtt_connected function <br/></td></tr>
86</table>
87<hr/><a name="_details"></a><h2>Detailed Description</h2>
88<p>Defines a structure of function pointers, each implementing a corresponding iot_mqtt_* function. In this way any MQTT client which implements the iot_mqtt_* interface can be swapped in under the MQTT/Shadow layer. </p>
89</div>
90<!--- window showing the filter options -->
91<div id="MSearchSelectWindow"
92 onmouseover="return searchBox.OnSearchSelectShow()"
93 onmouseout="return searchBox.OnSearchSelectHide()"
94 onkeydown="return searchBox.OnSearchSelectKey(event)">
95<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
96
97<!-- iframe showing the search results (closed by default) -->
98<div id="MSearchResultsWindow">
99<iframe src="" frameborder="0"
100 name="MSearchResults" id="MSearchResults">
101</iframe>
102</div>
103
104<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
105<a href="http://www.doxygen.org/index.html">
106<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
107</body>
108</html>
diff --git a/docs/html/structMQTTConnectParams.html b/docs/html/structMQTTConnectParams.html
new file mode 100644
index 0000000..109b882
--- /dev/null
+++ b/docs/html/structMQTTConnectParams.html
@@ -0,0 +1,145 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: MQTTConnectParams Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> </div>
53 <div class="headertitle">
54<h1>MQTTConnectParams Struct Reference</h1> </div>
55</div>
56<div class="contents">
57<!-- doxytag: class="MQTTConnectParams" -->
58<p>MQTT Connection Parameters.
59<a href="#_details">More...</a></p>
60
61<p><code>#include &lt;<a class="el" href="aws__iot__mqtt__interface_8h_source.html">aws_iot_mqtt_interface.h</a>&gt;</code></p>
62<!-- startSectionHeader --><div class="dynheader">
63Collaboration diagram for MQTTConnectParams:<!-- endSectionHeader --></div>
64<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
65<div class="center"><img src="structMQTTConnectParams__coll__graph.png" border="0" usemap="#MQTTConnectParams_coll__map" alt="Collaboration graph"/></div>
66<map name="MQTTConnectParams_coll__map" id="MQTTConnectParams_coll__map">
67</map>
68<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center><!-- endSectionContent --></div>
69<table class="memberdecls">
70<tr><td colspan="2"><h2><a name="pub-attribs"></a>
71Data Fields</h2></td></tr>
72<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afe7a9782130dab062a9b27aabcade48d"></a><!-- doxytag: member="MQTTConnectParams::pHostURL" ref="afe7a9782130dab062a9b27aabcade48d" args="" -->
73char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#afe7a9782130dab062a9b27aabcade48d">pHostURL</a></td></tr>
74<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to a string defining the endpoint for the MQTT service. <br/></td></tr>
75<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a03eed7f477e9f834294d0891d125ad5c"></a><!-- doxytag: member="MQTTConnectParams::port" ref="a03eed7f477e9f834294d0891d125ad5c" args="" -->
76uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#a03eed7f477e9f834294d0891d125ad5c">port</a></td></tr>
77<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">MQTT service listening port. <br/></td></tr>
78<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac8128e06c4135460050acf220bee7297"></a><!-- doxytag: member="MQTTConnectParams::pRootCALocation" ref="ac8128e06c4135460050acf220bee7297" args="" -->
79char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#ac8128e06c4135460050acf220bee7297">pRootCALocation</a></td></tr>
80<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to a string defining the Root CA file (full file, not path) <br/></td></tr>
81<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0ff5b27384df86ae50caac0b4bb8a429"></a><!-- doxytag: member="MQTTConnectParams::pDeviceCertLocation" ref="a0ff5b27384df86ae50caac0b4bb8a429" args="" -->
82char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#a0ff5b27384df86ae50caac0b4bb8a429">pDeviceCertLocation</a></td></tr>
83<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to a string defining the device identity certificate file (full file, not path) <br/></td></tr>
84<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a99ce9a0fe10c70ef3e445cf7612be919"></a><!-- doxytag: member="MQTTConnectParams::pDevicePrivateKeyLocation" ref="a99ce9a0fe10c70ef3e445cf7612be919" args="" -->
85char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#a99ce9a0fe10c70ef3e445cf7612be919">pDevicePrivateKeyLocation</a></td></tr>
86<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to a string defining the device private key file (full file, not path) <br/></td></tr>
87<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae089333563f566afdb36caa82e5375bf"></a><!-- doxytag: member="MQTTConnectParams::pClientID" ref="ae089333563f566afdb36caa82e5375bf" args="" -->
88char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#ae089333563f566afdb36caa82e5375bf">pClientID</a></td></tr>
89<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to a string defining the MQTT client ID (this needs to be unique <b>per</b> <b>device</b> across your AWS account) <br/></td></tr>
90<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2efa006d6305a8c6bea31cbbfb20cbfe"></a><!-- doxytag: member="MQTTConnectParams::pUserName" ref="a2efa006d6305a8c6bea31cbbfb20cbfe" args="" -->
91char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#a2efa006d6305a8c6bea31cbbfb20cbfe">pUserName</a></td></tr>
92<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Not used in the AWS IoT Service. <br/></td></tr>
93<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09497a2124f8021a70bde9d713350611"></a><!-- doxytag: member="MQTTConnectParams::pPassword" ref="a09497a2124f8021a70bde9d713350611" args="" -->
94char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#a09497a2124f8021a70bde9d713350611">pPassword</a></td></tr>
95<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Not used in the AWS IoT Service. <br/></td></tr>
96<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a25577733f870ba683b7f44e2288036a7"></a><!-- doxytag: member="MQTTConnectParams::MQTTVersion" ref="a25577733f870ba683b7f44e2288036a7" args="" -->
97MQTT_Ver_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#a25577733f870ba683b7f44e2288036a7">MQTTVersion</a></td></tr>
98<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Desired MQTT version used during connection. <br/></td></tr>
99<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8ae47bfc9025dafc49e80605317e7232"></a><!-- doxytag: member="MQTTConnectParams::KeepAliveInterval_sec" ref="a8ae47bfc9025dafc49e80605317e7232" args="" -->
100uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#a8ae47bfc9025dafc49e80605317e7232">KeepAliveInterval_sec</a></td></tr>
101<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">MQTT keep alive interval in seconds. Defines inactivity time allowed before determining the connection has been lost. <br/></td></tr>
102<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4ed3fb7b2aad72c7f33b39494c04eee7"></a><!-- doxytag: member="MQTTConnectParams::isCleansession" ref="a4ed3fb7b2aad72c7f33b39494c04eee7" args="" -->
103bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#a4ed3fb7b2aad72c7f33b39494c04eee7">isCleansession</a></td></tr>
104<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">MQTT clean session. True = this session is to be treated as clean. Previous server state is cleared and no stated is retained from this connection. <br/></td></tr>
105<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae5bed52bd50304de0d06795fac5502e6"></a><!-- doxytag: member="MQTTConnectParams::isWillMsgPresent" ref="ae5bed52bd50304de0d06795fac5502e6" args="" -->
106bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#ae5bed52bd50304de0d06795fac5502e6">isWillMsgPresent</a></td></tr>
107<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Is there a LWT associated with this connection? <br/></td></tr>
108<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abd5a646508c84aa7445822855969eaf6"></a><!-- doxytag: member="MQTTConnectParams::will" ref="abd5a646508c84aa7445822855969eaf6" args="" -->
109<a class="el" href="structMQTTwillOptions.html">MQTTwillOptions</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#abd5a646508c84aa7445822855969eaf6">will</a></td></tr>
110<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">MQTT LWT parameters. <br/></td></tr>
111<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac2d24e342b29b7f3ea4777732fd6988a"></a><!-- doxytag: member="MQTTConnectParams::mqttCommandTimeout_ms" ref="ac2d24e342b29b7f3ea4777732fd6988a" args="" -->
112uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#ac2d24e342b29b7f3ea4777732fd6988a">mqttCommandTimeout_ms</a></td></tr>
113<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Timeout for MQTT blocking calls. In milliseconds. <br/></td></tr>
114<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa870d2df978a54f739214ee888c67171"></a><!-- doxytag: member="MQTTConnectParams::tlsHandshakeTimeout_ms" ref="aa870d2df978a54f739214ee888c67171" args="" -->
115uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#aa870d2df978a54f739214ee888c67171">tlsHandshakeTimeout_ms</a></td></tr>
116<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">TLS handshake timeout. In milliseconds. <br/></td></tr>
117<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a11d7d74c185dabcafa71c938c7a6bdb8"></a><!-- doxytag: member="MQTTConnectParams::isSSLHostnameVerify" ref="a11d7d74c185dabcafa71c938c7a6bdb8" args="" -->
118bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#a11d7d74c185dabcafa71c938c7a6bdb8">isSSLHostnameVerify</a></td></tr>
119<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Client should perform server certificate hostname validation. <br/></td></tr>
120<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a770dfb57d9cc24f2f7048275d134350b"></a><!-- doxytag: member="MQTTConnectParams::disconnectHandler" ref="a770dfb57d9cc24f2f7048275d134350b" args="" -->
121iot_disconnect_handler&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTConnectParams.html#a770dfb57d9cc24f2f7048275d134350b">disconnectHandler</a></td></tr>
122<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback to be invoked upon connection loss. <br/></td></tr>
123</table>
124<hr/><a name="_details"></a><h2>Detailed Description</h2>
125<p>Defining a type for MQTT connection parameters. Passed into client when establishing a connection. </p>
126</div>
127<!--- window showing the filter options -->
128<div id="MSearchSelectWindow"
129 onmouseover="return searchBox.OnSearchSelectShow()"
130 onmouseout="return searchBox.OnSearchSelectHide()"
131 onkeydown="return searchBox.OnSearchSelectKey(event)">
132<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
133
134<!-- iframe showing the search results (closed by default) -->
135<div id="MSearchResultsWindow">
136<iframe src="" frameborder="0"
137 name="MSearchResults" id="MSearchResults">
138</iframe>
139</div>
140
141<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
142<a href="http://www.doxygen.org/index.html">
143<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
144</body>
145</html>
diff --git a/docs/html/structMQTTConnectParams__coll__graph.dot b/docs/html/structMQTTConnectParams__coll__graph.dot
new file mode 100644
index 0000000..e20886f
--- /dev/null
+++ b/docs/html/structMQTTConnectParams__coll__graph.dot
@@ -0,0 +1,8 @@
1digraph G
2{
3 edge [fontname="FreeSans.ttf",fontsize="10",labelfontname="FreeSans.ttf",labelfontsize="10"];
4 node [fontname="FreeSans.ttf",fontsize="10",shape=record];
5 Node1 [label="MQTTConnectParams",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
6 Node2 -> Node1 [dir=back,color="darkorchid3",fontsize="10",style="dashed",label="will",fontname="FreeSans.ttf"];
7 Node2 [label="MQTTwillOptions",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$structMQTTwillOptions.html",tooltip="Last Will and Testament Definition."];
8}
diff --git a/docs/html/structMQTTConnectParams__coll__graph.md5 b/docs/html/structMQTTConnectParams__coll__graph.md5
new file mode 100644
index 0000000..4b56b52
--- /dev/null
+++ b/docs/html/structMQTTConnectParams__coll__graph.md5
@@ -0,0 +1 @@
1e22de565f5322c9d5a98ab0fc55f82e \ No newline at end of file
diff --git a/docs/html/structMQTTMessageParams.html b/docs/html/structMQTTMessageParams.html
new file mode 100644
index 0000000..f5769c9
--- /dev/null
+++ b/docs/html/structMQTTMessageParams.html
@@ -0,0 +1,105 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: MQTTMessageParams Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> </div>
53 <div class="headertitle">
54<h1>MQTTMessageParams Struct Reference</h1> </div>
55</div>
56<div class="contents">
57<!-- doxytag: class="MQTTMessageParams" -->
58<p>MQTT Message Parameters.
59<a href="#_details">More...</a></p>
60
61<p><code>#include &lt;<a class="el" href="aws__iot__mqtt__interface_8h_source.html">aws_iot_mqtt_interface.h</a>&gt;</code></p>
62<table class="memberdecls">
63<tr><td colspan="2"><h2><a name="pub-attribs"></a>
64Data Fields</h2></td></tr>
65<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef06a771fecb653893f75ee74b5067aa"></a><!-- doxytag: member="MQTTMessageParams::qos" ref="aef06a771fecb653893f75ee74b5067aa" args="" -->
66QoSLevel&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTMessageParams.html#aef06a771fecb653893f75ee74b5067aa">qos</a></td></tr>
67<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Message Quality of Service. <br/></td></tr>
68<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6d0ac76d1a77b4369160b462214abe81"></a><!-- doxytag: member="MQTTMessageParams::isRetained" ref="a6d0ac76d1a77b4369160b462214abe81" args="" -->
69bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTMessageParams.html#a6d0ac76d1a77b4369160b462214abe81">isRetained</a></td></tr>
70<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Retained messages are <b>NOT</b> supported by the AWS IoT Service at the time of this SDK release. <br/></td></tr>
71<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4df7a8f21af28a9982483282b5ed65f2"></a><!-- doxytag: member="MQTTMessageParams::isDuplicate" ref="a4df7a8f21af28a9982483282b5ed65f2" args="" -->
72bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTMessageParams.html#a4df7a8f21af28a9982483282b5ed65f2">isDuplicate</a></td></tr>
73<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Is this message a duplicate QoS &gt; 0 message? Handled automatically by the MQTT client. <br/></td></tr>
74<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9faad31a60f5d4c26d0765832af8552e"></a><!-- doxytag: member="MQTTMessageParams::id" ref="a9faad31a60f5d4c26d0765832af8552e" args="" -->
75uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTMessageParams.html#a9faad31a60f5d4c26d0765832af8552e">id</a></td></tr>
76<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Message sequence identifier. Handled automatically by the MQTT client. <br/></td></tr>
77<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae0103a22ff8338af06553f3403b4b916"></a><!-- doxytag: member="MQTTMessageParams::pPayload" ref="ae0103a22ff8338af06553f3403b4b916" args="" -->
78void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTMessageParams.html#ae0103a22ff8338af06553f3403b4b916">pPayload</a></td></tr>
79<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to MQTT message payload (bytes). <br/></td></tr>
80<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a41d4499e625695a8682eb2f51c0fddf9"></a><!-- doxytag: member="MQTTMessageParams::PayloadLen" ref="a41d4499e625695a8682eb2f51c0fddf9" args="" -->
81uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTMessageParams.html#a41d4499e625695a8682eb2f51c0fddf9">PayloadLen</a></td></tr>
82<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Length of MQTT payload. <br/></td></tr>
83</table>
84<hr/><a name="_details"></a><h2>Detailed Description</h2>
85<p>Defines a type for properties of MQTT messages including topic, payload an QoS. </p>
86</div>
87<!--- window showing the filter options -->
88<div id="MSearchSelectWindow"
89 onmouseover="return searchBox.OnSearchSelectShow()"
90 onmouseout="return searchBox.OnSearchSelectHide()"
91 onkeydown="return searchBox.OnSearchSelectKey(event)">
92<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
93
94<!-- iframe showing the search results (closed by default) -->
95<div id="MSearchResultsWindow">
96<iframe src="" frameborder="0"
97 name="MSearchResults" id="MSearchResults">
98</iframe>
99</div>
100
101<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
102<a href="http://www.doxygen.org/index.html">
103<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
104</body>
105</html>
diff --git a/docs/html/structMQTTPublishParams.html b/docs/html/structMQTTPublishParams.html
new file mode 100644
index 0000000..09b4e55
--- /dev/null
+++ b/docs/html/structMQTTPublishParams.html
@@ -0,0 +1,100 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: MQTTPublishParams Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> </div>
53 <div class="headertitle">
54<h1>MQTTPublishParams Struct Reference</h1> </div>
55</div>
56<div class="contents">
57<!-- doxytag: class="MQTTPublishParams" -->
58<p>MQTT Publish Parameters.
59<a href="#_details">More...</a></p>
60
61<p><code>#include &lt;<a class="el" href="aws__iot__mqtt__interface_8h_source.html">aws_iot_mqtt_interface.h</a>&gt;</code></p>
62<!-- startSectionHeader --><div class="dynheader">
63Collaboration diagram for MQTTPublishParams:<!-- endSectionHeader --></div>
64<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
65<div class="center"><img src="structMQTTPublishParams__coll__graph.png" border="0" usemap="#MQTTPublishParams_coll__map" alt="Collaboration graph"/></div>
66<map name="MQTTPublishParams_coll__map" id="MQTTPublishParams_coll__map">
67</map>
68<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center><!-- endSectionContent --></div>
69<table class="memberdecls">
70<tr><td colspan="2"><h2><a name="pub-attribs"></a>
71Data Fields</h2></td></tr>
72<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad8b1bb06e8bd823de87b00b912d8b6e1"></a><!-- doxytag: member="MQTTPublishParams::pTopic" ref="ad8b1bb06e8bd823de87b00b912d8b6e1" args="" -->
73char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTPublishParams.html#ad8b1bb06e8bd823de87b00b912d8b6e1">pTopic</a></td></tr>
74<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to the string defining the desired publishing topic. <br/></td></tr>
75<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7ac4d0b9e84808a07e0036f9a0e4b369"></a><!-- doxytag: member="MQTTPublishParams::MessageParams" ref="a7ac4d0b9e84808a07e0036f9a0e4b369" args="" -->
76<a class="el" href="structMQTTMessageParams.html">MQTTMessageParams</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTPublishParams.html#a7ac4d0b9e84808a07e0036f9a0e4b369">MessageParams</a></td></tr>
77<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Parameters defining the message to be published. <br/></td></tr>
78</table>
79<hr/><a name="_details"></a><h2>Detailed Description</h2>
80<p>Defines a type for parameters supplied when publishing an MQTT message. </p>
81</div>
82<!--- window showing the filter options -->
83<div id="MSearchSelectWindow"
84 onmouseover="return searchBox.OnSearchSelectShow()"
85 onmouseout="return searchBox.OnSearchSelectHide()"
86 onkeydown="return searchBox.OnSearchSelectKey(event)">
87<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
88
89<!-- iframe showing the search results (closed by default) -->
90<div id="MSearchResultsWindow">
91<iframe src="" frameborder="0"
92 name="MSearchResults" id="MSearchResults">
93</iframe>
94</div>
95
96<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
97<a href="http://www.doxygen.org/index.html">
98<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
99</body>
100</html>
diff --git a/docs/html/structMQTTPublishParams__coll__graph.dot b/docs/html/structMQTTPublishParams__coll__graph.dot
new file mode 100644
index 0000000..fb2cb8b
--- /dev/null
+++ b/docs/html/structMQTTPublishParams__coll__graph.dot
@@ -0,0 +1,8 @@
1digraph G
2{
3 edge [fontname="FreeSans.ttf",fontsize="10",labelfontname="FreeSans.ttf",labelfontsize="10"];
4 node [fontname="FreeSans.ttf",fontsize="10",shape=record];
5 Node1 [label="MQTTPublishParams",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
6 Node2 -> Node1 [dir=back,color="darkorchid3",fontsize="10",style="dashed",label="MessageParams",fontname="FreeSans.ttf"];
7 Node2 [label="MQTTMessageParams",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$structMQTTMessageParams.html",tooltip="MQTT Message Parameters."];
8}
diff --git a/docs/html/structMQTTPublishParams__coll__graph.md5 b/docs/html/structMQTTPublishParams__coll__graph.md5
new file mode 100644
index 0000000..53a31f5
--- /dev/null
+++ b/docs/html/structMQTTPublishParams__coll__graph.md5
@@ -0,0 +1 @@
b2731d3b51295bb679e5fa0c84000479 \ No newline at end of file
diff --git a/docs/html/structMQTTSubscribeParams.html b/docs/html/structMQTTSubscribeParams.html
new file mode 100644
index 0000000..af45b81
--- /dev/null
+++ b/docs/html/structMQTTSubscribeParams.html
@@ -0,0 +1,96 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: MQTTSubscribeParams Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> </div>
53 <div class="headertitle">
54<h1>MQTTSubscribeParams Struct Reference</h1> </div>
55</div>
56<div class="contents">
57<!-- doxytag: class="MQTTSubscribeParams" -->
58<p>MQTT Subscription Parameters.
59<a href="#_details">More...</a></p>
60
61<p><code>#include &lt;<a class="el" href="aws__iot__mqtt__interface_8h_source.html">aws_iot_mqtt_interface.h</a>&gt;</code></p>
62<table class="memberdecls">
63<tr><td colspan="2"><h2><a name="pub-attribs"></a>
64Data Fields</h2></td></tr>
65<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8bbbc1a4a96d1270e11a58d3aa31521e"></a><!-- doxytag: member="MQTTSubscribeParams::pTopic" ref="a8bbbc1a4a96d1270e11a58d3aa31521e" args="" -->
66char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTSubscribeParams.html#a8bbbc1a4a96d1270e11a58d3aa31521e">pTopic</a></td></tr>
67<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to the string defining the desired subscription topic. <br/></td></tr>
68<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adcfb4d6691c3d68818b49b996addf4fa"></a><!-- doxytag: member="MQTTSubscribeParams::qos" ref="adcfb4d6691c3d68818b49b996addf4fa" args="" -->
69QoSLevel&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTSubscribeParams.html#adcfb4d6691c3d68818b49b996addf4fa">qos</a></td></tr>
70<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Quality of service of the subscription. <br/></td></tr>
71<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d21b3e72ac4530110cd43ccdc2245b1"></a><!-- doxytag: member="MQTTSubscribeParams::mHandler" ref="a5d21b3e72ac4530110cd43ccdc2245b1" args="" -->
72iot_message_handler&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTSubscribeParams.html#a5d21b3e72ac4530110cd43ccdc2245b1">mHandler</a></td></tr>
73<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback to be invoked upon receipt of a message on the subscribed topic. <br/></td></tr>
74</table>
75<hr/><a name="_details"></a><h2>Detailed Description</h2>
76<p>Defines the parameters needed when subscribing to an MQTT topic. </p>
77</div>
78<!--- window showing the filter options -->
79<div id="MSearchSelectWindow"
80 onmouseover="return searchBox.OnSearchSelectShow()"
81 onmouseout="return searchBox.OnSearchSelectHide()"
82 onkeydown="return searchBox.OnSearchSelectKey(event)">
83<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
84
85<!-- iframe showing the search results (closed by default) -->
86<div id="MSearchResultsWindow">
87<iframe src="" frameborder="0"
88 name="MSearchResults" id="MSearchResults">
89</iframe>
90</div>
91
92<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
93<a href="http://www.doxygen.org/index.html">
94<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
95</body>
96</html>
diff --git a/docs/html/structMQTTwillOptions.html b/docs/html/structMQTTwillOptions.html
new file mode 100644
index 0000000..b5a5469
--- /dev/null
+++ b/docs/html/structMQTTwillOptions.html
@@ -0,0 +1,100 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: MQTTwillOptions Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> </div>
53 <div class="headertitle">
54<h1>MQTTwillOptions Struct Reference</h1> </div>
55</div>
56<div class="contents">
57<!-- doxytag: class="MQTTwillOptions" -->
58<p>Last Will and Testament Definition.
59<a href="#_details">More...</a></p>
60
61<p><code>#include &lt;<a class="el" href="aws__iot__mqtt__interface_8h_source.html">aws_iot_mqtt_interface.h</a>&gt;</code></p>
62<table class="memberdecls">
63<tr><td colspan="2"><h2><a name="pub-attribs"></a>
64Data Fields</h2></td></tr>
65<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa27c5b47d2f848ac32cd2180d97dd8e3"></a><!-- doxytag: member="MQTTwillOptions::pTopicName" ref="aa27c5b47d2f848ac32cd2180d97dd8e3" args="" -->
66const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTwillOptions.html#aa27c5b47d2f848ac32cd2180d97dd8e3">pTopicName</a></td></tr>
67<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">LWT Topic. <br/></td></tr>
68<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3113cbbc7701ed62735a7fc0635e8d2f"></a><!-- doxytag: member="MQTTwillOptions::pMessage" ref="a3113cbbc7701ed62735a7fc0635e8d2f" args="" -->
69const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTwillOptions.html#a3113cbbc7701ed62735a7fc0635e8d2f">pMessage</a></td></tr>
70<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Message to be delivered as LWT. <br/></td></tr>
71<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5a056c3e21c3ba7b7825b601d4eb8ec4"></a><!-- doxytag: member="MQTTwillOptions::isRetained" ref="a5a056c3e21c3ba7b7825b601d4eb8ec4" args="" -->
72bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTwillOptions.html#a5a056c3e21c3ba7b7825b601d4eb8ec4">isRetained</a></td></tr>
73<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">NOT supported. <br/></td></tr>
74<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6c5ff6dad1a3487cd131bb6eaa990a3f"></a><!-- doxytag: member="MQTTwillOptions::qos" ref="a6c5ff6dad1a3487cd131bb6eaa990a3f" args="" -->
75QoSLevel&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTwillOptions.html#a6c5ff6dad1a3487cd131bb6eaa990a3f">qos</a></td></tr>
76<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">QoS of LWT message. <br/></td></tr>
77</table>
78<hr/><a name="_details"></a><h2>Detailed Description</h2>
79<p>Defining a type for LWT parameters. </p>
80<dl class="note"><dt><b>Note:</b></dt><dd>Retained messages are <b>NOT</b> supported by the AWS IoT Service at the time of this SDK release. </dd></dl>
81</div>
82<!--- window showing the filter options -->
83<div id="MSearchSelectWindow"
84 onmouseover="return searchBox.OnSearchSelectShow()"
85 onmouseout="return searchBox.OnSearchSelectHide()"
86 onkeydown="return searchBox.OnSearchSelectKey(event)">
87<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
88
89<!-- iframe showing the search results (closed by default) -->
90<div id="MSearchResultsWindow">
91<iframe src="" frameborder="0"
92 name="MSearchResults" id="MSearchResults">
93</iframe>
94</div>
95
96<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
97<a href="http://www.doxygen.org/index.html">
98<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
99</body>
100</html>
diff --git a/docs/html/structNetwork.html b/docs/html/structNetwork.html
new file mode 100644
index 0000000..a9796e4
--- /dev/null
+++ b/docs/html/structNetwork.html
@@ -0,0 +1,99 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: Network Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> </div>
53 <div class="headertitle">
54<h1>Network Struct Reference</h1> </div>
55</div>
56<div class="contents">
57<!-- doxytag: class="Network" -->
58<p><a class="el" href="structNetwork.html" title="Network Structure.">Network</a> Structure.
59<a href="#_details">More...</a></p>
60
61<p><code>#include &lt;<a class="el" href="network__interface_8h_source.html">network_interface.h</a>&gt;</code></p>
62<table class="memberdecls">
63<tr><td colspan="2"><h2><a name="pub-attribs"></a>
64Data Fields</h2></td></tr>
65<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad7b36ded416243b20d0d5924dba8385e"></a><!-- doxytag: member="Network::my_socket" ref="ad7b36ded416243b20d0d5924dba8385e" args="" -->
66int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structNetwork.html#ad7b36ded416243b20d0d5924dba8385e">my_socket</a></td></tr>
67<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Integer holding the socket file descriptor. <br/></td></tr>
68<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aabf2c7305c36a7858b471cef6d98de0e"></a><!-- doxytag: member="Network::mqttread" ref="aabf2c7305c36a7858b471cef6d98de0e" args=")(Network *, unsigned char *, int, int)" -->
69int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structNetwork.html#aabf2c7305c36a7858b471cef6d98de0e">mqttread</a> )(<a class="el" href="structNetwork.html">Network</a> *, unsigned char *, int, int)</td></tr>
70<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Function pointer pointing to the network function to read from the network. <br/></td></tr>
71<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a00ed168a988784ecb64c8a07da2e04bd"></a><!-- doxytag: member="Network::mqttwrite" ref="a00ed168a988784ecb64c8a07da2e04bd" args=")(Network *, unsigned char *, int, int)" -->
72int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structNetwork.html#a00ed168a988784ecb64c8a07da2e04bd">mqttwrite</a> )(<a class="el" href="structNetwork.html">Network</a> *, unsigned char *, int, int)</td></tr>
73<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Function pointer pointing to the network function to write to the network. <br/></td></tr>
74<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0f1dce0927b86b72bf1d5e33b609b385"></a><!-- doxytag: member="Network::disconnect" ref="a0f1dce0927b86b72bf1d5e33b609b385" args=")(Network *)" -->
75void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structNetwork.html#a0f1dce0927b86b72bf1d5e33b609b385">disconnect</a> )(<a class="el" href="structNetwork.html">Network</a> *)</td></tr>
76<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Function pointer pointing to the network function to disconnect from the network. <br/></td></tr>
77</table>
78<hr/><a name="_details"></a><h2>Detailed Description</h2>
79<p>Structure for defining a network connection. </p>
80</div>
81<!--- window showing the filter options -->
82<div id="MSearchSelectWindow"
83 onmouseover="return searchBox.OnSearchSelectShow()"
84 onmouseout="return searchBox.OnSearchSelectHide()"
85 onkeydown="return searchBox.OnSearchSelectKey(event)">
86<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
87
88<!-- iframe showing the search results (closed by default) -->
89<div id="MSearchResultsWindow">
90<iframe src="" frameborder="0"
91 name="MSearchResults" id="MSearchResults">
92</iframe>
93</div>
94
95<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
96<a href="http://www.doxygen.org/index.html">
97<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
98</body>
99</html>
diff --git a/docs/html/structShadowParameters__t.html b/docs/html/structShadowParameters__t.html
new file mode 100644
index 0000000..ed02eb6
--- /dev/null
+++ b/docs/html/structShadowParameters__t.html
@@ -0,0 +1,124 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: ShadowParameters_t Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> &#124;
53<a href="#related">Related Functions</a> </div>
54 <div class="headertitle">
55<h1>ShadowParameters_t Struct Reference</h1> </div>
56</div>
57<div class="contents">
58<!-- doxytag: class="ShadowParameters_t" -->
59<p>Shadow Connect parameters.
60<a href="#_details">More...</a></p>
61
62<p><code>#include &lt;<a class="el" href="aws__iot__shadow__interface_8h_source.html">aws_iot_shadow_interface.h</a>&gt;</code></p>
63<!-- startSectionHeader --><div class="dynheader">
64Collaboration diagram for ShadowParameters_t:<!-- endSectionHeader --></div>
65<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
66<div class="center"><img src="structShadowParameters__t__coll__graph.png" border="0" usemap="#ShadowParameters__t_coll__map" alt="Collaboration graph"/></div>
67<map name="ShadowParameters__t_coll__map" id="ShadowParameters__t_coll__map">
68</map>
69<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center><!-- endSectionContent --></div>
70<table class="memberdecls">
71<tr><td colspan="2"><h2><a name="pub-attribs"></a>
72Data Fields</h2></td></tr>
73<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adb78403e35dd900410d5d26ef0fa315d"></a><!-- doxytag: member="ShadowParameters_t::pMyThingName" ref="adb78403e35dd900410d5d26ef0fa315d" args="" -->
74char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structShadowParameters__t.html#adb78403e35dd900410d5d26ef0fa315d">pMyThingName</a></td></tr>
75<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Every device has a Thing Shadow and this is the placeholder for name. <br/></td></tr>
76<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a27619390335abf973719645b8f31a277"></a><!-- doxytag: member="ShadowParameters_t::pMqttClientId" ref="a27619390335abf973719645b8f31a277" args="" -->
77char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structShadowParameters__t.html#a27619390335abf973719645b8f31a277">pMqttClientId</a></td></tr>
78<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Currently the Shadow uses MQTT to connect and it is important to ensure we have unique client id. <br/></td></tr>
79<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abebf2ba2657ead7718385f2406730cc0"></a><!-- doxytag: member="ShadowParameters_t::pHost" ref="abebf2ba2657ead7718385f2406730cc0" args="" -->
80char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structShadowParameters__t.html#abebf2ba2657ead7718385f2406730cc0">pHost</a></td></tr>
81<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This will be unique to a customer and can be retrieved from the console. <br/></td></tr>
82<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3243eeb13c8bad2cf78dcd7003b1d665"></a><!-- doxytag: member="ShadowParameters_t::port" ref="a3243eeb13c8bad2cf78dcd7003b1d665" args="" -->
83int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structShadowParameters__t.html#a3243eeb13c8bad2cf78dcd7003b1d665">port</a></td></tr>
84<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">By default the port is 8883. <br/></td></tr>
85<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afa3bbe30735094046913d645b6d2ae50"></a><!-- doxytag: member="ShadowParameters_t::pRootCA" ref="afa3bbe30735094046913d645b6d2ae50" args="" -->
86char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structShadowParameters__t.html#afa3bbe30735094046913d645b6d2ae50">pRootCA</a></td></tr>
87<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Location with the Filename of the Root CA. <br/></td></tr>
88<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ba70adf7b2553a574d0c493815c3fde"></a><!-- doxytag: member="ShadowParameters_t::pClientCRT" ref="a9ba70adf7b2553a574d0c493815c3fde" args="" -->
89char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structShadowParameters__t.html#a9ba70adf7b2553a574d0c493815c3fde">pClientCRT</a></td></tr>
90<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Location of Device certs signed by AWS IoT service. <br/></td></tr>
91<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af0a34f1265930aec7023f625af80df7f"></a><!-- doxytag: member="ShadowParameters_t::pClientKey" ref="af0a34f1265930aec7023f625af80df7f" args="" -->
92char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structShadowParameters__t.html#af0a34f1265930aec7023f625af80df7f">pClientKey</a></td></tr>
93<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Location of Device private key. <br/></td></tr>
94<tr><td colspan="2"><h2><a name="related"></a>
95Related Functions</h2></td></tr>
96<tr><td colspan="2"><p>(Note that these are not member functions.) </p>
97<br/></td></tr>
98<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adc225bbde6004034d41899a4f4b13074"></a><!-- doxytag: member="ShadowParameters_t::ShadowParametersDefault" ref="adc225bbde6004034d41899a4f4b13074" args="" -->
99const <a class="el" href="structShadowParameters__t.html">ShadowParameters_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structShadowParameters__t.html#adc225bbde6004034d41899a4f4b13074">ShadowParametersDefault</a></td></tr>
100<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This is set to defaults from the configuration file The certs are set to NULL because they need the path to the file. <a class="el" href="shadow__sample_8c.html" title="A simple connected window example demonstrating the use of Thing Shadow.">shadow_sample.c</a> file demonstrates on how to get the relative path. <br/></td></tr>
101</table>
102<hr/><a name="_details"></a><h2>Detailed Description</h2>
103<p>As the Shadow SDK uses MQTT underneath, it could be connected and disconnected on events to save some battery. </p>
104<dl class="note"><dt><b>Note:</b></dt><dd>Always use the <code>ShadowParametersDefault</code> to initialize this struct </dd></dl>
105</div>
106<!--- window showing the filter options -->
107<div id="MSearchSelectWindow"
108 onmouseover="return searchBox.OnSearchSelectShow()"
109 onmouseout="return searchBox.OnSearchSelectHide()"
110 onkeydown="return searchBox.OnSearchSelectKey(event)">
111<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
112
113<!-- iframe showing the search results (closed by default) -->
114<div id="MSearchResultsWindow">
115<iframe src="" frameborder="0"
116 name="MSearchResults" id="MSearchResults">
117</iframe>
118</div>
119
120<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
121<a href="http://www.doxygen.org/index.html">
122<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
123</body>
124</html>
diff --git a/docs/html/structShadowParameters__t__coll__graph.dot b/docs/html/structShadowParameters__t__coll__graph.dot
new file mode 100644
index 0000000..671d755
--- /dev/null
+++ b/docs/html/structShadowParameters__t__coll__graph.dot
@@ -0,0 +1,7 @@
1digraph G
2{
3 edge [fontname="FreeSans.ttf",fontsize="10",labelfontname="FreeSans.ttf",labelfontsize="10"];
4 node [fontname="FreeSans.ttf",fontsize="10",shape=record];
5 Node1 [label="ShadowParameters_t",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
6 Node1 -> Node1 [dir=back,color="darkorchid3",fontsize="10",style="dashed",label="ShadowParametersDefault",fontname="FreeSans.ttf"];
7}
diff --git a/docs/html/structShadowParameters__t__coll__graph.md5 b/docs/html/structShadowParameters__t__coll__graph.md5
new file mode 100644
index 0000000..cf15738
--- /dev/null
+++ b/docs/html/structShadowParameters__t__coll__graph.md5
@@ -0,0 +1 @@
ab5ef58eeaeeab0087ddcabc3cfe0499 \ No newline at end of file
diff --git a/docs/html/structSubscriptionRecord__t.html b/docs/html/structSubscriptionRecord__t.html
new file mode 100644
index 0000000..07fab61
--- /dev/null
+++ b/docs/html/structSubscriptionRecord__t.html
@@ -0,0 +1,88 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: SubscriptionRecord_t Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> </div>
53 <div class="headertitle">
54<h1>SubscriptionRecord_t Struct Reference</h1> </div>
55</div>
56<div class="contents">
57<!-- doxytag: class="SubscriptionRecord_t" --><table class="memberdecls">
58<tr><td colspan="2"><h2><a name="pub-attribs"></a>
59Data Fields</h2></td></tr>
60<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a85ddc32db14edab4e1282f45f6da699e"></a><!-- doxytag: member="SubscriptionRecord_t::Topic" ref="a85ddc32db14edab4e1282f45f6da699e" args="[MAX_SHADOW_TOPIC_LENGTH_BYTES]" -->
61char&#160;</td><td class="memItemRight" valign="bottom"><b>Topic</b> [MAX_SHADOW_TOPIC_LENGTH_BYTES]</td></tr>
62<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa2e038f087245a46a1796c31a6a95ca0"></a><!-- doxytag: member="SubscriptionRecord_t::count" ref="aa2e038f087245a46a1796c31a6a95ca0" args="" -->
63uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>count</b></td></tr>
64<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac9b8b8df61ea615369ec0cee178e85ee"></a><!-- doxytag: member="SubscriptionRecord_t::isFree" ref="ac9b8b8df61ea615369ec0cee178e85ee" args="" -->
65bool&#160;</td><td class="memItemRight" valign="bottom"><b>isFree</b></td></tr>
66<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afb0007994d4e93a50bebf147172ceed0"></a><!-- doxytag: member="SubscriptionRecord_t::isSticky" ref="afb0007994d4e93a50bebf147172ceed0" args="" -->
67bool&#160;</td><td class="memItemRight" valign="bottom"><b>isSticky</b></td></tr>
68</table>
69</div>
70<!--- window showing the filter options -->
71<div id="MSearchSelectWindow"
72 onmouseover="return searchBox.OnSearchSelectShow()"
73 onmouseout="return searchBox.OnSearchSelectHide()"
74 onkeydown="return searchBox.OnSearchSelectKey(event)">
75<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
76
77<!-- iframe showing the search results (closed by default) -->
78<div id="MSearchResultsWindow">
79<iframe src="" frameborder="0"
80 name="MSearchResults" id="MSearchResults">
81</iframe>
82</div>
83
84<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
85<a href="http://www.doxygen.org/index.html">
86<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
87</body>
88</html>
diff --git a/docs/html/structTLSConnectParams.html b/docs/html/structTLSConnectParams.html
new file mode 100644
index 0000000..64059b7
--- /dev/null
+++ b/docs/html/structTLSConnectParams.html
@@ -0,0 +1,108 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: TLSConnectParams Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> </div>
53 <div class="headertitle">
54<h1>TLSConnectParams Struct Reference</h1> </div>
55</div>
56<div class="contents">
57<!-- doxytag: class="TLSConnectParams" -->
58<p>TLS Connection Parameters.
59<a href="#_details">More...</a></p>
60
61<p><code>#include &lt;<a class="el" href="network__interface_8h_source.html">network_interface.h</a>&gt;</code></p>
62<table class="memberdecls">
63<tr><td colspan="2"><h2><a name="pub-attribs"></a>
64Data Fields</h2></td></tr>
65<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a62e797f55d038c78739a2af11d03b6ff"></a><!-- doxytag: member="TLSConnectParams::pRootCALocation" ref="a62e797f55d038c78739a2af11d03b6ff" args="" -->
66char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structTLSConnectParams.html#a62e797f55d038c78739a2af11d03b6ff">pRootCALocation</a></td></tr>
67<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to string containing the filename (including path) of the root CA file. <br/></td></tr>
68<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa8a37f66a9473f554b92f0944e1baa3e"></a><!-- doxytag: member="TLSConnectParams::pDeviceCertLocation" ref="aa8a37f66a9473f554b92f0944e1baa3e" args="" -->
69char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structTLSConnectParams.html#aa8a37f66a9473f554b92f0944e1baa3e">pDeviceCertLocation</a></td></tr>
70<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to string containing the filename (including path) of the device certificate. <br/></td></tr>
71<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaca0411311eb106ca6c48bd788de9fdf"></a><!-- doxytag: member="TLSConnectParams::pDevicePrivateKeyLocation" ref="aaca0411311eb106ca6c48bd788de9fdf" args="" -->
72char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structTLSConnectParams.html#aaca0411311eb106ca6c48bd788de9fdf">pDevicePrivateKeyLocation</a></td></tr>
73<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to string containing the filename (including path) of the device private key file. <br/></td></tr>
74<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4deae89cd9ba3f3b2e75c27e1b80cdc0"></a><!-- doxytag: member="TLSConnectParams::pDestinationURL" ref="a4deae89cd9ba3f3b2e75c27e1b80cdc0" args="" -->
75char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structTLSConnectParams.html#a4deae89cd9ba3f3b2e75c27e1b80cdc0">pDestinationURL</a></td></tr>
76<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to string containing the endpoint of the MQTT service. <br/></td></tr>
77<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a98310c27d56c9856270e0c7ba02dde36"></a><!-- doxytag: member="TLSConnectParams::DestinationPort" ref="a98310c27d56c9856270e0c7ba02dde36" args="" -->
78int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structTLSConnectParams.html#a98310c27d56c9856270e0c7ba02dde36">DestinationPort</a></td></tr>
79<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Integer defining the connection port of the MQTT service. <br/></td></tr>
80<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a60800f6a6a6bc138e5b0a3e016d0be8f"></a><!-- doxytag: member="TLSConnectParams::timeout_ms" ref="a60800f6a6a6bc138e5b0a3e016d0be8f" args="" -->
81unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structTLSConnectParams.html#a60800f6a6a6bc138e5b0a3e016d0be8f">timeout_ms</a></td></tr>
82<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Unsigned integer defining the TLS handshake timeout value in milliseconds. <br/></td></tr>
83<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad81e67d8b722a28af4abdbeb89aa58e7"></a><!-- doxytag: member="TLSConnectParams::ServerVerificationFlag" ref="ad81e67d8b722a28af4abdbeb89aa58e7" args="" -->
84unsigned char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structTLSConnectParams.html#ad81e67d8b722a28af4abdbeb89aa58e7">ServerVerificationFlag</a></td></tr>
85<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Boolean. True = perform server certificate hostname validation. False = skip validation <b>NOT</b> recommended. <br/></td></tr>
86</table>
87<hr/><a name="_details"></a><h2>Detailed Description</h2>
88<p>Defines a type containing TLS specific parameters to be passed down to the TLS networking layer to create a TLS secured socket. </p>
89</div>
90<!--- window showing the filter options -->
91<div id="MSearchSelectWindow"
92 onmouseover="return searchBox.OnSearchSelectShow()"
93 onmouseout="return searchBox.OnSearchSelectHide()"
94 onkeydown="return searchBox.OnSearchSelectKey(event)">
95<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
96
97<!-- iframe showing the search results (closed by default) -->
98<div id="MSearchResultsWindow">
99<iframe src="" frameborder="0"
100 name="MSearchResults" id="MSearchResults">
101</iframe>
102</div>
103
104<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
105<a href="http://www.doxygen.org/index.html">
106<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
107</body>
108</html>
diff --git a/docs/html/structTimer.html b/docs/html/structTimer.html
new file mode 100644
index 0000000..18f33db
--- /dev/null
+++ b/docs/html/structTimer.html
@@ -0,0 +1,82 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: Timer Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> </div>
53 <div class="headertitle">
54<h1>Timer Struct Reference</h1> </div>
55</div>
56<div class="contents">
57<!-- doxytag: class="Timer" --><table class="memberdecls">
58<tr><td colspan="2"><h2><a name="pub-attribs"></a>
59Data Fields</h2></td></tr>
60<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0ff9ead68f4291dd778bc34e9c46a683"></a><!-- doxytag: member="Timer::end_time" ref="a0ff9ead68f4291dd778bc34e9c46a683" args="" -->
61struct timeval&#160;</td><td class="memItemRight" valign="bottom"><b>end_time</b></td></tr>
62</table>
63</div>
64<!--- window showing the filter options -->
65<div id="MSearchSelectWindow"
66 onmouseover="return searchBox.OnSearchSelectShow()"
67 onmouseout="return searchBox.OnSearchSelectHide()"
68 onkeydown="return searchBox.OnSearchSelectKey(event)">
69<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
70
71<!-- iframe showing the search results (closed by default) -->
72<div id="MSearchResultsWindow">
73<iframe src="" frameborder="0"
74 name="MSearchResults" id="MSearchResults">
75</iframe>
76</div>
77
78<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
79<a href="http://www.doxygen.org/index.html">
80<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
81</body>
82</html>
diff --git a/docs/html/structToBeReceivedAckRecord__t.html b/docs/html/structToBeReceivedAckRecord__t.html
new file mode 100644
index 0000000..8dcb458
--- /dev/null
+++ b/docs/html/structToBeReceivedAckRecord__t.html
@@ -0,0 +1,101 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: ToBeReceivedAckRecord_t Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> </div>
53 <div class="headertitle">
54<h1>ToBeReceivedAckRecord_t Struct Reference</h1> </div>
55</div>
56<div class="contents">
57<!-- doxytag: class="ToBeReceivedAckRecord_t" --><!-- startSectionHeader --><div class="dynheader">
58Collaboration diagram for ToBeReceivedAckRecord_t:<!-- endSectionHeader --></div>
59<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
60<div class="center"><img src="structToBeReceivedAckRecord__t__coll__graph.png" border="0" usemap="#ToBeReceivedAckRecord__t_coll__map" alt="Collaboration graph"/></div>
61<map name="ToBeReceivedAckRecord__t_coll__map" id="ToBeReceivedAckRecord__t_coll__map">
62</map>
63<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center><!-- endSectionContent --></div>
64<table class="memberdecls">
65<tr><td colspan="2"><h2><a name="pub-attribs"></a>
66Data Fields</h2></td></tr>
67<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a645a7e7facc1fc4f27089791949c0e78"></a><!-- doxytag: member="ToBeReceivedAckRecord_t::clientTokenID" ref="a645a7e7facc1fc4f27089791949c0e78" args="[MAX_SIZE_CLIENT_ID_WITH_SEQUENCE]" -->
68char&#160;</td><td class="memItemRight" valign="bottom"><b>clientTokenID</b> [MAX_SIZE_CLIENT_ID_WITH_SEQUENCE]</td></tr>
69<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4ba87d1f9ce13eaea97d796519f40cb7"></a><!-- doxytag: member="ToBeReceivedAckRecord_t::thingName" ref="a4ba87d1f9ce13eaea97d796519f40cb7" args="[MAX_SIZE_OF_THINGNAME]" -->
70char&#160;</td><td class="memItemRight" valign="bottom"><b>thingName</b> [MAX_SIZE_OF_THINGNAME]</td></tr>
71<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1f09c400a10f61d6bce26fa8aaab1175"></a><!-- doxytag: member="ToBeReceivedAckRecord_t::action" ref="a1f09c400a10f61d6bce26fa8aaab1175" args="" -->
72<a class="el" href="aws__iot__shadow__interface_8h.html#a1fc9e025434023d44d33737f8b7c2a8c">ShadowActions_t</a>&#160;</td><td class="memItemRight" valign="bottom"><b>action</b></td></tr>
73<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae867b03056e0a9903977d93e67b75827"></a><!-- doxytag: member="ToBeReceivedAckRecord_t::callback" ref="ae867b03056e0a9903977d93e67b75827" args="" -->
74<a class="el" href="aws__iot__shadow__interface_8h.html#a3aa42acf96d7ca3039a196c94ca57445">fpActionCallback_t</a>&#160;</td><td class="memItemRight" valign="bottom"><b>callback</b></td></tr>
75<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afe8fb4f8c032cedd7dc0bc376b423975"></a><!-- doxytag: member="ToBeReceivedAckRecord_t::pCallbackContext" ref="afe8fb4f8c032cedd7dc0bc376b423975" args="" -->
76void *&#160;</td><td class="memItemRight" valign="bottom"><b>pCallbackContext</b></td></tr>
77<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a20c6123280a84368e3e2aa81a9b3b5bd"></a><!-- doxytag: member="ToBeReceivedAckRecord_t::isFree" ref="a20c6123280a84368e3e2aa81a9b3b5bd" args="" -->
78bool&#160;</td><td class="memItemRight" valign="bottom"><b>isFree</b></td></tr>
79<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a95395ced9d6203fdc9ae20251b783b18"></a><!-- doxytag: member="ToBeReceivedAckRecord_t::timer" ref="a95395ced9d6203fdc9ae20251b783b18" args="" -->
80<a class="el" href="structTimer.html">Timer</a>&#160;</td><td class="memItemRight" valign="bottom"><b>timer</b></td></tr>
81</table>
82</div>
83<!--- window showing the filter options -->
84<div id="MSearchSelectWindow"
85 onmouseover="return searchBox.OnSearchSelectShow()"
86 onmouseout="return searchBox.OnSearchSelectHide()"
87 onkeydown="return searchBox.OnSearchSelectKey(event)">
88<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
89
90<!-- iframe showing the search results (closed by default) -->
91<div id="MSearchResultsWindow">
92<iframe src="" frameborder="0"
93 name="MSearchResults" id="MSearchResults">
94</iframe>
95</div>
96
97<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
98<a href="http://www.doxygen.org/index.html">
99<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
100</body>
101</html>
diff --git a/docs/html/structToBeReceivedAckRecord__t__coll__graph.dot b/docs/html/structToBeReceivedAckRecord__t__coll__graph.dot
new file mode 100644
index 0000000..58f7b74
--- /dev/null
+++ b/docs/html/structToBeReceivedAckRecord__t__coll__graph.dot
@@ -0,0 +1,8 @@
1digraph G
2{
3 edge [fontname="FreeSans.ttf",fontsize="10",labelfontname="FreeSans.ttf",labelfontsize="10"];
4 node [fontname="FreeSans.ttf",fontsize="10",shape=record];
5 Node1 [label="ToBeReceivedAckRecord_t",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
6 Node2 -> Node1 [dir=back,color="darkorchid3",fontsize="10",style="dashed",label="timer",fontname="FreeSans.ttf"];
7 Node2 [label="Timer",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$structTimer.html"];
8}
diff --git a/docs/html/structToBeReceivedAckRecord__t__coll__graph.md5 b/docs/html/structToBeReceivedAckRecord__t__coll__graph.md5
new file mode 100644
index 0000000..77e53fb
--- /dev/null
+++ b/docs/html/structToBeReceivedAckRecord__t__coll__graph.md5
@@ -0,0 +1 @@
cf0e60355cc9a6355da929793fc45bd2 \ No newline at end of file
diff --git a/docs/html/structjsmn__parser.html b/docs/html/structjsmn__parser.html
new file mode 100644
index 0000000..7917bfd
--- /dev/null
+++ b/docs/html/structjsmn__parser.html
@@ -0,0 +1,90 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: jsmn_parser Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> </div>
53 <div class="headertitle">
54<h1>jsmn_parser Struct Reference</h1> </div>
55</div>
56<div class="contents">
57<!-- doxytag: class="jsmn_parser" -->
58<p><code>#include &lt;<a class="el" href="jsmn_8h_source.html">jsmn.h</a>&gt;</code></p>
59<table class="memberdecls">
60<tr><td colspan="2"><h2><a name="pub-attribs"></a>
61Data Fields</h2></td></tr>
62<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3d0d6e48d3d5b24262f9e0c2241dc456"></a><!-- doxytag: member="jsmn_parser::pos" ref="a3d0d6e48d3d5b24262f9e0c2241dc456" args="" -->
63unsigned int&#160;</td><td class="memItemRight" valign="bottom"><b>pos</b></td></tr>
64<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af640efd7d154218124a964b65f114bff"></a><!-- doxytag: member="jsmn_parser::toknext" ref="af640efd7d154218124a964b65f114bff" args="" -->
65unsigned int&#160;</td><td class="memItemRight" valign="bottom"><b>toknext</b></td></tr>
66<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af11fcec48d9f1298909777a12f1d1e39"></a><!-- doxytag: member="jsmn_parser::toksuper" ref="af11fcec48d9f1298909777a12f1d1e39" args="" -->
67int&#160;</td><td class="memItemRight" valign="bottom"><b>toksuper</b></td></tr>
68</table>
69<hr/><a name="_details"></a><h2>Detailed Description</h2>
70<p>JSON parser. Contains an array of token blocks available. Also stores the string being parsed now and current position in that string </p>
71</div>
72<!--- window showing the filter options -->
73<div id="MSearchSelectWindow"
74 onmouseover="return searchBox.OnSearchSelectShow()"
75 onmouseout="return searchBox.OnSearchSelectHide()"
76 onkeydown="return searchBox.OnSearchSelectKey(event)">
77<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
78
79<!-- iframe showing the search results (closed by default) -->
80<div id="MSearchResultsWindow">
81<iframe src="" frameborder="0"
82 name="MSearchResults" id="MSearchResults">
83</iframe>
84</div>
85
86<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
87<a href="http://www.doxygen.org/index.html">
88<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
89</body>
90</html>
diff --git a/docs/html/structjsmntok__t.html b/docs/html/structjsmntok__t.html
new file mode 100644
index 0000000..c259554
--- /dev/null
+++ b/docs/html/structjsmntok__t.html
@@ -0,0 +1,100 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: jsmntok_t Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> </div>
53 <div class="headertitle">
54<h1>jsmntok_t Struct Reference</h1> </div>
55</div>
56<div class="contents">
57<!-- doxytag: class="jsmntok_t" -->
58<p><code>#include &lt;<a class="el" href="jsmn_8h_source.html">jsmn.h</a>&gt;</code></p>
59<table class="memberdecls">
60<tr><td colspan="2"><h2><a name="pub-attribs"></a>
61Data Fields</h2></td></tr>
62<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac03dbd6b83cbcd979eb64702d5b9943e"></a><!-- doxytag: member="jsmntok_t::type" ref="ac03dbd6b83cbcd979eb64702d5b9943e" args="" -->
63<a class="el" href="jsmn_8h.html#a065320719769f9dc1fbe30094e52802f">jsmntype_t</a>&#160;</td><td class="memItemRight" valign="bottom"><b>type</b></td></tr>
64<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0a8f55d0095f268ce8e224fe1234acd0"></a><!-- doxytag: member="jsmntok_t::start" ref="a0a8f55d0095f268ce8e224fe1234acd0" args="" -->
65int&#160;</td><td class="memItemRight" valign="bottom"><b>start</b></td></tr>
66<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab49e0369f39e9b6174141e7f5bde5996"></a><!-- doxytag: member="jsmntok_t::end" ref="ab49e0369f39e9b6174141e7f5bde5996" args="" -->
67int&#160;</td><td class="memItemRight" valign="bottom"><b>end</b></td></tr>
68<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8ac3694b7335456c8e602197778883db"></a><!-- doxytag: member="jsmntok_t::size" ref="a8ac3694b7335456c8e602197778883db" args="" -->
69int&#160;</td><td class="memItemRight" valign="bottom"><b>size</b></td></tr>
70</table>
71<hr/><a name="_details"></a><h2>Detailed Description</h2>
72<p>JSON token description. </p>
73<dl><dt><b>Parameters:</b></dt><dd>
74 <table class="params">
75 <tr><td class="paramname">type</td><td>type (object, array, string etc.) </td></tr>
76 <tr><td class="paramname">start</td><td>start position in JSON data string </td></tr>
77 <tr><td class="paramname">end</td><td>end position in JSON data string </td></tr>
78 </table>
79 </dd>
80</dl>
81</div>
82<!--- window showing the filter options -->
83<div id="MSearchSelectWindow"
84 onmouseover="return searchBox.OnSearchSelectShow()"
85 onmouseout="return searchBox.OnSearchSelectHide()"
86 onkeydown="return searchBox.OnSearchSelectKey(event)">
87<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
88
89<!-- iframe showing the search results (closed by default) -->
90<div id="MSearchResultsWindow">
91<iframe src="" frameborder="0"
92 name="MSearchResults" id="MSearchResults">
93</iframe>
94</div>
95
96<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
97<a href="http://www.doxygen.org/index.html">
98<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
99</body>
100</html>
diff --git a/docs/html/structjsonStruct.html b/docs/html/structjsonStruct.html
new file mode 100644
index 0000000..3c77393
--- /dev/null
+++ b/docs/html/structjsonStruct.html
@@ -0,0 +1,88 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: jsonStruct Struct Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
45 <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
46 <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
47 </ul>
48 </div>
49</div>
50<div class="header">
51 <div class="summary">
52<a href="#pub-attribs">Data Fields</a> </div>
53 <div class="headertitle">
54<h1>jsonStruct Struct Reference</h1> </div>
55</div>
56<div class="contents">
57<!-- doxytag: class="jsonStruct" --><table class="memberdecls">
58<tr><td colspan="2"><h2><a name="pub-attribs"></a>
59Data Fields</h2></td></tr>
60<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afddc7c4ad8ec88312dc4c6cb9892b241"></a><!-- doxytag: member="jsonStruct::pKey" ref="afddc7c4ad8ec88312dc4c6cb9892b241" args="" -->
61const char *&#160;</td><td class="memItemRight" valign="bottom"><b>pKey</b></td></tr>
62<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aae40f05c7dc64eaa5d6b81c02be6ea06"></a><!-- doxytag: member="jsonStruct::pData" ref="aae40f05c7dc64eaa5d6b81c02be6ea06" args="" -->
63void *&#160;</td><td class="memItemRight" valign="bottom"><b>pData</b></td></tr>
64<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adc471355e69ab39dbe2dbd785d7a2b68"></a><!-- doxytag: member="jsonStruct::type" ref="adc471355e69ab39dbe2dbd785d7a2b68" args="" -->
65JsonPrimitiveType&#160;</td><td class="memItemRight" valign="bottom"><b>type</b></td></tr>
66<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac5b597e3581cbde0147ee8b29547fcea"></a><!-- doxytag: member="jsonStruct::cb" ref="ac5b597e3581cbde0147ee8b29547fcea" args="" -->
67jsonStructCallback_t&#160;</td><td class="memItemRight" valign="bottom"><b>cb</b></td></tr>
68</table>
69</div>
70<!--- window showing the filter options -->
71<div id="MSearchSelectWindow"
72 onmouseover="return searchBox.OnSearchSelectShow()"
73 onmouseout="return searchBox.OnSearchSelectHide()"
74 onkeydown="return searchBox.OnSearchSelectKey(event)">
75<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
76
77<!-- iframe showing the search results (closed by default) -->
78<div id="MSearchResultsWindow">
79<iframe src="" frameborder="0"
80 name="MSearchResults" id="MSearchResults">
81</iframe>
82</div>
83
84<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
85<a href="http://www.doxygen.org/index.html">
86<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
87</body>
88</html>
diff --git a/docs/html/tab_a.png b/docs/html/tab_a.png
new file mode 100644
index 0000000..2d99ef2
--- /dev/null
+++ b/docs/html/tab_a.png
Binary files differ
diff --git a/docs/html/tab_b.png b/docs/html/tab_b.png
new file mode 100644
index 0000000..b2c3d2b
--- /dev/null
+++ b/docs/html/tab_b.png
Binary files differ
diff --git a/docs/html/tab_h.png b/docs/html/tab_h.png
new file mode 100644
index 0000000..c11f48f
--- /dev/null
+++ b/docs/html/tab_h.png
Binary files differ
diff --git a/docs/html/tab_s.png b/docs/html/tab_s.png
new file mode 100644
index 0000000..978943a
--- /dev/null
+++ b/docs/html/tab_s.png
Binary files differ
diff --git a/docs/html/tabs.css b/docs/html/tabs.css
new file mode 100644
index 0000000..2192056
--- /dev/null
+++ b/docs/html/tabs.css
@@ -0,0 +1,59 @@
1.tabs, .tabs2, .tabs3 {
2 background-image: url('tab_b.png');
3 width: 100%;
4 z-index: 101;
5 font-size: 13px;
6}
7
8.tabs2 {
9 font-size: 10px;
10}
11.tabs3 {
12 font-size: 9px;
13}
14
15.tablist {
16 margin: 0;
17 padding: 0;
18 display: table;
19}
20
21.tablist li {
22 float: left;
23 display: table-cell;
24 background-image: url('tab_b.png');
25 line-height: 36px;
26 list-style: none;
27}
28
29.tablist a {
30 display: block;
31 padding: 0 20px;
32 font-weight: bold;
33 background-image:url('tab_s.png');
34 background-repeat:no-repeat;
35 background-position:right;
36 color: #283A5D;
37 text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
38 text-decoration: none;
39 outline: none;
40}
41
42.tabs3 .tablist a {
43 padding: 0 10px;
44}
45
46.tablist a:hover {
47 background-image: url('tab_h.png');
48 background-repeat:repeat-x;
49 color: #fff;
50 text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
51 text-decoration: none;
52}
53
54.tablist li.current a {
55 background-image: url('tab_a.png');
56 background-repeat:repeat-x;
57 color: #fff;
58 text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
59}
diff --git a/docs/html/timer_8c.html b/docs/html/timer_8c.html
new file mode 100644
index 0000000..9d3dbd9
--- /dev/null
+++ b/docs/html/timer_8c.html
@@ -0,0 +1,248 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: timer.c File Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48</div>
49<div class="header">
50 <div class="summary">
51<a href="#func-members">Functions</a> </div>
52 <div class="headertitle">
53<h1>timer.c File Reference</h1> </div>
54</div>
55<div class="contents">
56
57<p>Linux implementation of the timer interface.
58<a href="#_details">More...</a></p>
59<code>#include &lt;stddef.h&gt;</code><br/>
60<code>#include &lt;sys/types.h&gt;</code><br/>
61<code>#include &quot;timer_linux.h&quot;</code><br/>
62<!-- startSectionHeader --><div class="dynheader">
63Include dependency graph for timer.c:<!-- endSectionHeader --></div>
64<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
65<div class="center"><img src="timer_8c__incl.png" border="0" usemap="#timer_8c" alt=""/></div>
66<map name="timer_8c" id="timer_8c">
67</map>
68<!-- endSectionContent --></div>
69<table class="memberdecls">
70<tr><td colspan="2"><h2><a name="func-members"></a>
71Functions</h2></td></tr>
72<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#a9e1050bfa919aca1978cffb051cc7ee9">expired</a> (<a class="el" href="structTimer.html">Timer</a> *timer)</td></tr>
73<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if a timer is expired. <a href="#a9e1050bfa919aca1978cffb051cc7ee9"></a><br/></td></tr>
74<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#a75af8f6d4820a905276fae6bac80212a">countdown_ms</a> (<a class="el" href="structTimer.html">Timer</a> *timer, unsigned int timeout)</td></tr>
75<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a timer (milliseconds) <a href="#a75af8f6d4820a905276fae6bac80212a"></a><br/></td></tr>
76<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#ab9b6a721d03b085959a0f66907822629">countdown</a> (<a class="el" href="structTimer.html">Timer</a> *timer, unsigned int timeout)</td></tr>
77<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a timer (seconds) <a href="#ab9b6a721d03b085959a0f66907822629"></a><br/></td></tr>
78<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#a9057a416766ddfe329756bc83cf969d0">left_ms</a> (<a class="el" href="structTimer.html">Timer</a> *timer)</td></tr>
79<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check the time remaining on a give timer. <a href="#a9057a416766ddfe329756bc83cf969d0"></a><br/></td></tr>
80<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#a0ff0436566be2657b87044a108a1f4bf">InitTimer</a> (<a class="el" href="structTimer.html">Timer</a> *timer)</td></tr>
81<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a timer. <a href="#a0ff0436566be2657b87044a108a1f4bf"></a><br/></td></tr>
82</table>
83<hr/><a name="_details"></a><h2>Detailed Description</h2>
84<hr/><h2>Function Documentation</h2>
85<a class="anchor" id="ab9b6a721d03b085959a0f66907822629"></a><!-- doxytag: member="timer.c::countdown" ref="ab9b6a721d03b085959a0f66907822629" args="(Timer *timer, unsigned int timeout)" -->
86<div class="memitem">
87<div class="memproto">
88 <table class="memname">
89 <tr>
90 <td class="memname">void countdown </td>
91 <td>(</td>
92 <td class="paramtype"><a class="el" href="structTimer.html">Timer</a> *&#160;</td>
93 <td class="paramname">, </td>
94 </tr>
95 <tr>
96 <td class="paramkey"></td>
97 <td></td>
98 <td class="paramtype">unsigned&#160;</td>
99 <td class="paramname"> <em>int</em>&#160;</td>
100 </tr>
101 <tr>
102 <td></td>
103 <td>)</td>
104 <td></td><td></td>
105 </tr>
106 </table>
107</div>
108<div class="memdoc">
109<p>Sets the timer to expire in a specified number of seconds.</p>
110<dl><dt><b>Parameters:</b></dt><dd>
111 <table class="params">
112 <tr><td class="paramname"><a class="el" href="structTimer.html">Timer</a></td><td>- pointer to the timer to be set to expire in seconds </td></tr>
113 <tr><td class="paramname">unsigned</td><td>int - set the timer to expire in this number of seconds </td></tr>
114 </table>
115 </dd>
116</dl>
117
118</div>
119</div>
120<a class="anchor" id="a75af8f6d4820a905276fae6bac80212a"></a><!-- doxytag: member="timer.c::countdown_ms" ref="a75af8f6d4820a905276fae6bac80212a" args="(Timer *timer, unsigned int timeout)" -->
121<div class="memitem">
122<div class="memproto">
123 <table class="memname">
124 <tr>
125 <td class="memname">void countdown_ms </td>
126 <td>(</td>
127 <td class="paramtype"><a class="el" href="structTimer.html">Timer</a> *&#160;</td>
128 <td class="paramname">, </td>
129 </tr>
130 <tr>
131 <td class="paramkey"></td>
132 <td></td>
133 <td class="paramtype">unsigned&#160;</td>
134 <td class="paramname"> <em>int</em>&#160;</td>
135 </tr>
136 <tr>
137 <td></td>
138 <td>)</td>
139 <td></td><td></td>
140 </tr>
141 </table>
142</div>
143<div class="memdoc">
144<p>Sets the timer to expire in a specified number of milliseconds.</p>
145<dl><dt><b>Parameters:</b></dt><dd>
146 <table class="params">
147 <tr><td class="paramname"><a class="el" href="structTimer.html">Timer</a></td><td>- pointer to the timer to be set to expire in milliseconds </td></tr>
148 <tr><td class="paramname">unsigned</td><td>int - set the timer to expire in this number of milliseconds </td></tr>
149 </table>
150 </dd>
151</dl>
152
153</div>
154</div>
155<a class="anchor" id="a9e1050bfa919aca1978cffb051cc7ee9"></a><!-- doxytag: member="timer.c::expired" ref="a9e1050bfa919aca1978cffb051cc7ee9" args="(Timer *timer)" -->
156<div class="memitem">
157<div class="memproto">
158 <table class="memname">
159 <tr>
160 <td class="memname">char expired </td>
161 <td>(</td>
162 <td class="paramtype"><a class="el" href="structTimer.html">Timer</a> *&#160;</td>
163 <td class="paramname">&#160;)</td>
164 <td></td>
165 </tr>
166 </table>
167</div>
168<div class="memdoc">
169<p>Call this function passing in a timer to check if that timer has expired.</p>
170<dl><dt><b>Parameters:</b></dt><dd>
171 <table class="params">
172 <tr><td class="paramname"><a class="el" href="structTimer.html">Timer</a></td><td>- pointer to the timer to be checked for expiration </td></tr>
173 </table>
174 </dd>
175</dl>
176<dl class="return"><dt><b>Returns:</b></dt><dd>character - 1 = timer expired, 0 = timer not expired </dd></dl>
177
178</div>
179</div>
180<a class="anchor" id="a0ff0436566be2657b87044a108a1f4bf"></a><!-- doxytag: member="timer.c::InitTimer" ref="a0ff0436566be2657b87044a108a1f4bf" args="(Timer *timer)" -->
181<div class="memitem">
182<div class="memproto">
183 <table class="memname">
184 <tr>
185 <td class="memname">void InitTimer </td>
186 <td>(</td>
187 <td class="paramtype"><a class="el" href="structTimer.html">Timer</a> *&#160;</td>
188 <td class="paramname">&#160;)</td>
189 <td></td>
190 </tr>
191 </table>
192</div>
193<div class="memdoc">
194<p>Performs any initialization required to the timer passed in.</p>
195<dl><dt><b>Parameters:</b></dt><dd>
196 <table class="params">
197 <tr><td class="paramname"><a class="el" href="structTimer.html">Timer</a></td><td>- pointer to the timer to be initialized </td></tr>
198 </table>
199 </dd>
200</dl>
201
202</div>
203</div>
204<a class="anchor" id="a9057a416766ddfe329756bc83cf969d0"></a><!-- doxytag: member="timer.c::left_ms" ref="a9057a416766ddfe329756bc83cf969d0" args="(Timer *timer)" -->
205<div class="memitem">
206<div class="memproto">
207 <table class="memname">
208 <tr>
209 <td class="memname">int left_ms </td>
210 <td>(</td>
211 <td class="paramtype"><a class="el" href="structTimer.html">Timer</a> *&#160;</td>
212 <td class="paramname">&#160;)</td>
213 <td></td>
214 </tr>
215 </table>
216</div>
217<div class="memdoc">
218<p>Checks the input timer and returns the number of milliseconds remaining on the timer.</p>
219<dl><dt><b>Parameters:</b></dt><dd>
220 <table class="params">
221 <tr><td class="paramname"><a class="el" href="structTimer.html">Timer</a></td><td>- pointer to the timer to be set to checked </td></tr>
222 </table>
223 </dd>
224</dl>
225<dl class="return"><dt><b>Returns:</b></dt><dd>int - milliseconds left on the countdown timer </dd></dl>
226
227</div>
228</div>
229</div>
230<!--- window showing the filter options -->
231<div id="MSearchSelectWindow"
232 onmouseover="return searchBox.OnSearchSelectShow()"
233 onmouseout="return searchBox.OnSearchSelectHide()"
234 onkeydown="return searchBox.OnSearchSelectKey(event)">
235<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
236
237<!-- iframe showing the search results (closed by default) -->
238<div id="MSearchResultsWindow">
239<iframe src="" frameborder="0"
240 name="MSearchResults" id="MSearchResults">
241</iframe>
242</div>
243
244<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
245<a href="http://www.doxygen.org/index.html">
246<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
247</body>
248</html>
diff --git a/docs/html/timer_8c__incl.dot b/docs/html/timer_8c__incl.dot
new file mode 100644
index 0000000..f1f63fd
--- /dev/null
+++ b/docs/html/timer_8c__incl.dot
@@ -0,0 +1,19 @@
1digraph G
2{
3 edge [fontname="FreeSans.ttf",fontsize="10",labelfontname="FreeSans.ttf",labelfontsize="10"];
4 node [fontname="FreeSans.ttf",fontsize="10",shape=record];
5 Node1 [label="timer.c",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
6 Node1 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
7 Node2 [label="stddef.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
8 Node1 -> Node3 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
9 Node3 [label="sys/types.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
10 Node1 -> Node4 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
11 Node4 [label="timer_linux.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$timer__linux_8h_source.html"];
12 Node4 -> Node5 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
13 Node5 [label="sys/time.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
14 Node4 -> Node6 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
15 Node6 [label="sys/select.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
16 Node4 -> Node7 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
17 Node7 [label="timer_interface.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$timer__interface_8h.html",tooltip="Timer interface definition for MQTT client."];
18 Node7 -> Node4 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
19}
diff --git a/docs/html/timer_8c__incl.md5 b/docs/html/timer_8c__incl.md5
new file mode 100644
index 0000000..8737930
--- /dev/null
+++ b/docs/html/timer_8c__incl.md5
@@ -0,0 +1 @@
4602a03b52efbb20cc3061d52825dde5 \ No newline at end of file
diff --git a/docs/html/timer__interface_8h.html b/docs/html/timer__interface_8h.html
new file mode 100644
index 0000000..ce4c7ca
--- /dev/null
+++ b/docs/html/timer__interface_8h.html
@@ -0,0 +1,276 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: timer_interface.h File Reference</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48</div>
49<div class="header">
50 <div class="summary">
51<a href="#typedef-members">Typedefs</a> &#124;
52<a href="#func-members">Functions</a> </div>
53 <div class="headertitle">
54<h1>timer_interface.h File Reference</h1> </div>
55</div>
56<div class="contents">
57
58<p><a class="el" href="structTimer.html">Timer</a> interface definition for MQTT client.
59<a href="#_details">More...</a></p>
60<code>#include &quot;timer_linux.h&quot;</code><br/>
61<!-- startSectionHeader --><div class="dynheader">
62Include dependency graph for timer_interface.h:<!-- endSectionHeader --></div>
63<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
64<div class="center"><img src="timer__interface_8h__incl.png" border="0" usemap="#timer__interface_8h" alt=""/></div>
65<map name="timer__interface_8h" id="timer__interface_8h">
66</map>
67<!-- endSectionContent --></div>
68<!-- startSectionHeader --><div class="dynheader">
69This graph shows which files directly or indirectly include this file:<!-- endSectionHeader --></div>
70<!-- startSectionSummary --><!-- endSectionSummary --><!-- startSectionContent --><div class="dyncontent">
71<div class="center"><img src="timer__interface_8h__dep__incl.png" border="0" usemap="#timer__interface_8hdep" alt=""/></div>
72<map name="timer__interface_8hdep" id="timer__interface_8hdep">
73</map>
74<!-- endSectionContent --></div>
75
76<p><a href="timer__interface_8h_source.html">Go to the source code of this file.</a></p>
77<table class="memberdecls">
78<tr><td colspan="2"><h2><a name="typedef-members"></a>
79Typedefs</h2></td></tr>
80<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structTimer.html">Timer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer__interface_8h.html#a9809d52f988a8dba9cd5d8e129cebadd">Timer</a></td></tr>
81<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="structTimer.html">Timer</a> Type. <a href="#a9809d52f988a8dba9cd5d8e129cebadd"></a><br/></td></tr>
82<tr><td colspan="2"><h2><a name="func-members"></a>
83Functions</h2></td></tr>
84<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer__interface_8h.html#adf4838ca0d96f6dbf45c99756731542d">expired</a> (<a class="el" href="structTimer.html">Timer</a> *)</td></tr>
85<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if a timer is expired. <a href="#adf4838ca0d96f6dbf45c99756731542d"></a><br/></td></tr>
86<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer__interface_8h.html#a346afafb170b78f813bf7a15e4f2aede">countdown_ms</a> (<a class="el" href="structTimer.html">Timer</a> *, unsigned int)</td></tr>
87<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a timer (milliseconds) <a href="#a346afafb170b78f813bf7a15e4f2aede"></a><br/></td></tr>
88<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer__interface_8h.html#acc8817569e64e1d4193b08ca2570517a">countdown</a> (<a class="el" href="structTimer.html">Timer</a> *, unsigned int)</td></tr>
89<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a timer (seconds) <a href="#acc8817569e64e1d4193b08ca2570517a"></a><br/></td></tr>
90<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer__interface_8h.html#a81352d29dba5f9e360b6f551b33475c6">left_ms</a> (<a class="el" href="structTimer.html">Timer</a> *)</td></tr>
91<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check the time remaining on a give timer. <a href="#a81352d29dba5f9e360b6f551b33475c6"></a><br/></td></tr>
92<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer__interface_8h.html#a79820bfaea999f86b108701af73dd68e">InitTimer</a> (<a class="el" href="structTimer.html">Timer</a> *)</td></tr>
93<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a timer. <a href="#a79820bfaea999f86b108701af73dd68e"></a><br/></td></tr>
94</table>
95<hr/><a name="_details"></a><h2>Detailed Description</h2>
96<p>Defines an interface to timers that can be used by other system components. MQTT client requires timers to handle timeouts and MQTT keep alive. Starting point for porting the SDK to the timer hardware layer of a new platform. </p>
97<hr/><h2>Typedef Documentation</h2>
98<a class="anchor" id="a9809d52f988a8dba9cd5d8e129cebadd"></a><!-- doxytag: member="timer_interface.h::Timer" ref="a9809d52f988a8dba9cd5d8e129cebadd" args="" -->
99<div class="memitem">
100<div class="memproto">
101 <table class="memname">
102 <tr>
103 <td class="memname">typedef struct <a class="el" href="structTimer.html">Timer</a> <a class="el" href="structTimer.html">Timer</a></td>
104 </tr>
105 </table>
106</div>
107<div class="memdoc">
108<p>Forward declaration of a timer struct. The definition of this struct is platform dependent. When porting to a new platform add this definition in "timer_&lt;platform&gt;.h" and include that file above. </p>
109
110</div>
111</div>
112<hr/><h2>Function Documentation</h2>
113<a class="anchor" id="acc8817569e64e1d4193b08ca2570517a"></a><!-- doxytag: member="timer_interface.h::countdown" ref="acc8817569e64e1d4193b08ca2570517a" args="(Timer *, unsigned int)" -->
114<div class="memitem">
115<div class="memproto">
116 <table class="memname">
117 <tr>
118 <td class="memname">void countdown </td>
119 <td>(</td>
120 <td class="paramtype"><a class="el" href="structTimer.html">Timer</a> *&#160;</td>
121 <td class="paramname">, </td>
122 </tr>
123 <tr>
124 <td class="paramkey"></td>
125 <td></td>
126 <td class="paramtype">unsigned&#160;</td>
127 <td class="paramname"> <em>int</em>&#160;</td>
128 </tr>
129 <tr>
130 <td></td>
131 <td>)</td>
132 <td></td><td></td>
133 </tr>
134 </table>
135</div>
136<div class="memdoc">
137<p>Sets the timer to expire in a specified number of seconds.</p>
138<dl><dt><b>Parameters:</b></dt><dd>
139 <table class="params">
140 <tr><td class="paramname"><a class="el" href="structTimer.html">Timer</a></td><td>- pointer to the timer to be set to expire in seconds </td></tr>
141 <tr><td class="paramname">unsigned</td><td>int - set the timer to expire in this number of seconds </td></tr>
142 </table>
143 </dd>
144</dl>
145
146</div>
147</div>
148<a class="anchor" id="a346afafb170b78f813bf7a15e4f2aede"></a><!-- doxytag: member="timer_interface.h::countdown_ms" ref="a346afafb170b78f813bf7a15e4f2aede" args="(Timer *, unsigned int)" -->
149<div class="memitem">
150<div class="memproto">
151 <table class="memname">
152 <tr>
153 <td class="memname">void countdown_ms </td>
154 <td>(</td>
155 <td class="paramtype"><a class="el" href="structTimer.html">Timer</a> *&#160;</td>
156 <td class="paramname">, </td>
157 </tr>
158 <tr>
159 <td class="paramkey"></td>
160 <td></td>
161 <td class="paramtype">unsigned&#160;</td>
162 <td class="paramname"> <em>int</em>&#160;</td>
163 </tr>
164 <tr>
165 <td></td>
166 <td>)</td>
167 <td></td><td></td>
168 </tr>
169 </table>
170</div>
171<div class="memdoc">
172<p>Sets the timer to expire in a specified number of milliseconds.</p>
173<dl><dt><b>Parameters:</b></dt><dd>
174 <table class="params">
175 <tr><td class="paramname"><a class="el" href="structTimer.html">Timer</a></td><td>- pointer to the timer to be set to expire in milliseconds </td></tr>
176 <tr><td class="paramname">unsigned</td><td>int - set the timer to expire in this number of milliseconds </td></tr>
177 </table>
178 </dd>
179</dl>
180
181</div>
182</div>
183<a class="anchor" id="adf4838ca0d96f6dbf45c99756731542d"></a><!-- doxytag: member="timer_interface.h::expired" ref="adf4838ca0d96f6dbf45c99756731542d" args="(Timer *)" -->
184<div class="memitem">
185<div class="memproto">
186 <table class="memname">
187 <tr>
188 <td class="memname">char expired </td>
189 <td>(</td>
190 <td class="paramtype"><a class="el" href="structTimer.html">Timer</a> *&#160;</td>
191 <td class="paramname">&#160;)</td>
192 <td></td>
193 </tr>
194 </table>
195</div>
196<div class="memdoc">
197<p>Call this function passing in a timer to check if that timer has expired.</p>
198<dl><dt><b>Parameters:</b></dt><dd>
199 <table class="params">
200 <tr><td class="paramname"><a class="el" href="structTimer.html">Timer</a></td><td>- pointer to the timer to be checked for expiration </td></tr>
201 </table>
202 </dd>
203</dl>
204<dl class="return"><dt><b>Returns:</b></dt><dd>character - 1 = timer expired, 0 = timer not expired </dd></dl>
205
206</div>
207</div>
208<a class="anchor" id="a79820bfaea999f86b108701af73dd68e"></a><!-- doxytag: member="timer_interface.h::InitTimer" ref="a79820bfaea999f86b108701af73dd68e" args="(Timer *)" -->
209<div class="memitem">
210<div class="memproto">
211 <table class="memname">
212 <tr>
213 <td class="memname">void InitTimer </td>
214 <td>(</td>
215 <td class="paramtype"><a class="el" href="structTimer.html">Timer</a> *&#160;</td>
216 <td class="paramname">&#160;)</td>
217 <td></td>
218 </tr>
219 </table>
220</div>
221<div class="memdoc">
222<p>Performs any initialization required to the timer passed in.</p>
223<dl><dt><b>Parameters:</b></dt><dd>
224 <table class="params">
225 <tr><td class="paramname"><a class="el" href="structTimer.html">Timer</a></td><td>- pointer to the timer to be initialized </td></tr>
226 </table>
227 </dd>
228</dl>
229
230</div>
231</div>
232<a class="anchor" id="a81352d29dba5f9e360b6f551b33475c6"></a><!-- doxytag: member="timer_interface.h::left_ms" ref="a81352d29dba5f9e360b6f551b33475c6" args="(Timer *)" -->
233<div class="memitem">
234<div class="memproto">
235 <table class="memname">
236 <tr>
237 <td class="memname">int left_ms </td>
238 <td>(</td>
239 <td class="paramtype"><a class="el" href="structTimer.html">Timer</a> *&#160;</td>
240 <td class="paramname">&#160;)</td>
241 <td></td>
242 </tr>
243 </table>
244</div>
245<div class="memdoc">
246<p>Checks the input timer and returns the number of milliseconds remaining on the timer.</p>
247<dl><dt><b>Parameters:</b></dt><dd>
248 <table class="params">
249 <tr><td class="paramname"><a class="el" href="structTimer.html">Timer</a></td><td>- pointer to the timer to be set to checked </td></tr>
250 </table>
251 </dd>
252</dl>
253<dl class="return"><dt><b>Returns:</b></dt><dd>int - milliseconds left on the countdown timer </dd></dl>
254
255</div>
256</div>
257</div>
258<!--- window showing the filter options -->
259<div id="MSearchSelectWindow"
260 onmouseover="return searchBox.OnSearchSelectShow()"
261 onmouseout="return searchBox.OnSearchSelectHide()"
262 onkeydown="return searchBox.OnSearchSelectKey(event)">
263<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
264
265<!-- iframe showing the search results (closed by default) -->
266<div id="MSearchResultsWindow">
267<iframe src="" frameborder="0"
268 name="MSearchResults" id="MSearchResults">
269</iframe>
270</div>
271
272<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
273<a href="http://www.doxygen.org/index.html">
274<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
275</body>
276</html>
diff --git a/docs/html/timer__interface_8h__dep__incl.dot b/docs/html/timer__interface_8h__dep__incl.dot
new file mode 100644
index 0000000..256b74e
--- /dev/null
+++ b/docs/html/timer__interface_8h__dep__incl.dot
@@ -0,0 +1,11 @@
1digraph G
2{
3 edge [fontname="FreeSans.ttf",fontsize="10",labelfontname="FreeSans.ttf",labelfontsize="10"];
4 node [fontname="FreeSans.ttf",fontsize="10",shape=record];
5 Node1 [label="timer_interface.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
6 Node1 -> Node2 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
7 Node2 [label="timer_linux.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$timer__linux_8h_source.html"];
8 Node2 -> Node3 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
9 Node3 [label="timer.c",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$timer_8c.html",tooltip="Linux implementation of the timer interface."];
10 Node2 -> Node1 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
11}
diff --git a/docs/html/timer__interface_8h__dep__incl.md5 b/docs/html/timer__interface_8h__dep__incl.md5
new file mode 100644
index 0000000..0595e07
--- /dev/null
+++ b/docs/html/timer__interface_8h__dep__incl.md5
@@ -0,0 +1 @@
d7bab85a7727c31c48ee68e97a31cf18 \ No newline at end of file
diff --git a/docs/html/timer__interface_8h__incl.dot b/docs/html/timer__interface_8h__incl.dot
new file mode 100644
index 0000000..dfa9186
--- /dev/null
+++ b/docs/html/timer__interface_8h__incl.dot
@@ -0,0 +1,13 @@
1digraph G
2{
3 edge [fontname="FreeSans.ttf",fontsize="10",labelfontname="FreeSans.ttf",labelfontsize="10"];
4 node [fontname="FreeSans.ttf",fontsize="10",shape=record];
5 Node1 [label="timer_interface.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled" fontcolor="black"];
6 Node1 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
7 Node2 [label="timer_linux.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$timer__linux_8h_source.html"];
8 Node2 -> Node3 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
9 Node3 [label="sys/time.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
10 Node2 -> Node4 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
11 Node4 [label="sys/select.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
12 Node2 -> Node1 [color="midnightblue",fontsize="10",style="solid",fontname="FreeSans.ttf"];
13}
diff --git a/docs/html/timer__interface_8h__incl.md5 b/docs/html/timer__interface_8h__incl.md5
new file mode 100644
index 0000000..7917192
--- /dev/null
+++ b/docs/html/timer__interface_8h__incl.md5
@@ -0,0 +1 @@
6043713435a1eb4c537a0187d6d655db \ No newline at end of file
diff --git a/docs/html/timer__interface_8h_source.html b/docs/html/timer__interface_8h_source.html
new file mode 100644
index 0000000..4b85729
--- /dev/null
+++ b/docs/html/timer__interface_8h_source.html
@@ -0,0 +1,108 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: timer_interface.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>timer_interface.h</h1> </div>
51</div>
52<div class="contents">
53<a href="timer__interface_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*******************************************************************************</span>
54<a name="l00002"></a>00002 <span class="comment"> * Copyright (c) 2014 IBM Corp.</span>
55<a name="l00003"></a>00003 <span class="comment"> *</span>
56<a name="l00004"></a>00004 <span class="comment"> * All rights reserved. This program and the accompanying materials</span>
57<a name="l00005"></a>00005 <span class="comment"> * are made available under the terms of the Eclipse Public License v1.0</span>
58<a name="l00006"></a>00006 <span class="comment"> * and Eclipse Distribution License v1.0 which accompany this distribution.</span>
59<a name="l00007"></a>00007 <span class="comment"> *</span>
60<a name="l00008"></a>00008 <span class="comment"> * The Eclipse Public License is available at</span>
61<a name="l00009"></a>00009 <span class="comment"> * http://www.eclipse.org/legal/epl-v10.html</span>
62<a name="l00010"></a>00010 <span class="comment"> * and the Eclipse Distribution License is available at</span>
63<a name="l00011"></a>00011 <span class="comment"> * http://www.eclipse.org/org/documents/edl-v10.php.</span>
64<a name="l00012"></a>00012 <span class="comment"> *</span>
65<a name="l00013"></a>00013 <span class="comment"> * Contributors:</span>
66<a name="l00014"></a>00014 <span class="comment"> * Allan Stockdill-Mander - initial API and implementation and/or initial documentation</span>
67<a name="l00015"></a>00015 <span class="comment"> *******************************************************************************/</span>
68<a name="l00016"></a>00016
69<a name="l00027"></a>00027 <span class="preprocessor">#ifndef __TIMER_INTERFACE_H_</span>
70<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define __TIMER_INTERFACE_H_</span>
71<a name="l00029"></a>00029 <span class="preprocessor"></span>
72<a name="l00030"></a>00030 <span class="comment">// Add the platform specific timer includes to define the Timer struct</span>
73<a name="l00031"></a>00031 <span class="preprocessor">#include &quot;timer_linux.h&quot;</span>
74<a name="l00032"></a>00032
75<a name="l00041"></a><a class="code" href="timer__interface_8h.html#a9809d52f988a8dba9cd5d8e129cebadd">00041</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structTimer.html">Timer</a> <a class="code" href="structTimer.html">Timer</a>;
76<a name="l00042"></a>00042
77<a name="l00051"></a>00051 <span class="keywordtype">char</span> <a class="code" href="timer_8c.html#a9e1050bfa919aca1978cffb051cc7ee9" title="Check if a timer is expired.">expired</a>(<a class="code" href="structTimer.html">Timer</a>*);
78<a name="l00052"></a>00052
79<a name="l00061"></a>00061 <span class="keywordtype">void</span> <a class="code" href="timer_8c.html#a75af8f6d4820a905276fae6bac80212a" title="Create a timer (milliseconds)">countdown_ms</a>(<a class="code" href="structTimer.html">Timer</a>*, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>);
80<a name="l00062"></a>00062
81<a name="l00071"></a>00071 <span class="keywordtype">void</span> <a class="code" href="timer_8c.html#ab9b6a721d03b085959a0f66907822629" title="Create a timer (seconds)">countdown</a>(<a class="code" href="structTimer.html">Timer</a>*, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>);
82<a name="l00072"></a>00072
83<a name="l00081"></a>00081 <span class="keywordtype">int</span> <a class="code" href="timer_8c.html#a9057a416766ddfe329756bc83cf969d0" title="Check the time remaining on a give timer.">left_ms</a>(<a class="code" href="structTimer.html">Timer</a>*);
84<a name="l00082"></a>00082
85<a name="l00090"></a>00090 <span class="keywordtype">void</span> <a class="code" href="timer_8c.html#a0ff0436566be2657b87044a108a1f4bf" title="Initialize a timer.">InitTimer</a>(<a class="code" href="structTimer.html">Timer</a>*);
86<a name="l00091"></a>00091
87<a name="l00092"></a>00092 <span class="preprocessor">#endif //__TIMER_INTERFACE_H_</span>
88</pre></div></div>
89</div>
90<!--- window showing the filter options -->
91<div id="MSearchSelectWindow"
92 onmouseover="return searchBox.OnSearchSelectShow()"
93 onmouseout="return searchBox.OnSearchSelectHide()"
94 onkeydown="return searchBox.OnSearchSelectKey(event)">
95<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
96
97<!-- iframe showing the search results (closed by default) -->
98<div id="MSearchResultsWindow">
99<iframe src="" frameborder="0"
100 name="MSearchResults" id="MSearchResults">
101</iframe>
102</div>
103
104<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
105<a href="http://www.doxygen.org/index.html">
106<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
107</body>
108</html>
diff --git a/docs/html/timer__linux_8h_source.html b/docs/html/timer__linux_8h_source.html
new file mode 100644
index 0000000..e05bab0
--- /dev/null
+++ b/docs/html/timer__linux_8h_source.html
@@ -0,0 +1,102 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>AWSIoTCSDK: timer_linux.h Source File</title>
6<link href="tabs.css" rel="stylesheet" type="text/css"/>
7<link href="search/search.css" rel="stylesheet" type="text/css"/>
8<script type="text/javaScript" src="search/search.js"></script>
9<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10</head>
11<body onload='searchBox.OnSelectItem(0);'>
12<!-- Generated by Doxygen 1.7.2 -->
13<script type="text/javascript"><!--
14var searchBox = new SearchBox("searchBox", "search",false,'Search');
15--></script>
16<div class="navigation" id="top">
17 <div class="tabs">
18 <ul class="tablist">
19 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
20 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
21 <li><a href="modules.html"><span>Modules</span></a></li>
22 <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
23 <li class="current"><a href="files.html"><span>Files</span></a></li>
24 <li id="searchli">
25 <div id="MSearchBox" class="MSearchBoxInactive">
26 <span class="left">
27 <img id="MSearchSelect" src="search/mag_sel.png"
28 onmouseover="return searchBox.OnSearchSelectShow()"
29 onmouseout="return searchBox.OnSearchSelectHide()"
30 alt=""/>
31 <input type="text" id="MSearchField" value="Search" accesskey="S"
32 onfocus="searchBox.OnSearchFieldFocus(true)"
33 onblur="searchBox.OnSearchFieldFocus(false)"
34 onkeyup="searchBox.OnSearchFieldChange(event)"/>
35 </span><span class="right">
36 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
37 </span>
38 </div>
39 </li>
40 </ul>
41 </div>
42 <div class="tabs2">
43 <ul class="tablist">
44 <li><a href="files.html"><span>File&#160;List</span></a></li>
45 <li><a href="globals.html"><span>Globals</span></a></li>
46 </ul>
47 </div>
48<div class="header">
49 <div class="headertitle">
50<h1>timer_linux.h</h1> </div>
51</div>
52<div class="contents">
53<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
54<a name="l00002"></a>00002 <span class="comment"> * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.</span>
55<a name="l00003"></a>00003 <span class="comment"> *</span>
56<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;).</span>
57<a name="l00005"></a>00005 <span class="comment"> * You may not use this file except in compliance with the License.</span>
58<a name="l00006"></a>00006 <span class="comment"> * A copy of the License is located at</span>
59<a name="l00007"></a>00007 <span class="comment"> *</span>
60<a name="l00008"></a>00008 <span class="comment"> * http://aws.amazon.com/apache2.0</span>
61<a name="l00009"></a>00009 <span class="comment"> *</span>
62<a name="l00010"></a>00010 <span class="comment"> * or in the &quot;license&quot; file accompanying this file. This file is distributed</span>
63<a name="l00011"></a>00011 <span class="comment"> * on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either</span>
64<a name="l00012"></a>00012 <span class="comment"> * express or implied. See the License for the specific language governing</span>
65<a name="l00013"></a>00013 <span class="comment"> * permissions and limitations under the License.</span>
66<a name="l00014"></a>00014 <span class="comment"> */</span>
67<a name="l00015"></a>00015
68<a name="l00016"></a>00016 <span class="preprocessor">#ifndef SRC_PROTOCOL_MQTT_AWS_IOT_EMBEDDED_CLIENT_WRAPPER_PLATFORM_LINUX_COMMON_TIMER_LINUX_H_</span>
69<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define SRC_PROTOCOL_MQTT_AWS_IOT_EMBEDDED_CLIENT_WRAPPER_PLATFORM_LINUX_COMMON_TIMER_LINUX_H_</span>
70<a name="l00018"></a>00018 <span class="preprocessor"></span>
71<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;sys/time.h&gt;</span>
72<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;sys/select.h&gt;</span>
73<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;<a class="code" href="timer__interface_8h.html" title="Timer interface definition for MQTT client.">timer_interface.h</a>&quot;</span>
74<a name="l00022"></a>00022
75<a name="l00023"></a>00023
76<a name="l00024"></a><a class="code" href="structTimer.html">00024</a> <span class="keyword">struct </span><a class="code" href="structTimer.html">Timer</a>{
77<a name="l00025"></a>00025 <span class="keyword">struct </span>timeval end_time;
78<a name="l00026"></a>00026 };
79<a name="l00027"></a>00027
80<a name="l00028"></a>00028
81<a name="l00029"></a>00029 <span class="preprocessor">#endif </span><span class="comment">/* SRC_PROTOCOL_MQTT_AWS_IOT_EMBEDDED_CLIENT_WRAPPER_PLATFORM_LINUX_COMMON_TIMER_LINUX_H_ */</span>
82</pre></div></div>
83</div>
84<!--- window showing the filter options -->
85<div id="MSearchSelectWindow"
86 onmouseover="return searchBox.OnSearchSelectShow()"
87 onmouseout="return searchBox.OnSearchSelectHide()"
88 onkeydown="return searchBox.OnSearchSelectKey(event)">
89<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>
90
91<!-- iframe showing the search results (closed by default) -->
92<div id="MSearchResultsWindow">
93<iframe src="" frameborder="0"
94 name="MSearchResults" id="MSearchResults">
95</iframe>
96</div>
97
98<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 6 2015 05:14:49 for AWSIoTCSDK by&#160;
99<a href="http://www.doxygen.org/index.html">
100<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
101</body>
102</html>
diff --git a/sample_apps/shadow_sample/Makefile b/sample_apps/shadow_sample/Makefile
new file mode 100644
index 0000000..76c2a43
--- /dev/null
+++ b/sample_apps/shadow_sample/Makefile
@@ -0,0 +1,80 @@
1CC = gcc
2
3#remove @ for no make command prints
4DEBUG=@
5
6APP_DIR = .
7APP_NAME=shadow_sample
8APP_INCLUDE_DIRS += -I $(APP_DIR)
9APP_SRC_FILES=$(APP_NAME).c
10
11#IoT client directory
12
13
14IOT_CLIENT_DIR=../../aws_iot_src
15
16PLATFORM_DIR = $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl
17PLATFORM_COMMON_DIR = $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/common
18SHADOW_SRC_DIR= $(IOT_CLIENT_DIR)/shadow
19
20
21IOT_INCLUDE_DIRS += -I $(IOT_CLIENT_DIR)/protocol/mqtt
22IOT_INCLUDE_DIRS += -I $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper
23IOT_INCLUDE_DIRS += -I $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux
24IOT_INCLUDE_DIRS += -I $(PLATFORM_COMMON_DIR)
25IOT_INCLUDE_DIRS += -I $(PLATFORM_DIR)
26IOT_INCLUDE_DIRS += -I $(SHADOW_SRC_DIR)
27IOT_INCLUDE_DIRS += -I $(IOT_CLIENT_DIR)/utils
28IOT_INCLUDE_DIRS += -I $(IOT_CLIENT_DIR)/shadow
29
30IOT_SRC_FILES += $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper/aws_iot_mqtt_embedded_client_wrapper.c
31IOT_SRC_FILES += $(IOT_CLIENT_DIR)/utils/jsmn.c
32IOT_SRC_FILES += $(IOT_CLIENT_DIR)/utils/aws_iot_json_utils.c
33IOT_SRC_FILES += $(shell find $(SHADOW_SRC_DIR)/ -name '*.c')
34IOT_SRC_FILES += $(shell find $(PLATFORM_DIR)/ -name '*.c')
35IOT_SRC_FILES += $(shell find $(PLATFORM_COMMON_DIR)/ -name '*.c')
36
37#MQTT Paho Embedded C client directory
38MQTT_DIR = ../../aws_mqtt_embedded_client_lib
39MQTT_C_DIR = $(MQTT_DIR)/MQTTClient-C/src
40MQTT_EMB_DIR = $(MQTT_DIR)/MQTTPacket/src
41
42MQTT_INCLUDE_DIR += -I $(MQTT_EMB_DIR)
43MQTT_INCLUDE_DIR += -I $(MQTT_C_DIR)
44
45MQTT_SRC_FILES += $(shell find $(MQTT_EMB_DIR)/ -name '*.c')
46MQTT_SRC_FILES += $(MQTT_C_DIR)/MQTTClient.c
47
48#TLS - openSSL
49TLS_LIB_DIR = /usr/lib/
50TLS_INCLUDE_DIR = -I /usr/include/openssl
51EXTERNAL_LIBS += -L$(TLS_LIB_DIR)
52LD_FLAG := -ldl -lssl -lcrypto
53LD_FLAG += -Wl,-rpath,$(TLS_LIB_DIR)
54
55#Aggregate all include and src directories
56INCLUDE_ALL_DIRS += $(IOT_INCLUDE_DIRS)
57INCLUDE_ALL_DIRS += $(MQTT_INCLUDE_DIR)
58INCLUDE_ALL_DIRS += $(TLS_INCLUDE_DIR)
59INCLUDE_ALL_DIRS += $(APP_INCLUDE_DIRS)
60
61SRC_FILES += $(MQTT_SRC_FILES)
62SRC_FILES += $(APP_SRC_FILES)
63SRC_FILES += $(IOT_SRC_FILES)
64
65# Logging level control
66LOG_FLAGS += -DIOT_DEBUG
67LOG_FLAGS += -DIOT_INFO
68LOG_FLAGS += -DIOT_WARN
69LOG_FLAGS += -DIOT_ERROR
70
71COMPILER_FLAGS += -g
72COMPILER_FLAGS += $(LOG_FLAGS)
73
74MAKE_CMD = $(CC) $(SRC_FILES) $(COMPILER_FLAGS) -o $(APP_NAME) $(EXTERNAL_LIBS) $(LD_FLAG) $(INCLUDE_ALL_DIRS)
75
76all:
77 $(DEBUG)$(MAKE_CMD)
78
79clean:
80 rm -rf $(APP_DIR)/$(APP_NAME)
diff --git a/sample_apps/shadow_sample/aws_iot_config.h b/sample_apps/shadow_sample/aws_iot_config.h
new file mode 100644
index 0000000..c705cc0
--- /dev/null
+++ b/sample_apps/shadow_sample/aws_iot_config.h
@@ -0,0 +1,53 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16/**
17 * @file aws_iot_config.h
18 * @brief AWS IoT specific configuration file
19 */
20
21#ifndef SRC_SHADOW_IOT_SHADOW_CONFIG_H_
22#define SRC_SHADOW_IOT_SHADOW_CONFIG_H_
23
24// Get from console
25// =================================================
26#define AWS_IOT_MQTT_HOST "" ///< Customer specific MQTT HOST. The same will be used for Thing Shadow
27#define AWS_IOT_MQTT_PORT 8883 ///< default port for MQTT/S
28#define AWS_IOT_MQTT_CLIENT_ID "c-sdk-client-id" ///< MQTT client ID should be unique for every device
29#define AWS_IOT_MY_THING_NAME "AWS-IoT-C-SDK" ///< Thing Name of the Shadow this device is associated with
30#define AWS_IOT_ROOT_CA_FILENAME "aws-iot-rootCA.crt" ///< Root CA file name
31#define AWS_IOT_CERTIFICATE_FILENAME "cert.pem" ///< device signed certificate file name
32#define AWS_IOT_PRIVATE_KEY_FILENAME "privkey.pem" ///< Device private key filename
33// =================================================
34
35// MQTT PubSub
36#define AWS_IOT_MQTT_TX_BUF_LEN 512 ///< Any time a message is sent out through the MQTT layer
37#define AWS_IOT_MQTT_RX_BUF_LEN 512
38#define AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS 5
39
40// Thing Shadow specific configs
41#define SHADOW_MAX_SIZE_OF_RX_BUFFER AWS_IOT_MQTT_RX_BUF_LEN+1 /** +1 is to leave space for the null terminator, this way the json parser can use it. */
42#define MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES 80 /** {"clientToken": ">>uniqueClientID<<+sequenceNumber"}*/
43#define MAX_SIZE_CLIENT_ID_WITH_SEQUENCE MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES + 10 /** {"clientToken": ">>uniqueClientID+sequenceNumber<<"}*/
44#define MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE MAX_SIZE_CLIENT_ID_WITH_SEQUENCE + 20 /** >>{"clientToken": "uniqueClientID+sequenceNumber"}<<*/
45#define MAX_SIZE_OF_THINGNAME 30
46#define MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME 10
47#define MAX_THINGNAME_HANDLED_AT_ANY_GIVEN_TIME 10
48#define MAX_JSON_TOKEN_EXPECTED 120
49#define MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME 60
50#define MAX_SIZE_OF_THING_NAME 20
51#define MAX_SHADOW_TOPIC_LENGTH_BYTES MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME + MAX_SIZE_OF_THING_NAME
52
53#endif /* SRC_SHADOW_IOT_SHADOW_CONFIG_H_ */
diff --git a/sample_apps/shadow_sample/shadow_sample.c b/sample_apps/shadow_sample/shadow_sample.c
new file mode 100644
index 0000000..43387a1
--- /dev/null
+++ b/sample_apps/shadow_sample/shadow_sample.c
@@ -0,0 +1,248 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16/**
17 * @file shadow_sample.c
18 * @brief A simple connected window example demonstrating the use of Thing Shadow
19 */
20
21#include <stdio.h>
22#include <stdlib.h>
23#include <ctype.h>
24#include <unistd.h>
25
26#include <signal.h>
27#include <memory.h>
28#include <sys/time.h>
29#include <limits.h>
30
31
32#include "aws_iot_log.h"
33#include "aws_iot_version.h"
34#include "aws_iot_shadow_interface.h"
35#include "aws_iot_shadow_json_data.h"
36#include "aws_iot_config.h"
37#include "aws_iot_mqtt_interface.h"
38
39/*!
40 * The goal of this sample application is to demonstrate the capabilities of shadow.
41 * This device(say Connected Window) will open the window of a room based on temperature
42 * It can report to the Shadow the following parameters:
43 * 1. temperature of the room (double)
44 * 2. status of the window (open or close)
45 * It can act on commands from the cloud. In this case it will open or close the window based on the json object "windowOpen" data[open/close]
46 *
47 * The two variables from a device's perspective are double temperature and bool windowOpen
48 * The device needs to act on only on windowOpen variable, so we will create a primitiveJson_t object with callback
49 The Json Document in the cloud will be
50 {
51 "reported": {
52 "temperature": 0,
53 "windowOpen": false
54 },
55 "desired": {
56 "windowOpen": false
57 }
58 }
59 */
60
61#define ROOMTEMPERATURE_UPPERLIMIT 32.0f
62#define ROOMTEMPERATURE_LOWERLIMIT 25.0f
63#define STARTING_ROOMTEMPERATURE ROOMTEMPERATURE_LOWERLIMIT
64
65static void simulateRoomTemperature(float *pRoomTemperature) {
66 static float deltaChange;
67
68 if (*pRoomTemperature >= ROOMTEMPERATURE_UPPERLIMIT) {
69 deltaChange = -0.5f;
70 } else if (*pRoomTemperature <= ROOMTEMPERATURE_LOWERLIMIT) {
71 deltaChange = 0.5f;
72 }
73
74 *pRoomTemperature += deltaChange;
75}
76
77void ShadowUpdateStatusCallback(const char *pThingName, ShadowActions_t action, Shadow_Ack_Status_t status,
78 const char *pReceivedJsonDocument, void *pContextData) {
79
80 if (status == SHADOW_ACK_TIMEOUT) {
81 INFO("Update Timeout--");
82 } else if (status == SHADOW_ACK_REJECTED) {
83 INFO("Update RejectedXX");
84 } else if (status == SHADOW_ACK_ACCEPTED) {
85 INFO("Update Accepted !!");
86 }
87}
88
89void windowActuate_Callback(const char *pJsonString, uint32_t JsonStringDataLen, jsonStruct_t *pContext) {
90 if (pContext != NULL) {
91 INFO("Delta - Window state changed to %d", *(bool *)(pContext->pData));
92 }
93}
94
95char certDirectory[PATH_MAX + 1] = "../../certs";
96char HostAddress[255] = AWS_IOT_MQTT_HOST;
97uint32_t port = AWS_IOT_MQTT_PORT;
98uint8_t numPubs = 5;
99
100void parseInputArgsForConnectParams(int argc, char** argv) {
101 int opt;
102
103 while (-1 != (opt = getopt(argc, argv, "h:p:c:n:"))) {
104 switch (opt) {
105 case 'h':
106 strcpy(HostAddress, optarg);
107 DEBUG("Host %s", optarg);
108 break;
109 case 'p':
110 port = atoi(optarg);
111 DEBUG("arg %s", optarg);
112 break;
113 case 'c':
114 strcpy(certDirectory, optarg);
115 DEBUG("cert root directory %s", optarg);
116 break;
117 case 'n':
118 numPubs = atoi(optarg);
119 DEBUG("num pubs %s", optarg);
120 break;
121 case '?':
122 if (optopt == 'c') {
123 ERROR("Option -%c requires an argument.", optopt);
124 } else if (isprint(optopt)) {
125 WARN("Unknown option `-%c'.", optopt);
126 } else {
127 WARN("Unknown option character `\\x%x'.", optopt);
128 }
129 break;
130 default:
131 ERROR("ERROR in command line argument parsing");
132 break;
133 }
134 }
135
136}
137
138#define MAX_LENGTH_OF_UPDATE_JSON_BUFFER 200
139
140int main(int argc, char** argv) {
141 IoT_Error_t rc = NONE_ERROR;
142 int32_t i = 0;
143
144 MQTTClient_t mqttClient;
145 aws_iot_mqtt_init(&mqttClient);
146
147 char JsonDocumentBuffer[MAX_LENGTH_OF_UPDATE_JSON_BUFFER];
148 size_t sizeOfJsonDocumentBuffer = sizeof(JsonDocumentBuffer) / sizeof(JsonDocumentBuffer[0]);
149 char *pJsonStringToUpdate;
150 float temperature = 0.0;
151
152 bool windowOpen = false;
153 jsonStruct_t windowActuator;
154 windowActuator.cb = windowActuate_Callback;
155 windowActuator.pData = &windowOpen;
156 windowActuator.pKey = "windowOpen";
157 windowActuator.type = SHADOW_JSON_BOOL;
158
159 jsonStruct_t temperatureHandler;
160 temperatureHandler.cb = NULL;
161 temperatureHandler.pKey = "temperature";
162 temperatureHandler.pData = &temperature;
163 temperatureHandler.type = SHADOW_JSON_FLOAT;
164
165 char rootCA[PATH_MAX + 1];
166 char clientCRT[PATH_MAX + 1];
167 char clientKey[PATH_MAX + 1];
168 char CurrentWD[PATH_MAX + 1];
169 char cafileName[] = AWS_IOT_ROOT_CA_FILENAME;
170 char clientCRTName[] = AWS_IOT_CERTIFICATE_FILENAME;
171 char clientKeyName[] = AWS_IOT_PRIVATE_KEY_FILENAME;
172
173 parseInputArgsForConnectParams(argc, argv);
174
175 INFO("\nAWS IoT SDK Version(dev) %d.%d.%d-%s\n", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, VERSION_TAG);
176
177 getcwd(CurrentWD, sizeof(CurrentWD));
178 sprintf(rootCA, "%s/%s%s", CurrentWD, certDirectory, cafileName);
179 sprintf(clientCRT, "%s/%s%s", CurrentWD, certDirectory, clientCRTName);
180 sprintf(clientKey, "%s/%s%s", CurrentWD, certDirectory, clientKeyName);
181
182 DEBUG("Using rootCA %s", rootCA);
183 DEBUG("Using clientCRT %s", clientCRT);
184 DEBUG("Using clientKey %s", clientKey);
185
186 ShadowParameters_t sp = ShadowParametersDefault;
187 sp.pMyThingName = AWS_IOT_MY_THING_NAME;
188 sp.pMqttClientId = AWS_IOT_MQTT_CLIENT_ID;
189 sp.pHost = HostAddress;
190 sp.port = port;
191 sp.pClientCRT = clientCRT;
192 sp.pClientKey = clientKey;
193 sp.pRootCA = rootCA;
194
195 INFO("Shadow Init");
196 rc = aws_iot_shadow_init(&mqttClient);
197
198 INFO("Shadow Connect");
199 rc = aws_iot_shadow_connect(&mqttClient, &sp);
200
201 if (NONE_ERROR != rc) {
202 ERROR("Shadow Connection Error %d", rc);
203 }
204
205 rc = aws_iot_shadow_register_delta(&mqttClient, &windowActuator);
206
207 if (NONE_ERROR != rc) {
208 ERROR("Shadow Register Delta Error");
209 }
210 temperature = STARTING_ROOMTEMPERATURE;
211
212 // loop and publish a change in temperature
213 while (NONE_ERROR == rc) {
214 rc = aws_iot_shadow_yield(&mqttClient, 200);
215 INFO("\n=======================================================================================\n");
216 INFO("On Device: window state %s", windowOpen?"true":"false");
217 simulateRoomTemperature(&temperature);
218
219 rc = aws_iot_shadow_init_json_document(JsonDocumentBuffer, sizeOfJsonDocumentBuffer);
220 if (rc == NONE_ERROR) {
221 rc = aws_iot_shadow_add_reported(JsonDocumentBuffer, sizeOfJsonDocumentBuffer, 2, &temperatureHandler,
222 &windowActuator);
223 if (rc == NONE_ERROR) {
224 rc = aws_iot_finalize_json_document(JsonDocumentBuffer, sizeOfJsonDocumentBuffer);
225 if (rc == NONE_ERROR) {
226 INFO("Update Shadow: %s", JsonDocumentBuffer);
227 rc = aws_iot_shadow_update(&mqttClient, AWS_IOT_MY_THING_NAME, JsonDocumentBuffer, ShadowUpdateStatusCallback,
228 NULL, 4, true);
229 }
230 }
231 }
232 INFO("*****************************************************************************************\n");
233 sleep(1);
234 }
235
236 if (NONE_ERROR != rc) {
237 ERROR("An error occurred in the loop %d", rc);
238 }
239
240 INFO("Disconnecting");
241 rc = aws_iot_shadow_disconnect(&mqttClient);
242
243 if (NONE_ERROR != rc) {
244 ERROR("Disconnect error %d", rc);
245 }
246
247 return rc;
248}
diff --git a/sample_apps/shadow_sample_console_echo/Makefile b/sample_apps/shadow_sample_console_echo/Makefile
new file mode 100644
index 0000000..574b0d2
--- /dev/null
+++ b/sample_apps/shadow_sample_console_echo/Makefile
@@ -0,0 +1,80 @@
1CC = gcc
2
3#remove @ for no make command prints
4DEBUG=@
5
6APP_DIR = .
7APP_NAME=shadow_console_echo
8APP_INCLUDE_DIRS += -I $(APP_DIR)
9APP_SRC_FILES=$(APP_NAME).c
10
11#IoT client directory
12
13
14IOT_CLIENT_DIR=../../aws_iot_src
15
16PLATFORM_DIR = $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl
17PLATFORM_COMMON_DIR = $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/common
18SHADOW_SRC_DIR= $(IOT_CLIENT_DIR)/shadow
19
20
21IOT_INCLUDE_DIRS += -I $(IOT_CLIENT_DIR)/protocol/mqtt
22IOT_INCLUDE_DIRS += -I $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper
23IOT_INCLUDE_DIRS += -I $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux
24IOT_INCLUDE_DIRS += -I $(PLATFORM_COMMON_DIR)
25IOT_INCLUDE_DIRS += -I $(PLATFORM_DIR)
26IOT_INCLUDE_DIRS += -I $(SHADOW_SRC_DIR)
27IOT_INCLUDE_DIRS += -I $(IOT_CLIENT_DIR)/utils
28IOT_INCLUDE_DIRS += -I $(IOT_CLIENT_DIR)/shadow
29
30IOT_SRC_FILES += $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper/aws_iot_mqtt_embedded_client_wrapper.c
31IOT_SRC_FILES += $(IOT_CLIENT_DIR)/utils/jsmn.c
32IOT_SRC_FILES += $(IOT_CLIENT_DIR)/utils/aws_iot_json_utils.c
33IOT_SRC_FILES += $(shell find $(SHADOW_SRC_DIR)/ -name '*.c')
34IOT_SRC_FILES += $(shell find $(PLATFORM_DIR)/ -name '*.c')
35IOT_SRC_FILES += $(shell find $(PLATFORM_COMMON_DIR)/ -name '*.c')
36
37#MQTT Paho Embedded C client directory
38MQTT_DIR = ../../aws_mqtt_embedded_client_lib
39MQTT_C_DIR = $(MQTT_DIR)/MQTTClient-C/src
40MQTT_EMB_DIR = $(MQTT_DIR)/MQTTPacket/src
41
42MQTT_INCLUDE_DIR += -I $(MQTT_EMB_DIR)
43MQTT_INCLUDE_DIR += -I $(MQTT_C_DIR)
44
45MQTT_SRC_FILES += $(shell find $(MQTT_EMB_DIR)/ -name '*.c')
46MQTT_SRC_FILES += $(MQTT_C_DIR)/MQTTClient.c
47
48#TLS - openSSL
49TLS_LIB_DIR = /usr/lib/
50TLS_INCLUDE_DIR = -I /usr/include/openssl
51EXTERNAL_LIBS += -L$(TLS_LIB_DIR)
52LD_FLAG := -ldl -lssl -lcrypto
53LD_FLAG += -Wl,-rpath,$(TLS_LIB_DIR)
54
55#Aggregate all include and src directories
56INCLUDE_ALL_DIRS += $(IOT_INCLUDE_DIRS)
57INCLUDE_ALL_DIRS += $(MQTT_INCLUDE_DIR)
58INCLUDE_ALL_DIRS += $(TLS_INCLUDE_DIR)
59INCLUDE_ALL_DIRS += $(APP_INCLUDE_DIRS)
60
61SRC_FILES += $(MQTT_SRC_FILES)
62SRC_FILES += $(APP_SRC_FILES)
63SRC_FILES += $(IOT_SRC_FILES)
64
65# Logging level control
66LOG_FLAGS += -DIOT_DEBUG
67LOG_FLAGS += -DIOT_INFO
68LOG_FLAGS += -DIOT_WARN
69LOG_FLAGS += -DIOT_ERROR
70
71COMPILER_FLAGS += -g
72COMPILER_FLAGS += $(LOG_FLAGS)
73
74MAKE_CMD = $(CC) $(SRC_FILES) $(COMPILER_FLAGS) -o $(APP_NAME) $(EXTERNAL_LIBS) $(LD_FLAG) $(INCLUDE_ALL_DIRS)
75
76all:
77 $(DEBUG)$(MAKE_CMD)
78
79clean:
80 rm -rf $(APP_DIR)/$(APP_NAME)
diff --git a/sample_apps/shadow_sample_console_echo/aws_iot_config.h b/sample_apps/shadow_sample_console_echo/aws_iot_config.h
new file mode 100644
index 0000000..c705cc0
--- /dev/null
+++ b/sample_apps/shadow_sample_console_echo/aws_iot_config.h
@@ -0,0 +1,53 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16/**
17 * @file aws_iot_config.h
18 * @brief AWS IoT specific configuration file
19 */
20
21#ifndef SRC_SHADOW_IOT_SHADOW_CONFIG_H_
22#define SRC_SHADOW_IOT_SHADOW_CONFIG_H_
23
24// Get from console
25// =================================================
26#define AWS_IOT_MQTT_HOST "" ///< Customer specific MQTT HOST. The same will be used for Thing Shadow
27#define AWS_IOT_MQTT_PORT 8883 ///< default port for MQTT/S
28#define AWS_IOT_MQTT_CLIENT_ID "c-sdk-client-id" ///< MQTT client ID should be unique for every device
29#define AWS_IOT_MY_THING_NAME "AWS-IoT-C-SDK" ///< Thing Name of the Shadow this device is associated with
30#define AWS_IOT_ROOT_CA_FILENAME "aws-iot-rootCA.crt" ///< Root CA file name
31#define AWS_IOT_CERTIFICATE_FILENAME "cert.pem" ///< device signed certificate file name
32#define AWS_IOT_PRIVATE_KEY_FILENAME "privkey.pem" ///< Device private key filename
33// =================================================
34
35// MQTT PubSub
36#define AWS_IOT_MQTT_TX_BUF_LEN 512 ///< Any time a message is sent out through the MQTT layer
37#define AWS_IOT_MQTT_RX_BUF_LEN 512
38#define AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS 5
39
40// Thing Shadow specific configs
41#define SHADOW_MAX_SIZE_OF_RX_BUFFER AWS_IOT_MQTT_RX_BUF_LEN+1 /** +1 is to leave space for the null terminator, this way the json parser can use it. */
42#define MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES 80 /** {"clientToken": ">>uniqueClientID<<+sequenceNumber"}*/
43#define MAX_SIZE_CLIENT_ID_WITH_SEQUENCE MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES + 10 /** {"clientToken": ">>uniqueClientID+sequenceNumber<<"}*/
44#define MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE MAX_SIZE_CLIENT_ID_WITH_SEQUENCE + 20 /** >>{"clientToken": "uniqueClientID+sequenceNumber"}<<*/
45#define MAX_SIZE_OF_THINGNAME 30
46#define MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME 10
47#define MAX_THINGNAME_HANDLED_AT_ANY_GIVEN_TIME 10
48#define MAX_JSON_TOKEN_EXPECTED 120
49#define MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME 60
50#define MAX_SIZE_OF_THING_NAME 20
51#define MAX_SHADOW_TOPIC_LENGTH_BYTES MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME + MAX_SIZE_OF_THING_NAME
52
53#endif /* SRC_SHADOW_IOT_SHADOW_CONFIG_H_ */
diff --git a/sample_apps/shadow_sample_console_echo/shadow_console_echo.c b/sample_apps/shadow_sample_console_echo/shadow_console_echo.c
new file mode 100644
index 0000000..63cbc5b
--- /dev/null
+++ b/sample_apps/shadow_sample_console_echo/shadow_console_echo.c
@@ -0,0 +1,223 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15#include <stdio.h>
16#include <stdlib.h>
17#include <string.h>
18#include <ctype.h>
19#include <unistd.h>
20#include <limits.h>
21
22#include "aws_iot_log.h"
23#include "aws_iot_version.h"
24#include "aws_iot_mqtt_interface.h"
25#include "aws_iot_shadow_interface.h"
26#include "aws_iot_config.h"
27
28/*
29 * The purpose of the application is to echo the contents of the message published on the delta topic
30 * For More details follow the console wizard
31 * Anything received on the delta topic will be sent back in reported
32 *
33 * This example will not use any of the json builder/helper functions provided in the aws_iot_shadow_json_data.h.
34 */
35char certDirectory[PATH_MAX + 1] = "../../certs";
36char HostAddress[255] = AWS_IOT_MQTT_HOST;
37uint32_t port = AWS_IOT_MQTT_PORT;
38bool messageArrivedOnDelta = false;
39
40/*
41 * @note The delta message is always sent on the "state" key in the json
42 * @note Any time messages are bigger than AWS_IOT_MQTT_RX_BUF_LEN the underlying MQTT library will ignore it. The maximum size of the message that can be received is limited to the AWS_IOT_MQTT_RX_BUF_LEN
43 */
44char stringToEchoDelta[SHADOW_MAX_SIZE_OF_RX_BUFFER];
45
46// Helper functions
47void parseInputArgsForConnectParams(int argc, char** argv);
48
49// Shadow Callback for receiving the delta
50void DeltaCallback(const char *pJsonValueBuffer, uint32_t valueLength, jsonStruct_t *pJsonStruct_t);
51
52void UpdateStatusCallback(const char *pThingName, ShadowActions_t action, Shadow_Ack_Status_t status,
53 const char *pReceivedJsonDocument, void *pContextData);
54
55int main(int argc, char** argv) {
56 IoT_Error_t rc = NONE_ERROR;
57 int32_t i = 0;
58
59 char rootCA[PATH_MAX + 1];
60 char clientCRT[PATH_MAX + 1];
61 char clientKey[PATH_MAX + 1];
62 char CurrentWD[PATH_MAX + 1];
63 char cafileName[] = AWS_IOT_ROOT_CA_FILENAME;
64 char clientCRTName[] = AWS_IOT_CERTIFICATE_FILENAME;
65 char clientKeyName[] = AWS_IOT_PRIVATE_KEY_FILENAME;
66
67 INFO("\nAWS IoT SDK Version %d.%d.%d-%s\n", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, VERSION_TAG);
68
69 getcwd(CurrentWD, sizeof(CurrentWD));
70 sprintf(rootCA, "%s/%s/%s", CurrentWD, certDirectory, cafileName);
71 sprintf(clientCRT, "%s/%s/%s", CurrentWD, certDirectory, clientCRTName);
72 sprintf(clientKey, "%s/%s/%s", CurrentWD, certDirectory, clientKeyName);
73
74 DEBUG("rootCA %s", rootCA);DEBUG("clientCRT %s", clientCRT);DEBUG("clientKey %s", clientKey);
75
76 parseInputArgsForConnectParams(argc, argv);
77
78 // initialize the mqtt client
79 MQTTClient_t mqttClient;
80 aws_iot_mqtt_init(&mqttClient);
81
82 ShadowParameters_t sp = ShadowParametersDefault;
83 sp.pMyThingName = AWS_IOT_MY_THING_NAME;
84 sp.pMqttClientId = AWS_IOT_MQTT_CLIENT_ID;
85 sp.pHost = AWS_IOT_MQTT_HOST;
86 sp.port = AWS_IOT_MQTT_PORT;
87 sp.pClientCRT = clientCRT;
88 sp.pClientKey = clientKey;
89 sp.pRootCA = rootCA;
90
91 INFO("Shadow Init");
92 rc = aws_iot_shadow_init(&mqttClient);
93 if (NONE_ERROR != rc) {
94 ERROR("Shadow Connection Error");
95 return rc;
96 }
97
98 INFO("Shadow Connect");
99 rc = aws_iot_shadow_connect(&mqttClient, &sp);
100 if (NONE_ERROR != rc) {
101 ERROR("Shadow Connection Error");
102 return rc;
103 }
104
105 jsonStruct_t deltaObject;
106 deltaObject.pData = stringToEchoDelta;
107 deltaObject.pKey = "state";
108 deltaObject.type = SHADOW_JSON_OBJECT;
109 deltaObject.cb = DeltaCallback;
110
111 /*
112 * Register the jsonStruct object
113 */
114 rc = aws_iot_shadow_register_delta(&mqttClient, &deltaObject);
115
116 // Now wait in the loop to receive any message sent from the console
117 while (rc == NONE_ERROR) {
118 /*
119 * Lets check for the incoming messages for 200 ms.
120 */
121 rc = aws_iot_shadow_yield(&mqttClient, 200);
122
123 if (messageArrivedOnDelta) {
124 INFO("\nSending delta message back %s\n", stringToEchoDelta);
125 rc = aws_iot_shadow_update(&mqttClient, AWS_IOT_MY_THING_NAME, stringToEchoDelta, UpdateStatusCallback, NULL, 2, true);
126 messageArrivedOnDelta = false;
127 }
128
129 // sleep for some time in seconds
130 sleep(1);
131 }
132
133 if (NONE_ERROR != rc) {
134 ERROR("An error occurred in the loop %d", rc);
135 }
136
137 INFO("Disconnecting");
138 rc = aws_iot_shadow_disconnect(&mqttClient);
139
140 if (NONE_ERROR != rc) {
141 ERROR("Disconnect error %d", rc);
142 }
143
144 return rc;
145}
146
147bool buildJSONForReported(char *pJsonDocument, size_t maxSizeOfJsonDocument, const char *pReceivedDeltaData, uint32_t lengthDelta) {
148 int32_t ret;
149
150 if (pJsonDocument == NULL) {
151 return false;
152 }
153
154 char tempClientTokenBuffer[MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE];
155
156 if(aws_iot_fill_with_client_token(tempClientTokenBuffer, MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE) != NONE_ERROR){
157 return false;
158 }
159
160 ret = snprintf(pJsonDocument, maxSizeOfJsonDocument, "{\"state\":{\"reported\":%.*s}, \"clientToken\":\"%s\"}", lengthDelta, pReceivedDeltaData, tempClientTokenBuffer);
161
162 if (ret >= maxSizeOfJsonDocument || ret < 0) {
163 return false;
164 }
165
166 return true;
167}
168
169void parseInputArgsForConnectParams(int argc, char** argv) {
170 int opt;
171
172 while (-1 != (opt = getopt(argc, argv, "h:p:c:"))) {
173 switch (opt) {
174 case 'h':
175 strcpy(HostAddress, optarg);
176 DEBUG("Host %s", optarg);
177 break;
178 case 'p':
179 port = atoi(optarg);
180 DEBUG("arg %s", optarg);
181 break;
182 case 'c':
183 strcpy(certDirectory, optarg);
184 DEBUG("cert root directory %s", optarg);
185 break;
186 case '?':
187 if (optopt == 'c') {
188 ERROR("Option -%c requires an argument.", optopt);
189 } else if (isprint(optopt)) {
190 WARN("Unknown option `-%c'.", optopt);
191 } else {
192 WARN("Unknown option character `\\x%x'.", optopt);
193 }
194 break;
195 default:
196 ERROR("ERROR in command line argument parsing");
197 break;
198 }
199 }
200
201}
202
203
204void DeltaCallback(const char *pJsonValueBuffer, uint32_t valueLength, jsonStruct_t *pJsonStruct_t) {
205
206 DEBUG("Received Delta message %.*s", valueLength, pJsonValueBuffer);
207
208 if (buildJSONForReported(stringToEchoDelta, SHADOW_MAX_SIZE_OF_RX_BUFFER, pJsonValueBuffer, valueLength)) {
209 messageArrivedOnDelta = true;
210 }
211}
212
213void UpdateStatusCallback(const char *pThingName, ShadowActions_t action, Shadow_Ack_Status_t status,
214 const char *pReceivedJsonDocument, void *pContextData) {
215
216 if (status == SHADOW_ACK_TIMEOUT) {
217 INFO("Update Timeout--");
218 } else if (status == SHADOW_ACK_REJECTED) {
219 INFO("Update RejectedXX");
220 } else if (status == SHADOW_ACK_ACCEPTED) {
221 INFO("Update Accepted !!");
222 }
223}
diff --git a/sample_apps/subscribe_publish_sample/Makefile b/sample_apps/subscribe_publish_sample/Makefile
new file mode 100644
index 0000000..8f913d4
--- /dev/null
+++ b/sample_apps/subscribe_publish_sample/Makefile
@@ -0,0 +1,73 @@
1CC = gcc
2
3#remove @ for no make command prints
4DEBUG=@
5
6APP_DIR = .
7APP_INCLUDE_DIRS += -I $(APP_DIR)
8APP_NAME=subscribe_publish_sample
9APP_SRC_FILES=$(APP_NAME).c
10
11#IoT client directory
12IOT_CLIENT_DIR=../../aws_iot_src
13IOT_INCLUDE_DIRS += -I $(IOT_CLIENT_DIR)/protocol/mqtt
14IOT_INCLUDE_DIRS += -I $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper
15IOT_INCLUDE_DIRS += -I $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux
16IOT_INCLUDE_DIRS += -I $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/common
17IOT_INCLUDE_DIRS += -I $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl
18IOT_INCLUDE_DIRS += -I $(IOT_CLIENT_DIR)/utils
19
20PLATFORM_DIR = $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/openssl
21PLATFORM_COMMON_DIR = $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper/platform_linux/common
22IOT_SRC_FILES += $(IOT_CLIENT_DIR)/protocol/mqtt/aws_iot_embedded_client_wrapper/aws_iot_mqtt_embedded_client_wrapper.c
23IOT_SRC_FILES += $(shell find $(PLATFORM_DIR)/ -name '*.c')
24IOT_SRC_FILES += $(shell find $(PLATFORM_COMMON_DIR)/ -name '*.c')
25
26#MQTT Paho Embedded C client directory
27MQTT_DIR = ../../aws_mqtt_embedded_client_lib
28MQTT_C_DIR = $(MQTT_DIR)/MQTTClient-C/src
29MQTT_EMB_DIR = $(MQTT_DIR)/MQTTPacket/src
30
31MQTT_INCLUDE_DIR += -I $(MQTT_EMB_DIR)
32MQTT_INCLUDE_DIR += -I $(MQTT_C_DIR)
33
34MQTT_SRC_FILES += $(shell find $(MQTT_EMB_DIR)/ -name '*.c')
35MQTT_SRC_FILES += $(MQTT_C_DIR)/MQTTClient.c
36
37
38#TLS - openSSL
39TLS_LIB_DIR = /usr/lib/
40TLS_INCLUDE_DIR = -I /usr/include/openssl
41EXTERNAL_LIBS += -L$(TLS_LIB_DIR)
42LD_FLAG := -ldl -lssl -lcrypto
43LD_FLAG += -Wl,-rpath,$(TLS_LIB_DIR)
44
45#Aggregate all include and src directories
46INCLUDE_ALL_DIRS += $(IOT_INCLUDE_DIRS)
47INCLUDE_ALL_DIRS += $(MQTT_INCLUDE_DIR)
48INCLUDE_ALL_DIRS += $(TLS_INCLUDE_DIR)
49INCLUDE_ALL_DIRS += $(APP_INCLUDE_DIRS)
50
51SRC_FILES += $(MQTT_SRC_FILES)
52SRC_FILES += $(APP_SRC_FILES)
53SRC_FILES += $(IOT_SRC_FILES)
54
55# Logging level control
56LOG_FLAGS += -DIOT_DEBUG
57LOG_FLAGS += -DIOT_INFO
58LOG_FLAGS += -DIOT_WARN
59LOG_FLAGS += -DIOT_ERROR
60
61
62COMPILER_FLAGS += -g
63COMPILER_FLAGS += $(LOG_FLAGS)
64
65MAKE_CMD = $(CC) $(SRC_FILES) $(COMPILER_FLAGS) -o $(APP_NAME) $(LD_FLAG) $(EXTERNAL_LIBS) $(INCLUDE_ALL_DIRS)
66
67all:
68 $(PRE_MAKE_CMD)
69 $(DEBUG)$(MAKE_CMD)
70 $(POST_MAKE_CMD)
71
72clean:
73 rm -rf $(APP_DIR)/$(APP_NAME)
diff --git a/sample_apps/subscribe_publish_sample/aws_iot_config.h b/sample_apps/subscribe_publish_sample/aws_iot_config.h
new file mode 100644
index 0000000..c705cc0
--- /dev/null
+++ b/sample_apps/subscribe_publish_sample/aws_iot_config.h
@@ -0,0 +1,53 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16/**
17 * @file aws_iot_config.h
18 * @brief AWS IoT specific configuration file
19 */
20
21#ifndef SRC_SHADOW_IOT_SHADOW_CONFIG_H_
22#define SRC_SHADOW_IOT_SHADOW_CONFIG_H_
23
24// Get from console
25// =================================================
26#define AWS_IOT_MQTT_HOST "" ///< Customer specific MQTT HOST. The same will be used for Thing Shadow
27#define AWS_IOT_MQTT_PORT 8883 ///< default port for MQTT/S
28#define AWS_IOT_MQTT_CLIENT_ID "c-sdk-client-id" ///< MQTT client ID should be unique for every device
29#define AWS_IOT_MY_THING_NAME "AWS-IoT-C-SDK" ///< Thing Name of the Shadow this device is associated with
30#define AWS_IOT_ROOT_CA_FILENAME "aws-iot-rootCA.crt" ///< Root CA file name
31#define AWS_IOT_CERTIFICATE_FILENAME "cert.pem" ///< device signed certificate file name
32#define AWS_IOT_PRIVATE_KEY_FILENAME "privkey.pem" ///< Device private key filename
33// =================================================
34
35// MQTT PubSub
36#define AWS_IOT_MQTT_TX_BUF_LEN 512 ///< Any time a message is sent out through the MQTT layer
37#define AWS_IOT_MQTT_RX_BUF_LEN 512
38#define AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS 5
39
40// Thing Shadow specific configs
41#define SHADOW_MAX_SIZE_OF_RX_BUFFER AWS_IOT_MQTT_RX_BUF_LEN+1 /** +1 is to leave space for the null terminator, this way the json parser can use it. */
42#define MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES 80 /** {"clientToken": ">>uniqueClientID<<+sequenceNumber"}*/
43#define MAX_SIZE_CLIENT_ID_WITH_SEQUENCE MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES + 10 /** {"clientToken": ">>uniqueClientID+sequenceNumber<<"}*/
44#define MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE MAX_SIZE_CLIENT_ID_WITH_SEQUENCE + 20 /** >>{"clientToken": "uniqueClientID+sequenceNumber"}<<*/
45#define MAX_SIZE_OF_THINGNAME 30
46#define MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME 10
47#define MAX_THINGNAME_HANDLED_AT_ANY_GIVEN_TIME 10
48#define MAX_JSON_TOKEN_EXPECTED 120
49#define MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME 60
50#define MAX_SIZE_OF_THING_NAME 20
51#define MAX_SHADOW_TOPIC_LENGTH_BYTES MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME + MAX_SIZE_OF_THING_NAME
52
53#endif /* SRC_SHADOW_IOT_SHADOW_CONFIG_H_ */
diff --git a/sample_apps/subscribe_publish_sample/subscribe_publish_sample.c b/sample_apps/subscribe_publish_sample/subscribe_publish_sample.c
new file mode 100644
index 0000000..dcf4cf6
--- /dev/null
+++ b/sample_apps/subscribe_publish_sample/subscribe_publish_sample.c
@@ -0,0 +1,189 @@
1/*
2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15#include <stdio.h>
16#include <stdlib.h>
17#include <ctype.h>
18#include <unistd.h>
19
20#include <signal.h>
21#include <memory.h>
22#include <sys/time.h>
23#include <limits.h>
24
25#include "aws_iot_log.h"
26#include "aws_iot_version.h"
27#include "aws_iot_mqtt_interface.h"
28#include "aws_iot_config.h"
29
30int MQTTcallbackHandler(MQTTCallbackParams params) {
31
32 INFO("Subscribe callback");
33 INFO("%.*s\t%.*s",
34 (int)params.TopicNameLen, params.pTopicName,
35 (int)params.MessageParams.PayloadLen, (char*)params.MessageParams.pPayload);
36
37 return 0;
38}
39
40void disconnectCallbackHandler(void) {
41 WARN("MQTT Disconnect");
42}
43
44
45char certDirectory[PATH_MAX + 1] = "../../certs";
46char HostAddress[255] = AWS_IOT_MQTT_HOST;
47uint32_t port = AWS_IOT_MQTT_PORT;
48uint32_t publishCount = 0;
49
50void parseInputArgsForConnectParams(int argc, char** argv) {
51 int opt;
52
53 while (-1 != (opt = getopt(argc, argv, "h:p:c:x:"))) {
54 switch (opt) {
55 case 'h':
56 strcpy(HostAddress, optarg);
57 DEBUG("Host %s", optarg);
58 break;
59 case 'p':
60 port = atoi(optarg);
61 DEBUG("arg %s", optarg);
62 break;
63 case 'c':
64 strcpy(certDirectory, optarg);
65 DEBUG("cert root directory %s", optarg);
66 break;
67 case 'x':
68 publishCount = atoi(optarg);
69 DEBUG("publish %s times\n", optarg);
70 break;
71 case '?':
72 if (optopt == 'c') {
73 ERROR("Option -%c requires an argument.", optopt);
74 }
75 else if (isprint(optopt)) {
76 WARN("Unknown option `-%c'.", optopt);
77 }
78 else {
79 WARN("Unknown option character `\\x%x'.", optopt);
80 }
81 break;
82 default:
83 ERROR("Error in command line argument parsing");
84 break;
85 }
86 }
87
88}
89
90int main(int argc, char** argv) {
91 IoT_Error_t rc = NONE_ERROR;
92 int32_t i = 0;
93 bool infinitePublishFlag = true;
94
95 char rootCA[PATH_MAX + 1];
96 char clientCRT[PATH_MAX + 1];
97 char clientKey[PATH_MAX + 1];
98 char CurrentWD[PATH_MAX + 1];
99 char cafileName[] = AWS_IOT_ROOT_CA_FILENAME;
100 char clientCRTName[] = AWS_IOT_CERTIFICATE_FILENAME;
101 char clientKeyName[] = AWS_IOT_PRIVATE_KEY_FILENAME;
102
103 parseInputArgsForConnectParams(argc, argv);
104
105
106 INFO("\nAWS IoT SDK Version %d.%d.%d-%s\n", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, VERSION_TAG);
107
108
109 getcwd(CurrentWD, sizeof(CurrentWD));
110 sprintf(rootCA, "%s/%s/%s", CurrentWD, certDirectory, cafileName);
111 sprintf(clientCRT, "%s/%s/%s", CurrentWD, certDirectory, clientCRTName);
112 sprintf(clientKey, "%s/%s/%s", CurrentWD, certDirectory, clientKeyName);
113
114 DEBUG("rootCA %s", rootCA);
115 DEBUG("clientCRT %s", clientCRT);
116 DEBUG("clientKey %s", clientKey);
117
118 MQTTConnectParams connectParams = MQTTConnectParamsDefault;
119
120 connectParams.KeepAliveInterval_sec = 10;
121 connectParams.isCleansession = true;
122 connectParams.MQTTVersion = MQTT_3_1_1;
123 connectParams.pClientID = "CSDK-test-device";
124 connectParams.pHostURL = HostAddress;
125 connectParams.port = port;
126 connectParams.isWillMsgPresent = false;
127 connectParams.pRootCALocation = rootCA;
128 connectParams.pDeviceCertLocation = clientCRT;
129 connectParams.pDevicePrivateKeyLocation = clientKey;
130 connectParams.mqttCommandTimeout_ms = 2000;
131 connectParams.tlsHandshakeTimeout_ms = 5000;
132 connectParams.isSSLHostnameVerify = true;// ensure this is set to true for production
133 connectParams.disconnectHandler = disconnectCallbackHandler;
134
135 INFO("Connecting...");
136 rc = aws_iot_mqtt_connect(&connectParams);
137 if (NONE_ERROR != rc) {
138 ERROR("Error(%d) connecting to %s:%d", rc, connectParams.pHostURL, connectParams.port);
139 }
140
141 MQTTSubscribeParams subParams = MQTTSubscribeParamsDefault;
142 subParams.mHandler = MQTTcallbackHandler;
143 subParams.pTopic = "sdkTest/sub";
144 subParams.qos = QOS_0;
145
146 if (NONE_ERROR == rc) {
147 INFO("Subscribing...");
148 rc = aws_iot_mqtt_subscribe(&subParams);
149 if (NONE_ERROR != rc) {
150 ERROR("Error subscribing");
151 }
152 }
153
154 MQTTMessageParams Msg = MQTTMessageParamsDefault;
155 Msg.qos = QOS_0;
156 char cPayload[100];
157 sprintf(cPayload, "%s : %d ", "hello from SDK", i);
158 Msg.pPayload = (void *) cPayload;
159 Msg.PayloadLen = strlen(cPayload) + 1;
160
161 MQTTPublishParams Params = MQTTPublishParamsDefault;
162 Params.pTopic = "sdkTest/sub";
163 Params.MessageParams = Msg;
164
165 if(publishCount != 0){
166 infinitePublishFlag = false;
167 }
168
169 while (NONE_ERROR == rc && (publishCount > 0 || infinitePublishFlag)) {
170 rc = aws_iot_mqtt_yield(100);
171 INFO("-->sleep");
172 sleep(1);
173 sprintf(cPayload, "%s : %d ", "hello from SDK", i++);
174 rc = aws_iot_mqtt_publish(&Params);
175 if(publishCount > 0){
176 publishCount--;
177 }
178 }
179
180 if(NONE_ERROR != rc){
181 ERROR("An error occurred in the loop.\n");
182 }
183 else{
184 INFO("Publish done\n");
185 }
186
187 return rc;
188}
189