Skip to content

Commit

Permalink
Remove deprecation warnings around particle subscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
keeramis committed Oct 13, 2020
1 parent 5ef3960 commit 4b29cfa
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions wiring/inc/spark_wiring_cloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
#include <functional>
#include <type_traits>

#define PARTICLE_DEPRECATED_API_DEFAULT_SUBSCRIBE_SCOPE \
PARTICLE_DEPRECATED_API("Beginning with 0.8.0 release, Particle.subscribe() will require event scope to be specified explicitly.");

typedef std::function<user_function_int_str_t> user_std_function_int_str_t;
typedef std::function<void (const char*, const char*)> wiring_event_handler_t;

Expand Down Expand Up @@ -319,11 +316,10 @@ class CloudClass {
return subscribe(eventName, std::bind(handler, instance, _1, _2), deviceID);
}

// Deprecated methods
bool subscribe(const char* name, EventHandler handler) PARTICLE_DEPRECATED_API_DEFAULT_SUBSCRIBE_SCOPE;
bool subscribe(const char* name, wiring_event_handler_t handler) PARTICLE_DEPRECATED_API_DEFAULT_SUBSCRIBE_SCOPE;
bool subscribe(const char* name, EventHandler handler);
bool subscribe(const char* name, wiring_event_handler_t handler);
template<typename T>
bool subscribe(const char* name, void (T::*handler)(const char*, const char*), T* instance) PARTICLE_DEPRECATED_API_DEFAULT_SUBSCRIBE_SCOPE;
bool subscribe(const char* name, void (T::*handler)(const char*, const char*), T* instance);

void unsubscribe()
{
Expand Down Expand Up @@ -558,7 +554,6 @@ inline bool CloudDisconnectOptions::isTimeoutSet() const {
return (flags_ & OptionFlag::TIMEOUT);
}

// Deprecated methods
inline particle::Future<bool> CloudClass::publish(const char* name) {
return publish(name, PUBLIC);
}
Expand Down

0 comments on commit 4b29cfa

Please sign in to comment.