Commit 4f807a94 authored by David Zeuthen's avatar David Zeuthen

some more doc fixes

parent 69959d3a
......@@ -13,7 +13,7 @@ DOC_MODULE=polkit
DOC_MAIN_SGML_FILE=polkit-docs.xml
# Extra options to supply to gtkdoc-scan
#SCAN_OPTIONS=--deprecated-guards="CAIRO_DISABLE_DEPRECATED"
SCAN_OPTIONS=--ignore-headers=config.h
# The directory containing the source code. Relative to $(srcdir)
DOC_SOURCE_DIR=..
......
......@@ -56,7 +56,7 @@
* is able to successfully authenticate. It is only useful for people
* writing user interfaces that interfaces with the end user.
**/
struct PolKitGrant
struct _PolKitGrant
{
int refcount;
......@@ -87,7 +87,6 @@ struct PolKitGrant
/**
* polkit_grant_new:
* @void:
*
* Creates a #PolKitGrant object.
*
......
......@@ -28,8 +28,8 @@
#include <polkit/polkit.h>
struct PolKitGrant;
typedef struct PolKitGrant PolKitGrant;
struct _PolKitGrant;
typedef struct _PolKitGrant PolKitGrant;
/**
* PolKitGrantType:
......
......@@ -54,7 +54,7 @@
*
* Objects of this class are used to record information about an action.
**/
struct PolKitAction
struct _PolKitAction
{
int refcount;
char *id;
......
......@@ -32,8 +32,8 @@
#include <polkit/polkit-types.h>
struct PolKitAction;
typedef struct PolKitAction PolKitAction;
struct _PolKitAction;
typedef struct _PolKitAction PolKitAction;
PolKitAction *polkit_action_new (void);
PolKitAction *polkit_action_ref (PolKitAction *action);
......
......@@ -56,7 +56,7 @@
* Objects of this class are used to record information about a caller
* in another process.
**/
struct PolKitCaller
struct _PolKitCaller
{
int refcount;
char *dbus_name;
......
......@@ -34,8 +34,8 @@
#include <polkit/polkit-session.h>
#include <sys/types.h>
struct PolKitCaller;
typedef struct PolKitCaller PolKitCaller;
struct _PolKitCaller;
typedef struct _PolKitCaller PolKitCaller;
PolKitCaller *polkit_caller_new (void);
PolKitCaller *polkit_caller_ref (PolKitCaller *caller);
......
......@@ -75,7 +75,7 @@ typedef struct ConfigNode ConfigNode;
* class; it's only here for integration with other PolicyKit
* components.
**/
struct PolKitConfig
struct _PolKitConfig
{
int refcount;
ConfigNode *top_config_node;
......@@ -717,7 +717,7 @@ config_node_determine_admin_auth (ConfigNode *node,
}
/**
* polkit_config_determine_auth_type:
* polkit_config_determine_admin_auth_type:
* @pk_config: the PolicyKit context
* @action: the type of access to check for
* @caller: the caller in question
......
......@@ -39,8 +39,8 @@
#include <polkit/polkit-session.h>
#include <polkit/polkit-caller.h>
struct PolKitConfig;
typedef struct PolKitConfig PolKitConfig;
struct _PolKitConfig;
typedef struct _PolKitConfig PolKitConfig;
PolKitConfig *polkit_config_new (const char *path, PolKitError **error);
PolKitConfig *polkit_config_ref (PolKitConfig *pk_config);
......
......@@ -82,7 +82,7 @@
*
* Context object for users of PolicyKit.
**/
struct PolKitContext
struct _PolKitContext
{
int refcount;
......
......@@ -41,8 +41,8 @@
#include <polkit/polkit-policy-cache.h>
#include <polkit/polkit-config.h>
struct PolKitContext;
typedef struct PolKitContext PolKitContext;
struct _PolKitContext;
typedef struct _PolKitContext PolKitContext;
/**
* PolKitContextConfigChangedCB:
......
......@@ -55,7 +55,7 @@
*
* Objects of this class are used for error reporting.
**/
struct PolKitError
struct _PolKitError
{
polkit_bool_t is_static;
PolKitErrorCode error_code;
......
......@@ -43,8 +43,8 @@ typedef enum
POLKIT_ERROR_POLICY_FILE_INVALID
} PolKitErrorCode;
struct PolKitError;
typedef struct PolKitError PolKitError;
struct _PolKitError;
typedef struct _PolKitError PolKitError;
PolKitErrorCode polkit_error_get_error_code (PolKitError *error);
const char *polkit_error_get_error_message (PolKitError *error);
......
......@@ -49,13 +49,13 @@
**/
/* TODO FIXME: this is Linux specific */
static unsigned long long
static polkit_uint64_t
get_start_time_for_pid (pid_t pid)
{
char *filename;
char *contents;
gsize length;
unsigned long long start_time;
polkit_uint64_t start_time;
GError *error = NULL;
char **tokens;
char *p;
......@@ -168,7 +168,7 @@ _polkit_grantdb_write_pid (const char *action_id, pid_t pid)
{
char *grant_file;
polkit_bool_t ret = FALSE;
unsigned long long pid_start_time;
polkit_uint64_t pid_start_time;
pid_start_time = get_start_time_for_pid (pid);
if (pid_start_time == 0)
......@@ -234,7 +234,7 @@ _polkit_grantdb_check_can_caller_do_action (PolKitContext *pk_context,
pid_t invoking_process_id;
PolKitSession *session;
char *session_objpath;
unsigned long long pid_start_time;
polkit_uint64_t pid_start_time;
grant_file = NULL;
result = POLKIT_RESULT_UNKNOWN;
......@@ -352,7 +352,7 @@ _polkit_grantdb_foreach (PolKitGrantDbForeachFunc callback, void *user_data)
if (strncmp (endptr + 1, "pid-", 4) == 0) {
int pid;
unsigned long long pid_time;
polkit_uint64_t pid_time;
pid = strtol (endptr + 1 + 4 /*pid-*/, &endptr, 10);
if (endptr == NULL || *endptr != '@')
......
......@@ -40,7 +40,11 @@ polkit_bool_t _polkit_grantdb_write_pid (const char *action_id, pid_t pid);
/**
* PolKitGrantDbGrantType:
*
* @POLKIT_GRANTDB_GRANT_TYPE_PROCESS: The privilege was granted to a process
* @POLKIT_GRANTDB_GRANT_TYPE_SESSION: The privilege was granted to session
* @POLKIT_GRANTDB_GRANT_TYPE_ALWAYS: The privilege was granted permanently
*
* Defines the type and scope of a privilege grant.
*/
typedef enum {
POLKIT_GRANTDB_GRANT_TYPE_PROCESS,
......@@ -51,13 +55,12 @@ typedef enum {
/**
* PolKitGrantDbForeachFunc:
* @action_id: Identifer for the action granted
* @uid: the UNIX process id, or -1 if the passed grant_type is not POLKIT_GRANTDB_GRANT_TYPE_ALWAYS
* @when: when the privilege was granted
* @grant_type: the type of grant; one of #PolKitGrantDbGrantType
* @pid: the process id, or -1 if the passed grant_type is not POLKIT_GRANTDB_GRANT_TYPE_PROCESS
* @pid_time: the start time of the process (only if pid is set)
* @session_id: the session id, or NULL if the passed grant_type is not POLKIT_GRANTDB_GRANT_TYPE_SESSION
* @uid: the UNIX process id, or -1 if the passed grant_type is not POLKIT_GRANTDB_GRANT_TYPE_ALWAYS
*
* @user_data: user data passed to polkit_grantdb_foreach()
*
* Callback function for polkit_policy_cache_foreach().
......@@ -67,7 +70,7 @@ typedef void (*PolKitGrantDbForeachFunc) (const char *action_id,
time_t when,
PolKitGrantDbGrantType grant_type,
pid_t pid,
unsigned long long pid_time,
polkit_uint64_t pid_time,
const char *session_id,
void *user_data);
......
......@@ -57,7 +57,7 @@
* Instances of this class are used to hold all policy objects
* (stemming from policy files) and provide look-up functions.
**/
struct PolKitPolicyCache
struct _PolKitPolicyCache
{
int refcount;
......@@ -208,7 +208,7 @@ polkit_policy_cache_debug (PolKitPolicyCache *policy_cache)
/**
* polkit_policy_cache_get_entry_by_id:
* @policy_cache: the cache
* @action: the action identifier
* @action_id: the action identifier
*
* Given a action identifier, find the object describing the
* definition of the policy; e.g. data stemming from files in
......
......@@ -34,8 +34,8 @@
#include <polkit/polkit-action.h>
#include <polkit/polkit-policy-file-entry.h>
struct PolKitPolicyCache;
typedef struct PolKitPolicyCache PolKitPolicyCache;
struct _PolKitPolicyCache;
typedef struct _PolKitPolicyCache PolKitPolicyCache;
/**
* PolKitPolicyCacheForeachFunc:
......
......@@ -55,7 +55,7 @@
* Objects of this class are used to record information about a
* default policy for an action.
**/
struct PolKitPolicyDefault
struct _PolKitPolicyDefault
{
int refcount;
PolKitResult default_inactive;
......
......@@ -36,8 +36,8 @@
#include <polkit/polkit-caller.h>
#include <polkit/polkit-error.h>
struct PolKitPolicyDefault;
typedef struct PolKitPolicyDefault PolKitPolicyDefault;
struct _PolKitPolicyDefault;
typedef struct _PolKitPolicyDefault PolKitPolicyDefault;
PolKitPolicyDefault *polkit_policy_default_ref (PolKitPolicyDefault *policy_default);
void polkit_policy_default_unref (PolKitPolicyDefault *policy_default);
......
......@@ -56,7 +56,7 @@
* Objects of this class are used to record information about a
* policy.
**/
struct PolKitPolicyFileEntry
struct _PolKitPolicyFileEntry
{
int refcount;
char *action;
......
......@@ -33,8 +33,8 @@
#include <polkit/polkit-result.h>
#include <polkit/polkit-policy-default.h>
struct PolKitPolicyFileEntry;
typedef struct PolKitPolicyFileEntry PolKitPolicyFileEntry;
struct _PolKitPolicyFileEntry;
typedef struct _PolKitPolicyFileEntry PolKitPolicyFileEntry;
/**
* PolKitPolicyFileEntryAnnotationsForeachFunc:
......
......@@ -59,7 +59,7 @@
* Objects of this class are used to record information about a
* policy file.
**/
struct PolKitPolicyFile
struct _PolKitPolicyFile
{
int refcount;
GSList *entries;
......
......@@ -33,8 +33,8 @@
#include <polkit/polkit-error.h>
#include <polkit/polkit-policy-file-entry.h>
struct PolKitPolicyFile;
typedef struct PolKitPolicyFile PolKitPolicyFile;
struct _PolKitPolicyFile;
typedef struct _PolKitPolicyFile PolKitPolicyFile;
/**
* PolKitPolicyFileEntryForeachFunc:
......
......@@ -55,7 +55,7 @@
* Objects of this class are used to record information about a
* seat.
**/
struct PolKitSeat
struct _PolKitSeat
{
int refcount;
char *ck_objref;
......
......@@ -32,8 +32,8 @@
#include <polkit/polkit-types.h>
struct PolKitSeat;
typedef struct PolKitSeat PolKitSeat;
struct _PolKitSeat;
typedef struct _PolKitSeat PolKitSeat;
PolKitSeat *polkit_seat_new (void);
PolKitSeat *polkit_seat_ref (PolKitSeat *seat);
......
......@@ -55,7 +55,7 @@
* Objects of this class are used to record information about a
* session.
**/
struct PolKitSession
struct _PolKitSession
{
int refcount;
uid_t uid;
......
......@@ -35,8 +35,8 @@
#include <sys/types.h>
struct PolKitSession;
typedef struct PolKitSession PolKitSession;
struct _PolKitSession;
typedef struct _PolKitSession PolKitSession;
PolKitSession *polkit_session_new (void);
PolKitSession *polkit_session_ref (PolKitSession *session);
......
......@@ -45,6 +45,13 @@
*/
typedef int polkit_bool_t;
/**
* polkit_uint64_t:
*
* Type for unsigned 64 bit integer.
*/
typedef unsigned long long polkit_uint64_t;
#ifndef TRUE
# define TRUE 1
#endif
......
......@@ -306,7 +306,7 @@ _print_grants (const char *action_id,
time_t when,
PolKitGrantDbGrantType grant_type,
pid_t pid,
unsigned long long pid_time,
polkit_uint64_t pid_time,
const char *session_id,
void *user_data)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment