|
|
@ -50,14 +50,14 @@ void CDynChatEGS::init()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
{ "DYN_CHAT:ADD_SERVICE_CHAN", CDynChatEGS::cbServiceAddChan },
|
|
|
|
{ "DYN_CHAT:ADD_SERVICE_CHAN", CDynChatEGS::cbServiceAddChan },
|
|
|
|
{ "DYN_CHAT:SET_HIDE_BUBBLE", CDynChatEGS::cbServiceSetHideBubble },
|
|
|
|
{ "DYN_CHAT:SET_HIDE_BUBBLE", CDynChatEGS::cbServiceSetHideBubble },
|
|
|
|
|
|
|
|
{ "DYN_CHAT:SET_UNIVERSAL_CHANNEL", CDynChatEGS::cbServiceSetUniversalChannel},
|
|
|
|
{ "DYN_CHAT:SET_CHAN_HISTORY", CDynChatEGS::cbServiceSetChanHistory },
|
|
|
|
{ "DYN_CHAT:SET_CHAN_HISTORY", CDynChatEGS::cbServiceSetChanHistory },
|
|
|
|
{ "DYN_CHAT:REMOVE_SERVICE_CHAN", CDynChatEGS::cbServiceRemoveChan },
|
|
|
|
{ "DYN_CHAT:REMOVE_SERVICE_CHAN", CDynChatEGS::cbServiceRemoveChan },
|
|
|
|
{ "DYN_CHAT:ADD_CLIENT", CDynChatEGS::cbServiceAddClient },
|
|
|
|
{ "DYN_CHAT:ADD_CLIENT", CDynChatEGS::cbServiceAddClient },
|
|
|
|
{ "DYN_CHAT:ADD_SESSION", CDynChatEGS::cbServiceAddSession },
|
|
|
|
{ "DYN_CHAT:ADD_SESSION", CDynChatEGS::cbServiceAddSession },
|
|
|
|
{ "DYN_CHAT:ADD_SESSION_ENTITY", CDynChatEGS::cbServiceAddSessionEntity },
|
|
|
|
{ "DYN_CHAT:ADD_SESSION_ENTITY", CDynChatEGS::cbServiceAddSessionEntity },
|
|
|
|
{ "DYN_CHAT:REMOVE_SESSION", CDynChatEGS::cbServiceRemoveSession },
|
|
|
|
{ "DYN_CHAT:REMOVE_SESSION", CDynChatEGS::cbServiceRemoveSession },
|
|
|
|
{ "DYN_CHAT:REMOVE_SESSION_ENTITY", CDynChatEGS::cbServiceRemoveSessionEntity }
|
|
|
|
{ "DYN_CHAT:REMOVE_SESSION_ENTITY", CDynChatEGS::cbServiceRemoveSessionEntity}
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
CUnifiedNetwork::getInstance()->addCallbackArray( _cbArray, sizeof(_cbArray) / sizeof(_cbArray[0]) );
|
|
|
|
CUnifiedNetwork::getInstance()->addCallbackArray( _cbArray, sizeof(_cbArray) / sizeof(_cbArray[0]) );
|
|
|
@ -315,7 +315,16 @@ bool CDynChatEGS::setHideBubble(TChanID chanID, bool hideBubble)
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//============================================================================================================
|
|
|
|
|
|
|
|
bool CDynChatEGS::setUniversalChannel(TChanID chanID, bool universalChannel)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CDynChatChan *chan = _DynChat.getChan(chanID);
|
|
|
|
|
|
|
|
if (!chan) return false;
|
|
|
|
|
|
|
|
if (universalChannel == chan->UniversalChannel) return true; // already good value
|
|
|
|
|
|
|
|
chan->UniversalChannel = universalChannel;
|
|
|
|
|
|
|
|
iosSetUniversalChannel(chanID, universalChannel);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//============================================================================================================
|
|
|
|
//============================================================================================================
|
|
|
|
void CDynChatEGS::cbServiceAddChan(NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
|
|
|
void CDynChatEGS::cbServiceAddChan(NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
|
|
@ -344,6 +353,16 @@ void CDynChatEGS::cbServiceSetHideBubble(NLNET::CMessage& msgin, const std::stri
|
|
|
|
DynChatEGS.setHideBubble(chan, hideBubble);
|
|
|
|
DynChatEGS.setHideBubble(chan, hideBubble);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//============================================================================================================
|
|
|
|
//============================================================================================================
|
|
|
|
|
|
|
|
void CDynChatEGS::cbServiceSetUniversalChannel(NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
TChanID chan;
|
|
|
|
|
|
|
|
bool universalChannel;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msgin.serial(chan);
|
|
|
|
|
|
|
|
msgin.serial(universalChannel);
|
|
|
|
|
|
|
|
DynChatEGS.setUniversalChannel(chan, universalChannel);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//============================================================================================================
|
|
|
|
void CDynChatEGS::cbServiceAddClient(NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
|
|
|
void CDynChatEGS::cbServiceAddClient(NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TDataSetRow dsr;
|
|
|
|
TDataSetRow dsr;
|
|
|
@ -484,6 +503,15 @@ void CDynChatEGS::iosSetHideBubble(TChanID chan, bool hideBubble)
|
|
|
|
sendMessageViaMirror( "IOS", msg);
|
|
|
|
sendMessageViaMirror( "IOS", msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//============================================================================================================
|
|
|
|
|
|
|
|
void CDynChatEGS::iosSetUniversalChannel(TChanID chan, bool universalChannel)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CMessage msg("DYN_CHAT:SET_UNIVERSAL_CHANNEL");
|
|
|
|
|
|
|
|
msg.serial(chan);
|
|
|
|
|
|
|
|
msg.serial(universalChannel);
|
|
|
|
|
|
|
|
sendMessageViaMirror( "IOS", msg);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//============================================================================================================
|
|
|
|
//============================================================================================================
|
|
|
|
void CDynChatEGS::iosRemoveSession(TChanID chan, const TDataSetRow &client)
|
|
|
|
void CDynChatEGS::iosRemoveSession(TChanID chan, const TDataSetRow &client)
|
|
|
|
{
|
|
|
|
{
|
|
|
|