SDK  2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
cbe::SubscribeManager Class Reference

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
 

Detailed Description

For managing subscriptions.

Member Typedef Documentation

◆ GetSubscriptionsDelegatePtr

Pointer to GetSubscriptionsDelegate that is passed into asynchronous version of method:

◆ SubscribeDelegatePtr

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:

Member Function Documentation

◆ getSubscriptions()

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.

Parameters
subscribeDelegatePointer to a delegate::GetSubscriptionsDelegate instance that is implemented by the user.

◆ subscribe() [1/3]

void cbe::SubscribeManager::subscribe ( cbe::UserId  sharingUserId,
cbe::PublishId  publishId,
std::string  subscribeName,
SubscribeDelegatePtr  subscribeDelegate 
)
inline

Subscribes to a Publish using ids.

Overload of subscribe()

Parameters
sharingUserIdUser id of the owner of the publish
publishIdpublish id (publish id)
subscribeNameName of created subscribe (usually same as the publish)
subscribeDelegateGets notified of the result

◆ subscribe() [2/3]

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).

Parameters
sharingUserIdUser id of the owner of the publish or 0 if sharingUserName should be used instead
sharingUserNameUser name of the owner of the publish or empty if sharingUserId should be used instead
publishIdPublish id or 0 if publishName should be used instead
publishNamePublish name or empty if publishId should be used instead
passwordRequired password or an empty string if no password
subscribeNameName of created favorite (usually same as the publish)
subscribeDelegateGets notified of the result

◆ subscribe() [3/3]

void cbe::SubscribeManager::subscribe ( std::string  sharingUserName,
std::string  publishName,
SubscribeDelegatePtr  subscribeDelegate 
)
inline

Subscribes to a Publish using names.

Pointer to cbe::delegate::SubscribeDelegate that is passed into asynchronous version of method subscribe()

Overload of subscribe()

Parameters
sharingUserNameUser name of the owner of the publish
publishNamePublish name that will also be the name of created favorite.
subscribeDelegateGets notified of the result

The documentation for this class was generated from the following file: