![]() |
SDK
2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
|
For managing subscriptions. More...
#include <SubscribeManager.h>
Public Types | |
using | GetSubscriptionsDelegatePtr = delegate::GetSubscriptionsDelegatePtr |
using | SubscribeDelegatePtr = delegate::SubscribeDelegatePtr |
Public Member Functions | |
void | getSubscriptions (GetSubscriptionsDelegatePtr subscribeDelegate) |
List your current subscriptions. More... | |
void | subscribe (cbe::UserId sharingUserId, std::string sharingUserName, cbe::PublishId publishId, std::string publishName, std::string password, std::string subscribeName, SubscribeDelegatePtr subscribeDelegate) |
Subscribes to a Publish using all parameters. More... | |
void | subscribe (std::string sharingUserName, std::string publishName, SubscribeDelegatePtr subscribeDelegate) |
Subscribes to a Publish using names. More... | |
void | subscribe (cbe::UserId sharingUserId, cbe::PublishId publishId, std::string subscribeName, SubscribeDelegatePtr subscribeDelegate) |
Subscribes to a Publish using ids. More... | |
SubscribeManager (cbe::DefaultCtor) | |
operator bool () const | |
Friends | |
class | CloudBackend |
For managing subscriptions.
Pointer to GetSubscriptionsDelegate that is passed into asynchronous version of method:
Pointer to cbe::delegate::GetSubscriptionsDelegate that is passed into asynchronous version of method getSubscriptions() Pointer to SubscribeDelegate that is passed into asynchronous version of method:
void cbe::SubscribeManager::getSubscriptions | ( | GetSubscriptionsDelegatePtr | subscribeDelegate | ) |
List your current subscriptions.
Listing is done independently of where in the actual directory tree the files are located.
subscribeDelegate | Pointer to a delegate::GetSubscriptionsDelegate instance that is implemented by the user. |
|
inline |
Subscribes to a Publish using ids.
Overload of subscribe()
sharingUserId | User id of the owner of the publish |
publishId | publish id (publish id) |
subscribeName | Name of created subscribe (usually same as the publish) |
subscribeDelegate | Gets notified of the result |
void cbe::SubscribeManager::subscribe | ( | cbe::UserId | sharingUserId, |
std::string | sharingUserName, | ||
cbe::PublishId | publishId, | ||
std::string | publishName, | ||
std::string | password, | ||
std::string | subscribeName, | ||
SubscribeDelegatePtr | subscribeDelegate | ||
) |
Subscribes to a Publish using all parameters.
Subscribe to a Publish that was issued by some other user (or yourself).
A Publish must not require a password, if required it should be provided by the publisher.
The retrieved subscription may be revoked with cbe::Object::unSubscribe() or cbe::Container::unSubscribe().
Subscribes to a publish shared by some other user (or yourself).
sharingUserId | User id of the owner of the publish or 0 if sharingUserName should be used instead |
sharingUserName | User name of the owner of the publish or empty if sharingUserId should be used instead |
publishId | Publish id or 0 if publishName should be used instead |
publishName | Publish name or empty if publishId should be used instead |
password | Required password or an empty string if no password |
subscribeName | Name of created favorite (usually same as the publish) |
subscribeDelegate | Gets notified of the result |
|
inline |
Subscribes to a Publish using names.
Pointer to cbe::delegate::SubscribeDelegate that is passed into asynchronous version of method subscribe()
Overload of subscribe()
sharingUserName | User name of the owner of the publish |
publishName | Publish name that will also be the name of created favorite. |
subscribeDelegate | Gets notified of the result |