Skip to content

Commit

Permalink
Merge pull request #440 from DevnathNair/fix-codebase-typos
Browse files Browse the repository at this point in the history
Fix Typos Across The Project
  • Loading branch information
fpagliughi authored Jun 22, 2023
2 parents d1a2943 + c6947e1 commit 121cf9f
Show file tree
Hide file tree
Showing 17 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion src/async_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ async_client::~async_client()


// Callback for MQTTAsync_setConnected()
// This is installed with the normall callbacks and with a call to
// This is installed with the normal callbacks and with a call to
// reconnect() to indicate that it succeeded. It signals the client's
// connect token then calls any registered callbacks.
void async_client::on_connected(void* context, char* cause)
Expand Down
12 changes: 6 additions & 6 deletions src/mqtt/connect_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ class connect_options
/**
* Sets the "keep alive" interval.
* This is the maximum time that should pass without communications
* between client and server. If no massages pass in this time, the
* between client and server. If no messages pass in this time, the
* client will ping the broker.
* @param keepAliveInterval The keep alive interval in seconds.
*/
Expand All @@ -331,7 +331,7 @@ class connect_options
/**
* Sets the "keep alive" interval with a chrono duration.
* This is the maximum time that should pass without communications
* between client and server. If no massages pass in this time, the
* between client and server. If no messages pass in this time, the
* client will ping the broker.
* @param interval The keep alive interval.
*/
Expand Down Expand Up @@ -570,12 +570,12 @@ class connect_data
connect_data();
/**
* Creates connection data with a user name, but no password.
* @param userName The user name fopr reconnecting to the MQTT broker.
* @param userName The user name for reconnecting to the MQTT broker.
*/
explicit connect_data(string_ref userName);
/**
* Creates connection data with a user name and password.
* @param userName The user name fopr reconnecting to the MQTT broker.
* @param userName The user name for reconnecting to the MQTT broker.
* @param password The password for connecting to the MQTT broker.
*/
connect_data(string_ref userName, binary_ref password);
Expand Down Expand Up @@ -632,7 +632,7 @@ class connect_options_builder
* Sets whether the server should remember state for the client across
* reconnects. (MQTT v3.x only)
* @param on @em true if the server should remember state for the client
* across reconnects, @em false othherwise.
* across reconnects, @em false otherwise.
*/
auto clean_session(bool on=true) -> self& {
opts_.set_clean_session(on);
Expand All @@ -641,7 +641,7 @@ class connect_options_builder
/**
* Sets the "keep alive" interval with a chrono duration.
* This is the maximum time that should pass without communications
* between client and server. If no massages pass in this time, the
* between client and server. If no messages pass in this time, the
* client will ping the broker.
* @param interval The keep alive interval.
*/
Expand Down
8 changes: 4 additions & 4 deletions src/mqtt/create_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class create_options
*/
create_options() : opts_(DFLT_C_STRUCT) {}
/**
* Default create optionsfor the specified version of MQTT.
* Default create options for the specified version of MQTT.
* @param mqttVersion The MQTT version used to create the client.
*/
explicit create_options(int mqttVersion);
Expand Down Expand Up @@ -160,7 +160,7 @@ class create_options
return to_bool(opts_.persistQoS0);
}
/**
* Determeine whether to persist QoS 0 messages.
* Determine whether to persist QoS 0 messages.
*
* @param on @em true if QoS 0 messages are persisted, @em false if not.
*/
Expand Down Expand Up @@ -235,10 +235,10 @@ class create_options_builder
return *this;
}
/**
* Determines whether to restore persisted messsages or clear the
* Determines whether to restore persisted messages or clear the
* persistence store. (Defaults true)
*
* @param on @em true to retore persisted messages, @em false to clear
* @param on @em true to restore persisted messages, @em false to clear
* the persistence store.
* @return A reference to this object.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/mqtt/iasync_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ class iasync_client
* received at the published QoS. Messages published at a
* higher quality of service will be received using the QoS
* specified on the subscribe.
* @param opts A collection of subscription optsions (one for each
* @param opts A collection of subscription options (one for each
* topic)
* @param props The MQTT v5 properties.
* @return token used to track and wait for the subscribe to complete.
Expand All @@ -362,7 +362,7 @@ class iasync_client
* callback. Use @em nullptr if not required.
* @param callback listener that will be notified when subscribe has
* completed
* @param opts A collection of subscription optsions (one for each
* @param opts A collection of subscription options (one for each
* topic)
* @param props The MQTT v5 properties.
* @return token used to track and wait for the subscribe to complete.
Expand Down
4 changes: 2 additions & 2 deletions src/mqtt/message.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ namespace mqtt {
* The topic and payload buffers are kept as references to const data, so
* they can be reassigned as needed, but the buffers can not be updated
* in-place. Normally they would be created externally then copied or moved
* into the message. The library to transport the messages never touchec the
* into the message. The library to transport the messages never touches the
* payloads or topics.
*
* This also means that message objects are farily cheap to copy, since they
* This also means that message objects are fairly cheap to copy, since they
* don't copy the payloads. They simply copy the reference to the buffers.
* It is safe to pass these buffer references across threads since all
* references promise not to update the contents of the buffer.
Expand Down
6 changes: 3 additions & 3 deletions src/mqtt/properties.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ class property
};

/**
* Extracts the value from the property as the specitied type.
* @return The value from the property as the specitied type.
* Extracts the value from the property as the specified type.
* @return The value from the property as the specified type.
*/
template <typename T>
inline T get(const property&) { throw bad_cast(); }
Expand Down Expand Up @@ -402,7 +402,7 @@ class properties

/**
* Retrieves a single value from a property list for when there may be
* multiple identical propert ID's.
* multiple identical property ID's.
* @tparam T The type of the value to retrieve
* @param props The property list
* @param propid The property ID code for the desired value.
Expand Down
6 changes: 3 additions & 3 deletions src/mqtt/response_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class token_test;
* functionality currently required by the library.
*
* Note, too, in the C lib, this became a place to add MQTT v5 options for
* the outgoing calls without breaking the API, so is also refered to as the
* the outgoing calls without breaking the API, so is also referred to as the
* "call options".
*/
class response_options
Expand All @@ -54,13 +54,13 @@ class response_options
public:
/**
* Create an empty response object.
* @param mqttVersion The MQTT versoion for the response.
* @param mqttVersion The MQTT version for the response.
*/
explicit response_options(int mqttVersion=MQTTVERSION_DEFAULT);
/**
* Creates a response object with the specified callbacks.
* @param tok A token to be used as the context.
* @param mqttVersion The MQTT versoion for the response.
* @param mqttVersion The MQTT version for the response.
*/
response_options(const token_ptr& tok, int mqttVersion=MQTTVERSION_DEFAULT);
/**
Expand Down
10 changes: 5 additions & 5 deletions src/mqtt/ssl_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class ssl_options
* cipher list format, please see the OpenSSL
* on-line documentation:
* http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT
* If this setting is ommitted, its default
* If this setting is omitted, its default
* value will be "ALL", that is, all the
* cipher suites -excluding those offering no
* encryption- will be considered. This
Expand All @@ -284,10 +284,10 @@ class ssl_options
void set_enabled_cipher_suites(const string& enabledCipherSuites);
/**
* Enables or disables verification of the server certificate.
* @param enablServerCertAuth enable/disable verification of the server
* @param enableServerCertAuth enable/disable verification of the server
* certificate
*/
void set_enable_server_cert_auth(bool enablServerCertAuth);
void set_enable_server_cert_auth(bool enableServerCertAuth);
/**
* Gets the requested SSL/TLS version.
* @return The requested SSL/TLS version.
Expand Down Expand Up @@ -350,7 +350,7 @@ class ssl_options
*/
std::vector<string> get_alpn_protos() const;
/**
* Sets the list of supported ALPN protolols.
* Sets the list of supported ALPN protocols.
* See:
* https://www.openssl.org/docs/man1.1.0/man3/SSL_CTX_set_alpn_protos.html
* @param protos The list of ALPN protocols to be negotiated.
Expand Down Expand Up @@ -430,7 +430,7 @@ class ssl_options_builder
* explanation of the cipher list format, please see the
* OpenSSL on-line documentation:
* http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT
* If this setting is ommitted, its default value will be
* If this setting is omitted, its default value will be
* "ALL", that is, all the cipher suites -excluding those
* offering no encryption- will be considered. This setting
* can be used to set an SSL anonymous connection (empty
Expand Down
4 changes: 2 additions & 2 deletions src/mqtt/string_collection.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class string_collection
*/
collection_type coll_;
/**
* A colleciton of pointers to NUL-terminated C strings for the topics.
* A collection of pointers to NUL-terminated C strings for the topics.
* This is what is required by the Paho C library, and thus the lifetime
* of the pointers will remain consistent with the lifetime of the
* object. The value is kept consistent with the current topics and
Expand Down Expand Up @@ -268,7 +268,7 @@ class name_value_collection
/** The type of the string/string pair of values */
using value_type = collection_type::value_type;
/**
* Default construtor for an empty collection.
* Default constructor for an empty collection.
*/
name_value_collection() =default;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/mqtt/subscribe_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class subscribe_options
opts_.retainAsPublished = on ? 1 : 0;
}
/**
* Gets the "retasin handling" option.
* Gets the "retain handling" option.
* @return When to send retained messages:
* @li (SEND_RETAINED_ON_SUBSCRIBE, 0) At the time of the subscribe
* @li (SEND_RETAINED_ON_NEW, 1) Only at the time of a new
Expand Down
14 changes: 7 additions & 7 deletions src/mqtt/thread_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ namespace mqtt {
/**
* A thread-safe queue for inter-thread communication.
*
* This is a lockinq queue with blocking operations. The get() operations
* This is a locking queue with blocking operations. The get() operations
* can always block on an empty queue, but have variations for non-blocking
* (try_get) and bounded-time blocking (try_get_for, try_get_until).
* @par
* The default queue has a capacity that is unbounded in the practical
* sense, limited by available memory. In this mode the object will not
* block when placing values into the queue. A capacity can bet set with the
* construtor or, at any time later by calling the @ref capacity(size_type)
* constructor or, at any time later by calling the @ref capacity(size_type)
* method. Using this latter method, the capacity can be set to an amount
* smaller than the current size of the queue. In that case all put's to the
* queue will block until the number of items are removed from the queue to
Expand Down Expand Up @@ -128,7 +128,7 @@ class thread_queue
* Sets the capacity of the queue.
* Note that the capacity can be set to a value smaller than the current
* size of the queue. In that event, all calls to put() will block until
* a suffucuent number
* a sufficient number
*/
void capacity(size_type cap) {
guard g(lock_);
Expand Down Expand Up @@ -270,9 +270,9 @@ class thread_queue
return true;
}
/**
* Attempt to remove an item from the queue for a bounded amout of time.
* Attempt to remove an item from the queue for a bounded amount of time.
* This will retrieve the next item from the queue. If the queue is
* empty, it will wait the specified amout of time for an item to arive
* empty, it will wait the specified amount of time for an item to arrive
* before timing out.
* @param val Pointer to a variable to receive the value.
* @param relTime The amount of time to wait until timing out.
Expand All @@ -295,9 +295,9 @@ class thread_queue
return true;
}
/**
* Attempt to remove an item from the queue for a bounded amout of time.
* Attempt to remove an item from the queue for a bounded amount of time.
* This will retrieve the next item from the queue. If the queue is
* empty, it will wait until the specified time for an item to arive
* empty, it will wait until the specified time for an item to arrive
* before timing out.
* @param val Pointer to a variable to receive the value.
* @param absTime The absolute time to wait to before timing out.
Expand Down
18 changes: 9 additions & 9 deletions src/mqtt/token.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class token
/** Whether the action has yet to complete */
bool complete_;

/** MQTT v5 propeties */
/** MQTT v5 properties */
//properties props_;
/** Connection response (null if not available) */
std::unique_ptr<connect_response> connRsp_;
Expand Down Expand Up @@ -213,15 +213,15 @@ class token
* Constructs a token object.
* @param typ The type of request that the token is tracking.
* @param cli The client that created the token.
* @param topic The topic assiciated with the token
* @param topic The topic associated with the token
*/
token(Type typ, iasync_client& cli, const string& topic)
: token(typ, cli, string_collection::create(topic)) {}
/**
* Constructs a token object.
* @param typ The type of request that the token is tracking.
* @param cli The client that created the token.
* @param topic The topic assiciated with the token
* @param topic The topic associated with the token
* @param userContext optional object used to pass context to the
* callback. Use @em nullptr if not required.
* @param cb callback listener that will be notified when subscribe has
Expand Down Expand Up @@ -287,7 +287,7 @@ class token
* Constructs a token object.
* @param typ The type of request that the token is tracking.
* @param cli The client that created the token.
* @param topic The topic assiciated with the token
* @param topic The topic associated with the token
*/
static ptr_t create(Type typ, iasync_client& cli, const string& topic) {
return std::make_shared<token>(typ, cli, topic);
Expand All @@ -296,7 +296,7 @@ class token
* Constructs a token object.
* @param typ The type of request that the token is tracking.
* @param cli The client that created the token.
* @param topic The topic assiciated with the token
* @param topic The topic associated with the token
* @param userContext optional object used to pass context to the
* callback. Use @em nullptr if not required.
* @param cb callback listener that will be notified when subscribe has
Expand Down Expand Up @@ -405,7 +405,7 @@ class token
}
/**
* Sets the number of results expected.
* This is only required for subecribe_many() with < MQTTv5
* This is only required for subscribe many() with < MQTTv5
* @param n The number of results expected.
*/
void set_num_expected(size_t n) { nExpected_ = n; }
Expand Down Expand Up @@ -479,23 +479,23 @@ class token
/**
* Gets the response from a connect operation.
* This returns the result of the completed operation. If the
* operaton is not yet complete this will block until the result
* operation is not yet complete this will block until the result
* is available.
* @return The result of the operation.
*/
connect_response get_connect_response() const;
/**
* Gets the response from a connect operation.
* This returns the result of the completed operation. If the
* operaton is not yet complete this will block until the result
* operation is not yet complete this will block until the result
* is available.
* @return The result of the operation.
*/
subscribe_response get_subscribe_response() const;
/**
* Gets the response from a connect operation.
* This returns the result of the completed operation. If the
* operaton is not yet complete this will block until the result
* operation is not yet complete this will block until the result
* is available.
* @return The result of the operation.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/mqtt/topic.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class topic
string name_;
/** The default QoS */
int qos_;
/** The default retined flag */
/** The default retained flag */
bool retained_;

public:
Expand Down
Loading

0 comments on commit 121cf9f

Please sign in to comment.