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

Root namespace for the CloudBackend SDK API. More...

Namespaces

 delegate
 Root namespace for the delegate interfaces.
 
 util
 General support program utilities.
 

Classes

class  Account
 Login account information. More...
 
class  CloudBackend
 The session that holds the connection with the cloud. More...
 
class  Container
 A collection of Item, can also represent a table or folder. More...
 
class  Database
 A database. More...
 
class  Filter
 Use to select Item that meets specific criterias when doing a query. More...
 
class  Group
 A group of members. More...
 
class  GroupFilter
 To filter when searching a list of Group. More...
 
class  GroupManager
 For managing the groups. More...
 
class  GroupQueryResult
 Resultset of data retrieved in a search for Group. More...
 
class  Item
 A set made up of Container and Object. More...
 
struct  Request
 
class  Member
 A of member of a Group. More...
 
class  Object
 Holder of a set of data, can represent a table row. More...
 
class  Publish
 Managing a published Item. More...
 
class  PublishManager
 Managing the list of web shares. More...
 
class  QueryChain
 To do a search for Object combining more than one Container table. More...
 
class  QueryChainExt
 Extension of class QueryChain. More...
 
class  QueryResult
 resultset of data retrieved. More...
 
class  Role
 User role information. More...
 
class  ShareManager
 Managing Shares. More...
 
class  Stream
 A data file attached to Object. More...
 
class  Subscribe
 Managing a subscribed Item. More...
 
class  SubscribeManager
 For managing subscriptions. More...
 
struct  ShareData
 
class  MatchesID
 Search lists with ID. More...
 

Typedefs

using Streams = std::vector< cbe::Stream >
 Collection of Stream objects.
 
using AclGroupId = std::uint64_t
 Identifies ACL-group. More...
 
using ContainerId = std::uint64_t
 Unique Id of a cbe::Container.
 
using DatabaseId = std::uint64_t
 The id of a Database.
 
using Date = std::uint64_t
 A time-stamp in the unix epoch format. More...
 
using GroupId = std::uint64_t
 Uniquely identifies the Group.
 
using ItemId = std::uint64_t
 Id of a cbe::Container or cbe::Object.
 
using MemberId = std::uint64_t
 Represents the cbe::Group membership id.
 
using ListenerHandle = std::uint64_t
 Unique Id for added Listener.
 
using ObjectId = std::uint64_t
 Unique Id of a cbe::Object.
 
using PublishId = std::uint64_t
 Id of a subscribed cbe::Container or cbe::Object.
 
using RoleId = std::uint64_t
 Uniquely identifies the Role.
 
using ShareId = std::uint64_t
 Uniquely identifies a sharing of a cbe::Container or cbe::Object.
 
using StreamId = std::uint64_t
 Uniquely identifies a cbe::Stream.
 
using SubscribeId = std::uint64_t
 Id of a subscription of a cbe::Container or cbe::Object.
 
using UserId = std::uint64_t
 Uniquely identifies the CBE user number.
 
using account_status_t = std::uint32_t
 
using failed_status_t = std::uint32_t
 
using http_t = std::uint32_t
 
using publish_access_t = std::uint32_t
 
using publish_visibility_t = std::uint32_t
 
using sync_direction_t = std::uint32_t
 
using sync_status_t = std::uint32_t
 
using transfer_t = std::uint32_t
 
using ErrorCode = std::uint32_t
 Mimics the general error code encoding in the www. More...
 
using application_t = int
 
using item_t = int
 
using object_t = int
 
using permission_status_t = int
 
using stream_t = int
 
using visibility = int
 
using AclMap = std::map< cbe::AclGroupId, std::pair< cbe::Permissions, AclScope > >
 ACL map (Access Control List) relating to users and groups. More...
 
using DataBases = std::map< std::string, cbe::Database >
 Databases available for the account.
 
using Items = std::vector< cbe::Item >
 Collection of items.
 
using KeyValues = std::map< std::string, std::pair< std::string, bool > >
 Map with key/value pairs, a.k.a. metadata. More...
 
using MemberBanInfo = std::map< std::pair< cbe::MemberId, cbe::MemberId >, std::pair< cbe::Date, std::string > >
 Map of a pair of members, associated with ban information. More...
 
using ShareIds = std::map< cbe::ShareId, std::vector< cbe::ShareData > >
 Map of cbe::ShareData for a specific cbe::ShareId.
 

Enumerations

enum class  AccountStatus : cbe::account_status_t { NotLoggedIn = 1 , LoggedIn = 2 , Failed = 3 }
 
enum class  AclScope : uint64_t { User = 1 , Group = 2 , Role = 3 }
 
enum  DefaultCtor
 Default constructor marker. More...
 
enum class  FilterOrder : uint32_t {
  Title = 1 , Relevance = 2 , Published = 3 , Updated = 4 ,
  Length = 5 , S1 = 6 , S2 = 7 , S3 = 8 ,
  S4 = 9
}
 
enum class  ItemType : cbe::item_t {
  Unapplicable = 1 , Unknown = 2 , Object = 4 , Container = 8 ,
  Tag = 16 , Group = 32
}
 
enum class  ObjectType : object_t { Other = 1 , GroupInvites = 2 , ShareInvite = 3 }
 
enum class  Permissions : permission_status_t {
  Read = 1 , Write = 2 , ReadWrite = 3 , Delete = 4 ,
  ReadDelete = 5 , WriteDelete = 6 , ReadWriteDelete = 7 , ChangeACL = 8 ,
  ReadChangeACL = 9 , WriteChangeACL = 10 , ReadWriteChangeACL = 11 , DeleteChangeACL = 12 ,
  ReadDeleteChangeACL = 13 , WriteDeleteChangeACL = 14 , AllPermissions = 15 , NoPermissions = 0
}
 Represents the access permission that can be set for any cbe::Object or cbe::Container. More...
 
enum class  PublishAccess : cbe::publish_access_t { Read = 1 , Update = 2 , Create = 3 }
 
enum class  PublishVisibility : cbe::publish_visibility_t { Public = 1 , Friends = 2 , Private = 3 , Invited = 4 }
 
enum class  Visibility : visibility { Public = 1 , Private = 2 }
 

Functions

cbe::ItemType operator| (cbe::ItemType lh, cbe::ItemType rh)
 
std::ostream & operator<< (std::ostream &os, ItemType itemType)
 

Detailed Description

Root namespace for the CloudBackend SDK API.

Located in Types.h that should be included in programs.

Typedef Documentation

◆ AclGroupId

using cbe::AclGroupId = typedef std::uint64_t

Identifies ACL-group.

Representation that can be a UserId or GroupId.

I.e., the union set:
AclGroupId = UserId ∪ GroupId.

◆ AclMap

using cbe::AclMap = typedef std::map<cbe::AclGroupId, std::pair<cbe::Permissions, AclScope> >

ACL map (Access Control List) relating to users and groups.

Map of a specific user or group, in terms of cbe::UserId or cbe::GroupId and its cbe::Permission on a Container or Object, to represent access permissions for specific users or groups.

◆ Date

using cbe::Date = typedef std::uint64_t

A time-stamp in the unix epoch format.

A.k.a. POSIX time or time-stamp.

The equivalent in Linux shell can be found using e.g.,

date +%s --utc --date='now'
date +%s --utc --date='today 17:30:00'

To convert a time-stamp to human readable format use e.g.,

date --utc --date=@1678902345

◆ ErrorCode

using cbe::ErrorCode = typedef std::uint32_t

Mimics the general error code encoding in the www.

see Wikipedia: List of HTTP status codes

◆ KeyValues

using cbe::KeyValues = typedef std::map<std::string, std::pair<std::string, bool> >

Map with key/value pairs, a.k.a. metadata.

Can be applied on cbe::Object but not on cbe::Container.

  • key uniquely identifies the value; name must start with a letter or _
  • value and index flag
    • a string value
    • a boolean flag indicating whether this key/value entry is index (true) or not indexed (false).

◆ MemberBanInfo

using cbe::MemberBanInfo = typedef std::map<std::pair<cbe::MemberId, cbe::MemberId>, std::pair<cbe::Date, std::string> >

Map of a pair of members, associated with ban information.

Structure:

  • Key is formed by a std::pair of members, where:
    • first represents the banned member.
    • second represents the banning member with administration privileges.
  • Value is formed by another pair:
    • date of the ban
    • a free text reason message.

Enumeration Type Documentation

◆ AccountStatus

enum cbe::AccountStatus : cbe::account_status_t
strong

Callback for login returns one of these three in callback.

  1. NotLoggedIn
  2. LoggedIn
  3. Failed

◆ AclScope

enum cbe::AclScope : uint64_t
strong

Enum that determines different ACL categories

◆ DefaultCtor

Default constructor marker.

To default construct objects from most of the CloudBackend classes, this marker type is required.

Example use
~~~
// Conceptually, a default construction of an instance of cbe::Container
cbe::Container myContainer{ cbe::DefaultCtor{} };
// Ditto
~~~
A collection of Item, can also represent a table or folder.
Definition: Container.h:63
Holder of a set of data, can represent a table row.
Definition: Object.h:64
DefaultCtor
Default constructor marker.
Definition: Types.h:204

◆ FilterOrder

enum cbe::FilterOrder : uint32_t
strong

Set the filter order in which the search or query will be sorted after.

  1. Title
  2. Relevance
  3. Published
  4. Updated
  5. Length
  6. S1
  7. S2
  8. S3
  9. S4

◆ ItemType

enum cbe::ItemType : cbe::item_t
strong

ItemType can be used to sort out cbe objects if the user would like to create a container to put all different kinds of cbe objects in. E.g.,

◆ ObjectType

enum cbe::ObjectType : object_t
strong

Type of invite.

◆ Permissions

enum cbe::Permissions : permission_status_t
strong

Represents the access permission that can be set for any cbe::Object or cbe::Container.

Forms the the possible different combinations of:

  • 1: Read
  • 2: Write
  • 4: Delete
  • 8: ChangeACL

combinations give access for users to use different API calls.

        0. NoPermissions

  1. Read
  2. Write
  3. ReadWrite
  4. Delete
  5. ReadDelete
  6. WriteDelete
  7. ReadWriteDelete
  8. ChangeACL
  9. ReadChangeACL
  10. WriteChangeACL
  11. ReadWriteChangeACL
  12. DeleteChangeACL
  13. ReadDeleteChangeACL
  14. WriteDeleteChangeACL
  15. AllPermissions

E.g.: cbe::Permissions::ReadDelete gives the ability to call move() on a Container or an Object.

◆ PublishAccess

enum cbe::PublishAccess : cbe::publish_access_t
strong

Access permission for publish

  1. Read
  2. Update
  3. Create

◆ PublishVisibility

enum cbe::PublishVisibility : cbe::publish_visibility_t
strong

Visibility for publish

  1. Public
  2. Friends
  3. Private
  4. Invited

◆ Visibility

enum cbe::Visibility : visibility
strong

Visibility is used for both groups and members, in this version the member visibility will be Public for all members who join a group.

Members will in the future also have the option of visibility friends.

  1. Public
  2. Private