24#include "application.h" 
   28#include <libaccounts-glib/ag-application.h> 
   30using namespace Accounts;
 
   46    m_application(application)
 
   54    m_application(nullptr)
 
 
   63    m_application(other.m_application)
 
   65    if (m_application != 
nullptr)
 
   66        ag_application_ref(m_application);
 
 
   71    if (m_application == other.m_application) 
return *
this;
 
   72    if (m_application != 
nullptr)
 
   73        ag_application_unref(m_application);
 
   74    m_application = other.m_application;
 
   75    if (m_application != 
nullptr)
 
   76        ag_application_ref(m_application);
 
   85    if (m_application != 
nullptr) {
 
   86        ag_application_unref(m_application);
 
   87        m_application = 
nullptr;
 
 
   97    return m_application != 
nullptr;
 
 
  107    if (Q_UNLIKELY(!
isValid())) 
return QString();
 
  108    return UTF8(ag_application_get_name(m_application));
 
 
  118    GDesktopAppInfo *info =
 
  119        ag_application_get_desktop_app_info(m_application);
 
  120    if (Q_LIKELY(info)) {
 
  121        name = UTF8(g_app_info_get_display_name(G_APP_INFO(info)));
 
  122        g_object_unref(info);
 
 
  133    return UTF8(ag_application_get_description(m_application));
 
 
  143    GDesktopAppInfo *info =
 
  144        ag_application_get_desktop_app_info(m_application);
 
  145    if (Q_LIKELY(info)) {
 
  146        gchar *gIconName = g_desktop_app_info_get_string(info, 
"Icon");
 
  147        if (Q_LIKELY(gIconName)) {
 
  151        g_object_unref(info);
 
 
  163    GDesktopAppInfo *info =
 
  164        ag_application_get_desktop_app_info(m_application);
 
  165    if (Q_LIKELY(info)) {
 
  166        filePath = UTF8(g_desktop_app_info_get_filename(info));
 
  167        g_object_unref(info);
 
 
  179    return UTF8(ag_application_get_i18n_domain(m_application));
 
 
  189    return ag_application_supports_service(m_application,
 
 
  200    return UTF8(ag_application_get_service_usage(m_application,
 
 
  204AgApplication *Application::application()
 const 
  206    return m_application;
 
Information on the client applications of libaccounts.
bool isValid() const
Check whether this object represents an Application.
~Application()
Destructor.
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.
Representation of an account service.