~phablet-team/messaging-framework/maintain-connection-state

« back to all changes in this revision

Viewing changes to include/messaging/member.h

  • Committer: Tarmac
  • Author(s): Roberto Mier Escandon
  • Date: 2016-08-23 22:33:39 UTC
  • mfrom: (50.1.19 allow-members-have-roles)
  • Revision ID: tarmac-20160823223339-w6d9xjzyqly8k2b6
Fw code modifying Members to use Roles interface so that upper layers receive participants permissions
Also setting roles when added members from the client

NOTE: This MR should be landed along with https://code.launchpad.net/~ningbo-team/ningbo/roles-management/+merge/303265.

Approved by Tiago Salem Herrmann, system-apps-ci-bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#define MESSAGING_MEMBER
3
3
 
4
4
#include <messaging/user.h>
 
5
#include <messaging/flags.h>
5
6
 
6
7
namespace messaging
7
8
{
13
14
    Local
14
15
};
15
16
 
 
17
enum class Role : uint
 
18
{
 
19
    Member  = 1 << 0,   //1
 
20
    Admin   = 1 << 1    //2
 
21
};
 
22
 
16
23
class MESSAGING_FW_PUBLIC Member : public User
17
24
{
18
25
public:
19
26
    Member(std::string id,
20
27
                PendingStatus pending_status = PendingStatus::None,
 
28
                Flags<Role> roles = Flags<Role>(Role::Member),
21
29
                std::string display_name = std::string{},
22
30
                VariantMap properties = VariantMap{});
23
31
 
24
32
    PendingStatus pending_status() const;
 
33
    Flags<Role> roles() const;
25
34
 
26
35
private:
27
36
    /// @cond