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 
00037 class TELEPATHY_QT4_EXPORT AbstractInterface : public QDBusAbstractInterface
00038 {
00039     Q_OBJECT
00040     Q_DISABLE_COPY(AbstractInterface)
00041 
00042 public:
00043     virtual ~AbstractInterface();
00044 
00045     bool isValid() const;
00046     QString invalidationReason() const;
00047     QString invalidationMessage() const;
00048 
00049 protected Q_SLOTS:
00050     virtual void invalidate(Tp::DBusProxy *proxy,
00051             const QString &error, const QString &message);
00052 
00053 protected:
00054     AbstractInterface(DBusProxy *parent, const char *interface);
00055     AbstractInterface(const QString &busName, const QString &path,
00056             const char *interface, const QDBusConnection &connection,
00057             QObject *parent);
00058 
00059 private:
00060     struct Private;
00061     friend struct Private;
00062     Private *mPriv;
00063 };
00064 
00065 } // Tp
00066 
00067 #endif


Copyright © 2009 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.2.1