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


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