Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
Eclipse Foundation
Eclipse Paho C Client Library for the MQTT Protocol
提交
5f1bfaea
E
Eclipse Paho C Client Library for the MQTT Protocol
项目概览
镜像
/
Eclipse Foundation
/
Eclipse Paho C Client Library for the MQTT Protocol
大约 1 年 前同步成功
通知
251
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
Eclipse Paho C Client Library for the MQTT Protocol
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5f1bfaea
编写于
2月 10, 2015
作者:
I
Ian Craggs
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
08e3029c
d2c47512
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
38 addition
and
24 deletion
+38
-24
Makefile
Makefile
+26
-13
src/MQTTAsync.h
src/MQTTAsync.h
+3
-3
src/MQTTClient.h
src/MQTTClient.h
+7
-6
src/MQTTVersion.c
src/MQTTVersion.c
+2
-2
未找到文件。
Makefile
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录