-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
-DPACKAGE_LIB_DIR=\""$(libdir)"\" \
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
+ -DPOLKIT_COMPILATION \
@GLIB_CFLAGS@ @DBUS_CFLAGS@
lib_LTLIBRARIES=libpolkit-dbus.la
#include <fcntl.h>
#include <polkit-dbus/polkit-dbus.h>
+#include <polkit/polkit-private.h>
static polkit_bool_t
check_pid_for_authorization (pid_t caller_pid, const char *action_id)
return ret;
}
-/* this function is in polkit/polkit-authorization-db.c */
-extern polkit_bool_t _polkit_authorization_db_auth_file_add (const char *root, polkit_bool_t transient, uid_t uid, char *str_to_add);
-
int
main (int argc, char *argv[])
{
libpolkit_la_SOURCES = \
polkit.h \
- polkit-types.h \
+ polkit-private.h \
+ polkit-types.h \
polkit-error.h polkit-error.c \
polkit-result.h polkit-result.c \
polkit-context.h polkit-context.c \
#include "polkit-debug.h"
#include "polkit-authorization-constraint.h"
#include "polkit-utils.h"
+#include "polkit-private.h"
/**
* SECTION:polkit-authorization-constraint
POLKIT_AUTHORIZATION_CONSTRAINT_REQUIRE_LOCAL |
POLKIT_AUTHORIZATION_CONSTRAINT_REQUIRE_ACTIVE};
-extern PolKitAuthorizationConstraint *_polkit_authorization_constraint_new (const char *entry_in_auth_file);
-
PolKitAuthorizationConstraint *
_polkit_authorization_constraint_new (const char *entry_in_auth_file)
{
#include "polkit-authorization-db.h"
#include "polkit-utils.h"
-extern PolKitAuthorizationDB *_polkit_authorization_db_new (void);
-extern void _polkit_authorization_db_invalidate_cache (PolKitAuthorizationDB *authdb);
-
struct _PolKitAuthorizationDB
{
int refcount;
#include "polkit-debug.h"
#include "polkit-authorization-db.h"
#include "polkit-utils.h"
-
-extern PolKitAuthorizationDB *_polkit_authorization_db_new (void);
-extern void _polkit_authorization_db_invalidate_cache (PolKitAuthorizationDB *authdb);
+#include "polkit-private.h"
/**
* SECTION:polkit-authorization-db
return start_time;
}
-extern PolKitAuthorization *_polkit_authorization_new_for_uid (const char *entry_in_auth_file, uid_t uid);
-
/**
* _authdb_get_auths_for_uid:
* @authdb: authorization database
return ret;
}
-/* this function is also used by polkit-dbus/polkit-explicit-grant-helper */
-extern polkit_bool_t _polkit_authorization_db_auth_file_add (const char *root, polkit_bool_t transient, uid_t uid, char *str_to_add);
-
polkit_bool_t
_polkit_authorization_db_auth_file_add (const char *root, polkit_bool_t transient, uid_t uid, char *str_to_add)
{
return ret;
}
-
-extern const char *_polkit_authorization_get_authfile_entry (PolKitAuthorization *auth);
-
/**
* polkit_authorization_db_revoke_entry:
* @authdb: the authorization database
#include "polkit-debug.h"
#include "polkit-authorization.h"
#include "polkit-utils.h"
+#include "polkit-private.h"
/**
* SECTION:polkit-authorization
char *session_id;
};
-extern PolKitAuthorization *_polkit_authorization_new_for_uid (const char *entry_in_auth_file, uid_t uid);
-
-extern const char *_polkit_authorization_get_authfile_entry (PolKitAuthorization *auth);
-
const char *
_polkit_authorization_get_authfile_entry (PolKitAuthorization *auth)
{
#include "polkit-debug.h"
#include "polkit-context.h"
#include "polkit-policy-cache.h"
-
-extern PolKitAuthorizationDB *_polkit_authorization_db_new (void);
-extern void _polkit_authorization_db_invalidate_cache (PolKitAuthorizationDB *authdb);
+#include "polkit-private.h"
/**
* SECTION:polkit
pk_context->load_descriptions = TRUE;
}
-extern PolKitPolicyCache *_polkit_policy_cache_new (const char *dirname, polkit_bool_t load_descriptions, PolKitError **error);
-
/**
* polkit_context_get_policy_cache:
* @pk_context: the context
#include "polkit-debug.h"
#include "polkit-policy-file.h"
#include "polkit-policy-cache.h"
+#include "polkit-private.h"
/**
* SECTION:polkit-policy-cache
policy_cache->priv_entries = g_slist_append (policy_cache->priv_entries, policy_file_entry);
}
-extern PolKitPolicyCache *_polkit_policy_cache_new (const char *dirname, polkit_bool_t load_descriptions, PolKitError **error);
-
PolKitPolicyCache *
_polkit_policy_cache_new (const char *dirname, polkit_bool_t load_descriptions, PolKitError **error)
{
#include "polkit-debug.h"
#include "polkit-error.h"
#include "polkit-policy-default.h"
+#include "polkit-private.h"
/**
* SECTION:polkit-policy-default
PolKitResult default_active;
};
-extern PolKitPolicyDefault *_polkit_policy_default_new (PolKitResult defaults_allow_any,
- PolKitResult defaults_allow_inactive,
- PolKitResult defaults_allow_active);
-
PolKitPolicyDefault *
_polkit_policy_default_new (PolKitResult defaults_allow_any,
PolKitResult defaults_allow_inactive,
#include "polkit-result.h"
#include "polkit-policy-file-entry.h"
#include "polkit-authorization-db.h"
+#include "polkit-private.h"
/**
* SECTION:polkit-policy-file-entry
GHashTable *annotations;
};
-extern void _polkit_policy_file_entry_set_descriptions (PolKitPolicyFileEntry *pfe,
- const char *policy_description,
- const char *policy_message);
-
-
-extern PolKitPolicyDefault *_polkit_policy_default_new (PolKitResult defaults_allow_any,
- PolKitResult defaults_allow_inactive,
- PolKitResult defaults_allow_active);
-
-extern PolKitPolicyFileEntry *_polkit_policy_file_entry_new (const char *action_id,
- PolKitResult defaults_allow_any,
- PolKitResult defaults_allow_inactive,
- PolKitResult defaults_allow_active,
- GHashTable *annotations);
/* NOTE: we take ownership of the annotations object */
-extern PolKitPolicyFileEntry *
+PolKitPolicyFileEntry *
_polkit_policy_file_entry_new (const char *action_id,
PolKitResult defaults_allow_any,
PolKitResult defaults_allow_inactive,
#include "polkit-policy-file.h"
#include "polkit-policy-file-entry.h"
#include "polkit-debug.h"
+#include "polkit-private.h"
/**
* SECTION:polkit-policy-file
GSList *entries;
};
-extern PolKitPolicyFileEntry *_polkit_policy_file_entry_new (const char *action_id,
- PolKitResult defaults_allow_any,
- PolKitResult defaults_allow_inactive,
- PolKitResult defaults_allow_active,
- GHashTable *annotations);
-
enum {
STATE_NONE,
STATE_UNKNOWN_TAG,
XML_StopParser (pd->parser, FALSE);
}
-
-extern void _polkit_policy_file_entry_set_descriptions (PolKitPolicyFileEntry *pfe,
- const char *policy_description,
- const char *policy_message);
-
/**
* _localize:
* @translations: a mapping from xml:lang to the value, e.g. 'da' -> 'Smadre', 'en_CA' -> 'Punch, Aye!'
--- /dev/null
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+/***************************************************************************
+ *
+ * polkit-private.h : Private functions
+ *
+ * Copyright (C) 2007 David Zeuthen, <david@fubar.dk>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ **************************************************************************/
+
+#if !defined (POLKIT_COMPILATION)
+#error "This is a private file and shouldn't be included outside PolicyKit."
+#endif
+
+#ifndef POLKIT_PRIVATE_H
+#define POLKIT_PRIVATE_H
+
+#include <glib.h>
+#include <polkit/polkit.h>
+
+POLKIT_BEGIN_DECLS
+
+PolKitAuthorization *_polkit_authorization_new_for_uid (const char *entry_in_auth_file, uid_t uid);
+const char *_polkit_authorization_get_authfile_entry (PolKitAuthorization *auth);
+
+PolKitAuthorizationConstraint *_polkit_authorization_constraint_new (const char *entry_in_auth_file);
+
+PolKitAuthorizationDB *_polkit_authorization_db_new (void);
+void _polkit_authorization_db_invalidate_cache (PolKitAuthorizationDB *authdb);
+
+PolKitAuthorization *_polkit_authorization_new_for_uid (const char *entry_in_auth_file, uid_t uid);
+
+polkit_bool_t _polkit_authorization_db_auth_file_add (const char *root, polkit_bool_t transient, uid_t uid, char *str_to_add);
+
+const char *_polkit_authorization_get_authfile_entry (PolKitAuthorization *auth);
+
+PolKitAuthorizationDB *_polkit_authorization_db_new (void);
+void _polkit_authorization_db_invalidate_cache (PolKitAuthorizationDB *authdb);
+
+PolKitPolicyCache *_polkit_policy_cache_new (const char *dirname, polkit_bool_t load_descriptions, PolKitError **error);
+
+PolKitPolicyCache *_polkit_policy_cache_new (const char *dirname, polkit_bool_t load_descriptions, PolKitError **error);
+
+PolKitPolicyDefault *_polkit_policy_default_new (PolKitResult defaults_allow_any,
+ PolKitResult defaults_allow_inactive,
+ PolKitResult defaults_allow_active);
+
+PolKitPolicyFileEntry *_polkit_policy_file_entry_new (const char *action_id,
+ PolKitResult defaults_allow_any,
+ PolKitResult defaults_allow_inactive,
+ PolKitResult defaults_allow_active,
+ GHashTable *annotations);
+
+void _polkit_policy_file_entry_set_descriptions (PolKitPolicyFileEntry *pfe,
+ const char *policy_description,
+ const char *policy_message);
+
+
+PolKitPolicyDefault *_polkit_policy_default_new (PolKitResult defaults_allow_any,
+ PolKitResult defaults_allow_inactive,
+ PolKitResult defaults_allow_active);
+
+PolKitPolicyFileEntry *_polkit_policy_file_entry_new (const char *action_id,
+ PolKitResult defaults_allow_any,
+ PolKitResult defaults_allow_inactive,
+ PolKitResult defaults_allow_active,
+ GHashTable *annotations);
+
+void _polkit_policy_file_entry_set_descriptions (PolKitPolicyFileEntry *pfe,
+ const char *policy_description,
+ const char *policy_message);
+
+
+POLKIT_END_DECLS
+
+#endif /* POLKIT_PRIVATE_H */
+