accounts-qt  1.15
application.h
00001 /* vi: set et sw=4 ts=4 cino=t0,(0: */
00002 /*
00003  * This file is part of libaccounts-qt
00004  *
00005  * Copyright (C) 2012 Nokia Corporation.
00006  * Copyright (C) 2012-2016 Canonical Ltd.
00007  *
00008  * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
00009  *
00010  * This library is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU Lesser General Public License
00012  * version 2.1 as published by the Free Software Foundation.
00013  *
00014  * This library is distributed in the hope that it will be useful, but
00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00017  * Lesser General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU Lesser General Public
00020  * License along with this library; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00022  * 02110-1301 USA
00023  */
00024 
00025 #ifndef ACCOUNTS_APPLICATION_H
00026 #define ACCOUNTS_APPLICATION_H
00027 
00028 #include "Accounts/accountscommon.h"
00029 
00030 #include <QString>
00031 
00032 extern "C"
00033 {
00034     typedef struct _AgApplication AgApplication;
00035 }
00036 
00037 namespace Accounts
00038 {
00039 class Service;
00040 
00041 class ACCOUNTS_EXPORT Application
00042 {
00043 public:
00044     Application();
00045     Application(const Application &other);
00046     Application &operator=(const Application &other);
00047     ~Application();
00048 
00049     bool isValid() const;
00050 
00051     QString name() const;
00052     QString displayName() const;
00053     QString description() const;
00054     QString iconName() const;
00055     QString desktopFilePath() const;
00056     QString trCatalog() const;
00057 
00058     bool supportsService(const Service &service) const;
00059     QString serviceUsage(const Service &service) const;
00060 
00061 private:
00062     // Don't include private data in docs: \cond
00063     friend class Manager;
00064     Application(AgApplication *application);
00065     AgApplication *application() const;
00066 
00067     AgApplication *m_application;
00068     // \endcond
00069 };
00070 
00071 } //namespace
00072 
00073 #endif // ACCOUNTS_APPLICATION_H