24 #include "application.h"
28 #include <libaccounts-glib/ag-application.h>
30 using namespace Accounts;
46 m_application(application)
55 m_application(other.m_application)
57 if (m_application != 0)
58 ag_application_ref(m_application);
63 if (m_application == other.m_application)
return *
this;
64 if (m_application != 0)
65 ag_application_unref(m_application);
66 m_application = other.m_application;
67 if (m_application != 0)
68 ag_application_ref(m_application);
77 if (m_application != 0) {
78 ag_application_unref(m_application);
89 return m_application != 0;
99 if (Q_UNLIKELY(!
isValid()))
return QString();
100 return UTF8(ag_application_get_name(m_application));
110 GDesktopAppInfo *info =
111 ag_application_get_desktop_app_info(m_application);
112 if (Q_LIKELY(info)) {
113 name = UTF8(g_app_info_get_display_name(G_APP_INFO(info)));
114 g_object_unref(info);
125 return UTF8(ag_application_get_description(m_application));
135 GDesktopAppInfo *info =
136 ag_application_get_desktop_app_info(m_application);
137 if (Q_LIKELY(info)) {
138 gchar *gIconName = g_desktop_app_info_get_string(info,
"Icon");
139 if (Q_LIKELY(gIconName)) {
140 iconName = UTF8(gIconName);
143 g_object_unref(info);
155 GDesktopAppInfo *info =
156 ag_application_get_desktop_app_info(m_application);
157 if (Q_LIKELY(info)) {
158 filePath = UTF8(g_desktop_app_info_get_filename(info));
159 g_object_unref(info);
171 return UTF8(ag_application_get_i18n_domain(m_application));
181 return UTF8(ag_application_get_service_usage(m_application,
QString iconName() const
Get the icon name of the application.
QString description() const
Get the description of the application.
QString desktopFilePath() const
Get the .desktop file associated with this application.
QString serviceUsage(const Service &service) const
Get the description from the application XML file, for the specified service; if not found...
Application(const Application &other)
Copy constructor.
Representation of an account service.
QString name() const
Get the unique ID of the application.
bool isValid() const
Check whether this object represents an Application.
QString displayName() const
Get the display name of the application.
Information on the client applications of libaccounts.
QString trCatalog() const
Get the translation catalog for the texts returned by the methods of this class.
~Application()
Destructor.