Commit a114ed8f authored by David Zeuthen's avatar David Zeuthen

require POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE to be defined

Also use @stability in the docs to indicate that the interface is
currently subject to change.
parent 2f0e640f
......@@ -12,6 +12,7 @@ INCLUDES = \
-DPACKAGE_LIB_DIR=\""$(libdir)"\" \
-D_POSIX_PTHREAD_SEMANTICS \
-D_REENTRANT \
-DPOLKIT_AGENT_COMPILATION \
-DEGG_DBUS_I_KNOW_API_IS_SUBJECT_TO_CHANGE \
$(NULL)
......@@ -60,7 +61,6 @@ libpolkit_agent_1_la_SOURCES = \
$(NULL)
libpolkit_agent_1_la_CFLAGS = \
-D_POLKIT_AGENT_COMPILATION \
$(GLIB_CFLAGS) \
$(EGG_DBUS_CFLAGS) \
$(NULL)
......
......@@ -22,9 +22,14 @@
#ifndef __POLKIT_AGENT_H
#define __POLKIT_AGENT_H
#define _POLKIT_AGENT_INSIDE_POLKIT_AGENT_H 1
#if !defined (POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE) && !defined (POLKIT_AGENT_COMPILATION)
#error "libpolkitagent is unstable API and subject to change. You must define POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE to acknowledge this."
#endif
#define POLKIT_AGENT_INSIDE_POLKIT_AGENT_H 1
#include <polkitagent/polkitagenttypes.h>
#include <polkitagent/polkitagentlistener.h>
#include <polkitagent/polkitagentsession.h>
#undef _POLKIT_AGENT_INSIDE_POLKIT_AGENT_H
#undef POLKIT_AGENT_INSIDE_POLKIT_AGENT_H
#endif /* __POLKIT_AGENT_H */
......@@ -30,6 +30,7 @@
* SECTION:polkitagentlistener
* @title: PolkitAgentListener
* @short_description: Abstract base class for Authentication Agents
* @stability: Unstable
*
* #PolkitAgentListener is an abstract base class used for implementing authentication
* agents. To implement an authentication agent, simply subclass #PolkitAgentListener and
......
......@@ -19,6 +19,10 @@
* Author: David Zeuthen <davidz@redhat.com>
*/
#if !defined(POLKIT_AGENT_INSIDE_POLKIT_AGENT_H) && !defined (POLKIT_AGENT_COMPILATION)
#error "Only <polkitagent/polkitagent.h> can be included directly, this file may disappear or change contents"
#endif
#ifndef __POLKIT_AGENT_LISTENER_H
#define __POLKIT_AGENT_LISTENER_H
......
......@@ -23,6 +23,7 @@
* SECTION:polkitagentsession
* @title: PolkitAgentSession
* @short_description: Authentication Session
* @stability: Unstable
*
* The #PolkitAgentSession class is an abstraction used for interacting with the
* native authentication system (for example PAM) for obtaining authorizations.
......
......@@ -19,6 +19,10 @@
* Author: David Zeuthen <davidz@redhat.com>
*/
#if !defined(POLKIT_AGENT_INSIDE_POLKIT_AGENT_H) && !defined (POLKIT_AGENT_COMPILATION)
#error "Only <polkitagent/polkitagent.h> can be included directly, this file may disappear or change contents"
#endif
#ifndef __POLKIT_AGENT_SESSION_H
#define __POLKIT_AGENT_SESSION_H
......
......@@ -19,6 +19,10 @@
* Author: David Zeuthen <davidz@redhat.com>
*/
#if !defined(POLKIT_AGENT_INSIDE_POLKIT_AGENT_H) && !defined (POLKIT_AGENT_COMPILATION)
#error "Only <polkitagent/polkitagent.h> can be included directly, this file may disappear or change contents"
#endif
#ifndef __POLKIT_AGENT_TYPES_H
#define __POLKIT_AGENT_TYPES_H
......
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