Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync MQTT files from C-SDK for commit e60683b #1

Merged
merged 4 commits into from
Aug 27, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Include filepaths for source and include.
include( mqttFilePaths.cmake )

# MQTT library target.
add_library( mqtt
${MQTT_SOURCES} )

# MQTT public include path.
target_include_directories( mqtt PUBLIC ${MQTT_INCLUDE_PUBLIC_DIRS} )

# MQTT private include path.
target_include_directories( mqtt PRIVATE ${MQTT_INCLUDE_PRIVATE_DIRS}
${LOGGING_INCLUDE_DIRS} )

# Organization of MQTT in IDE projects.
set_target_properties( mqtt PROPERTIES FOLDER libraries/standard )
source_group( include FILES include/mqtt.h include/mqtt_lightweight.h include/mqtt_state.h )
source_group( src FILES ${MQTT_SOURCES} )
source_group( src\\private FILES src/private/mqtt_internal.h )

if(BUILD_TESTS)
add_subdirectory( utest )
add_subdirectory( integration-test )
endif()
4 changes: 0 additions & 4 deletions CODE_OF_CONDUCT.md

This file was deleted.

61 changes: 0 additions & 61 deletions CONTRIBUTING.md

This file was deleted.

15 changes: 0 additions & 15 deletions LICENSE

This file was deleted.

21 changes: 7 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
## My Project
# MQTT Client Library

TODO: Fill this README out!
## Generating documentation

Be sure to:

* Change the title in this README
* Edit your repository description on GitHub

## Security

See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.

## License

This library is licensed under the MIT-0 License. See the LICENSE file.
The Doxygen references were created using Doxygen version 1.8.20. To generate the
Doxygen pages, please run the following command from the root of this repository:

```shell
doxygen doc/doxygen/config.doxyfile
```
15 changes: 15 additions & 0 deletions cbmc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Emitted when running CBMC proofs
proofs/**/logs
proofs/**/gotos
proofs/**/report
proofs/**/html

# Emitted by CBMC Viewer
TAGS-*

# Emitted by Arpa
arpa_cmake/
Makefile.arpa

# These files should be overwritten whenever prepare.py runs
cbmc-batch.yaml
1 change: 1 addition & 0 deletions cbmc/include/README.md
44 changes: 44 additions & 0 deletions cbmc/include/event_callback_stub.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

/**
* @file event_callback_stub.h
* @brief Stub definition for the application defined MQTT library incoming
* event callback.
*/
#ifndef EVENT_CALLBACK_STUB_H_
#define EVENT_CALLBACK_STUB_H_

/* mqtt.h must precede including this header. */

/**
* @brief User defined callback for receiving incoming publishes and incoming
* acks.
*
* @param[in] pContext Initialized MQTT context.
* @param[in] pPacketInfo Information on the type of incoming MQTT packet.
* @param[in] pDeserializedInfo Deserialized information from incoming packet.
*/
void EventCallbackStub( MQTTContext_t * pContext,
MQTTPacketInfo_t * pPacketInfo,
MQTTDeserializedInfo_t * pDeserializedInfo );

#endif /* ifndef EVENT_CALLBACK_STUB_H_ */
37 changes: 37 additions & 0 deletions cbmc/include/get_time_stub.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

/**
* @file get_time_stub.h
* @brief Stub definition for the application defined callback to retrieve the
* current time in milliseconds.
*/
#ifndef GET_TIME_STUB_H_
#define GET_TIME_STUB_H_

/**
* Application defined callback to retrieve the current time in milliseconds.
*
* @return The current time in milliseconds.
*/
uint32_t GetCurrentTimeStub( void );

#endif /* ifndef GET_TIME_STUB_H_ */
Loading