File indexing completed on 2023-12-10 04:56:58

0001 /*
0002  * static methods on the KTp namespace
0003  *
0004  * Copyright (C) 2013 David Edmundson <kde@davidedmundson.co.uk>
0005  *
0006  * This library is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU Lesser General Public
0008  * License as published by the Free Software Foundation; either
0009  * version 2.1 of the License, or (at your option) any later version.
0010  *
0011  * This library is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014  * Lesser General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU Lesser General Public
0017  * License along with this library; if not, write to the Free Software
0018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
0019  */
0020 
0021 #include <TelepathyQt/Types>
0022 
0023 #include <KTp/ktpcommoninternals_export.h>
0024 
0025 namespace KTp
0026 {
0027 class GlobalContactManager;
0028 
0029     KTPCOMMONINTERNALS_EXPORT bool kpeopleEnabled();
0030 
0031     /**
0032      * Returns an accountFactory with the following features set:
0033      *  - FeatureCore
0034      *  - FeatureProfile
0035      *
0036      * FeatureConnection is not set, accounts will be created with a null connection at startup
0037      *
0038      */
0039 
0040     KTPCOMMONINTERNALS_EXPORT Tp::AccountFactoryConstPtr accountFactory();
0041 
0042     /**
0043      * Returns a connectionFactory with the following features set:
0044      *  - FeatureCore
0045      *  - FeatureSelfContact
0046      *
0047      * FeatureRoster is expensive and should be called manually in becomeReady(Feature::Connection::FeatureRoster)
0048      *
0049      */
0050 
0051     KTPCOMMONINTERNALS_EXPORT Tp::ConnectionFactoryConstPtr connectionFactory();
0052 
0053     /**
0054      * Returns a default channelFactory with no special features.
0055      * Applications are expected to create a custom channel factories for their clientRegistrars
0056      */
0057     KTPCOMMONINTERNALS_EXPORT Tp::ChannelFactoryConstPtr channelFactory();
0058 
0059     /**
0060      * Returns a contactFactory with the following features set:
0061      *  - FeatureSimplePresence
0062      *  - FeatureCapabilities
0063      *  - FeatureClientTypes
0064      *  - FeatureAvatarData
0065      */
0066     KTPCOMMONINTERNALS_EXPORT Tp::ContactFactoryConstPtr contactFactory();
0067 
0068     KTPCOMMONINTERNALS_EXPORT Tp::AccountManagerPtr accountManager();
0069     KTPCOMMONINTERNALS_EXPORT KTp::GlobalContactManager* contactManager();
0070 }