File indexing completed on 2024-04-21 15:02:47
0001 /* 0002 SPDX-FileCopyrightText: 2013 David Edmundson <davidedmundson@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 0007 #ifndef GLOBAL_H 0008 #define GLOBAL_H 0009 0010 #include <QString> 0011 #include <QStringList> 0012 #include <QVariantMap> 0013 0014 #include <kpeople/kpeople_export.h> 0015 0016 namespace KPeople 0017 { 0018 class PersonData; 0019 0020 /** 0021 * Merge all uris into a single person. 0022 * Ids can be a mix of person Ids and contact IDs. 0023 * 0024 * @param uris a list of all identifiers to be merged 0025 * 0026 * @return the identifier of the new person or an empty string upon failure 0027 */ 0028 KPEOPLE_EXPORT QString mergeContacts(const QStringList &uris); 0029 0030 /** 0031 * Unmerge a contact. Either remove a contact from a given person or remove a person 0032 * identified by @p uri. 0033 * 0034 * @return Whether the unmerge was successful 0035 */ 0036 KPEOPLE_EXPORT bool unmergeContact(const QString &uri); 0037 0038 /** 0039 * Return a QPixmap for a TP presence string 0040 * 0041 * @return QPixmap with the Tp presence icon 0042 */ 0043 KPEOPLE_EXPORT QString iconNameForPresenceString(const QString &presenceName); 0044 0045 /** 0046 * Returns a sort priority for the given presenceName 0047 * 0048 * @return sort priority of the given presence 0049 */ 0050 KPEOPLE_EXPORT int presenceSortPriority(const QString &presenceName); 0051 0052 } 0053 0054 void initResources(); 0055 0056 #endif // GLOBAL_H