|
|
|
@ -67,8 +67,11 @@ ActionDescription::List actionsToListAndFree(GList *glist)
|
|
|
|
|
{
|
|
|
|
|
gpointer i = glist2->data;
|
|
|
|
|
result.append(ActionDescription(static_cast<PolkitActionDescription*>(i)));
|
|
|
|
|
if (i)
|
|
|
|
|
{
|
|
|
|
|
g_object_unref(i);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
g_list_free(glist);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
@ -121,14 +124,38 @@ class Authority::Private
|
|
|
|
|
|
|
|
|
|
Authority::Private::~Private()
|
|
|
|
|
{
|
|
|
|
|
if (m_checkAuthorizationCancellable)
|
|
|
|
|
{
|
|
|
|
|
g_object_unref(m_checkAuthorizationCancellable);
|
|
|
|
|
}
|
|
|
|
|
if (m_enumerateActionsCancellable)
|
|
|
|
|
{
|
|
|
|
|
g_object_unref(m_enumerateActionsCancellable);
|
|
|
|
|
}
|
|
|
|
|
if (m_registerAuthenticationAgentCancellable)
|
|
|
|
|
{
|
|
|
|
|
g_object_unref(m_registerAuthenticationAgentCancellable);
|
|
|
|
|
}
|
|
|
|
|
if (m_unregisterAuthenticationAgentCancellable)
|
|
|
|
|
{
|
|
|
|
|
g_object_unref(m_unregisterAuthenticationAgentCancellable);
|
|
|
|
|
}
|
|
|
|
|
if (m_authenticationAgentResponseCancellable)
|
|
|
|
|
{
|
|
|
|
|
g_object_unref(m_authenticationAgentResponseCancellable);
|
|
|
|
|
}
|
|
|
|
|
if (m_enumerateTemporaryAuthorizationsCancellable)
|
|
|
|
|
{
|
|
|
|
|
g_object_unref(m_enumerateTemporaryAuthorizationsCancellable);
|
|
|
|
|
}
|
|
|
|
|
if (m_revokeTemporaryAuthorizationsCancellable)
|
|
|
|
|
{
|
|
|
|
|
g_object_unref(m_revokeTemporaryAuthorizationsCancellable);
|
|
|
|
|
}
|
|
|
|
|
if (m_revokeTemporaryAuthorizationCancellable)
|
|
|
|
|
{
|
|
|
|
|
g_object_unref(m_revokeTemporaryAuthorizationCancellable);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Authority::Private::init()
|
|
|
|
@ -185,7 +212,10 @@ Authority::Authority(TQObject *parent) : TQObject(parent), d(new Private(this))
|
|
|
|
|
|
|
|
|
|
Authority::~Authority()
|
|
|
|
|
{
|
|
|
|
|
if (d->pkAuthority)
|
|
|
|
|
{
|
|
|
|
|
g_object_unref(d->pkAuthority);
|
|
|
|
|
}
|
|
|
|
|
delete d;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -634,8 +664,11 @@ TemporaryAuthorization::List Authority::enumerateTemporaryAuthorizationsSync(con
|
|
|
|
|
for (glist2 = glist; glist2 != NULL; glist2 = g_list_next(glist2))
|
|
|
|
|
{
|
|
|
|
|
result.append(TemporaryAuthorization((PolkitTemporaryAuthorization*)glist2->data));
|
|
|
|
|
if (glist2->data)
|
|
|
|
|
{
|
|
|
|
|
g_object_unref(glist2->data);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
g_list_free(glist);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
@ -667,8 +700,11 @@ void Authority::Private::enumerateTemporaryAuthorizationsCallback(GObject *objec
|
|
|
|
|
for (glist2 = glist; glist2 != NULL; glist2 = g_list_next(glist2))
|
|
|
|
|
{
|
|
|
|
|
res.append(TemporaryAuthorization((PolkitTemporaryAuthorization*)glist2->data));
|
|
|
|
|
if (glist2->data)
|
|
|
|
|
{
|
|
|
|
|
g_object_unref(glist2->data);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
g_list_free(glist);
|
|
|
|
|
emit authority->enumerateTemporaryAuthorizationsFinished(res);
|
|
|
|
|
}
|
|
|
|
|