summaryrefslogtreecommitdiff
path: root/indra/newview/rlvcommon.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/rlvcommon.h')
-rw-r--r--indra/newview/rlvcommon.h49
1 files changed, 37 insertions, 12 deletions
diff --git a/indra/newview/rlvcommon.h b/indra/newview/rlvcommon.h
index 288d48e373..79ac6e1704 100644
--- a/indra/newview/rlvcommon.h
+++ b/indra/newview/rlvcommon.h
@@ -1,16 +1,41 @@
#pragma once
-// ============================================================================
-// RlvStrings
-//
-
-class RlvStrings
+namespace Rlv
{
-public:
- static std::string getVersion(bool wants_legacy);
- static std::string getVersionAbout();
- static std::string getVersionImplNum();
- static std::string getVersionNum();
-};
+ // ============================================================================
+ // RlvStrings
+ //
+
+ class Strings
+ {
+ public:
+ static std::string getVersion(bool wants_legacy);
+ static std::string getVersionAbout();
+ static std::string getVersionImplNum();
+ static std::string getVersionNum();
+ };
+
+ // ============================================================================
+ // RlvUtil
+ //
+
+ namespace Util
+ {
+ bool isValidReplyChannel(S32 nChannel, bool isLoopback = false);
+ bool sendChatReply(S32 nChannel, const std::string& strUTF8Text);
+ bool sendChatReply(const std::string& strChannel, const std::string& strUTF8Text);
+ };
+
+ inline bool Util::isValidReplyChannel(S32 nChannel, bool isLoopback)
+ {
+ return (nChannel > (!isLoopback ? 0 : -1)) && (CHAT_CHANNEL_DEBUG != nChannel);
+ }
+
+ inline bool Util::sendChatReply(const std::string& strChannel, const std::string& strUTF8Text)
+ {
+ S32 nChannel;
+ return LLStringUtil::convertToS32(strChannel, nChannel) ? sendChatReply(nChannel, strUTF8Text) : false;
+ }
-// ============================================================================
+ // ============================================================================
+}