• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  *    Ian Craggs - initial API and implementation and/or initial documentation
15  *    Ian Craggs - MQTT 3.1.1 updates
16  *******************************************************************************/
17 
18 #if !defined(MQTTPROTOCOL_H)
19 #define MQTTPROTOCOL_H
20 
21 #include "LinkedList.h"
22 #include "MQTTPacket.h"
23 #include "Clients.h"
24 
25 #define MAX_MSG_ID 65535
26 #define MAX_CLIENTID_LEN 65535
27 
28 typedef struct
29 {
30 	int socket;
31 	Publications* p;
32 } pending_write;
33 
34 
35 typedef struct
36 {
37 	List publications;
38 	unsigned int msgs_received;
39 	unsigned int msgs_sent;
40 	List pending_writes; /* for qos 0 writes not complete */
41 } MQTTProtocol;
42 
43 
44 #include "MQTTProtocolOut.h"
45 
46 #endif
47