summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/groupwise/libgroupwise/eventtransfer.cpp
blob: fb3f3101da08c96c25196a32e6f54bbd90cbb71c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/*
    eventtransfer.cpp - Kopete Groupwise Protocol
    
    Copyright (c) 2004      SUSE Linux AG	 	 http://www.suse.com
    
    Kopete (c) 2002-2004 by the Kopete developers <[email protected]>
 
    *************************************************************************
    *                                                                       *
    * This library is free software; you can redistribute it and/or         *
    * modify it under the terms of the GNU Lesser General Public            *
    * License as published by the Free Software Foundation; either          *
    * version 2 of the License, or (at your option) any later version.      *
    *                                                                       *
    *************************************************************************
*/

#include "eventtransfer.h"

EventTransfer::EventTransfer( const Q_UINT32 eventType, const TQString & source, TQDateTime timeStamp )
 : Transfer(), m_eventType( eventType ), m_source( source ), m_timeStamp( timeStamp )
{
	m_contentFlags |= ( EventType | Source | TimeStamp );
}


EventTransfer::~EventTransfer()
{
}

// query contents

bool EventTransfer::hasEventType()
{
	return ( m_contentFlags & EventType );
}

bool EventTransfer::hasSource()
{
	return ( m_contentFlags & Source );
}

bool EventTransfer::hasTimeStamp()
{
	return ( m_contentFlags & TimeStamp );
}

bool EventTransfer::hasGuid()
{
	return ( m_contentFlags & Guid );
}

bool EventTransfer::hasFlags()
{
	return ( m_contentFlags & Flags );
}

bool EventTransfer::hasMessage()
{
	return ( m_contentFlags & Message );
}

bool EventTransfer::hasStatus()
{
	return ( m_contentFlags & Status );
}

bool EventTransfer::hasStatusText()
{
	return ( m_contentFlags & StatusText );
}

// accessors
	
int EventTransfer::eventType()
{ 
	return m_eventType;
}

TQString EventTransfer::source()
{
	return m_source;
}

TQDateTime EventTransfer::timeStamp()
{
	return m_timeStamp;
}

GroupWise::ConferenceGuid EventTransfer::guid()
{
	return m_guid;
}

Q_UINT32 EventTransfer::flags()
{
	return m_flags;
}

TQString EventTransfer::message()
{
	return m_message;
}

Q_UINT16 EventTransfer::status()
{
	return m_status;
}

TQString EventTransfer::statusText()
{
	return m_statusText;
}

// mutators
void EventTransfer::setGuid( const GroupWise::ConferenceGuid & guid )
{
	m_contentFlags |= Guid;
	m_guid = guid;
}

void EventTransfer::setFlags( const Q_UINT32 flags )
{
	m_contentFlags |= Flags;
	m_flags = flags;
}

void EventTransfer::setMessage( const TQString & message )
{
	m_contentFlags |= Message;
	m_message = message;
}

void EventTransfer::setStatus( const Q_UINT16 inStatus )
{
	m_contentFlags |= Status;
	m_status = inStatus;
}

void EventTransfer::setStatusText( const TQString & statusText )
{
	m_contentFlags |= StatusText;
	m_statusText = statusText;
}