23 #ifndef _TelepathyQt_abstract_client_h_HEADER_GUARD_
24 #define _TelepathyQt_abstract_client_h_HEADER_GUARD_
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
30 #include <TelepathyQt/Constants>
31 #include <TelepathyQt/SharedPtr>
32 #include <TelepathyQt/Types>
36 #include <QSharedDataPointer>
38 #include <QVariantMap>
43 class ClientRegistrar;
44 class ChannelClassSpecList;
54 bool isRegistered()
const;
59 void setRegistered(
bool registered);
62 friend struct Private;
80 bool isRecovering()
const {
return qdbus_cast<
bool>(allInfo().value(QLatin1String(
"recovering"))); }
82 QVariantMap allInfo()
const;
86 QSharedDataPointer<Private> mPriv;
93 bool shouldRecover()
const;
95 virtual void observeChannels(
const MethodInvocationContextPtr<> &context,
96 const AccountPtr &account,
97 const ConnectionPtr &connection,
98 const QList<ChannelPtr> &channels,
99 const ChannelDispatchOperationPtr &dispatchOperation,
100 const QList<ChannelRequestPtr> &requestsSatisfied,
101 const ObserverInfo &observerInfo) = 0;
108 friend struct Private;
121 virtual void addDispatchOperation(
const MethodInvocationContextPtr<> &context,
122 const ChannelDispatchOperationPtr &dispatchOperation) = 0;
129 friend struct Private;
148 Capabilities(
const QStringList &tokens = QStringList());
157 QLatin1String(
"/gtalk-p2p"));
163 QLatin1String(
"/gtalk-p2p"));
169 QLatin1String(
"/gtalk-p2p"));
175 QLatin1String(
"/ice-udp"));
181 QLatin1String(
"/ice-udp"));
187 QLatin1String(
"/ice-udp"));
193 QLatin1String(
"/wlm-8.5"));
199 QLatin1String(
"/wlm-8.5"));
205 QLatin1String(
"/wlm-8.5"));
211 QLatin1String(
"/wlm-2009"));
217 QLatin1String(
"/wlm-2009"));
223 QLatin1String(
"/wlm-2009"));
229 QLatin1String(
"/audio/") + mimeSubType.toLower());
235 QLatin1String(
"/audio/") + mimeSubType.toLower());
241 QLatin1String(
"/audio/") + mimeSubType.toLower());
247 QLatin1String(
"/video/") + mimeSubType.toLower());
253 QLatin1String(
"/video/") + mimeSubType.toLower());
259 QLatin1String(
"/video/") + mimeSubType.toLower());
262 bool hasToken(
const QString &token)
const;
263 void setToken(
const QString &token);
264 void unsetToken(
const QString &token);
266 QStringList allTokens()
const;
270 QSharedDataPointer<Private> mPriv;
276 HandlerInfo(
const QVariantMap &info = QVariantMap());
282 QVariantMap allInfo()
const;
286 QSharedDataPointer<Private> mPriv;
295 virtual bool bypassApproval()
const = 0;
297 virtual void handleChannels(
const MethodInvocationContextPtr<> &context,
298 const AccountPtr &account,
299 const ConnectionPtr &connection,
300 const QList<ChannelPtr> &channels,
301 const QList<ChannelRequestPtr> &requestsSatisfied,
302 const QDateTime &userActionTime,
305 bool wantsRequestNotification()
const;
306 virtual void addRequest(
const ChannelRequestPtr &request);
307 virtual void removeRequest(
const ChannelRequestPtr &request,
308 const QString &errorName,
const QString &errorMessage);
313 bool wantsRequestNotification =
false);
317 friend struct Private;
void setGTalkP2PNATTraversalToken()
Definition: abstract-client.h:160
void setWLM85NATTraversalToken()
Definition: abstract-client.h:196
void unsetWLM85NATTraversalToken()
Definition: abstract-client.h:202
The AbstractClientObserver class represents a Telepathy observer.
Definition: abstract-client.h:66
The AbstractClientApprover class represents a Telepathy approver.
Definition: abstract-client.h:112
bool hasGTalkP2PNATTraversalToken() const
Definition: abstract-client.h:154
The AbstractClientHandler class represents a Telepathy handler.
Definition: abstract-client.h:140
The AbstractClient class represents a Telepathy client.
Definition: abstract-client.h:46
void unsetWLM2009NATTraversalToken()
Definition: abstract-client.h:220
void setVideoCodecToken(const QString &mimeSubType)
Definition: abstract-client.h:250
bool isRecovering() const
Definition: abstract-client.h:80
The ChannelClassSpecList class represents a list of ChannelClassSpec.
Definition: channel-class-spec.h:249
bool hasWLM2009NATTraversalToken() const
Definition: abstract-client.h:208
void setAudioCodecToken(const QString &mimeSubType)
Definition: abstract-client.h:232
bool hasAudioCodecToken(const QString &mimeSubType) const
Definition: abstract-client.h:226
void setICEUDPNATTraversalToken()
Definition: abstract-client.h:178
bool hasVideoCodecToken(const QString &mimeSubType) const
Definition: abstract-client.h:244
#define TP_QT_IFACE_CHANNEL_INTERFACE_MEDIA_SIGNALLING
Definition: buildqt4/TelepathyQt/_gen/constants.h:5025
The AbstractClientHandler::HandlerInfo class provides a wrapper around the additional info about the ...
Definition: abstract-client.h:273
void unsetICEUDPNATTraversalToken()
Definition: abstract-client.h:184
The ClientRegistrar class is responsible for registering Telepathy clients (Observer, Approver, Handler).
Definition: client-registrar.h:43
The AbstractClientObserver::ObserverInfo class provides a wrapper around the additional info about th...
Definition: abstract-client.h:71
The RefCounted class is a base class for shared objects used by SharedPtr.
Definition: shared-ptr.h:42
void unsetAudioCodecToken(const QString &mimeSubType)
Definition: abstract-client.h:238
The AbstractClientHandler::Capabilities class provides a wrapper around the capabilities of a handler...
Definition: abstract-client.h:145
void setWLM2009NATTraversalToken()
Definition: abstract-client.h:214
void unsetVideoCodecToken(const QString &mimeSubType)
Definition: abstract-client.h:256
bool hasICEUDPNATTraversalToken() const
Definition: abstract-client.h:172
void unsetGTalkP2PNATTraversalToken()
Definition: abstract-client.h:166
bool hasWLM85NATTraversalToken() const
Definition: abstract-client.h:190