2010-05-27 20:04:31 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2010, Pier Luigi Fiorini. All rights reserved.
|
|
|
|
* Distributed under the terms of the GPL v2 License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Pier Luigi Fiorini, pierluigi.fiorini@gmail.com
|
|
|
|
*/
|
|
|
|
|
|
|
|
//#include <libsupport/Base64.h>
|
|
|
|
|
2010-05-28 15:41:58 -05:00
|
|
|
#include <CayaProtocolMessages.h>
|
2010-05-27 20:04:31 -05:00
|
|
|
|
2010-05-28 15:41:58 -05:00
|
|
|
#include "JabberHandler.h"
|
2010-05-27 20:04:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
static status_t
|
|
|
|
connect_thread(void* data)
|
|
|
|
{
|
|
|
|
gloox::Client* client = (gloox::Client*)data;
|
|
|
|
if (!client)
|
|
|
|
return B_BAD_VALUE;
|
|
|
|
|
2010-05-28 15:41:58 -05:00
|
|
|
while (client->recv(1000) == gloox::ConnNoError);
|
2010-05-27 20:04:31 -05:00
|
|
|
|
|
|
|
return B_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::JabberHandler()
|
|
|
|
:
|
|
|
|
fClient(NULL),
|
2010-05-27 20:04:31 -05:00
|
|
|
fVCardManager(NULL)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::~JabberHandler()
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
fVCardManager->cancelVCardOperations(this);
|
|
|
|
Shutdown();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
status_t
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::Init(CayaProtocolMessengerInterface* messenger)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
fServerMessenger = messenger;
|
|
|
|
|
|
|
|
return B_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
status_t
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::Process(BMessage* msg)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
if (msg->what != IM_MESSAGE)
|
|
|
|
return B_ERROR;
|
|
|
|
|
|
|
|
int32 im_what = 0;
|
|
|
|
|
|
|
|
msg->FindInt32("im_what", &im_what);
|
|
|
|
|
|
|
|
switch (im_what) {
|
|
|
|
case IM_SET_OWN_STATUS: {
|
|
|
|
int32 status = msg->FindInt32("status");
|
|
|
|
BString status_msg = msg->FindString("message");
|
|
|
|
|
|
|
|
switch (status) {
|
|
|
|
case CAYA_ONLINE:
|
|
|
|
// Log in if we still need to
|
2010-05-28 15:41:58 -05:00
|
|
|
resume_thread(fRecvThread);
|
|
|
|
break;
|
|
|
|
case CAYA_OFFLINE:
|
|
|
|
kill_thread(fRecvThread);
|
2010-05-27 20:04:31 -05:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case IM_SEND_MESSAGE: {
|
|
|
|
const char* id = msg->FindString("id");
|
|
|
|
const char* subject = msg->FindString("subject");
|
|
|
|
const char* body = msg->FindString("body");
|
|
|
|
|
|
|
|
if (!id || !body)
|
|
|
|
return B_ERROR;
|
|
|
|
|
2010-05-28 15:41:58 -05:00
|
|
|
// Send JabberHandler message
|
2010-05-27 20:04:31 -05:00
|
|
|
gloox::Message jm(gloox::Message::Chat, gloox::JID(id),
|
|
|
|
body, (subject ? subject : gloox::EmptyString));
|
|
|
|
fClient->send(jm);
|
|
|
|
|
|
|
|
// Tell Caya we actually sent the message
|
2010-05-28 15:41:58 -05:00
|
|
|
_MessageSent(id, subject, body);
|
2010-05-27 20:04:31 -05:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
return B_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
return B_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
status_t
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::Shutdown()
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
if (fClient)
|
|
|
|
fClient->disconnect();
|
|
|
|
return B_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const char*
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::Signature() const
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
return kProtocolSignature;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const char*
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::FriendlySignature() const
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
return kProtocolName;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
status_t
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::UpdateSettings(BMessage* msg)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
const char* username = msg->FindString("username");
|
|
|
|
const char* password = msg->FindString("password");
|
|
|
|
const char* server = msg->FindString("server");
|
|
|
|
const char* resource = msg->FindString("resource");
|
|
|
|
|
|
|
|
// Sanity check
|
2010-05-28 15:41:58 -05:00
|
|
|
if (!username || !password || !resource)
|
2010-05-27 20:04:31 -05:00
|
|
|
return B_ERROR;
|
|
|
|
|
|
|
|
// Store settings
|
|
|
|
fUsername = username;
|
|
|
|
fPassword = password;
|
|
|
|
fServer = server;
|
|
|
|
fResource = resource;
|
|
|
|
|
2010-05-28 15:41:58 -05:00
|
|
|
// Give the add-on a change to override settings
|
|
|
|
OverrideSettings();
|
|
|
|
|
|
|
|
// Compose JID
|
|
|
|
BString jid = ComposeJID();
|
2010-05-27 20:04:31 -05:00
|
|
|
|
|
|
|
// Register our client
|
2010-05-28 15:41:58 -05:00
|
|
|
fClient = new gloox::Client(gloox::JID(jid.String()), fPassword.String());
|
|
|
|
fClient->setServer(fServer.String());
|
2010-05-27 20:04:31 -05:00
|
|
|
fClient->registerConnectionListener(this);
|
|
|
|
fClient->registerMessageHandler(this);
|
|
|
|
fClient->rosterManager()->registerRosterListener(this);
|
|
|
|
fClient->disco()->setVersion("Caya", VERSION);
|
|
|
|
fClient->disco()->setIdentity("client", "caya");
|
|
|
|
fClient->logInstance().registerLogHandler(gloox::LogLevelDebug,
|
|
|
|
gloox::LogAreaAll, this);
|
|
|
|
|
|
|
|
// Register vCard manager
|
|
|
|
fVCardManager = new gloox::VCardManager(fClient);
|
|
|
|
|
|
|
|
// Connect to the server
|
|
|
|
fClient->connect(false);
|
|
|
|
|
|
|
|
// Read data from another thread
|
2010-05-28 15:41:58 -05:00
|
|
|
fRecvThread = spawn_thread(connect_thread, "connect_thread",
|
2010-05-27 20:04:31 -05:00
|
|
|
B_NORMAL_PRIORITY, (void*)fClient);
|
2010-05-28 15:41:58 -05:00
|
|
|
if (fRecvThread < B_OK)
|
|
|
|
return B_ERROR;
|
|
|
|
return B_OK;
|
2010-05-27 20:04:31 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
uint32
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::GetEncoding()
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
return 0xffff;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CayaProtocolMessengerInterface*
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::MessengerInterface() const
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
return fServerMessenger;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::_MessageSent(const char* id, const char* subject,
|
2010-05-27 20:04:31 -05:00
|
|
|
const char* body)
|
|
|
|
{
|
|
|
|
BMessage msg(IM_MESSAGE);
|
|
|
|
msg.AddInt32("im_what", IM_MESSAGE_SENT);
|
|
|
|
msg.AddString("protocol", kProtocolSignature);
|
|
|
|
msg.AddString("id", id);
|
|
|
|
msg.AddString("subject", subject);
|
|
|
|
msg.AddString("body", body);
|
|
|
|
fServerMessenger->SendMessage(&msg);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CayaStatus
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::_GlooxStatusToCaya(gloox::Presence::PresenceType type)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
switch (type) {
|
|
|
|
case gloox::Presence::Available:
|
|
|
|
case gloox::Presence::Chat:
|
|
|
|
return CAYA_ONLINE;
|
|
|
|
case gloox::Presence::Away:
|
|
|
|
return CAYA_AWAY;
|
|
|
|
case gloox::Presence::XA:
|
|
|
|
return CAYA_EXTENDED_AWAY;
|
|
|
|
case gloox::Presence::DND:
|
|
|
|
return CAYA_DO_NOT_DISTURB;
|
|
|
|
case gloox::Presence::Unavailable:
|
|
|
|
return CAYA_OFFLINE;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return CAYA_OFFLINE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* gloox callbacks
|
|
|
|
**********************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::onConnect()
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
BMessage msg(IM_MESSAGE);
|
|
|
|
msg.AddInt32("im_what", IM_OWN_STATUS_SET);
|
|
|
|
msg.AddString("protocol", kProtocolSignature);
|
|
|
|
msg.AddInt32("status", CAYA_ONLINE);
|
|
|
|
fServerMessenger->SendMessage(&msg);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::onDisconnect(gloox::ConnectionError e)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
BMessage msg(IM_MESSAGE);
|
|
|
|
msg.AddInt32("im_what", IM_OWN_STATUS_SET);
|
|
|
|
msg.AddString("protocol", kProtocolSignature);
|
|
|
|
msg.AddInt32("status", CAYA_OFFLINE);
|
|
|
|
fServerMessenger->SendMessage(&msg);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::onTLSConnect(const gloox::CertInfo& info)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::onResourceBindError(const gloox::Error* error)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::handleRoster(const gloox::Roster& roster)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
std::list<BMessage> msgs;
|
|
|
|
|
|
|
|
BMessage contactListMsg(IM_MESSAGE);
|
|
|
|
contactListMsg.AddInt32("im_what", IM_CONTACT_LIST);
|
|
|
|
|
|
|
|
gloox::Roster::const_iterator it = roster.begin();
|
|
|
|
for (; it != roster.end(); ++it) {
|
|
|
|
const char* jid = (*it).second->jid().c_str();
|
|
|
|
const char* name = (*it).second->name().c_str();
|
|
|
|
int32 subscription = (*it).second->subscription();
|
|
|
|
|
|
|
|
// Add jid to the server based contact list message
|
|
|
|
contactListMsg.AddString("id", jid);
|
|
|
|
|
|
|
|
// Contact information message
|
|
|
|
BMessage infoMsg(IM_MESSAGE);
|
|
|
|
infoMsg.AddInt32("im_what", IM_CONTACT_INFO);
|
|
|
|
infoMsg.AddString("protocol", kProtocolSignature);
|
|
|
|
infoMsg.AddString("id", jid);
|
|
|
|
infoMsg.AddString("name", name);
|
|
|
|
infoMsg.AddInt32("subscription", subscription);
|
|
|
|
infoMsg.AddInt32("status", CAYA_OFFLINE);
|
|
|
|
|
|
|
|
// Groups
|
|
|
|
gloox::StringList g = (*it).second->groups();
|
|
|
|
gloox::StringList::const_iterator it_g = g.begin();
|
|
|
|
for (; it_g != g.end(); ++it_g)
|
|
|
|
infoMsg.AddString("group", (*it_g).c_str());
|
|
|
|
|
|
|
|
// Resources
|
|
|
|
gloox::RosterItem::ResourceMap::const_iterator rit
|
|
|
|
= (*it).second->resources().begin();
|
|
|
|
for (; rit != (*it).second->resources().end(); ++rit)
|
|
|
|
infoMsg.AddString("resource", (*rit).first.c_str());
|
|
|
|
|
|
|
|
// Store contact info message to be sent later
|
|
|
|
msgs.push_back(infoMsg);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Send server based contact list
|
|
|
|
contactListMsg.AddString("protocol", kProtocolSignature);
|
|
|
|
fServerMessenger->SendMessage(&contactListMsg);
|
|
|
|
|
|
|
|
// Contact list and vCard request
|
|
|
|
std::list<BMessage>::iterator msgsIt;
|
|
|
|
for (msgsIt = msgs.begin(); msgsIt != msgs.end(); ++msgsIt) {
|
|
|
|
BMessage msg = (*msgsIt);
|
|
|
|
const char* jid = msg.FindString("id");
|
|
|
|
fServerMessenger->SendMessage(&msg);
|
|
|
|
fVCardManager->fetchVCard(gloox::JID(jid), this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::handleMessage(const gloox::Message& m, gloox::MessageSession*)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
// Only chat messages are handled now
|
|
|
|
if (m.subtype() != gloox::Message::Chat)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (m.body() == "") {
|
|
|
|
// TODO: Started and stopped typing
|
|
|
|
} else {
|
|
|
|
BMessage msg(IM_MESSAGE);
|
|
|
|
msg.AddInt32("im_what", IM_MESSAGE_RECEIVED);
|
|
|
|
msg.AddString("protocol", kProtocolSignature);
|
|
|
|
msg.AddString("id", m.from().bare().c_str());
|
|
|
|
msg.AddString("subject", m.subject().c_str());
|
|
|
|
msg.AddString("body", m.body().c_str());
|
|
|
|
fServerMessenger->SendMessage(&msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::handleItemAdded(const gloox::JID&)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::handleItemSubscribed(const gloox::JID&)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::handleItemUnsubscribed(const gloox::JID&)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::handleItemRemoved(const gloox::JID&)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::handleItemUpdated(const gloox::JID&)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::handleRosterPresence(const gloox::RosterItem& item,
|
2010-05-27 20:04:31 -05:00
|
|
|
const std::string&,
|
|
|
|
gloox::Presence::PresenceType type,
|
|
|
|
const std::string& presenceMsg)
|
|
|
|
{
|
|
|
|
BMessage msg(IM_MESSAGE);
|
|
|
|
msg.AddInt32("im_what", IM_STATUS_SET);
|
|
|
|
msg.AddString("protocol", kProtocolSignature);
|
|
|
|
msg.AddString("id", item.jid().c_str());
|
2010-05-28 15:41:58 -05:00
|
|
|
msg.AddInt32("status", _GlooxStatusToCaya(type));
|
2010-05-27 20:04:31 -05:00
|
|
|
msg.AddString("message", presenceMsg.c_str());
|
|
|
|
fServerMessenger->SendMessage(&msg);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::handleSelfPresence(const gloox::RosterItem& item, const std::string&,
|
2010-05-27 20:04:31 -05:00
|
|
|
gloox::Presence::PresenceType type,
|
|
|
|
const std::string& presenceMsg)
|
|
|
|
{
|
|
|
|
BMessage msg(IM_MESSAGE);
|
|
|
|
msg.AddInt32("im_what", IM_OWN_CONTACT_INFO);
|
|
|
|
msg.AddString("protocol", kProtocolSignature);
|
|
|
|
msg.AddString("id", item.jid().c_str());
|
|
|
|
msg.AddString("name", item.name().c_str());
|
|
|
|
msg.AddInt32("subscription", item.subscription());
|
|
|
|
//resource
|
|
|
|
//groups
|
2010-05-28 15:41:58 -05:00
|
|
|
msg.AddInt32("status", _GlooxStatusToCaya(type));
|
2010-05-27 20:04:31 -05:00
|
|
|
msg.AddString("message", presenceMsg.c_str());
|
|
|
|
fServerMessenger->SendMessage(&msg);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::handleSubscriptionRequest(const gloox::JID&, const std::string&)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::handleUnsubscriptionRequest(const gloox::JID&, const std::string&)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::handleNonrosterPresence(const gloox::Presence&)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::handleRosterError(const gloox::IQ&)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::handleLog(gloox::LogLevel level, gloox::LogArea,
|
2010-05-27 20:04:31 -05:00
|
|
|
const std::string& msg)
|
|
|
|
{
|
|
|
|
if (level >= gloox::LogLevelWarning)
|
|
|
|
printf("%s\n", msg.c_str());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::handleVCard(const gloox::JID& jid, const gloox::VCard* card)
|
2010-05-27 20:04:31 -05:00
|
|
|
{
|
|
|
|
if (!card)
|
|
|
|
return;
|
|
|
|
|
|
|
|
gloox::VCard::Name name = card->name();
|
|
|
|
gloox::VCard::Photo photo = card->photo();
|
|
|
|
|
|
|
|
std::string fullName = name.family + " " + name.given;
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
BString decoded
|
|
|
|
= Base64::Decode(BString(photo.binval.c_str()));
|
|
|
|
#endif
|
|
|
|
|
|
|
|
BMessage msg(IM_MESSAGE);
|
|
|
|
msg.AddInt32("im_what", IM_EXTENDED_CONTACT_INFO);
|
|
|
|
msg.AddString("protocol", kProtocolSignature);
|
|
|
|
msg.AddString("id", jid.bare().c_str());
|
|
|
|
msg.AddString("nick", card->nickname().c_str());
|
|
|
|
msg.AddString("family name", name.family.c_str());
|
|
|
|
msg.AddString("given name", name.given.c_str());
|
|
|
|
msg.AddString("middle name", name.middle.c_str());
|
|
|
|
msg.AddString("prefix", name.prefix.c_str());
|
|
|
|
msg.AddString("suffix", name.suffix.c_str());
|
|
|
|
msg.AddString("full name", fullName.c_str());
|
|
|
|
fServerMessenger->SendMessage(&msg);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2010-05-28 15:41:58 -05:00
|
|
|
JabberHandler::handleVCardResult(gloox::VCardHandler::VCardContext context,
|
2010-05-27 20:04:31 -05:00
|
|
|
const gloox::JID& jid,
|
|
|
|
gloox::StanzaError)
|
|
|
|
{
|
|
|
|
//if (context == gloox::VCardHandler::FetchVCard)
|
|
|
|
//else
|
|
|
|
}
|