accounts-qt 1.17

application.h
1/* vi: set et sw=4 ts=4 cino=t0,(0: */
2/*
3 * This file is part of libaccounts-qt
4 *
5 * Copyright (C) 2012 Nokia Corporation.
6 * Copyright (C) 2012-2016 Canonical Ltd.
7 *
8 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public License
12 * version 2.1 as published by the Free Software Foundation.
13 *
14 * This library is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22 * 02110-1301 USA
23 */
24
25#ifndef ACCOUNTS_APPLICATION_H
26#define ACCOUNTS_APPLICATION_H
27
28#include "Accounts/accountscommon.h"
29
30#include <QString>
31
32 extern "C"
33{
34 typedef struct _AgApplication AgApplication;
35}
36
37 namespace Accounts
38{
39 class Service;
40
41 class ACCOUNTS_EXPORT Application
42{
43 public:
44 Application();
45 Application(const Application &other);
46 Application &operator=(const Application &other);
47 ~Application();
48
49 bool isValid() const;
50
51 QString name() const;
52 QString displayName() const;
53 QString description() const;
54 QString iconName() const;
55 QString desktopFilePath() const;
56 QString trCatalog() const;
57
58 bool supportsService(const Service &service) const;
59 QString serviceUsage(const Service &service) const;
60
61 private:
62 // Don't include private data in docs: \cond
63 friend class Manager;
64 Application(AgApplication *application);
65 AgApplication *application() const;
66
67 AgApplication *m_application;
68 // \endcond
69};
70
71} //namespace
72
73#endif // ACCOUNTS_APPLICATION_H
Accounts::Application::isValid
bool isValid() const
Check whether this object represents an Application.
Definition application.cpp:95
Accounts::Application::name
QString name() const
Get the unique ID of the application.
Definition application.cpp:105
Accounts::Application::desktopFilePath
QString desktopFilePath() const
Get the .desktop file associated with this application.
Definition application.cpp:160
Accounts::Application::iconName
QString iconName() const
Get the icon name of the application.
Definition application.cpp:140
Accounts::Application::displayName
QString displayName() const
Get the display name of the application.
Definition application.cpp:115
Accounts::Application::description
QString description() const
Get the description of the application.
Definition application.cpp:131
Accounts::Application::supportsService
bool supportsService(const Service &service) const
Check whether the application supports the given service.
Definition application.cpp:187
Accounts::Application::serviceUsage
QString serviceUsage(const Service &service) const
Get the description from the application XML file, for the specified service; if not found,...
Definition application.cpp:198
Accounts::Application::trCatalog
QString trCatalog() const
Get the translation catalog for the texts returned by the methods of this class.
Definition application.cpp:177
Accounts::Application::Application
Application()
Construct an invalid application.
Definition application.cpp:53
Accounts::Manager
Manager of accounts, services and providers.
Definition manager.h:52
Accounts::Service
Representation of an account service.
Definition service.h:49