Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
paho.mqtt.c
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eclipse
paho.mqtt.c
Commits
5f1bfaea
Commit
5f1bfaea
authored
Feb 10, 2015
by
Ian Craggs
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
parents
08e3029c
d2c47512
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
24 deletions
+38
-24
Makefile
Makefile
+26
-13
MQTTAsync.h
src/MQTTAsync.h
+3
-3
MQTTClient.h
src/MQTTClient.h
+7
-6
MQTTVersion.c
src/MQTTVersion.c
+2
-2
No files found.
Makefile
View file @
5f1bfaea
...
...
@@ -23,6 +23,24 @@
SHELL
=
/bin/sh
.PHONY
:
clean
,
mkdir
,
install
,
uninstall
,
html
ifndef
release.version
release.version
=
1.0.3
endif
# determine current platform
BUILD_TYPE
?=
debug
ifeq
($(OS),Windows_NT)
OSTYPE
?=
$(OS)
MACHINETYPE
?=
$(PROCESSOR_ARCHITECTURE)
else
OSTYPE
?=
$(
shell
uname
-s
)
MACHINETYPE
?=
$(
shell
uname
-m
)
build.level
=
$(
shell
date
)
endif
# OS
ifeq
($(OSTYPE),linux)
OSTYPE
=
Linux
endif
# assume this is normally run in the main Paho directory
ifndef
srcdir
srcdir
=
src
...
...
@@ -78,19 +96,6 @@ MQTTLIB_CS = paho-mqtt3cs
MQTTLIB_A
=
paho-mqtt3a
MQTTLIB_AS
=
paho-mqtt3as
# determine current platform
BUILD_TYPE
?=
debug
ifeq
($(OS),Windows_NT)
OSTYPE
?=
$(OS)
MACHINETYPE
?=
$(PROCESSOR_ARCHITECTURE)
else
OSTYPE
?=
$(
shell
uname
-s
)
MACHINETYPE
?=
$(
shell
uname
-m
)
endif
# OS
ifeq
($(OSTYPE),linux)
OSTYPE
=
Linux
endif
CC
?=
gcc
ifndef
INSTALL
...
...
@@ -121,6 +126,8 @@ LDFLAGS_AS = $(LDFLAGS) -shared $(START_GROUP) -lpthread $(EXTRA_LIB) -lssl -lcr
ifeq
($(OSTYPE),Linux)
SED_COMMAND
=
sed
-i
"s/
\#\#
MQTTCLIENT_VERSION_TAG
\#\#
/
${
release
.version
}
/g; s/
\#\#
MQTTCLIENT_BUILD_TAG
\#\#
/
${
build
.level
}
/g"
MQTTCLIENT_INIT
=
MQTTClient_init
MQTTASYNC_INIT
=
MQTTAsync_init
START_GROUP
=
-Wl
,--start-group
...
...
@@ -135,6 +142,8 @@ LDFLAGS_AS += -Wl,-soname,lib${MQTTLIB_AS}.so.${MAJOR_VERSION} -Wl,-no-whole-arc
else
ifeq
($(OSTYPE),Darwin)
SED_COMMAND
=
sed
-i
""
-e
"s/
\#\#
MQTTCLIENT_VERSION_TAG
\#\#
/
${
release
.version
}
/g"
-e
"s/
\#\#
MQTTCLIENT_BUILD_TAG
\#\#
/
${
build
.level
}
/g"
MQTTCLIENT_INIT
=
_MQTTClient_init
MQTTASYNC_INIT
=
_MQTTAsync_init
START_GROUP
=
...
...
@@ -181,21 +190,25 @@ ${ASYNC_SAMPLES}: ${blddir}/samples/%: ${srcdir}/samples/%.c $(MQTTLIB_A_TARGET)
${
CC
}
-o
$@
$<
-l
${
MQTTLIB_A
}
${
FLAGS_EXE
}
${MQTTLIB_C_TARGET}
:
${SOURCE_FILES_C} ${HEADERS_C}
$(SED_COMMAND)
$(srcdir)
/MQTTClient.c
${
CC
}
${
CCFLAGS_SO
}
-o
$@
${
SOURCE_FILES_C
}
${
LDFLAGS_C
}
-
ln
-s
lib
$(MQTTLIB_C)
.so.
${
VERSION
}
${
blddir
}
/lib
$(MQTTLIB_C)
.so.
${
MAJOR_VERSION
}
-
ln
-s
lib
$(MQTTLIB_C)
.so.
${
MAJOR_VERSION
}
${
blddir
}
/lib
$(MQTTLIB_C)
.so
${MQTTLIB_CS_TARGET}
:
${SOURCE_FILES_CS} ${HEADERS_C}
$(SED_COMMAND)
$(srcdir)
/MQTTClient.c
${
CC
}
${
CCFLAGS_SO
}
-o
$@
${
SOURCE_FILES_CS
}
-DOPENSSL
${
LDFLAGS_CS
}
-
ln
-s
lib
$(MQTTLIB_CS)
.so.
${
VERSION
}
${
blddir
}
/lib
$(MQTTLIB_CS)
.so.
${
MAJOR_VERSION
}
-
ln
-s
lib
$(MQTTLIB_CS)
.so.
${
MAJOR_VERSION
}
${
blddir
}
/lib
$(MQTTLIB_CS)
.so
${MQTTLIB_A_TARGET}
:
${SOURCE_FILES_A} ${HEADERS_A}
$(SED_COMMAND)
$(srcdir)
/MQTTAsync.c
${
CC
}
${
CCFLAGS_SO
}
-o
$@
${
SOURCE_FILES_A
}
${
LDFLAGS_A
}
-
ln
-s
lib
$(MQTTLIB_A)
.so.
${
VERSION
}
${
blddir
}
/lib
$(MQTTLIB_A)
.so.
${
MAJOR_VERSION
}
-
ln
-s
lib
$(MQTTLIB_A)
.so.
${
MAJOR_VERSION
}
${
blddir
}
/lib
$(MQTTLIB_A)
.so
${MQTTLIB_AS_TARGET}
:
${SOURCE_FILES_AS} ${HEADERS_A}
$(SED_COMMAND)
$(srcdir)
/MQTTAsync.c
${
CC
}
${
CCFLAGS_SO
}
-o
$@
${
SOURCE_FILES_AS
}
-DOPENSSL
${
LDFLAGS_AS
}
-
ln
-s
lib
$(MQTTLIB_AS)
.so.
${
VERSION
}
${
blddir
}
/lib
$(MQTTLIB_AS)
.so.
${
MAJOR_VERSION
}
-
ln
-s
lib
$(MQTTLIB_AS)
.so.
${
MAJOR_VERSION
}
${
blddir
}
/lib
$(MQTTLIB_AS)
.so
...
...
src/MQTTAsync.h
View file @
5f1bfaea
/*******************************************************************************
* Copyright (c) 2009, 201
4
IBM Corp.
* Copyright (c) 2009, 201
5
IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
...
...
@@ -23,7 +23,7 @@
* @cond MQTTAsync_main
* @mainpage Asynchronous MQTT client library for C
*
* © Copyright IBM Corp. 2009, 201
4
* © Copyright IBM Corp. 2009, 201
5
*
* @brief An Asynchronous MQTT client library for C.
*
...
...
@@ -447,7 +447,7 @@ DLLExport int MQTTAsync_setCallbacks(MQTTAsync handle, void* context, MQTTAsync_
* @param serverURI A null-terminated string specifying the server to
* which the client will connect. It takes the form <i>protocol://host:port</i>.
* <i>protocol</i> must be <i>tcp</i> or <i>ssl</i>. For <i>host</i>, you can
* specify either an IP address or a
domain
name. For instance, to connect to
* specify either an IP address or a
host
name. For instance, to connect to
* a server running on the local machines with the default MQTT port, specify
* <i>tcp://localhost:1883</i>.
* @param clientId The client identifier passed to the server when the
...
...
src/MQTTClient.h
View file @
5f1bfaea
/*******************************************************************************
* Copyright (c) 2009, 201
4
IBM Corp.
* Copyright (c) 2009, 201
5
IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
...
...
@@ -38,7 +38,7 @@
* @endcond
* @cond MQTTClient_main
* @mainpage MQTT Client library for C
* © Copyright IBM Corp. 2009, 201
4
* © Copyright IBM Corp. 2009, 201
5
*
* @brief An MQTT client library in C.
*
...
...
@@ -370,8 +370,9 @@ DLLExport int MQTTClient_setCallbacks(MQTTClient handle, void* context, MQTTClie
* this function.
* @param serverURI A null-terminated string specifying the server to
* which the client will connect. It takes the form <i>protocol://host:port</i>.
* Currently, <i>protocol</i> must be <i>tcp</i>. For <i>host</i>, you can
* specify either an IP address or a domain name. For instance, to connect to
* Currently, <i>protocol</i> must be <i>tcp</i> or <i>ssl</i>.
* For <i>host</i>, you can
* specify either an IP address or a host name. For instance, to connect to
* a server running on the local machines with the default MQTT port, specify
* <i>tcp://localhost:1883</i>.
* @param clientId The client identifier passed to the server when the
...
...
@@ -567,13 +568,13 @@ typedef struct
*/
MQTTClient_willOptions
*
will
;
/**
* MQTT servers that support the MQTT v3.1 protocol provide authentication
* MQTT servers that support the MQTT v3.1
.1
protocol provide authentication
* and authorisation by user name and password. This is the user name
* parameter.
*/
const
char
*
username
;
/**
* MQTT servers that support the MQTT v3.1 protocol provide authentication
* MQTT servers that support the MQTT v3.1
.1
protocol provide authentication
* and authorisation by user name and password. This is the password
* parameter.
*/
...
...
src/MQTTVersion.c
View file @
5f1bfaea
/*******************************************************************************
* Copyright (c) 2012, 201
4
IBM Corp.
* Copyright (c) 2012, 201
5
IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
...
...
@@ -178,7 +178,7 @@ void printEyecatchers(char* filename)
int
main
(
int
argc
,
char
**
argv
)
{
printf
(
"MQTTVersion: print the version strings of an MQTT client library
\n
"
);
printf
(
"Copyright (c) 201
3 IBM Corp.
\n
"
);
printf
(
"Copyright (c) 201
2, 2015 IBM Corp.
\n
"
);
if
(
argc
==
1
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment