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

abstract-interface.h

00001 /* Abstract base class for Telepathy interfaces
00002  *
00003  * Copyright (C) 2009 Collabora Ltd. <http://www.collabora.co.uk/>
00004  * Copyright (C) 2009 Nokia Corporation
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 _TelepathyQt4_abstract_interface_h_HEADER_GUARD_
00022 #define _TelepathyQt4_abstract_interface_h_HEADER_GUARD_
00023 
00024 #ifndef IN_TELEPATHY_QT4_HEADER
00025 #error IN_TELEPATHY_QT4_HEADER
00026 #endif
00027 
00028 #include <TelepathyQt4/Global>
00029 
00030 #include <QDBusAbstractInterface>
00031 
00032 namespace Tp
00033 {
00034 
00035 class DBusProxy;
00036 class PendingVariant;
00037 class PendingOperation;
00038 class PendingVariantMap;
00039 
00040 class TELEPATHY_QT4_EXPORT AbstractInterface : public QDBusAbstractInterface
00041 {
00042     Q_OBJECT
00043     Q_DISABLE_COPY(AbstractInterface)
00044 
00045 public:
00046     virtual ~AbstractInterface();
00047 
00048     bool isValid() const;
00049     QString invalidationReason() const;
00050     QString invalidationMessage() const;
00051 
00052 protected Q_SLOTS:
00053     virtual void invalidate(Tp::DBusProxy *proxy,
00054             const QString &error, const QString &message);
00055 
00056 protected:
00057     AbstractInterface(DBusProxy *proxy, const char *interface);
00058     AbstractInterface(const QString &busName, const QString &path,
00059             const char *interface, const QDBusConnection &connection,
00060             QObject *parent);
00061 
00062     PendingVariant *internalRequestProperty(const QString &name) const;
00063     PendingOperation *internalSetProperty(const QString &name, const QVariant &newValue);
00064     PendingVariantMap *internalRequestAllProperties() const;
00065 
00066 private:
00067     struct Private;
00068     friend struct Private;
00069     Private *mPriv;
00070 };
00071 
00072 } // Tp
00073 
00074 #endif


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