accounts-qt 0.31
service.h
Go to the documentation of this file.
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-2010 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  */
00023 
00024 #ifndef SERVICE_H
00025 #define SERVICE_H
00026 
00027 
00028 #include <QObject>
00029 #include <QSettings>
00030 #include <QStringList>
00031 #include <QXmlStreamReader>
00032 #include <QDomDocument>
00033 
00034 #include "Accounts/accountscommon.h"
00035 
00036 extern "C"
00037 {
00038     typedef struct _AgService AgService;
00039 }
00040 
00041 namespace Accounts
00042 {
00043 class Service;
00044 
00045 typedef QList<Service*> ServiceList;
00046 
00057 class ACCOUNTS_EXPORT Service
00058 {
00059 public:
00063     QString name() const;
00064 
00068     QString displayName() const;
00069 
00073     QString serviceType() const;
00074 
00078     QString provider() const;
00079 
00083     QString iconName() const;
00084 
00089     QXmlStreamReader *xmlStreamReader() const;
00090 
00094     const QDomDocument domDocument() const;
00095 
00096     // \cond
00097     AgService *service() const;
00098 
00099 private:
00100     ~Service();
00101 
00102     friend class Account;
00103     friend class Manager;
00104     Service(AgService *service);
00105     AgService *m_service;
00106     mutable QDomDocument doc;
00107     // \endcond
00108 };
00109 
00110 } //namespace Accounts
00111 
00112 #endif // SERVICE_H