[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:06:18 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=4ee9271

The following commit has been merged in the master branch:
commit 4ee9271ce7c7399f8e5983a6e4db4eb2445f6c2e
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Fri Feb 1 09:04:19 2013 +0000

    Add new types enum
    
    REVIEW: 108598
---
 KTp/types.h | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)

diff --git a/KTp/types.h b/KTp/types.h
new file mode 100644
index 0000000..205341c
--- /dev/null
+++ b/KTp/types.h
@@ -0,0 +1,84 @@
+/*
+ * Common enums and types in KTp
+ *
+ * Copyright (C) 2013 David Edmundson <kde at davidedmundson.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef KTP_TYPES_H
+#define KTP_TYPES_H
+
+#include "contact.h"
+
+#include <TelepathyQt/Account>
+#include <TelepathyQt/AccountManager>
+
+#include <QVariant>
+
+//this is deliberately the wrong namespace for backwards compatability, we will change it when the roles are sorted.
+namespace KTp
+{
+    enum RowType {
+        ContactRowType,
+        PersonRowType,
+        AccountRowType,
+        GroupRowType,
+        UserRowType
+    };
+
+    enum ContactModelRole {
+        // general roles
+        RowTypeRole = Qt::UserRole //returns one of KTp::ContactRowType, KTp::PersonRowType, KTp::GroupRowType, KTp::AccountRowType
+        IdRole, //returns Contact ID, Account UID, or group ID (group name or "_ungrouped")
+
+        //telepathy roles
+        ContactRole = Qt::UserRole + 1000,  ///<return Tp::ContactPtr
+        AccountRole, ///< return Tp::AccountPtr
+
+        //contact/person roles
+        ContactClientTypesRole = Qt::UserRole + 2000, ///< stringlist. See Tp::Contact::ClientTypes
+        ContactAvatarPathRole, ///<string. path to avatar file
+        ContactGroupsRole, ///< stringlist. of all groups contact is in
+        ContactPresenceMessageRole,
+        ContactPresenceTypeRole,
+        ContactPresenceIconRole,
+        ContactSubscriptionStateRole, ///< enum of type Tp::Contact::PresenceState
+        ContactPublishStateRole, ///< enum of type Tp::Contact::PresenceState
+        ContactIsBlockedRole, ///< bool, true if contact is blocked
+
+        ContactHasTextChannelRole, ///< bool, returns true if a text channel is active for this contact
+        ContactUnreadMessageCountRole, ///< int. the number of unread messages in active channels with this contact
+
+        ContactCanTextChatRole, ///< bool. You and contact can both text chat
+        ContactCanFileTransferRole, ///< bool. You and contact can both file transfer
+        ContactCanAudioCallRole, ///< bool. You and contact can both audio call
+        ContactCanVideoCallRole, ///< bool. You and contact can both video call
+        ContactTubesRole, ///< stringlist. common supported dbus + stream services between you and contact
+
+        //heading roles
+        HeaderTotalUsersRole = Qt::UserRole  + 3000,
+        HeaderOnlineUsersRole,
+
+        CustomRole = Qt::UserRole + 4000 // a placemark for custom roles in inherited models
+    };
+}
+
+Q_DECLARE_METATYPE(Tp::AccountPtr)
+Q_DECLARE_METATYPE(KTp::ContactPtr)
+Q_DECLARE_METATYPE(Tp::AccountManagerPtr);
+
+
+#endif // KTP_TYPES_H

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list