require POLKIT_AGENT_I_KNOW_API_IS_SUBJECT_TO_CHANGE to be defined
authorDavid Zeuthen <davidz@redhat.com>
Sun, 1 Feb 2009 17:39:21 +0000 (12:39 -0500)
committerDavid Zeuthen <davidz@redhat.com>
Sun, 1 Feb 2009 17:39:21 +0000 (12:39 -0500)
Also use @stability in the docs to indicate that the interface is
currently subject to change.

src/polkitagent/Makefile.am
src/polkitagent/polkitagent.h
src/polkitagent/polkitagentlistener.c
src/polkitagent/polkitagentlistener.h
src/polkitagent/polkitagentsession.c
src/polkitagent/polkitagentsession.h
src/polkitagent/polkitagenttypes.h

index 49f6afd..0acdc7f 100644 (file)
@@ -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)
index 4b56683..d417e5d 100644 (file)
 #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 */
index 313d38f..c1c6771 100644 (file)
@@ -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
index b50e922..dc17bc3 100644 (file)
  * 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
 
index 184dd2b..4327b4b 100644 (file)
@@ -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.
index acba074..be01852 100644 (file)
  * 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
 
index 2405ebc..c1143be 100644 (file)
  * 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