[telepathy-qt4/master] Connection: Standardize class definition.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Mon Jun 29 08:33:29 PDT 2009
- Moved public xxxInterface methods definition to the end of the public methods
declaration.
- Added friend struct Private declaration.
- Added Q_DISABLE_COPY(xxx) to all classes that can not be copied.
- Moved Q_DISABLE_COPY(xxx) declaration to the top of the class definition,
before the public keyword.
- Reorder public, protected, SIGNALS declaration as follows:
public
public Q_SLOTS
Q_SIGNALS
protected
protected Q_SLOTS
private Q_SLOTS
private
- Moved friend class xxx definitions to be placed right bellow private keyword.
---
TelepathyQt4/connection.h | 55 +++++++++++++++++++++-----------------------
1 files changed, 26 insertions(+), 29 deletions(-)
diff --git a/TelepathyQt4/connection.h b/TelepathyQt4/connection.h
index 3b83b44..f87e2e2 100644
--- a/TelepathyQt4/connection.h
+++ b/TelepathyQt4/connection.h
@@ -89,11 +89,29 @@ public:
uint statusReason() const;
uint selfHandle() const;
+ ContactPtr selfContact() const;
SimpleStatusSpecMap allowedPresenceStatuses() const;
PendingOperation *setSelfPresence(const QString &status, const QString &statusMessage);
- ContactPtr selfContact() const;
+ PendingChannel *createChannel(const QVariantMap &request);
+ PendingChannel *ensureChannel(const QVariantMap &request);
+
+ PendingReady *requestConnect(const Features &requestedFeatures = Features());
+ PendingOperation *requestDisconnect();
+
+ PendingHandles *requestHandles(uint handleType, const QStringList &names);
+ PendingHandles *referenceHandles(uint handleType, const UIntList &handles);
+
+ PendingContactAttributes *getContactAttributes(const UIntList &handles,
+ const QStringList &interfaces, bool reference = true);
+ QStringList contactAttributeInterfaces() const;
+ ContactManager *contactManager() const;
+
+ inline Client::DBus::PropertiesInterface *propertiesInterface() const
+ {
+ return optionalInterface<Client::DBus::PropertiesInterface>(BypassInterfaceCheck);
+ }
inline Client::ConnectionInterfaceAliasingInterface *aliasingInterface(
InterfaceSupportedChecking check = CheckInterfaceSupported) const
@@ -131,28 +149,6 @@ public:
return optionalInterface<Client::ConnectionInterfaceRequestsInterface>(check);
}
- inline Client::DBus::PropertiesInterface *propertiesInterface() const
- {
- return optionalInterface<Client::DBus::PropertiesInterface>(BypassInterfaceCheck);
- }
-
- PendingChannel *createChannel(const QVariantMap &request);
-
- PendingChannel *ensureChannel(const QVariantMap &request);
-
- PendingReady *requestConnect(const Features &requestedFeatures = Features());
-
- PendingOperation *requestDisconnect();
-
- PendingHandles *requestHandles(uint handleType, const QStringList &names);
-
- PendingHandles *referenceHandles(uint handleType, const UIntList &handles);
-
- PendingContactAttributes *getContactAttributes(const UIntList &handles,
- const QStringList &interfaces, bool reference = true);
- QStringList contactAttributeInterfaces() const;
- ContactManager *contactManager() const;
-
Q_SIGNALS:
void statusChanged(uint newStatus, uint newStatusReason);
void selfHandleChanged(uint newHandle);
@@ -184,19 +180,20 @@ private Q_SLOTS:
void onSelfHandleChanged(uint);
private:
- void refHandle(uint type, uint handle);
- void unrefHandle(uint type, uint handle);
- void handleRequestLanded(uint type);
-
- struct Private;
class PendingConnect;
- friend struct Private;
friend class PendingChannel;
friend class PendingConnect;
friend class PendingContactAttributes;
friend class PendingContacts;
friend class PendingHandles;
friend class ReferencedHandles;
+
+ void refHandle(uint type, uint handle);
+ void unrefHandle(uint type, uint handle);
+ void handleRequestLanded(uint type);
+
+ struct Private;
+ friend struct Private;
Private *mPriv;
};
--
1.5.6.5
More information about the telepathy-commits
mailing list