accounts-qt 1.16
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
32extern "C"
33{
34 typedef struct _AgApplication AgApplication;
35}
36
37namespace Accounts
38{
39class Service;
40
41class ACCOUNTS_EXPORT Application
42{
43public:
45 Application(const Application &other);
46 Application &operator=(const Application &other);
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
61private:
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
bool isValid() const
Check whether this object represents an Application.
QString name() const
Get the unique ID of the application.
QString desktopFilePath() const
Get the .desktop file associated with this application.
QString iconName() const
Get the icon name of the application.
QString displayName() const
Get the display name of the application.
QString description() const
Get the description of the application.
bool supportsService(const Service &service) const
Check whether the application supports the given service.
QString serviceUsage(const Service &service) const
Get the description from the application XML file, for the specified service; if not found,...
QString trCatalog() const
Get the translation catalog for the texts returned by the methods of this class.
Application()
Construct an invalid application.
Manager of accounts, services and providers.
Definition manager.h:52
Representation of an account service.
Definition service.h:49