File indexing completed on 2023-11-26 04:55:45
0001 /* 0002 * Copyright (C) 2012 Dan Vrátil <dvratil@redhat.com> 0003 * 0004 * This library is free software; you can redistribute it and/or 0005 * modify it under the terms of the GNU Lesser General Public 0006 * License as published by the Free Software Foundation; either 0007 * version 2.1 of the License, or (at your option) any later version. 0008 * 0009 * This library is distributed in the hope that it will be useful, 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 * Lesser General Public License for more details. 0013 * 0014 * You should have received a copy of the GNU Lesser General Public 0015 * License along with this library; if not, write to the Free Software 0016 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 0017 */ 0018 0019 #ifndef KTP_ACTIONS_H 0020 #define KTP_ACTIONS_H 0021 0022 #include <TelepathyQt/Types> 0023 0024 #include <KTp/ktpcommoninternals_export.h> 0025 0026 namespace Tp { 0027 class PendingChannelRequest; 0028 class PendingOperation; 0029 } 0030 0031 namespace KTp { 0032 0033 namespace Actions { 0034 0035 typedef QList<QUrl> DocumentList; 0036 0037 KTPCOMMONINTERNALS_EXPORT Tp::PendingChannelRequest* startChat(const Tp::AccountPtr &account, 0038 const QString &contactIdentifier, 0039 bool delegateToPreferredHandler = true); 0040 0041 KTPCOMMONINTERNALS_EXPORT Tp::PendingChannelRequest* startChat(const Tp::AccountPtr &account, 0042 const Tp::ContactPtr &contact, 0043 bool delegateToPreferredHandler = true); 0044 0045 KTPCOMMONINTERNALS_EXPORT Tp::PendingChannelRequest* startGroupChat(const Tp::AccountPtr &account, 0046 const QString &roomName); 0047 0048 KTPCOMMONINTERNALS_EXPORT Tp::PendingChannelRequest* startAudioCall(const Tp::AccountPtr &account, 0049 const Tp::ContactPtr &contact); 0050 0051 KTPCOMMONINTERNALS_EXPORT Tp::PendingChannelRequest* startAudioVideoCall(const Tp::AccountPtr &account, 0052 const Tp::ContactPtr &contact); 0053 0054 KTPCOMMONINTERNALS_EXPORT Tp::PendingChannelRequest* startDesktopSharing(const Tp::AccountPtr &account, 0055 const Tp::ContactPtr &contact); 0056 0057 KTPCOMMONINTERNALS_EXPORT Tp::PendingChannelRequest* startFileTransfer(const Tp::AccountPtr &account, 0058 const Tp::ContactPtr &contact, 0059 const QString &filePath); 0060 0061 KTPCOMMONINTERNALS_EXPORT Tp::PendingOperation* startFileTransfer(const Tp::AccountPtr &account, 0062 const Tp::ContactPtr &contact, 0063 const QUrl &url); 0064 0065 KTPCOMMONINTERNALS_EXPORT Tp::PendingChannelRequest* startCollaborativeEditing(const Tp::AccountPtr& account, 0066 const Tp::ContactPtr& contact, 0067 const DocumentList& documents, 0068 bool needOpenEditor=false); 0069 0070 0071 KTPCOMMONINTERNALS_EXPORT Tp::PendingChannelRequest* startCollaborativeEditing(const Tp::AccountPtr& account, 0072 const QString& chatroom, 0073 const DocumentList& documents, 0074 bool needOpenEditor=false); 0075 0076 KTPCOMMONINTERNALS_EXPORT void openLogViewer(const Tp::AccountPtr &account, 0077 const Tp::ContactPtr &contact); 0078 0079 KTPCOMMONINTERNALS_EXPORT void openLogViewer(const Tp::AccountPtr &account, 0080 const QString &targetId); 0081 0082 KTPCOMMONINTERNALS_EXPORT void openLogViewer(const QUrl &uri); 0083 0084 0085 } /* namespace Actions */ 0086 0087 } /* namespace KTp */ 0088 0089 #endif // KTP_ACTIONS_H