|
libaccounts-qt
1.1
|
00001 /* vi: set et sw=4 ts=4 cino=t0,(0: */ 00002 /* 00003 * This file is part of libaccounts-qt 00004 * 00005 * Copyright (C) 2009-2011 Nokia Corporation. 00006 * 00007 * Contact: Alberto Mardegan <alberto.mardegan@nokia.com> 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU Lesser General Public License 00011 * version 2.1 as published by the Free Software Foundation. 00012 * 00013 * This library is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00021 * 02110-1301 USA 00022 */ 00028 #ifndef SERVICE_H 00029 #define SERVICE_H 00030 00031 00032 #include <QObject> 00033 #include <QSettings> 00034 #include <QStringList> 00035 #include <QXmlStreamReader> 00036 #include <QDomDocument> 00037 00038 #include "Accounts/accountscommon.h" 00039 00040 extern "C" 00041 { 00042 typedef struct _AgService AgService; 00043 } 00044 00045 namespace Accounts 00046 { 00047 class Service; 00048 00049 typedef QList<Service*> ServiceList; 00050 00051 class ACCOUNTS_EXPORT Service 00052 { 00053 public: 00054 QString name() const; 00055 QString displayName() const; 00056 QString trCatalog() const; 00057 QString serviceType() const; 00058 QString provider() const; 00059 QString iconName() const; 00060 00067 QXmlStreamReader *xmlStreamReader() const; 00068 00069 const QDomDocument domDocument() const; 00070 00071 // \cond 00072 AgService *service() const; 00073 00074 private: 00075 ~Service(); 00076 00077 friend class Account; 00078 friend class Manager; 00079 Service(AgService *service); 00080 AgService *m_service; 00081 mutable QDomDocument doc; 00082 // \endcond 00083 }; 00084 00085 } //namespace Accounts 00086 00087 #endif // SERVICE_H