gloox
1.0.1
Main Page
Related Pages
Namespaces
Classes
Files
File List
src
mucmessagesession.cpp
1
/*
2
Copyright (c) 2006-2012 by Jakob Schroeter <js@camaya.net>
3
This file is part of the gloox library. http://camaya.net/gloox
4
5
This software is distributed under a license. The full license
6
agreement can be found in the file LICENSE in this distribution.
7
This software may not be copied, modified, sold or distributed
8
other than expressed in the named license agreement.
9
10
This software is distributed without any warranty.
11
*/
12
13
14
#include "mucmessagesession.h"
15
#include "clientbase.h"
16
#include "message.h"
17
#include "messagehandler.h"
18
19
namespace
gloox
20
{
21
22
MUCMessageSession::MUCMessageSession
(
ClientBase
* parent,
const
JID
& jid )
23
:
MessageSession
( parent, jid, false,
Message
::Groupchat |
Message
::Chat
24
|
Message
::Normal |
Message
::
Error
,
25
false )
26
{
27
}
28
29
MUCMessageSession::~MUCMessageSession
()
30
{
31
}
32
33
void
MUCMessageSession::handleMessage
(
Message
& msg )
34
{
35
if
( m_messageHandler )
36
m_messageHandler->
handleMessage
( msg );
37
}
38
39
void
MUCMessageSession::send
(
const
std::string& message )
40
{
41
Message
m(
Message::Groupchat
, m_target, message );
42
43
// decorate( m );
44
45
m_parent->
send
( m );
46
}
47
48
void
MUCMessageSession::setSubject
(
const
std::string& subject )
49
{
50
Message
m(
Message::Groupchat
, m_target.
bareJID
(),
EmptyString
, subject );
51
m_parent->
send
( m );
52
}
53
54
}
Generated on Sun Jun 30 2013 14:37:36 for gloox by
1.8.1.2