1 //******************************************************************
3 // Copyright 2014 Intel Corporation All Rights Reserved.
4 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 #ifndef LITESESSION_HPP_
7 #define LITESESSION_HPP_
9 // ============================================================================
11 // ============================================================================
15 #include <boost/shared_ptr.hpp>
17 using namespace Intel::STC;
19 #include "LiteConnection.h"
21 // ============================================================================
23 // ============================================================================
30 LiteSession(API::Context::SharedPtr pCCFContext, UUID_t uuid) : pCCFContext_(pCCFContext), sessionId_(uuid) {};
31 virtual ~LiteSession() { connectionSet_.clear(); };
33 virtual void invite() = 0;
34 virtual void disconnect() = 0;
45 void setPublicAvatarId(const UUID_t& avatarId) {
46 publicAvatarId_ = avatarId;
49 void setPrivateAvatarId(const UUID_t& avatarId) {
50 privateAvatarId_ = avatarId;
53 void setUserId(const UUID_t& userId) {
57 void setIssuer(const std::string& issuer) {
61 void setName(const std::string& name) {
65 void setStatusText(const std::string& text) {
69 void setSecurityCode(const std::string& code) {
73 void setApplicationSet(const std::set<UUID_t>& applicationSet) {
74 applicationSet_ = applicationSet;
77 const UUID_t& getPublicAvatarId() {
78 return publicAvatarId_;
81 const UUID_t& getPrivateAvatarId() {
82 return privateAvatarId_;
85 const UUID_t& getUserId() {
89 const std::string& getIssuer() {
93 const std::string& getName() {
97 const std::string& getStatusText() {
101 const std::string& getSecurityCode() {
102 return securityCode_;
104 const std::set<UUID_t>& getApplicationSet() {
105 return applicationSet_;
108 void addConnection(boost::shared_ptr<LiteConnection> connection) {
109 connectionSet_.insert(connection);
112 void removeConnection(boost::shared_ptr<LiteConnection> connection) {
113 connectionSet_.erase(connection);
117 bool onLocalNetwork_;
118 bool onCloudNetwork_;
123 API::Context::SharedPtr pCCFContext_;
124 API::InvitationBuilder::SharedPtr pInvitationBuilder_;
127 UUID_t publicAvatarId_;
128 UUID_t privateAvatarId_;
131 std::string sessionName_;
132 std::string statusText_;
133 std::string securityCode_;
134 std::set <UUID_t> applicationSet_;
136 std::set<boost::shared_ptr<LiteConnection>> connectionSet_;
144 #endif /* LITESESSION_HPP_ */