28 #include <libaccounts-glib/ag-provider.h>
31 using namespace Accounts;
49 if (m_provider !=
nullptr && mode == AddReference)
50 ag_provider_ref(m_provider);
66 m_provider(other.m_provider)
68 if (m_provider !=
nullptr)
69 ag_provider_ref(m_provider);
74 if (m_provider == other.m_provider)
return *
this;
75 if (m_provider !=
nullptr)
76 ag_provider_unref(m_provider);
77 m_provider = other.m_provider;
78 if (m_provider !=
nullptr)
79 ag_provider_ref(m_provider);
85 if (m_provider !=
nullptr) {
86 ag_provider_unref(m_provider);
97 return m_provider !=
nullptr;
107 if (Q_UNLIKELY(!
isValid()))
return QString();
108 return UTF8(ag_provider_get_name(m_provider));
117 return UTF8(ag_provider_get_display_name(m_provider));
126 return UTF8(ag_provider_get_description(m_provider));
137 return UTF8(ag_provider_get_plugin_name(m_provider));
146 return ASCII(ag_provider_get_i18n_domain(m_provider));
154 return ASCII(ag_provider_get_icon_name(m_provider));
163 return UTF8(ag_provider_get_domains_regex(m_provider));
171 return ag_provider_get_single_account(m_provider);
181 ag_provider_get_file_contents(m_provider, &data);
187 if (!doc.setContent(QByteArray(data),
true,
188 &errorStr, &errorLine, &errorColumn))
190 QString message(QStringLiteral(
"Parse error reading account provider file "
191 "at line %1, column %2:\n%3"));
192 message = message.arg(errorLine).arg(errorColumn).arg(errorStr);
193 qWarning() << __PRETTY_FUNCTION__ << message;
199 AgProvider *Provider::provider()
const