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

channel-class-spec.h

00001 /*
00002  * This file is part of TelepathyQt4Yell
00003  *
00004  * Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019  */
00020 
00021 #ifndef _TelepathyQt4Yell_channel_class_spec_h_HEADER_GUARD_
00022 #define _TelepathyQt4Yell_channel_class_spec_h_HEADER_GUARD_
00023 
00024 #ifndef IN_TELEPATHY_QT4_YELL_HEADER
00025 #error IN_TELEPATHY_QT4_YELL_HEADER
00026 #endif
00027 
00028 #include <TelepathyQt4Yell/Constants>
00029 #include <TelepathyQt4Yell/Global>
00030 
00031 #include <TelepathyQt4/ChannelClassSpec>
00032 
00033 namespace Tpy
00034 {
00035 
00036 class TELEPATHY_QT4_YELL_EXPORT ChannelClassSpec : public Tp::ChannelClassSpec
00037 {
00038 public:
00039     ChannelClassSpec();
00040     ChannelClassSpec(const Tp::ChannelClass &cc);
00041     ChannelClassSpec(const QVariantMap &props);
00042     ChannelClassSpec(const QString &channelType, Tp::HandleType targetHandleType,
00043             const QVariantMap &otherProperties = QVariantMap());
00044     ChannelClassSpec(const QString &channelType, Tp::HandleType targetHandleType, bool requested,
00045             const QVariantMap &otherProperties = QVariantMap());
00046     ChannelClassSpec(const ChannelClassSpec &other,
00047             const QVariantMap &additionalProperties = QVariantMap());
00048     ~ChannelClassSpec();
00049 
00050     bool hasMediaCallInitialAudioFlag() const
00051     {
00052         return qdbus_cast<bool>(
00053                 property(TP_QT4_YELL_IFACE_CHANNEL_TYPE_CALL + QLatin1String(".InitialAudio")));
00054     }
00055 
00056     void setMediaCallInitialAudioFlag()
00057     {
00058         setProperty(TP_QT4_YELL_IFACE_CHANNEL_TYPE_CALL + QLatin1String(".InitialAudio"),
00059                 QVariant::fromValue(true));
00060     }
00061 
00062     void unsetMediaCallInitialAudioFlag()
00063     {
00064         unsetProperty(TP_QT4_YELL_IFACE_CHANNEL_TYPE_CALL + QLatin1String(".InitialAudio"));
00065     }
00066 
00067     bool hasMediaCallInitialVideoFlag() const
00068     {
00069         return qdbus_cast<bool>(
00070                 property(TP_QT4_YELL_IFACE_CHANNEL_TYPE_CALL + QLatin1String(".InitialVideo")));
00071     }
00072 
00073     void setMediaCallInitialVideoFlag()
00074     {
00075         setProperty(TP_QT4_YELL_IFACE_CHANNEL_TYPE_CALL + QLatin1String(".InitialVideo"),
00076                 QVariant::fromValue(true));
00077     }
00078 
00079     void unsetMediaCallInitialVideoFlag()
00080     {
00081         unsetProperty(TP_QT4_YELL_IFACE_CHANNEL_TYPE_CALL + QLatin1String(".InitialVideo"));
00082     }
00083 
00084     static ChannelClassSpec mediaCall(const QVariantMap &additionalProperties = QVariantMap());
00085     static ChannelClassSpec audioCall(const QVariantMap &additionalProperties =
00086             QVariantMap());
00087     static ChannelClassSpec videoCall(const QVariantMap &additionalProperties =
00088             QVariantMap());
00089     static ChannelClassSpec videoCallWithAudio(const QVariantMap &additionalProperties =
00090             QVariantMap());
00091 };
00092 
00093 } // Tpy
00094 
00095 Q_DECLARE_METATYPE(Tpy::ChannelClassSpec);
00096 
00097 #endif


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