summaryrefslogtreecommitdiffstats
path: root/konversation/src/konvdcop.h
blob: f94c256737b6f0411c0107ad67c81712a71146b3 (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
/*
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
*/

/*
  The konversation DCOP interface class
  begin:     Mar 7 2003
  copyright: (C) 2003 by Alex Zepeda
  email:     zipzippy@sonic.net
*/

#ifndef KONV_DCOP_H
#define KONV_DCOP_H

#include "konviface.h"
#include "common.h"

#include <tqobject.h>
#include <dcopobject.h>


class KonvDCOP : public TQObject, virtual public KonvIface
{
    Q_OBJECT
  

    public:
        KonvDCOP();

        TQString getNickname (const TQString &server);
        TQString getAnyNickname ();
        TQString getChannelEncoding(const TQString& server, const TQString& channel);

    signals:
        void dcopSay(const TQString& server,const TQString& target,const TQString& command);
        void dcopInfo(const TQString& string);
        void dcopInsertMarkerLine();
        void dcopRaw(const TQString& server, const TQString& command);
        void dcopMultiServerRaw(const TQString& command);

        void connectTo(Konversation::ConnectionFlag flag,
                       const TQString& hostName,
                       const TQString& port = "",
                       const TQString& password = "",
                       const TQString& nick = "",
                       const TQString& channel = "",
                       bool useSSL = false);

    public slots:
        void setAway(const TQString &awaymessage);
        void setBack();
        void sayToAll(const TQString &message);
        void actionToAll(const TQString &message);
        void raw(const TQString& server,const TQString& command);
        void say(const TQString& server,const TQString& target,const TQString& command);
        void info(const TQString& string);
        void debug(const TQString& string);
        void error(const TQString& string);
        void insertMarkerLine();
        void connectToServer(const TQString& adress, int port, const TQString& channel, const TQString& password);
        TQStringList listServers();
        TQStringList listConnectedServers();

        void setScreenSaverStarted();
        void setScreenSaverStopped();
};

class KonvIdentDCOP : public TQObject, virtual public KonvIdentityIface
{
    Q_OBJECT
  

        public:
        KonvIdentDCOP();

        void setrealName(const TQString &identity, const TQString& name);
        TQString getrealName(const TQString &identity);
        void setIdent(const TQString &identity, const TQString& ident);
        TQString getIdent(const TQString &identity);

        void setNickname(const TQString &identity, int index,const TQString& nick);
        TQString getNickname(const TQString &identity, int index);

        void setBot(const TQString &identity, const TQString& bot);
        TQString getBot(const TQString &identity);
        void setPassword(const TQString &identity, const TQString& password);
        TQString getPassword(const TQString &identity);

        void setNicknameList(const TQString &identity, const TQStringList& newList);
        TQStringList getNicknameList(const TQString &identity);

        void setQuitReason(const TQString &identity, const TQString& reason);
        TQString getQuitReason(const TQString &identity);
        void setPartReason(const TQString &identity, const TQString& reason);
        TQString getPartReason(const TQString &identity);
        void setKickReason(const TQString &identity, const TQString& reason);
        TQString getKickReason(const TQString &identity);

        void setShowAwayMessage(const TQString &identity, bool state);
        bool getShowAwayMessage(const TQString &identity);

        void setAwayMessage(const TQString &identity, const TQString& message);
        TQString getAwayMessage(const TQString &identity);
        void setReturnMessage(const TQString &identity, const TQString& message);
        TQString getReturnMessage(const TQString &identity);

        TQStringList listIdentities();
};
#endif