libqutim 0.3.1.0
abstractcontact.h
Go to the documentation of this file.
00001 /****************************************************************************
00002 **
00003 ** qutIM - instant messenger
00004 **
00005 ** Copyright © 2011 Ruslan Nigmatullin <euroelessar@yandex.ru>
00006 **
00007 *****************************************************************************
00008 **
00009 ** $QUTIM_BEGIN_LICENSE$
00010 ** This program is free software: you can redistribute it and/or modify
00011 ** it under the terms of the GNU General Public License as published by
00012 ** the Free Software Foundation, either version 3 of the License, or
00013 ** (at your option) any later version.
00014 **
00015 ** This program is distributed in the hope that it will be useful,
00016 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00018 ** See the GNU General Public License for more details.
00019 **
00020 ** You should have received a copy of the GNU General Public License
00021 ** along with this program.  If not, see http://www.gnu.org/licenses/.
00022 ** $QUTIM_END_LICENSE$
00023 **
00024 ****************************************************************************/
00025 
00026 #ifndef ABSTRACTCONTACT_H
00027 #define ABSTRACTCONTACT_H
00028 
00029 #include "chatunit.h"
00030 #include "status.h"
00031 #include <QIcon>
00032 #include <QScopedPointer>
00033 
00034 #ifndef Q_QDOC
00035 namespace qutim_sdk_0_3
00036 {
00037 struct AbstractContactPrivate;
00038 class MetaContact;
00039 class Message;
00040 
00041 //Remove me
00042 class LIBQUTIM_EXPORT AbstractContact : public ChatUnit
00043 {
00044     Q_OBJECT
00045     Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
00046     Q_PROPERTY(Status status READ status NOTIFY statusChanged)
00047 public:
00048     AbstractContact(const QString &id, Account *parent = 0);
00049     virtual ~AbstractContact();
00050     QString id() const;
00051     virtual QString name() const;
00052     virtual Status status() const;
00053     MetaContact *metaContact();
00054     virtual bool sendMessage(const Message &message) = 0;
00055     virtual void setName(const QString &name) = 0;
00056 signals:
00057     void statusChanged(const qutim_sdk_0_3::Status &current, const qutim_sdk_0_3::Status &previous);
00058     void nameChanged(const QString &current, const QString &previous);
00059 private:
00060     QScopedPointer<AbstractContactPrivate> p;
00061 };
00062 }
00063 #endif
00064 
00065 #endif // ABSTRACTCONTACT_H
00066