blob: a631186cce70643d577bbb0bec499f19b2729bcd (
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
|
%{CPP_TEMPLATE}
#include "%{APPNAMELC}.h"
#include <kdebug.h>
#include <tdeapplication.h>
%{APPNAME}::%{APPNAME}() : DCOPObject("serviceInterface")
{
kdDebug() << "Starting new service... " << endl;
m_List = TQStringList();
}
%{APPNAME}::~%{APPNAME}()
{
kdDebug() << "Going away... " << endl;
}
TQString %{APPNAME}::string(int idx)
{
return *m_List.at(idx);
}
TQStringList %{APPNAME}::list()
{
return m_List;
}
void %{APPNAME}::add(TQString arg)
{
kdDebug() << "Adding " << arg << " to the list" << endl;
m_List << arg;
}
bool %{APPNAME}::remove(TQString arg)
{
TQStringList::Iterator it = m_List.find(arg);
if (it != m_List.end())
{
m_List.remove(it);
}
else
return false;
return true;
}
bool %{APPNAME}::exit()
{
kapp->quit();
}
|