1
0
mirror of https://github.com/qt/qtmqtt.git synced 2026-10-25 16:16:26 +00:00

Initial commit

rough sketch to get started
This commit is contained in:
Maurice Kalinowski 2017-01-19 10:27:05 +01:00
commit b9f44867a7
17 changed files with 658 additions and 0 deletions

4
.gitattributes vendored Normal file
View File

@ -0,0 +1,4 @@
.tag export-subst
.gitignore export-ignore
.gitattributes export-ignore
.commit-template export-ignore

342
.gitignore vendored Normal file
View File

@ -0,0 +1,342 @@
# Prerequisites
*.d
# Compiled Object files
*.o
*.ko
*.obj
*.elf
*.slo
*.lo
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Compiled Static libraries
*.a
*.la
*.lai
*.lib
# Compiled Dynamic libraries
*.so
*.so.*
*.dll
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Qt-es
/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.qbs.user
*.qbs.user.*
*.moc
moc_*.cpp
qrc_*.cpp
ui_*.h
Makefile*
*build-*
## QtCreator
*.autosave
# QtCtreator Qml
*.qmlproject.user
*.qmlproject.user.*
# QtCtreator CMake
CMakeLists.txt.user*
## Visual Studio
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config

4
.qmake.conf Normal file
View File

@ -0,0 +1,4 @@
load(qt_build_config)
CONFIG += warning_clean
MODULE_VERSION = 5.8.0

1
.tag Normal file
View File

@ -0,0 +1 @@
$Format:%H$

6
qtmqtt.pro Normal file
View File

@ -0,0 +1,6 @@
lessThan(QT_MAJOR_VERSION, 5) {
error("Cannot build current Qt MQTT sources with Qt version $${QT_VERSION}.")
}
load(configure)
load(qt_parts)

View File

@ -0,0 +1,34 @@
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtMqtt
description = Qt MQTT Reference Documentation
version = $QT_VERSION
qhp.projects = QtMqtt
qhp.QtMqtt.file = qtmqtt.qhp
qhp.QtMqtt.namespace = org.qt-project.qtmqtt.$QT_VERSION_TAG
qhp.QtMqtt.virtualFolder = qtmqtt
qhp.QtMqtt.indexTitle = Qt MQTT
qhp.QtMqtt.indexRoot =
qhp.QtMqtt.filterAttributes = qtmqtt $QT_VERSION qtrefdoc
qhp.QtMqtt.customFilters.Qt.name = QtMqtt $QT_VERSION
qhp.QtMqtt.customFilters.Qt.filterAttributes = qtmqtt $QT_VERSION
qhp.QtMqtt.subprojects = classes
qhp.QtMqtt.subprojects.classes.title = C++ Classes
qhp.QtMqtt.subprojects.classes.indexTitle = Qt MQTT C++ Classes
qhp.QtMqtt.subprojects.classes.selectors = class fake:headerfile
qhp.QtMqtt.subprojects.classes.sortPages = true
headerdirs += ..
sourcedirs += ..
imagedirs += images
excludedirs += ../qt4support
depends += qtcore qtdoc qtnetwork qmake
navigation.landingpage = "Qt MQTT"
navigation.cppclassespage = "Qt MQTT C++ Classes"

View File

@ -0,0 +1,29 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
****************************************************************************/
/*!
\page qtmqtt-index.html
\title Qt MQTT
\brief Provides an API to make MQTT programming simple and portable.
To use these classes in your application, use the following include statement:
\code
#include <QtMqtt/QtMqtt>
\endcode
To link against the module, add this line to your \l qmake \c .pro file:
\code
QT += mqtt
\endcode
\section1 Related Information
\list
\li \l{Qt MQTT C++ Classes}{C++ Classes}
\endlist
*/

View File

@ -0,0 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
****************************************************************************/
/*!
\module QtMqtt
\title Qt MQTT C++ Classes
\ingroup modules
\qtvariable mqtt
\brief List of C++ classes that enable sending messages via the MQTT protocol.
To use these classes in your application, use the following include statement:
\code
#include <QtMqtt/QtMqtt>
\endcode
To link against the module, add this line to your \l qmake \c .pro file:
\code
QT += mqtt
\endcode
*/

View File

@ -0,0 +1,137 @@
a:link, a:visited {
color: #00732F;
text-decoration: none;
font-weight: bold;
}
body {
font: normal 400 14px/1.2 Arial;
margin-top: 85px;
}
h1 {
margin: 0;
}
h2 {
font: 500 20px/1.2 Arial;
}
h3.fn, span.fn {
-moz-border-radius: 7px 7px 7px 7px;
-webkit-border-radius: 7px 7px 7px 7px;
border-radius: 7px 7px 7px 7px;
background-color: #F6F6F6;
border-width: 1px;
border-style: solid;
border-color: #E6E6E6;
word-spacing: 3px;
padding: 3px 5px;
}
table, pre {
-moz-border-radius: 7px 7px 7px 7px;
-webkit-border-radius: 7px 7px 7px 7px;
border-radius: 7px 7px 7px 7px;
background-color: #F6F6F6;
border: 1px solid #E6E6E6;
border-collapse: separate;
font-size: 12px;
line-height: 1.2;
margin-bottom: 25px;
margin-left: 15px;
}
table td {
padding: 3px 15px 3px 20px;
}
table tr.even {
background-color: white;
color: #66666E;
}
table tr.odd {
background-color: #F6F6F6;
color: #66666E;
}
li {
margin-bottom: 10px;
padding-left: 12px;
}
.cpp {
display: block;
margin: 10;
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
padding: 20px 0 20px 0;
}
.footer {
margin-top: 50px;
}
.memItemLeft {
padding-right: 3px;
}
.memItemRight {
padding: 3px 15px 3px 0;
}
.qml {
display: block;
margin: 10;
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
padding: 20px 0 20px 0;
}
.qmldefault {
padding-left: 5px;
float: right;
color: red;
}
.qmlreadonly {
padding-left: 5px;
float: right;
color: #254117;
}
.rightAlign {
padding: 3px 5px 3px 10px;
text-align: right;
}
.title {
background-color: white;
color: #44A51C;
font-family: Verdana;
font-size: 35px;
font-weight: normal;
left: 0;
padding-bottom: 5px;
padding-left: 16px;
padding-top: 20px;
position: absolute;
right: 0;
top: 0;
}
.toc {
float: right;
-moz-border-radius: 7px 7px 7px 7px;
-webkit-border-radius: 7px 7px 7px 7px;
border-radius: 7px 7px 7px 7px;
background-color: #F6F6F6;
border: 1px solid #DDD;
margin: 0 20px 10px 10px;
padding: 20px 15px 20px 20px;
height: auto;
width: 200px;
}

17
src/mqtt/mqtt.pro Normal file
View File

@ -0,0 +1,17 @@
TARGET = QtMqtt
CONFIG += c++11
QT_FOR_PRIVATE = network
QMAKE_DOCS = $$PWD/doc/qtmqtt.qdocconf
PUBLIC_HEADERS += \
qmqttglobal.h
PRIVATE_HEADERS +=
SOURCES +=
HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS
load(qt_module)

24
src/mqtt/qmqttglobal.h Normal file
View File

@ -0,0 +1,24 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
****************************************************************************/
#pragma once
#include <QtCore/qglobal.h>
QT_BEGIN_NAMESPACE
#ifndef QT_STATIC
# if defined(QT_BUILD_MQTT_LIB)
# define Q_MQTT_EXPORT Q_DECL_EXPORT
# else
# define Q_MQTT_EXPORT Q_DECL_IMPORT
# endif
#else
# define Q_MQTT_EXPORT
#endif
QT_END_NAMESPACE

3
src/src.pro Normal file
View File

@ -0,0 +1,3 @@
TEMPLATE = subdirs
SUBDIRS = mqtt

7
sync.profile Normal file
View File

@ -0,0 +1,7 @@
%modules = (
"QtMqtt" => "$basedir/src/mqtt",
);
%dependencies = (
"qtbase" => ""
);

2
tests/auto/auto.pro Normal file
View File

@ -0,0 +1,2 @@
TEMPLATE = subdirs
SUBDIRS += cmake

View File

@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 2.8)
project(qmake_cmake_files)
enable_testing()
find_package(Qt5Core REQUIRED)
include("${_Qt5CTestMacros}")
test_module_includes(
Mqtt QMqtt
)

View File

@ -0,0 +1,6 @@
# Cause make to do nothing.
TEMPLATE = subdirs
CMAKE_QT_MODULES_UNDER_TEST = mqtt
CONFIG += ctest_testcase

2
tests/tests.pro Normal file
View File

@ -0,0 +1,2 @@
TEMPLATE = subdirs
SUBDIRS += auto