polkitprivate.h 3.88 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/*
 * Copyright (C) 2008 Red Hat, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General
 * Public License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * Author: David Zeuthen <davidz@redhat.com>
 */

#ifndef __POLKIT_PRIVATE_H
#define __POLKIT_PRIVATE_H

25
#include "polkitimplicitauthorization.h"
26
#include "polkitactiondescription.h"
27
#include "polkitsubject.h"
28
#include "polkitauthorizationresult.h"
29
#include "polkittemporaryauthorization.h"
30

31 32 33 34 35 36 37 38 39 40
/* FIXME: This header file is currently installed among other public header
   files, and the symbols are exported in the shared library.

   For application writers: relying on any function here is strongly
   discouraged.

   For polkit maintainers: This should be made private if a large ABI break
   were necessary in the future.  In the meantime, consider that there is
   non-zero risk that changing these functions might break some applications. */

David Zeuthen's avatar
David Zeuthen committed
41 42 43 44 45 46 47 48
PolkitActionDescription  *polkit_action_description_new_for_gvariant (GVariant *value);
GVariant *polkit_action_description_to_gvariant (PolkitActionDescription *action_description);

GVariant *polkit_subject_to_gvariant (PolkitSubject *subject);
GVariant *polkit_identity_to_gvariant (PolkitIdentity *identity);

PolkitSubject  *polkit_subject_new_for_gvariant (GVariant *variant, GError **error);
PolkitIdentity *polkit_identity_new_for_gvariant (GVariant *variant, GError **error);
49

David Zeuthen's avatar
David Zeuthen committed
50 51
PolkitAuthorizationResult  *polkit_authorization_result_new_for_gvariant (GVariant *value);
GVariant *polkit_authorization_result_to_gvariant (PolkitAuthorizationResult *authorization_result);
52

53 54 55 56 57
PolkitTemporaryAuthorization *polkit_temporary_authorization_new    (const gchar                  *id,
                                                                     const gchar                  *action_id,
                                                                     PolkitSubject                *subject,
                                                                     guint64                       time_obtained,
                                                                     guint64                       time_expires);
58 59
PolkitTemporaryAuthorization *polkit_temporary_authorization_new_for_gvariant (GVariant *value,
                                                                               GError   **error);
David Zeuthen's avatar
David Zeuthen committed
60
GVariant *polkit_temporary_authorization_to_gvariant (PolkitTemporaryAuthorization *authorization);
61

David Zeuthen's avatar
David Zeuthen committed
62 63
GVariant *polkit_details_to_gvariant (PolkitDetails *details);
PolkitDetails *polkit_details_new_for_gvariant (GVariant *value);
64

David Zeuthen's avatar
David Zeuthen committed
65 66 67 68 69 70 71 72 73 74 75 76
PolkitActionDescription *
polkit_action_description_new (const gchar                 *action_id,
                               const gchar                 *description,
                               const gchar                 *message,
                               const gchar                 *vendor_name,
                               const gchar                 *vendor_url,
                               const gchar                 *icon_name,
                               PolkitImplicitAuthorization  implicit_any,
                               PolkitImplicitAuthorization  implicit_inactive,
                               PolkitImplicitAuthorization  implicit_active,
                               GHashTable                  *annotations);

77
#endif /* __POLKIT_PRIVATE_H */