23 #ifndef _TelepathyQt_channel_h_HEADER_GUARD_ 
   24 #define _TelepathyQt_channel_h_HEADER_GUARD_ 
   26 #ifndef IN_TP_QT_HEADER 
   27 #error IN_TP_QT_HEADER 
   30 #include <TelepathyQt/_gen/cli-channel.h> 
   32 #include <TelepathyQt/Constants> 
   33 #include <TelepathyQt/DBus> 
   34 #include <TelepathyQt/DBusProxy> 
   35 #include <TelepathyQt/OptionalInterfaceFactory> 
   36 #include <TelepathyQt/ReadinessHelper> 
   37 #include <TelepathyQt/SharedPtr> 
   38 #include <TelepathyQt/Types> 
   41 #include <QSharedDataPointer> 
   42 #include <QVariantMap> 
   48 class PendingOperation;
 
   61     static ChannelPtr create(
const ConnectionPtr &connection,
 
   62             const QString &objectPath, 
const QVariantMap &immutableProperties);
 
   66     ConnectionPtr connection() 
const;
 
   68     QVariantMap immutableProperties() 
const;
 
   70     QString channelType() 
const;
 
   73     uint targetHandle() 
const;
 
   74     QString targetId() 
const;
 
   75     ContactPtr targetContact() 
const;
 
   77     bool isRequested() 
const;
 
   78     ContactPtr initiatorContact() 
const;
 
   86     bool groupCanAddContacts() 
const;
 
   87     bool groupCanAddContactsWithMessage() 
const;
 
   88     bool groupCanAcceptContactsWithMessage() 
const;
 
   90             const QString &message = QString());
 
   91     bool groupCanRescindContacts() 
const;
 
   92     bool groupCanRescindContactsWithMessage() 
const;
 
   93     bool groupCanRemoveContacts() 
const;
 
   94     bool groupCanRemoveContactsWithMessage() 
const;
 
   95     bool groupCanRejectContactsWithMessage() 
const;
 
   96     bool groupCanDepartWithMessage() 
const;
 
   98             const QString &message = QString(),
 
  101     Contacts groupContacts(
bool includeSelfContact = 
true) 
const;
 
  102     Contacts groupLocalPendingContacts(
bool includeSelfContact = 
true) 
const;
 
  103     Contacts groupRemotePendingContacts(
bool includeSelfContact = 
true) 
const;
 
  114         bool isValid()
 const { 
return mPriv.constData() != 0; }
 
  116         bool hasActor() 
const;
 
  117         ContactPtr actor() 
const;
 
  119         bool hasReason()
 const { 
return allDetails().contains(QLatin1String(
"change-reason")); }
 
  122         bool hasMessage()
 const { 
return allDetails().contains(QLatin1String(
"message")); }
 
  123         QString 
message ()
 const { 
return qdbus_cast<QString>(allDetails().value(QLatin1String(
"message"))); }
 
  125         bool hasError()
 const { 
return allDetails().contains(QLatin1String(
"error")); }
 
  126         QString 
error()
 const { 
return qdbus_cast<QString>(allDetails().value(QLatin1String(
"error"))); }
 
  128         bool hasDebugMessage()
 const { 
return allDetails().contains(QLatin1String(
"debug-message")); }
 
  129         QString 
debugMessage()
 const { 
return qdbus_cast<QString>(allDetails().value(QLatin1String(
"debug-message"))); }
 
  131         QVariantMap allDetails() 
const;
 
  141         friend struct Private;
 
  142         QSharedDataPointer<Private> mPriv;
 
  148     bool groupAreHandleOwnersAvailable() 
const;
 
  151     bool groupIsSelfContactTracked() 
const;
 
  152     ContactPtr groupSelfContact() 
const;
 
  154     bool isConference() 
const;
 
  155     Contacts conferenceInitialInviteeContacts() 
const;
 
  156     QList<ChannelPtr> conferenceChannels() 
const;
 
  157     QList<ChannelPtr> conferenceInitialChannels() 
const;
 
  158     QHash<uint, ChannelPtr> conferenceOriginalChannels() 
const;
 
  160     bool supportsConferenceMerging() 
const;
 
  163     bool supportsConferenceSplitting() 
const;
 
  170     void groupCanAddContactsChanged(
bool canAddContacts);
 
  171     void groupCanRemoveContactsChanged(
bool canRemoveContacts);
 
  172     void groupCanRescindContactsChanged(
bool canRescindContacts);
 
  174     void groupMembersChanged(
 
  175             const Tp::Contacts &groupMembersAdded,
 
  176             const Tp::Contacts &groupLocalPendingMembersAdded,
 
  177             const Tp::Contacts &groupRemotePendingMembersAdded,
 
  178             const Tp::Contacts &groupMembersRemoved,
 
  184     void groupSelfContactChanged();
 
  186     void conferenceChannelMerged(
const Tp::ChannelPtr &channel);
 
  187     void conferenceChannelRemoved(
const Tp::ChannelPtr &channel,
 
  191     Channel(
const ConnectionPtr &connection,
const QString &objectPath,
 
  192             const QVariantMap &immutableProperties, 
const Feature &coreFeature);
 
  196     bool groupSelfHandleIsLocalPending() 
const;
 
  202     TP_QT_NO_EXPORT 
void gotMainProperties(QDBusPendingCallWatcher *watcher);
 
  203     TP_QT_NO_EXPORT 
void gotChannelType(QDBusPendingCallWatcher *watcher);
 
  204     TP_QT_NO_EXPORT 
void gotHandle(QDBusPendingCallWatcher *watcher);
 
  205     TP_QT_NO_EXPORT 
void gotInterfaces(QDBusPendingCallWatcher *watcher);
 
  206     TP_QT_NO_EXPORT 
void onClosed();
 
  209     TP_QT_NO_EXPORT 
void onConnectionInvalidated();
 
  211     TP_QT_NO_EXPORT 
void gotGroupProperties(QDBusPendingCallWatcher *watcher);
 
  212     TP_QT_NO_EXPORT 
void gotGroupFlags(QDBusPendingCallWatcher *watcher);
 
  213     TP_QT_NO_EXPORT 
void gotAllMembers(QDBusPendingCallWatcher *watcher);
 
  214     TP_QT_NO_EXPORT 
void gotLocalPendingMembersWithInfo(QDBusPendingCallWatcher *watcher);
 
  215     TP_QT_NO_EXPORT 
void gotSelfHandle(QDBusPendingCallWatcher *watcher);
 
  218     TP_QT_NO_EXPORT 
void onGroupFlagsChanged(uint added, uint removed);
 
  219     TP_QT_NO_EXPORT 
void onMembersChanged(
const QString &message,
 
  222             uint actor, uint reason);
 
  223     TP_QT_NO_EXPORT 
void onMembersChangedDetailed(
 
  226             const QVariantMap &details);
 
  228     TP_QT_NO_EXPORT 
void onSelfHandleChanged(uint selfHandle);
 
  230     TP_QT_NO_EXPORT 
void gotConferenceProperties(QDBusPendingCallWatcher *watcher);
 
  232     TP_QT_NO_EXPORT 
void onConferenceChannelMerged(
const QDBusObjectPath &channel, uint channelSpecificHandle,
 
  233             const QVariantMap &properties);
 
  234     TP_QT_NO_EXPORT 
void onConferenceChannelMerged(
const QDBusObjectPath &channel);
 
  235     TP_QT_NO_EXPORT 
void onConferenceChannelRemoved(
const QDBusObjectPath &channel, 
const QVariantMap &details);
 
  236     TP_QT_NO_EXPORT 
void onConferenceChannelRemoved(
const QDBusObjectPath &channel);
 
  241     friend class PendingLeave;
 
  244     friend struct Private;
 
bool hasDebugMessage() const 
Definition: channel.h:128
The ContactManager class is responsible for managing contacts. 
Definition: contact-manager.h:50
HandleType
Definition: build/TelepathyQt/_gen/constants.h:1375
bool isValid() const 
Definition: channel.h:114
ChannelGroupChangeReason
Definition: build/TelepathyQt/_gen/constants.h:3234
ChannelGroupChangeReason reason() const 
Definition: channel.h:120
QString debugMessage() const 
Definition: channel.h:129
static const Feature FeatureCore
Definition: channel.h:58
QString error() const 
Definition: channel.h:126
The Feature class represents a feature that can be enabled on demand. 
Definition: feature.h:41
The StatefulDBusProxy class is a base class representing a remote object whose API is stateful...
Definition: dbus-proxy.h:96
The Channel::GroupMemberChangeDetails class represents the details of a group membership change...
Definition: channel.h:105
bool hasMessage() const 
Definition: channel.h:122
Definition: cli-channel.h:44
The PendingOperation class is a base class for pending asynchronous operations. 
Definition: pending-operation.h:45
Definition: build/TelepathyQt/_gen/types.h:1668
Definition: build/TelepathyQt/_gen/types.h:101
bool hasReason() const 
Definition: channel.h:119
QString message() const 
Definition: channel.h:123
The Contact class represents a Telepathy contact. 
Definition: contact.h:51
bool hasError() const 
Definition: channel.h:125
QFlags< ChannelGroupFlag > ChannelGroupFlags
Definition: build/TelepathyQt/_gen/constants.h:1043
static const Feature FeatureConferenceInitialInviteeContacts
Definition: channel.h:59
Definition: build/TelepathyQt/_gen/constants.h:3255
The OptionalInterfaceFactory class is a helper class for high-level D-Bus proxy classes willing to of...
Definition: optional-interface-factory.h:65
The Channel class represents a Telepathy channel. 
Definition: channel.h:51