summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4068c59)
raw | patch | inline | side by side (parent: 4068c59)
author | daleharvey <daleharvey@users.sourceforge.net> | |
Sun, 30 Jul 2006 19:24:17 +0000 (19:24 +0000) | ||
committer | daleharvey <daleharvey@users.sourceforge.net> | |
Sun, 30 Jul 2006 19:24:17 +0000 (19:24 +0000) |
diff --git a/src/jabber_whiteboard/invitation-handlers.cpp b/src/jabber_whiteboard/invitation-handlers.cpp
index f304d095e04d9d976e9efb1e1c3855e799ad3a48..1ddf479e09d07e586ab4241a6fcc633e85e4e433 100644 (file)
{
SPDesktop* dt = createInkboardDesktop(from, State::WHITEBOARD_PEER);
InkboardDocument* idoc = dynamic_cast< InkboardDocument* >(sp_desktop_document(dt)->rdoc);
- send(from, Message::PROTOCOL, " ");
+ //sendProtocol(from, Message::PROTOCOL, " ");
break;
}
case DECLINE_INVITATION:
break;
}
default:
- send(from, Message::PROTOCOL, " ");
+ //sendProtocol(from, Message::PROTOCOL, " ");
break;
}
index 3b689b395ef393b1bafbf2c62b045a4025138a0b..fc58dc349b19ecaa57d2144109c0f10f3085a3b8 100644 (file)
Inkscape::Whiteboard::SessionManager& sm =
Inkscape::Whiteboard::SessionManager::instance();
sm.doShare(jid, Inkscape::Whiteboard::State::WHITEBOARD_PEER);
-
-// Inkscape::Whiteboard::SessionManager::instance().createInkboardDesktop(jid, Inkscape::Whiteboard::INKBOARD_PRIVATE);
}
void PedroGui::doGroupShare(const DOMString &groupJid)
Inkscape::Whiteboard::SessionManager& sm =
Inkscape::Whiteboard::SessionManager::instance();
sm.doShare(groupJid, Inkscape::Whiteboard::State::WHITEBOARD_MUC);
-
-// Inkscape::Whiteboard::SessionManager::instance().createInkboardDesktop(groupJid, Inkscape::Whiteboard::INKBOARD_MUC);
}
//##################
index e669403cf1bf015dbf70fcec8bd37af87660f0ae..a64efbdb33efe821fd8be87c0695cadbd849b310 100644 (file)
getClient().disconnect();
}
-unsigned long SessionManager::getSequenceNumber()
-{
- return sequenceNumber++;
-}
-
-bool
-SessionManager::send(const Glib::ustring &destJid,
- const Message::Wrapper type,
- const Glib::ustring &data)
-{
- Pedro::DOMString xmlData = Pedro::Parser::encode(data);
- char *fmt=
- "<message type='chat' from='%s' to='%s' id='ink_%d'>"
- "<w xmlns='%s' "
- "protocol='%d' type='%d' seq='%d'><x:inkboard-data>%s</x:inkboard-data></inkboard>"
- "<body></body>"
- "</message>";
- if (!getClient().write(fmt,
- getClient().getJid().c_str(),
- destJid.c_str(),
- getClient().getMsgId(),
- INKBOARD_XMLNS,
- 2,
- type,
- getSequenceNumber(),
- xmlData.c_str()
- ))
- {
- return false;
- }
-
- return true;
-}
-
-bool
-SessionManager::sendGroup(const Glib::ustring &groupJid,
- const Message::Wrapper type,
- const Glib::ustring &data)
-{
- Pedro::DOMString xmlData = Pedro::Parser::encode(data);
- char *fmt=
- "<message type='groupchat' from='%s' to='%s' id='ink_%d'>"
- "<inkboard xmlns='%s' "
- "protocol='%d' type='%d' seq='%d'><x:inkboard-data>%s</x:inkboard-data></inkboard>"
- "<body></body>"
- "</message>";
- if (!getClient().write(fmt,
- getClient().getJid().c_str(),
- groupJid.c_str(),
- getClient().getMsgId(),
- INKBOARD_XMLNS,
- 2,
- type,
- getSequenceNumber(),
- xmlData.c_str()
- ))
- {
- return false;
- }
-
- return true;
-}
-
void
SessionManager::processXmppEvent(const Pedro::XmppEvent &event)
{
int type = event.getType();
+ g_warning("recieved pedro");
+
switch (type) {
case Pedro::XmppEvent::EVENT_STATUS:
{
index d6e600fe448c108301ca9e113e58d179a39ccb1f..7e61c6b91957ad0bcd0afce006a72688815213e6 100644 (file)
static void showClient();
static SessionManager& instance();
- /**
- *
- */
- unsigned long getSequenceNumber();
-
/**
*
*/
virtual Pedro::XmppClient &getClient()
{ return gui.client; }
- /**
- *
- */
- virtual bool send(const Glib::ustring &destJid,
- const Message::Wrapper type,
- const Glib::ustring &data);
-
- /**
- *
- */
- virtual bool sendGroup(const Glib::ustring &destJid,
- const Message::Wrapper type,
- const Glib::ustring &data);
/**
*
*/