[kdbus] KDBUS_ITEM_PAYLOAD_OFF items are (once again) relative to msg header
[platform/upstream/glib.git] / gio / giotypes.h
index a54f52d..de62cef 100644 (file)
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  *
  * Author: Alexander Larsson <alexl@redhat.com>
  */
 
+#ifndef __GIO_TYPES_H__
+#define __GIO_TYPES_H__
+
 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
 #error "Only <gio/gio.h> can be included directly."
 #endif
 
-#ifndef __GIO_TYPES_H__
-#define __GIO_TYPES_H__
-
 #include <gio/gioenums.h>
 
 G_BEGIN_DECLS
@@ -38,7 +36,31 @@ typedef struct _GAsyncInitable                GAsyncInitable;
 typedef struct _GBufferedInputStream          GBufferedInputStream;
 typedef struct _GBufferedOutputStream         GBufferedOutputStream;
 typedef struct _GCancellable                  GCancellable;
+typedef struct _GCharsetConverter             GCharsetConverter;
+typedef struct _GConverter                    GConverter;
+typedef struct _GConverterInputStream         GConverterInputStream;
+typedef struct _GConverterOutputStream        GConverterOutputStream;
 typedef struct _GDataInputStream              GDataInputStream;
+typedef struct _GSimplePermission             GSimplePermission;
+typedef struct _GZlibCompressor               GZlibCompressor;
+typedef struct _GZlibDecompressor             GZlibDecompressor;
+
+typedef struct _GSimpleActionGroup            GSimpleActionGroup;
+typedef struct _GRemoteActionGroup            GRemoteActionGroup;
+typedef struct _GDBusActionGroup              GDBusActionGroup;
+typedef struct _GActionMap                    GActionMap;
+typedef struct _GActionGroup                  GActionGroup;
+typedef struct _GPropertyAction               GPropertyAction;
+typedef struct _GSimpleAction                 GSimpleAction;
+typedef struct _GAction                       GAction;
+typedef struct _GApplication                  GApplication;
+typedef struct _GApplicationCommandLine       GApplicationCommandLine;
+typedef struct _GSettingsBackend              GSettingsBackend;
+typedef struct _GSettings                     GSettings;
+typedef struct _GPermission                   GPermission;
+
+typedef struct _GMenuModel                    GMenuModel;
+typedef struct _GNotification                 GNotification;
 
 /**
  * GDrive:
@@ -69,6 +91,7 @@ typedef struct _GFileInfo                     GFileInfo;
 typedef struct _GFileAttributeMatcher         GFileAttributeMatcher;
 typedef struct _GFileAttributeInfo            GFileAttributeInfo;
 typedef struct _GFileAttributeInfoList        GFileAttributeInfoList;
+typedef struct _GFileDescriptorBased          GFileDescriptorBased;
 typedef struct _GFileInputStream              GFileInputStream;
 typedef struct _GFileOutputStream             GFileOutputStream;
 typedef struct _GFileIOStream                 GFileIOStream;
@@ -78,6 +101,7 @@ typedef struct _GFilenameCompleter            GFilenameCompleter;
 
 typedef struct _GIcon                         GIcon; /* Dummy typedef */
 typedef struct _GInetAddress                  GInetAddress;
+typedef struct _GInetAddressMask              GInetAddressMask;
 typedef struct _GInetSocketAddress            GInetSocketAddress;
 typedef struct _GInputStream                  GInputStream;
 typedef struct _GInitable                     GInitable;
@@ -88,10 +112,12 @@ typedef struct _GIOExtension                  GIOExtension;
 /**
  * GIOSchedulerJob:
  *
- * Opaque class for definining and scheduling IO jobs.
+ * Opaque class for defining and scheduling IO jobs.
  **/
 typedef struct _GIOSchedulerJob               GIOSchedulerJob;
+typedef struct _GIOStreamAdapter              GIOStreamAdapter;
 typedef struct _GLoadableIcon                 GLoadableIcon; /* Dummy typedef */
+typedef struct _GBytesIcon                    GBytesIcon;
 typedef struct _GMemoryInputStream            GMemoryInputStream;
 typedef struct _GMemoryOutputStream           GMemoryOutputStream;
 
@@ -103,10 +129,22 @@ typedef struct _GMemoryOutputStream           GMemoryOutputStream;
 typedef struct _GMount                        GMount; /* Dummy typedef */
 typedef struct _GMountOperation               GMountOperation;
 typedef struct _GNetworkAddress               GNetworkAddress;
+typedef struct _GNetworkMonitor               GNetworkMonitor;
 typedef struct _GNetworkService               GNetworkService;
 typedef struct _GOutputStream                 GOutputStream;
 typedef struct _GIOStream                     GIOStream;
+typedef struct _GPollableInputStream          GPollableInputStream; /* Dummy typedef */
+typedef struct _GPollableOutputStream         GPollableOutputStream; /* Dummy typedef */
 typedef struct _GResolver                     GResolver;
+
+/**
+ * GResource:
+ *
+ * A resource bundle.
+ *
+ * Since: 2.32
+ */
+typedef struct _GResource                     GResource;
 typedef struct _GSeekable                     GSeekable;
 typedef struct _GSimpleAsyncResult            GSimpleAsyncResult;
 
@@ -143,7 +181,7 @@ typedef struct _GSocketClient                               GSocketClient;
  **/
 typedef struct _GSocketConnection                           GSocketConnection;
 /**
- * GSocketClient:
+ * GSocketListener:
  *
  * A helper class for network servers to listen for and accept connections.
  *
@@ -163,6 +201,7 @@ typedef struct _GSocketAddress                GSocketAddress;
 typedef struct _GSocketAddressEnumerator      GSocketAddressEnumerator;
 typedef struct _GSocketConnectable            GSocketConnectable;
 typedef struct _GSrvTarget                    GSrvTarget;
+typedef struct _GTask                         GTask;
 /**
  * GTcpConnection:
  *
@@ -171,19 +210,40 @@ typedef struct _GSrvTarget                    GSrvTarget;
  * Since: 2.22
  **/
 typedef struct _GTcpConnection                              GTcpConnection;
+typedef struct _GTcpWrapperConnection                       GTcpWrapperConnection;
 /**
  * GThreadedSocketService:
  *
- * A helper class for handling accepting incomming connections in the
+ * A helper class for handling accepting incoming connections in the
  * glib mainloop and handling them in a thread.
  *
  * Since: 2.22
  **/
 typedef struct _GThreadedSocketService                      GThreadedSocketService;
 typedef struct _GThemedIcon                   GThemedIcon;
+typedef struct _GTlsCertificate               GTlsCertificate;
+typedef struct _GTlsClientConnection          GTlsClientConnection; /* Dummy typedef */
+typedef struct _GTlsConnection                GTlsConnection;
+typedef struct _GTlsDatabase                  GTlsDatabase;
+typedef struct _GTlsFileDatabase              GTlsFileDatabase;
+typedef struct _GTlsInteraction               GTlsInteraction;
+typedef struct _GTlsPassword                  GTlsPassword;
+typedef struct _GTlsServerConnection          GTlsServerConnection; /* Dummy typedef */
 typedef struct _GVfs                          GVfs; /* Dummy typedef */
 
 /**
+ * GProxyResolver:
+ *
+ * A helper class to enumerate proxies base on URI.
+ *
+ * Since: 2.26
+ **/
+typedef struct _GProxyResolver                GProxyResolver;
+typedef struct _GProxy                       GProxy;
+typedef struct _GProxyAddress                GProxyAddress;
+typedef struct _GProxyAddressEnumerator              GProxyAddressEnumerator;
+
+/**
  * GVolume:
  *
  * Opaque mountable volume object.
@@ -235,6 +295,49 @@ typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
                                             goffset file_size,
                                             gpointer callback_data);
 
+/**
+ * GFileMeasureProgressCallback:
+ * @reporting: %TRUE if more reports will come
+ * @current_size: the current cumulative size measurement
+ * @num_dirs: the number of directories visited so far
+ * @num_files: the number of non-directory files encountered
+ * @user_data: the data passed to the original request for this callback
+ *
+ * This callback type is used by g_file_measure_disk_usage() to make
+ * periodic progress reports when measuring the amount of disk spaced
+ * used by a directory.
+ *
+ * These calls are made on a best-effort basis and not all types of
+ * #GFile will support them.  At the minimum, however, one call will
+ * always be made immediately.
+ *
+ * In the case that there is no support, @reporting will be set to
+ * %FALSE (and the other values undefined) and no further calls will be
+ * made.  Otherwise, the @reporting will be %TRUE and the other values
+ * all-zeros during the first (immediate) call.  In this way, you can
+ * know which type of progress UI to show without a delay.
+ *
+ * For g_file_measure_disk_usage() the callback is made directly.  For
+ * g_file_measure_disk_usage_async() the callback is made via the
+ * default main context of the calling thread (ie: the same way that the
+ * final async result would be reported).
+ *
+ * @current_size is in the same units as requested by the operation (see
+ * %G_FILE_DISK_USAGE_APPARENT_SIZE).
+ *
+ * The frequency of the updates is implementation defined, but is
+ * ideally about once every 200ms.
+ *
+ * The last progress callback may or may not be equal to the final
+ * result.  Always check the async result to get the final value.
+ *
+ * Since: 2.38
+ **/
+typedef void (* GFileMeasureProgressCallback) (gboolean reporting,
+                                               guint64  current_size,
+                                               guint64  num_dirs,
+                                               guint64  num_files,
+                                               gpointer user_data);
 
 /**
  * GIOSchedulerJobFunc:
@@ -244,10 +347,6 @@ typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
  *
  * I/O Job function.
  *
- * Note that depending on whether threads are available, the
- * #GIOScheduler may run jobs in separate threads or in an idle
- * in the mainloop.
- *
  * Long-running jobs should periodically check the @cancellable
  * to see if they have been cancelled.
  *
@@ -280,7 +379,7 @@ typedef void (*GSimpleAsyncThreadFunc) (GSimpleAsyncResult *res,
  * This is the function type of the callback used for the #GSource
  * returned by g_socket_create_source().
  *
- * Returns: it should return FALSE if the source should be removed.
+ * Returns: it should return %FALSE if the source should be removed.
  *
  * Since: 2.22
  */
@@ -291,12 +390,12 @@ typedef gboolean (*GSocketSourceFunc) (GSocket *socket,
 /**
  * GInputVector:
  * @buffer: Pointer to a buffer where data will be written.
- * @size: the availible size in @buffer.
+ * @size: the available size in @buffer.
  *
  * Structure used for scatter/gather data input.
- * You generally pass in an array of #GInputVector<!-- -->s and the operation
- * will store the read data starting in the first buffer, switching to
- * the next as needed.
+ * You generally pass in an array of #GInputVectors
+ * and the operation will store the read data starting in the
+ * first buffer, switching to the next as needed.
  *
  * Since: 2.22
  */
@@ -313,8 +412,9 @@ struct _GInputVector {
  * @size: the size of @buffer.
  *
  * Structure used for scatter/gather data output.
- * You generally pass in an array of #GOutputVector<!-- -->s and the operation
- * will use all the buffers as if they were one buffer.
+ * You generally pass in an array of #GOutputVectors
+ * and the operation will use all the buffers as if they were
+ * one buffer.
  *
  * Since: 2.22
  */
@@ -325,6 +425,110 @@ struct _GOutputVector {
   gsize size;
 };
 
+typedef struct _GCredentials                  GCredentials;
+typedef struct _GUnixCredentialsMessage       GUnixCredentialsMessage;
+typedef struct _GUnixFDList                   GUnixFDList;
+typedef struct _GDBusMessage                  GDBusMessage;
+typedef struct _GDBusConnection               GDBusConnection;
+typedef struct _GDBusProxy                    GDBusProxy;
+typedef struct _GDBusMethodInvocation         GDBusMethodInvocation;
+typedef struct _GDBusServer                   GDBusServer;
+typedef struct _GDBusAuthObserver             GDBusAuthObserver;
+typedef struct _GDBusErrorEntry               GDBusErrorEntry;
+typedef struct _GDBusInterfaceVTable          GDBusInterfaceVTable;
+typedef struct _GDBusSubtreeVTable            GDBusSubtreeVTable;
+typedef struct _GDBusAnnotationInfo           GDBusAnnotationInfo;
+typedef struct _GDBusArgInfo                  GDBusArgInfo;
+typedef struct _GDBusMethodInfo               GDBusMethodInfo;
+typedef struct _GDBusSignalInfo               GDBusSignalInfo;
+typedef struct _GDBusPropertyInfo             GDBusPropertyInfo;
+typedef struct _GDBusInterfaceInfo            GDBusInterfaceInfo;
+typedef struct _GDBusNodeInfo                 GDBusNodeInfo;
+
+/**
+ * GCancellableSourceFunc:
+ * @cancellable: the #GCancellable
+ * @user_data: data passed in by the user.
+ *
+ * This is the function type of the callback used for the #GSource
+ * returned by g_cancellable_source_new().
+ *
+ * Returns: it should return %FALSE if the source should be removed.
+ *
+ * Since: 2.28
+ */
+typedef gboolean (*GCancellableSourceFunc) (GCancellable *cancellable,
+                                           gpointer      user_data);
+
+/**
+ * GPollableSourceFunc:
+ * @pollable_stream: the #GPollableInputStream or #GPollableOutputStream
+ * @user_data: data passed in by the user.
+ *
+ * This is the function type of the callback used for the #GSource
+ * returned by g_pollable_input_stream_create_source() and
+ * g_pollable_output_stream_create_source().
+ *
+ * Returns: it should return %FALSE if the source should be removed.
+ *
+ * Since: 2.28
+ */
+typedef gboolean (*GPollableSourceFunc) (GObject  *pollable_stream,
+                                        gpointer  user_data);
+
+typedef struct _GDBusInterface              GDBusInterface; /* Dummy typedef */
+typedef struct _GDBusInterfaceSkeleton      GDBusInterfaceSkeleton;
+typedef struct _GDBusObject                 GDBusObject;  /* Dummy typedef */
+typedef struct _GDBusObjectSkeleton         GDBusObjectSkeleton;
+typedef struct _GDBusObjectProxy            GDBusObjectProxy;
+typedef struct _GDBusObjectManager          GDBusObjectManager;  /* Dummy typedef */
+typedef struct _GDBusObjectManagerClient    GDBusObjectManagerClient;
+typedef struct _GDBusObjectManagerServer    GDBusObjectManagerServer;
+
+/**
+ * GDBusProxyTypeFunc:
+ * @manager: A #GDBusObjectManagerClient.
+ * @object_path: The object path of the remote object.
+ * @interface_name: (allow-none): The interface name of the remote object or %NULL if a #GDBusObjectProxy #GType is requested.
+ * @user_data: User data.
+ *
+ * Function signature for a function used to determine the #GType to
+ * use for an interface proxy (if @interface_name is not %NULL) or
+ * object proxy (if @interface_name is %NULL).
+ *
+ * This function is called in the
+ * [thread-default main loop][g-main-context-push-thread-default]
+ * that @manager was constructed in.
+ *
+ * Returns: A #GType to use for the remote object. The returned type
+ *   must be a #GDBusProxy<!-- -->- or #GDBusObjectProxy<!-- -->-derived
+ *   type.
+ *
+ * Since: 2.30
+ */
+typedef GType (*GDBusProxyTypeFunc) (GDBusObjectManagerClient   *manager,
+                                     const gchar                *object_path,
+                                     const gchar                *interface_name,
+                                     gpointer                    user_data);
+
+typedef struct _GTestDBus GTestDBus;
+
+/**
+ * GSubprocess:
+ *
+ * A child process.
+ *
+ * Since: 2.40
+ */
+typedef struct _GSubprocess                   GSubprocess;
+/**
+ * GSubprocessLauncher:
+ *
+ * Options for launching a child process.
+ *
+ * Since: 2.40
+ */
+typedef struct _GSubprocessLauncher           GSubprocessLauncher;
 
 G_END_DECLS