CHOP-581: Preliminary attempt to add enter/leave group chat hooks.

Unstable! Using present "startIM" is known to crash the Mac viewer. Committing
to migrate to different dev box for further debugging.
master
Nat Goodspeed 2011-04-12 11:04:19 -04:00
parent 37bf11cc13
commit e9f6de28b2
4 changed files with 63 additions and 0 deletions

View File

@ -70,6 +70,7 @@ include_directories(
)
set(viewer_SOURCE_FILES
groupchatlistener.cpp
llagent.cpp
llagentaccess.cpp
llagentcamera.cpp
@ -612,6 +613,7 @@ endif (LINUX)
set(viewer_HEADER_FILES
CMakeLists.txt
ViewerInstall.cmake
groupchatlistener.h
llagent.h
llagentaccess.h
llagentcamera.h

View File

@ -0,0 +1,36 @@
/**
* @file groupchatlistener.cpp
* @author Nat Goodspeed
* @date 2011-04-11
* @brief Implementation for groupchatlistener.
*
* $LicenseInfo:firstyear=2011&license=internal$
* Copyright (c) 2011, Linden Research, Inc.
* $/LicenseInfo$
*/
// Precompiled header
#include "llviewerprecompiledheaders.h"
// associated header
#include "groupchatlistener.h"
// STL headers
// std headers
// external library headers
// other Linden headers
#include "llgroupactions.h"
GroupChatListener::GroupChatListener():
LLEventAPI("GroupChat",
"API to enter, leave, send and intercept group chat messages")
{
add("startIM",
"Enter a group chat in group with UUID [\"id\"]\n"
"Assumes the logged-in agent is already a member of this group.",
&LLGroupActions::startIM,
LLSDArray("id"));
add("endIM",
"Leave a group chat in group with UUID [\"id\"]\n"
"Assumes a prior successful startIM request.",
&LLGroupActions::endIM,
LLSDArray("id"));
}

View File

@ -0,0 +1,23 @@
/**
* @file groupchatlistener.h
* @author Nat Goodspeed
* @date 2011-04-11
* @brief
*
* $LicenseInfo:firstyear=2011&license=internal$
* Copyright (c) 2011, Linden Research, Inc.
* $/LicenseInfo$
*/
#if ! defined(LL_GROUPCHATLISTENER_H)
#define LL_GROUPCHATLISTENER_H
#include "lleventapi.h"
class GroupChatListener: public LLEventAPI
{
public:
GroupChatListener();
};
#endif /* ! defined(LL_GROUPCHATLISTENER_H) */

View File

@ -40,10 +40,12 @@
#include "llsidetray.h"
#include "llstatusbar.h" // can_afford_transaction()
#include "llimfloater.h"
#include "groupchatlistener.h"
//
// Globals
//
static GroupChatListener sGroupChatListener;
class LLGroupHandler : public LLCommandHandler
{