Home · All Classes · All Namespaces · Modules · Functions · Files

capabilities-base.h

00001 /*
00002  * This file is part of TelepathyQt4
00003  *
00004  * Copyright (C) 2009-2010 Collabora Ltd. <http://www.collabora.co.uk/>
00005  * Copyright (C) 2009-2010 Nokia Corporation
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020  */
00021 
00022 #ifndef _TelepathyQt4_capabilities_base_h_HEADER_GUARD_
00023 #define _TelepathyQt4_capabilities_base_h_HEADER_GUARD_
00024 
00025 #ifndef IN_TELEPATHY_QT4_HEADER
00026 #error IN_TELEPATHY_QT4_HEADER
00027 #endif
00028 
00029 #include <TelepathyQt4/RequestableChannelClassSpec>
00030 #include <TelepathyQt4/Types>
00031 
00032 namespace Tp
00033 {
00034 
00035 class TELEPATHY_QT4_EXPORT CapabilitiesBase
00036 {
00037 public:
00038     CapabilitiesBase(const CapabilitiesBase &other);
00039     virtual ~CapabilitiesBase();
00040 
00041     CapabilitiesBase &operator=(const CapabilitiesBase &other);
00042 
00043     RequestableChannelClassSpecList allClassSpecs() const;
00044 
00045     TELEPATHY_QT4_DEPRECATED RequestableChannelClassList requestableChannelClasses() const;
00046 
00047     bool isSpecificToContact() const;
00048 
00049     bool textChats() const;
00050 
00051     bool streamedMediaCalls() const;
00052     bool streamedMediaAudioCalls() const;
00053     bool streamedMediaVideoCalls() const;
00054     bool streamedMediaVideoCallsWithAudio() const;
00055     bool upgradingStreamedMediaCalls() const;
00056 
00057     TELEPATHY_QT4_DEPRECATED bool supportsTextChats() const;
00058 
00059     TELEPATHY_QT4_DEPRECATED bool supportsMediaCalls() const;
00060     TELEPATHY_QT4_DEPRECATED bool supportsAudioCalls() const;
00061     TELEPATHY_QT4_DEPRECATED bool supportsVideoCalls(bool withAudio = true) const;
00062     TELEPATHY_QT4_DEPRECATED bool supportsUpgradingCalls() const;
00063 
00064     // later: FIXME TODO why not now‽
00065     // bool fileTransfers() const;
00066     // QList<FileHashType> fileTransfersRequireHash() const;
00067     //
00068     // bool streamTubes() const;
00069     // bool dBusTubes() const;
00070 
00071 protected:
00072     CapabilitiesBase(bool specificToContact);
00073     CapabilitiesBase(const RequestableChannelClassList &rccs,
00074             bool specificToContact);
00075     CapabilitiesBase(const RequestableChannelClassSpecList &rccSpecs,
00076             bool specificToContact);
00077 
00078     virtual void updateRequestableChannelClasses(
00079             const RequestableChannelClassList &rccs);
00080 
00081 private:
00082     friend class Connection;
00083     friend class Contact;
00084 
00085     struct Private;
00086     friend struct Private;
00087     // FIXME (API/ABI break) Make mPriv a QSharedDataPointer
00088     Private *mPriv;
00089 };
00090 
00091 } // Tp
00092 
00093 #endif


Copyright © 2008-2010 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.3.13