Debian Codegraph @

src/polkitbackend/polkitbackendactionlookup.h

raw
1 /*
2 * Copyright (C) 2008 Red Hat, Inc.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General
15 * Public License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
17 * Boston, MA 02111-1307, USA.
18 *
19 * Author: David Zeuthen <[email protected]>
20 */
21
22 #if !defined (_POLKIT_BACKEND_COMPILATION) && !defined(_POLKIT_BACKEND_INSIDE_POLKIT_BACKEND_H)
23 #error "Only <polkitbackend/polkitbackend.h> can be included directly, this file may disappear or change contents."
24 #endif
25
26 #ifndef __POLKIT_BACKEND_ACTION_LOOKUP_H
27 #define __POLKIT_BACKEND_ACTION_LOOKUP_H
28
29 #include <glib-object.h>
30
31 #include <polkit/polkit.h>
32 #include <polkitbackend/polkitbackendtypes.h>
33
34 G_BEGIN_DECLS
35
36 /**
37 * POLKIT_BACKEND_ACTION_LOOKUP_EXTENSION_POINT_NAME:
38 *
39 * Extension point name for looking up action information.
40 */
41 #define POLKIT_BACKEND_ACTION_LOOKUP_EXTENSION_POINT_NAME "polkit-backend-action-lookup-1"
42
43 #define POLKIT_BACKEND_TYPE_ACTION_LOOKUP (polkit_backend_action_lookup_get_type())
44 #define POLKIT_BACKEND_ACTION_LOOKUP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), POLKIT_BACKEND_TYPE_ACTION_LOOKUP, PolkitBackendActionLookup))
45 #define POLKIT_BACKEND_IS_ACTION_LOOKUP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), POLKIT_BACKEND_TYPE_ACTION_LOOKUP))
46 #define POLKIT_BACKEND_ACTION_LOOKUP_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), POLKIT_BACKEND_TYPE_ACTION_LOOKUP, PolkitBackendActionLookupIface))
47
48 #if 0
49 /**
50 * PolkitBackendActionLookup:
51 *
52 * Opaque object for #PolkitBackendActionLookupIface.
53 */
54 typedef struct _PolkitBackendActionLookup PolkitBackendActionLookup; /* Dummy typedef */
55 #endif
56 typedef struct _PolkitBackendActionLookupIface PolkitBackendActionLookupIface;
57
58 /**
59 * PolkitBackendActionLookupIface:
60 * @get_message: See polkit_backend_action_lookup_get_message().
61 * @get_icon_name: See polkit_backend_action_lookup_get_icon_name().
62 * @get_details: See polkit_backend_action_lookup_get_details().
63 *
64 * Interface that is used by backends to provide localized data shown
65 * in authentication dialogs.
66 */
67 struct _PolkitBackendActionLookupIface
68 {
69 /*< private >*/
70 GTypeInterface parent_iface;
71
72 /*< public >*/
73 /* VTable */
74
75 gchar * (*get_message) (PolkitBackendActionLookup *lookup,
76 const gchar *action_id,
77 PolkitDetails *details,
78 PolkitActionDescription *action_description);
79
80 gchar * (*get_icon_name) (PolkitBackendActionLookup *lookup,
81 const gchar *action_id,
82 PolkitDetails *details,
83 PolkitActionDescription *action_description);
84
85 PolkitDetails * (*get_details) (PolkitBackendActionLookup *lookup,
86 const gchar *action_id,
87 PolkitDetails *details,
88 PolkitActionDescription *action_description);
89 };
90
91 #ifdef _POLKIT_BACKEND_ACTION_LOOKUP_NO_DEPRECATED_WARNING
92 GType polkit_backend_action_lookup_get_type (void) G_GNUC_CONST;
93 gchar *polkit_backend_action_lookup_get_message (PolkitBackendActionLookup *lookup,
94 const gchar *action_id,
95 PolkitDetails *details,
96 PolkitActionDescription *action_description);
97 gchar *polkit_backend_action_lookup_get_icon_name (PolkitBackendActionLookup *lookup,
98 const gchar *action_id,
99 PolkitDetails *details,
100 PolkitActionDescription *action_description);
101 PolkitDetails *polkit_backend_action_lookup_get_details (PolkitBackendActionLookup *lookup,
102 const gchar *action_id,
103 PolkitDetails *details,
104 PolkitActionDescription *action_description);
105 #else
106 GType polkit_backend_action_lookup_get_type (void) G_GNUC_CONST G_GNUC_DEPRECATED_FOR (use_PolkitDetails_instead);
107 gchar *polkit_backend_action_lookup_get_message (PolkitBackendActionLookup *lookup,
108 const gchar *action_id,
109 PolkitDetails *details,
110 PolkitActionDescription *action_description) G_GNUC_DEPRECATED_FOR (use_PolkitDetails_instead);
111 gchar *polkit_backend_action_lookup_get_icon_name (PolkitBackendActionLookup *lookup,
112 const gchar *action_id,
113 PolkitDetails *details,
114 PolkitActionDescription *action_description) G_GNUC_DEPRECATED_FOR (use_PolkitDetails_instead);
115 PolkitDetails *polkit_backend_action_lookup_get_details (PolkitBackendActionLookup *lookup,
116 const gchar *action_id,
117 PolkitDetails *details,
118 PolkitActionDescription *action_description) G_GNUC_DEPRECATED_FOR (use_PolkitDetails_instead);
119 #endif
120
121 G_END_DECLS
122
123 #endif /* __POLKIT_BACKEND_ACTION_LOOKUP_H */