summaryrefslogtreecommitdiff
path: root/indra/newview/llavataractions.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2009-12-16 12:16:24 -0500
committerNyx (Neal Orman) <nyx@lindenlab.com>2009-12-16 12:16:24 -0500
commitace0be2a7c0665e382e47aeedfcffed7410e11a9 (patch)
tree2d437342310d52806c6b378f1046ad56d9eb6456 /indra/newview/llavataractions.cpp
parent90bb29245cbd9626f840f1d16c351ac415f7c35e (diff)
parent1e5f2f5d8c4264cc704c687aa1b624296b6444e2 (diff)
merge with avp-tip
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r--indra/newview/llavataractions.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 5f90a7627f..33dc7ee2c8 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -61,6 +61,7 @@
#include "llviewerregion.h"
#include "llimfloater.h"
#include "lltrans.h"
+#include "llcallingcard.h"
// static
void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name)
@@ -265,6 +266,24 @@ bool LLAvatarActions::isCalling(const LLUUID &id)
return (LLIMModel::getInstance()->findIMSession(session_id) != NULL);
}
+//static
+bool LLAvatarActions::canCall(const LLUUID &id)
+{
+ if(isFriend(id))
+ {
+ return LLAvatarTracker::instance().isBuddyOnline(id) && LLVoiceClient::voiceEnabled();
+ }
+ else
+ {
+ // don't need to check online/offline status because "usual resident" (resident that is not a friend)
+ // can be only ONLINE. There is no way to see "usual resident" in OFFLINE status. If we see "usual
+ // resident" it automatically means that the resident is ONLINE. So to make a call to the "usual resident"
+ // we need to check only that "our" voice is enabled.
+ return LLVoiceClient::voiceEnabled();
+ }
+
+}
+
// static
void LLAvatarActions::startConference(const std::vector<LLUUID>& ids)
{