~ubuntu-branches/ubuntu/saucy/kopete/saucy-updates

« back to all changes in this revision

Viewing changes to .pc/kubuntu_no_break_api.diff/protocols/skype/skypecontact.h

  • Committer: Package Import Robot
  • Author(s): Howard Chan, Michał Zając, Howard Chan
  • Date: 2013-06-28 18:19:57 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130628181957-oe71prbd9qv1ygop
Tags: 4:4.10.90-0ubuntu1
[ Michał Zając ]
* New upstream beta release

[ Howard Chan ]
* Delete the API patch since it's included in upstream now.
* Fix control file to make -dbg depend on main package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  This file is part of the KDE project
2
 
    Copyright (C) 2005 Michal Vaner <michal.vaner@kdemail.net>
3
 
    Copyright (C) 2008-2009 Pali Rohár <pali.rohar@gmail.com>
4
 
 
5
 
    This library is free software; you can redistribute it and/or
6
 
    modify it under the terms of the GNU Library General Public
7
 
    License version 2 as published by the Free Software Foundation.
8
 
 
9
 
    This library is distributed in the hope that it will be useful,
10
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
 
    Library General Public License for more details.
13
 
 
14
 
    You should have received a copy of the GNU Library General Public License
15
 
    along with this library; see the file COPYING.LIB.  If not, write to
16
 
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
 
    Boston, MA 02111-1307, USA.
18
 
 
19
 
*/
20
 
#ifndef SKYPECONTACT_H
21
 
#define SKYPECONTACT_H
22
 
 
23
 
#include <kopetecontact.h>
24
 
 
25
 
class SkypeAccount;
26
 
class QString;
27
 
class QDateTime;
28
 
class SkypeContactPrivate;
29
 
namespace Kopete {
30
 
        class MetaContact;
31
 
        class ChatSession;
32
 
}
33
 
class KAction;
34
 
class SkypeChatSession;
35
 
 
36
 
/**
37
 
 * @author Michal Vaner (VORNER) <michal.vaner@kdemail.net>
38
 
 * @author Pali Rohár
39
 
 * @short Skype contact
40
 
 */
41
 
class SkypeContact : public Kopete::Contact
42
 
{
43
 
        Q_OBJECT
44
 
        private:
45
 
                ///some internal things
46
 
                SkypeContactPrivate *d;
47
 
                ///This examines all factors of users online status and sets the status acordingly
48
 
                void resetStatus();
49
 
        private slots:
50
 
                ///This will note that the session was destroyed and therefore can't be used again. As well used when the chat becomes multi-user so it no longer belongs to this contact
51
 
                void removeChat();
52
 
                ///Enables or disables the call action depending on if it can be called or not.
53
 
                void enableActions(bool value);
54
 
                ///The status changed, so there should be update of the availiblity of some things
55
 
                void statusChanged();
56
 
        public:
57
 
                /**
58
 
                 * Constructor.
59
 
                 * @param account Account to which it belongs
60
 
                 * @param id ID of the new contact
61
 
                 * @param parent Metacontact to put it inside
62
 
                 */
63
 
                SkypeContact(SkypeAccount *account, const QString &id, Kopete::MetaContact *parent, bool user = true);
64
 
                /**
65
 
                 * Destructor.
66
 
                 */
67
 
                ~SkypeContact();
68
 
                /**
69
 
                 * Creates a chat session.
70
 
                 * @param flags Can I create it?
71
 
                 * @return Pointer to that session
72
 
                 */
73
 
                virtual Kopete::ChatSession *manager( CanCreateFlags canCreate = CannotCreate );
74
 
                /**
75
 
                 * Save this contact (resp. set what should be saved and it will be written automatically by kopete)
76
 
                 */
77
 
                virtual void serialize(QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData);
78
 
                ///Returns full name for the contact
79
 
                virtual QString formattedName() const;
80
 
                ///Is it reachable now?
81
 
                virtual bool isReachable();
82
 
                ///Does this contact has opened chat session?
83
 
                bool hasChat() const;
84
 
                ///Tell kopete which actions to show in the contact pop-up menu
85
 
                virtual QList<KAction*> *customContextMenuActions();
86
 
                ///Give me actually existing chat session
87
 
                SkypeChatSession *getChatSession();
88
 
                ///Can this contact be called now?
89
 
                bool canCall() const;
90
 
        private slots:
91
 
                /**
92
 
                 * Authorize the user to see if I'm online
93
 
                 */
94
 
                void authorize();
95
 
                /**
96
 
                 * Remove authorization from that user
97
 
                 */
98
 
                void disAuthor();
99
 
                /**
100
 
                 * Block this user, no more messages
101
 
                 */
102
 
                void block();
103
 
        public slots:
104
 
                /**
105
 
                 * Please ask for the contact information (emit infoReques with your name)
106
 
                 */
107
 
                void requestInfo();
108
 
                /**
109
 
                 * Chnages something in the contact.
110
 
                 * @param change What change was it? It looks like [property] [value]
111
 
                 */
112
 
                void setInfo(const QString &change);
113
 
                /**
114
 
                 * This one showes message in the chat session.
115
 
                 * @param message The message to show
116
 
                 * @param chat The chat ID of the chat the message belongs to
117
 
                 * @param timeStamp time when message was send
118
 
                 */
119
 
                void receiveIm(const QString &message, const QString &chat, const QDateTime &timeStamp);
120
 
                /**
121
 
                 * connection status changed
122
 
                 * @param connected Are we connected now?
123
 
                 */
124
 
                void connectionStatus(bool connected);
125
 
                ///This slot calls a contact
126
 
                void call();
127
 
                /**
128
 
                 * This slot should show the user info
129
 
                 * TODO: Implement this
130
 
                 * Now it only shows a messagebox
131
 
                 */
132
 
                virtual void slotUserInfo();
133
 
                /**
134
 
                 * Remove the contact from skype server
135
 
                 */
136
 
                virtual void deleteContact();
137
 
                /**
138
 
                 * Save me to the Skype
139
 
                 */
140
 
                virtual void sync(unsigned int changed);
141
 
                /**
142
 
                 * Send file
143
 
                 */
144
 
                virtual void sendFile(const KUrl &url, const QString &, uint);
145
 
        signals:
146
 
                /**
147
 
                 * There is a request to get/refresh the contact info from skype
148
 
                 * @param contact Which contact wants it?
149
 
                 */
150
 
                void infoRequest(const QString &contact);
151
 
                /**
152
 
                 * The possibility to call this contact has changed, so GUI should enable/disable some buttons.
153
 
                 * @param value Is it possible to call it now?
154
 
                 */
155
 
                void setActionsPossible(bool value);
156
 
};
157
 
 
158
 
#endif