summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicechannel.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoicechannel.h')
-rw-r--r--indra/newview/llvoicechannel.h68
1 files changed, 31 insertions, 37 deletions
diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h
index 84ef3e7c08..dd24c72891 100644
--- a/indra/newview/llvoicechannel.h
+++ b/indra/newview/llvoicechannel.h
@@ -66,16 +66,14 @@ public:
LLVoiceChannel(const LLUUID& session_id, const std::string& session_name);
virtual ~LLVoiceChannel();
- /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
+ virtual void onChange(EStatusType status, const LLSD& channelInfo, bool proximal);
virtual void handleStatusChange(EStatusType status);
virtual void handleError(EStatusType status);
virtual void deactivate();
virtual void activate();
- virtual void setChannelInfo(
- const std::string& uri,
- const std::string& credentials);
- virtual void getChannelInfo();
+ virtual void setChannelInfo(const LLSD &channelInfo);
+ virtual void requestChannelInfo();
virtual BOOL isActive();
virtual BOOL callStarted();
@@ -96,7 +94,6 @@ public:
EDirection getCallDirection() {return mCallDirection;}
static LLVoiceChannel* getChannelByID(const LLUUID& session_id);
- static LLVoiceChannel* getChannelByURI(std::string uri);
static LLVoiceChannel* getCurrentVoiceChannel();
static void initClass();
@@ -110,29 +107,24 @@ protected:
* Use this method if you want mStateChangedCallback to be executed while state is changed
*/
void doSetState(const EState& state);
- void setURI(std::string uri);
// there can be two directions INCOMING and OUTGOING
EDirection mCallDirection;
- std::string mURI;
- std::string mCredentials;
LLUUID mSessionID;
EState mState;
std::string mSessionName;
- LLSD mNotifyArgs;
- LLSD mCallDialogPayload;
+ LLSD mNotifyArgs;
+ LLSD mChannelInfo;
// true if call was ended by agent
bool mCallEndedByAgent;
- BOOL mIgnoreNextSessionLeave;
+ bool mIgnoreNextSessionLeave;
LLHandle<LLPanel> mLoginNotificationHandle;
typedef std::map<LLUUID, LLVoiceChannel*> voice_channel_map_t;
static voice_channel_map_t sVoiceChannelMap;
- typedef std::map<std::string, LLVoiceChannel*> voice_channel_map_uri_t;
- static voice_channel_map_uri_t sVoiceChannelURIMap;
-
+ static LLVoiceChannel* sProximalVoiceChannel;
static LLVoiceChannel* sCurrentVoiceChannel;
static LLVoiceChannel* sSuspendedVoiceChannel;
static BOOL sSuspended;
@@ -146,14 +138,12 @@ class LLVoiceChannelGroup : public LLVoiceChannel
public:
LLVoiceChannelGroup(const LLUUID& session_id, const std::string& session_name, BOOL hangup_on_last_leave);
- /*virtual*/ void handleStatusChange(EStatusType status);
- /*virtual*/ void handleError(EStatusType status);
- /*virtual*/ void activate();
- /*virtual*/ void deactivate();
- /*vritual*/ void setChannelInfo(
- const std::string& uri,
- const std::string& credentials);
- /*virtual*/ void getChannelInfo();
+ void handleStatusChange(EStatusType status) override;
+ void handleError(EStatusType status) override;
+ void activate() override;
+ void deactivate() override;
+ void setChannelInfo(const LLSD &channelInfo) override;
+ void requestChannelInfo() override;
protected:
virtual void setState(EState state);
@@ -171,26 +161,30 @@ class LLVoiceChannelProximal : public LLVoiceChannel, public LLSingleton<LLVoice
LLSINGLETON(LLVoiceChannelProximal);
public:
- /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
- /*virtual*/ void handleStatusChange(EStatusType status);
- /*virtual*/ void handleError(EStatusType status);
- /*virtual*/ BOOL isActive();
- /*virtual*/ void activate();
- /*virtual*/ void deactivate();
+ void onChange(EStatusType status, const LLSD& channelInfo, bool proximal) override;
+ void handleStatusChange(EStatusType status) override;
+ void handleError(EStatusType status) override;
+ BOOL isActive() override;
+ void activate() override;
+ void deactivate() override;
};
class LLVoiceChannelP2P : public LLVoiceChannelGroup
{
public:
- LLVoiceChannelP2P(const LLUUID& session_id, const std::string& session_name, const LLUUID& other_user_id);
+ LLVoiceChannelP2P(const LLUUID &session_id,
+ const std::string &session_name,
+ const LLUUID &other_user_id,
+ LLVoiceP2POutgoingCallInterface * outgoing_call_interface);
- /*virtual*/ void handleStatusChange(EStatusType status);
- /*virtual*/ void handleError(EStatusType status);
- /*virtual*/ void activate();
- /*virtual*/ void getChannelInfo();
+ void handleStatusChange(EStatusType status) override;
+ void handleError(EStatusType status) override;
+ void activate() override;
+ void requestChannelInfo() override;
+ void deactivate() override;
- void setSessionHandle(const std::string& handle, const std::string &inURI);
+ void setChannelInfo(const LLSD& channel_info);
protected:
virtual void setState(EState state);
@@ -202,10 +196,10 @@ private:
*
**/
void addToTheRecentPeopleList();
-
- std::string mSessionHandle;
LLUUID mOtherUserID;
BOOL mReceivedCall;
+ LLVoiceP2POutgoingCallInterface *mOutgoingCallInterface;
+ LLVoiceP2PIncomingCallInterfacePtr mIncomingCallInterface;
};
#endif // LL_VOICECHANNEL_H