Google Cloud IoT device SDK for embedded C  1.0.2
iotc_connection_data.h
Go to the documentation of this file.
1 /* Copyright 2018-2020 Google LLC
2  *
3  * This is part of the Google Cloud IoT Device SDK for Embedded C.
4  * It is licensed under the BSD 3-Clause license; you may not use this file
5  * except in compliance with the License.
6  *
7  * You may obtain a copy of the License at:
8  * https://opensource.org/licenses/BSD-3-Clause
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __IOTC_CONNECTION_DATA_H__
18 #define __IOTC_CONNECTION_DATA_H__
19 
20 #include <iotc_mqtt.h>
21 #include "iotc_types.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
52 
59 typedef enum iotc_session_type_e {
65 
74 typedef struct iotc_connection_data_s {
76  char* host;
78  char* username;
80  char* password;
82  char* client_id;
84  uint16_t port;
94  char* will_topic;
96  char* will_message;
102 
103 #ifdef __cplusplus
104 }
105 #endif
106 
107 #endif /* __IOTC_CONNECTION_DATA_H__ */
The connection is not established and there is no pending connection request.
struct iotc_connection_data_s iotc_connection_data_t
The MQTT CONNECT parameters.
enum iotc_mqtt_retain_e iotc_mqtt_retain_t
The MQTT retain flag.
The MQTT header flags.
iotc_mqtt_retain_t will_retain
Unused.
char * host
The MQTT broker hostname.
enum iotc_mqtt_qos_e iotc_mqtt_qos_t
The MQTT Quality of Service levels.
char * username
The MQTT client username.
uint16_t connection_timeout
The connection timeout in seconds.
iotc_session_type_t session_type
The MQTT client session.
The MQTT CONNECT parameters.
iotc_connection_state_e
MQTT unclean session.
iotc_mqtt_qos_t will_qos
Unused.
iotc_connection_state_t connection_state
The CONNACK message from the MQTT broker.
enum iotc_session_type_e iotc_session_type_t
MQTT session types.
char * password
The MQTT client password.
char * client_id
The MQTT client ID.
The connection is closed.
Defines custom data formats.
iotc_session_type_e
The disconnect operation started.
enum iotc_connection_state_e iotc_connection_state_t
Connection process and lifecycle states.
MQTT clean session.
uint16_t port
The port on which the MQTT broker listens.
The client connected to an MQTT broker.
The connect operation started.
uint16_t keepalive_timeout
MQTT keepalive in seconds.