![]() |
SDK
2.1.4
CloudBackend Software Development Kit - SDK API for C++
|
For managing subscriptions. More...
#include <SubscribeManager.h>
Public Member Functions | |
void | getSubscriptions (GetSubscriptionsDelegatePtr subscribeDelegate) |
List your current subscriptions. More... | |
delegate::GetSubscriptionsDelegate::Success | getSubscriptions () |
Synchronous [exception] Synchronous version of getSubscriptions(GetSubscriptionsDelegatePtr) , and throws an exception, GetSubscriptionsException, in case of a failed call. See getSubscriptions(GetSubscriptionsDelegatePtr) More... | |
cbe::util::Optional< delegate::GetSubscriptionsDelegate::Success > | getSubscriptions (GetSubscriptionsError &error) |
Synchronous [non-throwing] Synchronous version of getSubscriptions(GetSubscriptionsDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call. See getSubscriptions(GetSubscriptionsDelegatePtr) 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... | |
delegate::SubscribeDelegate::Success | subscribe (cbe::UserId sharingUserId, std::string sharingUserName, cbe::PublishId publishId, std::string publishName, std::string password, std::string subscribeName) |
Synchronous [exception] Synchronous version of subscribe(cbe::UserId, std::string, cbe::PublishId, std::string, std::string, std::string, SubscribeDelegatePtr) , and throws an exception, SubscribeException, in case of a failed call. See subscribe(SubscribeDelegatePtr) More... | |
cbe::util::Optional< delegate::SubscribeDelegate::Success > | subscribe (cbe::UserId sharingUserId, std::string sharingUserName, cbe::PublishId publishId, std::string publishName, std::string password, std::string subscribeName, SubscribeError &error) |
Synchronous [non-throwing] Synchronous version of subscribe(sharingUserId, sharingUserName, publishId, publishName, password, subscribeName, SubscribeDelegatePtr) , and throws no exception on error, instead the out/return parameter error is used to provide the error information in connection with a failed call. See subscribe(sharingUserId, sharingUserName, publishId, publishName, password, subscribeName, SubscribeDelegatePtr) 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:
using cbe::SubscribeManager::GetSubscriptionsException = delegate::GetSubscriptionsDelegate::Exception |
Pointer to cbe::delegate::GetSubscriptionsDelegate that is passed into asynchronous version of method getSubscriptions() See delegate::object::GetSubscriptionsDelegate::Exception
Forms the type of the error
return parameter for the synchronous version of method getSubscriptions()
See delegate::GetSubscriptionsDelegate::ErrorInfo
Pointer to SubscribeDelegate that is passed into asynchronous version of method:
Pointer to cbe::delegate::SubscribeDelegate that is passed into asynchronous version of method subscribe() See delegate::object::SubscribeDelegate::Exception
Forms the type of the error
return parameter for the synchronous version of method subscribe(sharingUserId, sharingUserName, publishId, publishName, password, subscribeName, SubscribeError&) "subscribe()"
See delegate::SubscribeDelegate::ErrorInfo
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. |
delegate::GetSubscriptionsDelegate::Success cbe::SubscribeManager::getSubscriptions | ( | ) |
Synchronous [exception] Synchronous version of getSubscriptions(GetSubscriptionsDelegatePtr) , and throws an exception, GetSubscriptionsException, in case of a failed call.
See getSubscriptions(GetSubscriptionsDelegatePtr)
GetSubscriptionsException |
cbe::util::Optional<delegate::GetSubscriptionsDelegate::Success> cbe::SubscribeManager::getSubscriptions | ( | GetSubscriptionsError & | error | ) |
Synchronous [non-throwing] Synchronous version of getSubscriptions(GetSubscriptionsDelegatePtr) , and throws no exception on error, instead the out/return parameter error
is used to provide the error information in connection with a failed call.
See getSubscriptions(GetSubscriptionsDelegatePtr)
[out] | error | Return parameter containing the error information in case of a failed call. An empty return value will indicate failure, and the GetSubscriptionsError object passed in will we be populated with the error information. |
false
— indicates a failed call, and the error information is passed out via the error
out/return parameter. 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 |
delegate::SubscribeDelegate::Success cbe::SubscribeManager::subscribe | ( | cbe::UserId | sharingUserId, |
std::string | sharingUserName, | ||
cbe::PublishId | publishId, | ||
std::string | publishName, | ||
std::string | password, | ||
std::string | subscribeName | ||
) |
Synchronous [exception] Synchronous version of subscribe(cbe::UserId, std::string, cbe::PublishId, std::string, std::string, std::string, SubscribeDelegatePtr) , and throws an exception, SubscribeException, in case of a failed call.
See subscribe(SubscribeDelegatePtr)
SubscribeException |
cbe::util::Optional<delegate::SubscribeDelegate::Success> cbe::SubscribeManager::subscribe | ( | cbe::UserId | sharingUserId, |
std::string | sharingUserName, | ||
cbe::PublishId | publishId, | ||
std::string | publishName, | ||
std::string | password, | ||
std::string | subscribeName, | ||
SubscribeError & | error | ||
) |
Synchronous [non-throwing] Synchronous version of subscribe(sharingUserId, sharingUserName, publishId, publishName, password, subscribeName, SubscribeDelegatePtr) , and throws no exception on error, instead the out/return parameter error
is used to provide the error information in connection with a failed call.
See subscribe(sharingUserId, sharingUserName, publishId, publishName, password, subscribeName, SubscribeDelegatePtr)
[out] | error | Return parameter containing the error information in case of a failed call. An empty return value will indicate failure, and the SubscribeError object passed in will we be populated with the error information. |
false
— indicates a failed call, and the error information is passed out via the error
out/return parameter.
|
inline |
Subscribes to a Publish using names.
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 |
|
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 |