Added x86 builds
This commit is contained in:
commit
de90cc96d6
|
@ -0,0 +1,500 @@
|
|||
/* -----------------------------------------------------------------*-C-*-
|
||||
libffi 3.2.9999 - Copyright (c) 2011, 2014 Anthony Green
|
||||
- Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the ``Software''), to deal in the Software without
|
||||
restriction, including without limitation the rights to use, copy,
|
||||
modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
/* -------------------------------------------------------------------
|
||||
Most of the API is documented in doc/libffi.texi.
|
||||
|
||||
The raw API is designed to bypass some of the argument packing and
|
||||
unpacking on architectures for which it can be avoided. Routines
|
||||
are provided to emulate the raw API if the underlying platform
|
||||
doesn't allow faster implementation.
|
||||
|
||||
More details on the raw API can be found in:
|
||||
|
||||
http://gcc.gnu.org/ml/java/1999-q3/msg00138.html
|
||||
|
||||
and
|
||||
|
||||
http://gcc.gnu.org/ml/java/1999-q3/msg00174.html
|
||||
-------------------------------------------------------------------- */
|
||||
|
||||
#ifndef LIBFFI_H
|
||||
#define LIBFFI_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Specify which architecture libffi is configured for. */
|
||||
#ifndef X86
|
||||
#define X86
|
||||
#endif
|
||||
|
||||
/* ---- System configuration information --------------------------------- */
|
||||
|
||||
#include <ffitarget.h>
|
||||
|
||||
/* Need minimal decorations for DLLs to works on Windows. GCC has
|
||||
autoimport and autoexport. Rely on Libtool to help MSVC export
|
||||
from a DLL, but always declare data to be imported for MSVC
|
||||
clients. This costs an extra indirection for MSVC clients using
|
||||
the static version of the library, but don't worry about that.
|
||||
Besides, as a workaround, they can define FFI_BUILDING if they
|
||||
*know* they are going to link with the static library. */
|
||||
#if defined _WIN32 && !defined FFI_STATIC_BUILD
|
||||
#ifdef FFI_BUILDING
|
||||
#define FFI_EXTERN __declspec(dllexport)
|
||||
#else
|
||||
#define FFI_EXTERN __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define FFI_EXTERN extern
|
||||
#endif
|
||||
|
||||
#ifndef LIBFFI_ASM
|
||||
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
#define __attribute__(X)
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <limits.h>
|
||||
|
||||
/* LONG_LONG_MAX is not always defined (not if STRICT_ANSI, for example).
|
||||
But we can find it either under the correct ANSI name, or under GNU
|
||||
C's internal name. */
|
||||
|
||||
#define FFI_64_BIT_MAX 9223372036854775807
|
||||
|
||||
#ifdef LONG_LONG_MAX
|
||||
# define FFI_LONG_LONG_MAX LONG_LONG_MAX
|
||||
#else
|
||||
# ifdef LLONG_MAX
|
||||
# define FFI_LONG_LONG_MAX LLONG_MAX
|
||||
# ifdef _AIX52 /* or newer has C99 LLONG_MAX */
|
||||
# undef FFI_64_BIT_MAX
|
||||
# define FFI_64_BIT_MAX 9223372036854775807LL
|
||||
# endif /* _AIX52 or newer */
|
||||
# else
|
||||
# ifdef __GNUC__
|
||||
# define FFI_LONG_LONG_MAX __LONG_LONG_MAX__
|
||||
# endif
|
||||
# ifdef _AIX /* AIX 5.1 and earlier have LONGLONG_MAX */
|
||||
# ifndef __PPC64__
|
||||
# if defined (__IBMC__) || defined (__IBMCPP__)
|
||||
# define FFI_LONG_LONG_MAX LONGLONG_MAX
|
||||
# endif
|
||||
# endif /* __PPC64__ */
|
||||
# undef FFI_64_BIT_MAX
|
||||
# define FFI_64_BIT_MAX 9223372036854775807LL
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The closure code assumes that this works on pointers, i.e. a size_t
|
||||
can hold a pointer. */
|
||||
|
||||
typedef struct _ffi_type
|
||||
{
|
||||
size_t size;
|
||||
unsigned short alignment;
|
||||
unsigned short type;
|
||||
struct _ffi_type **elements;
|
||||
} ffi_type;
|
||||
|
||||
#ifndef LIBFFI_HIDE_BASIC_TYPES
|
||||
#if SCHAR_MAX == 127
|
||||
# define ffi_type_uchar ffi_type_uint8
|
||||
# define ffi_type_schar ffi_type_sint8
|
||||
#else
|
||||
#error "char size not supported"
|
||||
#endif
|
||||
|
||||
#if SHRT_MAX == 32767
|
||||
# define ffi_type_ushort ffi_type_uint16
|
||||
# define ffi_type_sshort ffi_type_sint16
|
||||
#elif SHRT_MAX == 2147483647
|
||||
# define ffi_type_ushort ffi_type_uint32
|
||||
# define ffi_type_sshort ffi_type_sint32
|
||||
#else
|
||||
#error "short size not supported"
|
||||
#endif
|
||||
|
||||
#if INT_MAX == 32767
|
||||
# define ffi_type_uint ffi_type_uint16
|
||||
# define ffi_type_sint ffi_type_sint16
|
||||
#elif INT_MAX == 2147483647
|
||||
# define ffi_type_uint ffi_type_uint32
|
||||
# define ffi_type_sint ffi_type_sint32
|
||||
#elif INT_MAX == 9223372036854775807
|
||||
# define ffi_type_uint ffi_type_uint64
|
||||
# define ffi_type_sint ffi_type_sint64
|
||||
#else
|
||||
#error "int size not supported"
|
||||
#endif
|
||||
|
||||
#if LONG_MAX == 2147483647
|
||||
# if FFI_LONG_LONG_MAX != FFI_64_BIT_MAX
|
||||
#error "no 64-bit data type supported"
|
||||
# endif
|
||||
#elif LONG_MAX != FFI_64_BIT_MAX
|
||||
#error "long size not supported"
|
||||
#endif
|
||||
|
||||
#if LONG_MAX == 2147483647
|
||||
# define ffi_type_ulong ffi_type_uint32
|
||||
# define ffi_type_slong ffi_type_sint32
|
||||
#elif LONG_MAX == FFI_64_BIT_MAX
|
||||
# define ffi_type_ulong ffi_type_uint64
|
||||
# define ffi_type_slong ffi_type_sint64
|
||||
#else
|
||||
#error "long size not supported"
|
||||
#endif
|
||||
|
||||
/* These are defined in types.c. */
|
||||
FFI_EXTERN ffi_type ffi_type_void;
|
||||
FFI_EXTERN ffi_type ffi_type_uint8;
|
||||
FFI_EXTERN ffi_type ffi_type_sint8;
|
||||
FFI_EXTERN ffi_type ffi_type_uint16;
|
||||
FFI_EXTERN ffi_type ffi_type_sint16;
|
||||
FFI_EXTERN ffi_type ffi_type_uint32;
|
||||
FFI_EXTERN ffi_type ffi_type_sint32;
|
||||
FFI_EXTERN ffi_type ffi_type_uint64;
|
||||
FFI_EXTERN ffi_type ffi_type_sint64;
|
||||
FFI_EXTERN ffi_type ffi_type_float;
|
||||
FFI_EXTERN ffi_type ffi_type_double;
|
||||
FFI_EXTERN ffi_type ffi_type_pointer;
|
||||
|
||||
#if 1
|
||||
FFI_EXTERN ffi_type ffi_type_longdouble;
|
||||
#else
|
||||
#define ffi_type_longdouble ffi_type_double
|
||||
#endif
|
||||
|
||||
#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
|
||||
FFI_EXTERN ffi_type ffi_type_complex_float;
|
||||
FFI_EXTERN ffi_type ffi_type_complex_double;
|
||||
#if 1
|
||||
FFI_EXTERN ffi_type ffi_type_complex_longdouble;
|
||||
#else
|
||||
#define ffi_type_complex_longdouble ffi_type_complex_double
|
||||
#endif
|
||||
#endif
|
||||
#endif /* LIBFFI_HIDE_BASIC_TYPES */
|
||||
|
||||
typedef enum {
|
||||
FFI_OK = 0,
|
||||
FFI_BAD_TYPEDEF,
|
||||
FFI_BAD_ABI
|
||||
} ffi_status;
|
||||
|
||||
typedef struct {
|
||||
ffi_abi abi;
|
||||
unsigned nargs;
|
||||
ffi_type **arg_types;
|
||||
ffi_type *rtype;
|
||||
unsigned bytes;
|
||||
unsigned flags;
|
||||
unsigned isVariadic;
|
||||
#ifdef FFI_EXTRA_CIF_FIELDS
|
||||
FFI_EXTRA_CIF_FIELDS;
|
||||
#endif
|
||||
} ffi_cif;
|
||||
|
||||
/* ---- Definitions for the raw API -------------------------------------- */
|
||||
|
||||
#ifndef FFI_SIZEOF_ARG
|
||||
# if LONG_MAX == 2147483647
|
||||
# define FFI_SIZEOF_ARG 4
|
||||
# elif LONG_MAX == FFI_64_BIT_MAX
|
||||
# define FFI_SIZEOF_ARG 8
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef FFI_SIZEOF_JAVA_RAW
|
||||
# define FFI_SIZEOF_JAVA_RAW FFI_SIZEOF_ARG
|
||||
#endif
|
||||
|
||||
typedef union {
|
||||
ffi_sarg sint;
|
||||
ffi_arg uint;
|
||||
float flt;
|
||||
char data[FFI_SIZEOF_ARG];
|
||||
void* ptr;
|
||||
} ffi_raw;
|
||||
|
||||
#if FFI_SIZEOF_JAVA_RAW == 4 && FFI_SIZEOF_ARG == 8
|
||||
/* This is a special case for mips64/n32 ABI (and perhaps others) where
|
||||
sizeof(void *) is 4 and FFI_SIZEOF_ARG is 8. */
|
||||
typedef union {
|
||||
signed int sint;
|
||||
unsigned int uint;
|
||||
float flt;
|
||||
char data[FFI_SIZEOF_JAVA_RAW];
|
||||
void* ptr;
|
||||
} ffi_java_raw;
|
||||
#else
|
||||
typedef ffi_raw ffi_java_raw;
|
||||
#endif
|
||||
|
||||
FFI_EXTERN
|
||||
void ffi_raw_call (ffi_cif *cif,
|
||||
void (*fn)(void),
|
||||
void *rvalue,
|
||||
ffi_raw *avalue);
|
||||
|
||||
FFI_EXTERN void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
|
||||
FFI_EXTERN void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
|
||||
FFI_EXTERN size_t ffi_raw_size (ffi_cif *cif);
|
||||
|
||||
/* This is analogous to the raw API, except it uses Java parameter
|
||||
packing, even on 64-bit machines. I.e. on 64-bit machines longs
|
||||
and doubles are followed by an empty 64-bit word. */
|
||||
FFI_EXTERN
|
||||
void ffi_java_raw_call (ffi_cif *cif,
|
||||
void (*fn)(void),
|
||||
void *rvalue,
|
||||
ffi_java_raw *avalue);
|
||||
|
||||
FFI_EXTERN void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw);
|
||||
FFI_EXTERN void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args);
|
||||
FFI_EXTERN size_t ffi_java_raw_size (ffi_cif *cif);
|
||||
|
||||
/* ---- Definitions for closures ----------------------------------------- */
|
||||
|
||||
#if FFI_CLOSURES
|
||||
|
||||
#ifdef _MSC_VER
|
||||
__declspec(align(8))
|
||||
#endif
|
||||
typedef struct {
|
||||
#if 0
|
||||
void *trampoline_table;
|
||||
void *trampoline_table_entry;
|
||||
#else
|
||||
char tramp[FFI_TRAMPOLINE_SIZE];
|
||||
#endif
|
||||
ffi_cif *cif;
|
||||
void (*fun)(ffi_cif*,void*,void**,void*);
|
||||
void *user_data;
|
||||
} ffi_closure
|
||||
#ifdef __GNUC__
|
||||
__attribute__((aligned (8)))
|
||||
#endif
|
||||
;
|
||||
|
||||
#ifndef __GNUC__
|
||||
# ifdef __sgi
|
||||
# pragma pack 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
FFI_EXTERN void *ffi_closure_alloc (size_t size, void **code);
|
||||
FFI_EXTERN void ffi_closure_free (void *);
|
||||
|
||||
FFI_EXTERN ffi_status
|
||||
ffi_prep_closure (ffi_closure*,
|
||||
ffi_cif *,
|
||||
void (*fun)(ffi_cif*,void*,void**,void*),
|
||||
void *user_data)
|
||||
#if defined(__GNUC__) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 405)
|
||||
__attribute__((deprecated ("use ffi_prep_closure_loc instead")))
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 3
|
||||
__attribute__((deprecated))
|
||||
#endif
|
||||
;
|
||||
|
||||
FFI_EXTERN ffi_status
|
||||
ffi_prep_closure_loc (ffi_closure*,
|
||||
ffi_cif *,
|
||||
void (*fun)(ffi_cif*,void*,void**,void*),
|
||||
void *user_data,
|
||||
void*codeloc);
|
||||
|
||||
#ifdef __sgi
|
||||
# pragma pack 8
|
||||
#endif
|
||||
typedef struct {
|
||||
#if 0
|
||||
void *trampoline_table;
|
||||
void *trampoline_table_entry;
|
||||
#else
|
||||
char tramp[FFI_TRAMPOLINE_SIZE];
|
||||
#endif
|
||||
ffi_cif *cif;
|
||||
|
||||
#if !FFI_NATIVE_RAW_API
|
||||
|
||||
/* If this is enabled, then a raw closure has the same layout
|
||||
as a regular closure. We use this to install an intermediate
|
||||
handler to do the transaltion, void** -> ffi_raw*. */
|
||||
|
||||
void (*translate_args)(ffi_cif*,void*,void**,void*);
|
||||
void *this_closure;
|
||||
|
||||
#endif
|
||||
|
||||
void (*fun)(ffi_cif*,void*,ffi_raw*,void*);
|
||||
void *user_data;
|
||||
|
||||
} ffi_raw_closure;
|
||||
|
||||
typedef struct {
|
||||
#if 0
|
||||
void *trampoline_table;
|
||||
void *trampoline_table_entry;
|
||||
#else
|
||||
char tramp[FFI_TRAMPOLINE_SIZE];
|
||||
#endif
|
||||
|
||||
ffi_cif *cif;
|
||||
|
||||
#if !FFI_NATIVE_RAW_API
|
||||
|
||||
/* If this is enabled, then a raw closure has the same layout
|
||||
as a regular closure. We use this to install an intermediate
|
||||
handler to do the translation, void** -> ffi_raw*. */
|
||||
|
||||
void (*translate_args)(ffi_cif*,void*,void**,void*);
|
||||
void *this_closure;
|
||||
|
||||
#endif
|
||||
|
||||
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*);
|
||||
void *user_data;
|
||||
|
||||
} ffi_java_raw_closure;
|
||||
|
||||
FFI_EXTERN ffi_status
|
||||
ffi_prep_raw_closure (ffi_raw_closure*,
|
||||
ffi_cif *cif,
|
||||
void (*fun)(ffi_cif*,void*,ffi_raw*,void*),
|
||||
void *user_data);
|
||||
|
||||
FFI_EXTERN ffi_status
|
||||
ffi_prep_raw_closure_loc (ffi_raw_closure*,
|
||||
ffi_cif *cif,
|
||||
void (*fun)(ffi_cif*,void*,ffi_raw*,void*),
|
||||
void *user_data,
|
||||
void *codeloc);
|
||||
|
||||
FFI_EXTERN ffi_status
|
||||
ffi_prep_java_raw_closure (ffi_java_raw_closure*,
|
||||
ffi_cif *cif,
|
||||
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
|
||||
void *user_data);
|
||||
|
||||
FFI_EXTERN ffi_status
|
||||
ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,
|
||||
ffi_cif *cif,
|
||||
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
|
||||
void *user_data,
|
||||
void *codeloc);
|
||||
|
||||
#endif /* FFI_CLOSURES */
|
||||
|
||||
#if FFI_GO_CLOSURES
|
||||
|
||||
typedef struct {
|
||||
void *tramp;
|
||||
ffi_cif *cif;
|
||||
void (*fun)(ffi_cif*,void*,void**,void*);
|
||||
} ffi_go_closure;
|
||||
|
||||
FFI_EXTERN
|
||||
ffi_status ffi_prep_go_closure (ffi_go_closure*, ffi_cif *,
|
||||
void (*fun)(ffi_cif*,void*,void**,void*));
|
||||
|
||||
FFI_EXTERN
|
||||
void ffi_call_go (ffi_cif *cif, void (*fn)(void), void *rvalue,
|
||||
void **avalue, void *closure);
|
||||
|
||||
#endif /* FFI_GO_CLOSURES */
|
||||
|
||||
/* ---- Public interface definition -------------------------------------- */
|
||||
|
||||
FFI_EXTERN
|
||||
ffi_status ffi_prep_cif(ffi_cif *cif,
|
||||
ffi_abi abi,
|
||||
unsigned int nargs,
|
||||
ffi_type *rtype,
|
||||
ffi_type **atypes);
|
||||
|
||||
FFI_EXTERN
|
||||
ffi_status ffi_prep_cif_var(ffi_cif *cif,
|
||||
ffi_abi abi,
|
||||
unsigned int nfixedargs,
|
||||
unsigned int ntotalargs,
|
||||
ffi_type *rtype,
|
||||
ffi_type **atypes);
|
||||
|
||||
FFI_EXTERN
|
||||
void ffi_call(ffi_cif *cif,
|
||||
void (*fn)(void),
|
||||
void *rvalue,
|
||||
void **avalue);
|
||||
|
||||
FFI_EXTERN
|
||||
ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type,
|
||||
size_t *offsets);
|
||||
|
||||
/* Useful for eliminating compiler warnings. */
|
||||
#define FFI_FN(f) ((void (*)(void))f)
|
||||
|
||||
/* ---- Definitions shared with assembly code ---------------------------- */
|
||||
|
||||
#endif /* !LIBFFI_ASM */
|
||||
|
||||
/* If these change, update src/mips/ffitarget.h. */
|
||||
#define FFI_TYPE_VOID 0
|
||||
#define FFI_TYPE_INT 1
|
||||
#define FFI_TYPE_FLOAT 2
|
||||
#define FFI_TYPE_DOUBLE 3
|
||||
#if 1
|
||||
#define FFI_TYPE_LONGDOUBLE 4
|
||||
#else
|
||||
#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
|
||||
#endif
|
||||
#define FFI_TYPE_UINT8 5
|
||||
#define FFI_TYPE_SINT8 6
|
||||
#define FFI_TYPE_UINT16 7
|
||||
#define FFI_TYPE_SINT16 8
|
||||
#define FFI_TYPE_UINT32 9
|
||||
#define FFI_TYPE_SINT32 10
|
||||
#define FFI_TYPE_UINT64 11
|
||||
#define FFI_TYPE_SINT64 12
|
||||
#define FFI_TYPE_STRUCT 13
|
||||
#define FFI_TYPE_POINTER 14
|
||||
#define FFI_TYPE_COMPLEX 15
|
||||
|
||||
/* This should always refer to the last type code (for sanity checks). */
|
||||
#define FFI_TYPE_LAST FFI_TYPE_COMPLEX
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,21 @@
|
|||
/* Include the correct ffi.h automatically. This helps us create prefixes
|
||||
* with multi-lib Linux and OSX/iOS universal builds. To avoid listing all
|
||||
* possible architectures here, we try the configured target arch first and then
|
||||
* include the most common multilib/universal setups in the #elif ladder */
|
||||
#ifdef __x86__
|
||||
#include "ffi-x86.h"
|
||||
#elif defined(__i386__) || defined(_M_IX86)
|
||||
#include "ffi-x86.h"
|
||||
#elif defined(__x86_64__) || defined(_M_X64)
|
||||
#include "ffi-x86_64.h"
|
||||
#elif defined(__arm__) || defined(_M_ARM)
|
||||
#include "ffi-arm.h"
|
||||
#elif defined(__aarch64__) || defined(_M_ARM64)
|
||||
#include "ffi-aarch64.h"
|
||||
#elif defined(__powerpc__) || defined(_M_PPC)
|
||||
#include "ffi-powerpc.h"
|
||||
#elif defined(__powerpc64__)
|
||||
#include "ffi-powerpc64.h"
|
||||
#else
|
||||
#error "Unsupported Architecture"
|
||||
#endif
|
|
@ -0,0 +1,147 @@
|
|||
/* -----------------------------------------------------------------*-C-*-
|
||||
ffitarget.h - Copyright (c) 2012, 2014, 2018 Anthony Green
|
||||
Copyright (c) 1996-2003, 2010 Red Hat, Inc.
|
||||
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
|
||||
Target configuration macros for x86 and x86-64.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
``Software''), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
----------------------------------------------------------------------- */
|
||||
|
||||
#ifndef LIBFFI_TARGET_H
|
||||
#define LIBFFI_TARGET_H
|
||||
|
||||
#ifndef LIBFFI_H
|
||||
#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead."
|
||||
#endif
|
||||
|
||||
/* ---- System specific configurations ----------------------------------- */
|
||||
|
||||
/* For code common to all platforms on x86 and x86_64. */
|
||||
#define X86_ANY
|
||||
|
||||
#if defined (X86_64) && defined (__i386__)
|
||||
#undef X86_64
|
||||
#define X86
|
||||
#endif
|
||||
|
||||
#ifdef X86_WIN64
|
||||
#define FFI_SIZEOF_ARG 8
|
||||
#define USE_BUILTIN_FFS 0 /* not yet implemented in mingw-64 */
|
||||
#endif
|
||||
|
||||
#define FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION
|
||||
#ifndef _MSC_VER
|
||||
#define FFI_TARGET_HAS_COMPLEX_TYPE
|
||||
#endif
|
||||
|
||||
/* ---- Generic type definitions ----------------------------------------- */
|
||||
|
||||
#ifndef LIBFFI_ASM
|
||||
#ifdef X86_WIN64
|
||||
#ifdef _MSC_VER
|
||||
typedef unsigned __int64 ffi_arg;
|
||||
typedef __int64 ffi_sarg;
|
||||
#else
|
||||
typedef unsigned long long ffi_arg;
|
||||
typedef long long ffi_sarg;
|
||||
#endif
|
||||
#else
|
||||
#if defined __x86_64__ && defined __ILP32__
|
||||
#define FFI_SIZEOF_ARG 8
|
||||
#define FFI_SIZEOF_JAVA_RAW 4
|
||||
typedef unsigned long long ffi_arg;
|
||||
typedef long long ffi_sarg;
|
||||
#else
|
||||
typedef unsigned long ffi_arg;
|
||||
typedef signed long ffi_sarg;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef enum ffi_abi {
|
||||
#if defined(X86_WIN64)
|
||||
FFI_FIRST_ABI = 0,
|
||||
FFI_WIN64, /* sizeof(long double) == 8 - microsoft compilers */
|
||||
FFI_GNUW64, /* sizeof(long double) == 16 - GNU compilers */
|
||||
FFI_LAST_ABI,
|
||||
#ifdef __GNUC__
|
||||
FFI_DEFAULT_ABI = FFI_GNUW64
|
||||
#else
|
||||
FFI_DEFAULT_ABI = FFI_WIN64
|
||||
#endif
|
||||
|
||||
#elif defined(X86_64) || (defined (__x86_64__) && defined (X86_DARWIN))
|
||||
FFI_FIRST_ABI = 1,
|
||||
FFI_UNIX64,
|
||||
FFI_WIN64,
|
||||
FFI_EFI64 = FFI_WIN64,
|
||||
FFI_GNUW64,
|
||||
FFI_LAST_ABI,
|
||||
FFI_DEFAULT_ABI = FFI_UNIX64
|
||||
|
||||
#elif defined(X86_WIN32)
|
||||
FFI_FIRST_ABI = 0,
|
||||
FFI_SYSV = 1,
|
||||
FFI_STDCALL = 2,
|
||||
FFI_THISCALL = 3,
|
||||
FFI_FASTCALL = 4,
|
||||
FFI_MS_CDECL = 5,
|
||||
FFI_PASCAL = 6,
|
||||
FFI_REGISTER = 7,
|
||||
FFI_LAST_ABI,
|
||||
FFI_DEFAULT_ABI = FFI_MS_CDECL
|
||||
#else
|
||||
FFI_FIRST_ABI = 0,
|
||||
FFI_SYSV = 1,
|
||||
FFI_THISCALL = 3,
|
||||
FFI_FASTCALL = 4,
|
||||
FFI_STDCALL = 5,
|
||||
FFI_PASCAL = 6,
|
||||
FFI_REGISTER = 7,
|
||||
FFI_MS_CDECL = 8,
|
||||
FFI_LAST_ABI,
|
||||
FFI_DEFAULT_ABI = FFI_SYSV
|
||||
#endif
|
||||
} ffi_abi;
|
||||
#endif
|
||||
|
||||
/* ---- Definitions for closures ----------------------------------------- */
|
||||
|
||||
#define FFI_CLOSURES 1
|
||||
#define FFI_GO_CLOSURES 1
|
||||
|
||||
#define FFI_TYPE_SMALL_STRUCT_1B (FFI_TYPE_LAST + 1)
|
||||
#define FFI_TYPE_SMALL_STRUCT_2B (FFI_TYPE_LAST + 2)
|
||||
#define FFI_TYPE_SMALL_STRUCT_4B (FFI_TYPE_LAST + 3)
|
||||
#define FFI_TYPE_MS_STRUCT (FFI_TYPE_LAST + 4)
|
||||
|
||||
#if defined (X86_64) || defined(X86_WIN64) \
|
||||
|| (defined (__x86_64__) && defined (X86_DARWIN))
|
||||
# define FFI_TRAMPOLINE_SIZE 24
|
||||
# define FFI_NATIVE_RAW_API 0
|
||||
#else
|
||||
# define FFI_TRAMPOLINE_SIZE 12
|
||||
# define FFI_NATIVE_RAW_API 1 /* x86 has native raw api support */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
/* Include the correct ffitarget.h automatically. This helps us create prefixes
|
||||
* with multi-lib Linux and OSX/iOS universal builds. To avoid listing all
|
||||
* possible architectures here, we try the configured target arch first and then
|
||||
* include the most common multilib/universal setups in the #elif ladder */
|
||||
#ifdef __x86__
|
||||
#include "ffitarget-x86.h"
|
||||
#elif defined(__i386__) || defined(_M_IX86)
|
||||
#include "ffitarget-x86.h"
|
||||
#elif defined(__x86_64__) || defined(_M_X64)
|
||||
#include "ffitarget-x86_64.h"
|
||||
#elif defined(__arm__) || defined(_M_ARM)
|
||||
#include "ffitarget-arm.h"
|
||||
#elif defined(__aarch64__) || defined(_M_ARM64)
|
||||
#include "ffitarget-aarch64.h"
|
||||
#elif defined(__powerpc__) || defined(_M_PPC)
|
||||
#include "ffitarget-powerpc.h"
|
||||
#elif defined(__powerpc64__)
|
||||
#include "ffitarget-powerpc64.h"
|
||||
#else
|
||||
#error "Unsupported Architecture"
|
||||
#endif
|
|
@ -0,0 +1,198 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DESKTOP_APP_INFO_H__
|
||||
#define __G_DESKTOP_APP_INFO_H__
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DESKTOP_APP_INFO (g_desktop_app_info_get_type ())
|
||||
#define G_DESKTOP_APP_INFO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DESKTOP_APP_INFO, GDesktopAppInfo))
|
||||
#define G_DESKTOP_APP_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DESKTOP_APP_INFO, GDesktopAppInfoClass))
|
||||
#define G_IS_DESKTOP_APP_INFO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DESKTOP_APP_INFO))
|
||||
#define G_IS_DESKTOP_APP_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DESKTOP_APP_INFO))
|
||||
#define G_DESKTOP_APP_INFO_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DESKTOP_APP_INFO, GDesktopAppInfoClass))
|
||||
|
||||
typedef struct _GDesktopAppInfo GDesktopAppInfo;
|
||||
typedef struct _GDesktopAppInfoClass GDesktopAppInfoClass;
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDesktopAppInfo, g_object_unref)
|
||||
|
||||
struct _GDesktopAppInfoClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_desktop_app_info_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDesktopAppInfo *g_desktop_app_info_new_from_filename (const char *filename);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDesktopAppInfo *g_desktop_app_info_new_from_keyfile (GKeyFile *key_file);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const char * g_desktop_app_info_get_filename (GDesktopAppInfo *info);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
const char * g_desktop_app_info_get_generic_name (GDesktopAppInfo *info);
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
const char * g_desktop_app_info_get_categories (GDesktopAppInfo *info);
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
const char * const *g_desktop_app_info_get_keywords (GDesktopAppInfo *info);
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
gboolean g_desktop_app_info_get_nodisplay (GDesktopAppInfo *info);
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
gboolean g_desktop_app_info_get_show_in (GDesktopAppInfo *info,
|
||||
const gchar *desktop_env);
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
const char * g_desktop_app_info_get_startup_wm_class (GDesktopAppInfo *info);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDesktopAppInfo *g_desktop_app_info_new (const char *desktop_id);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info);
|
||||
|
||||
GLIB_DEPRECATED_IN_2_42
|
||||
void g_desktop_app_info_set_desktop_env (const char *desktop_env);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_36
|
||||
gboolean g_desktop_app_info_has_key (GDesktopAppInfo *info,
|
||||
const char *key);
|
||||
GLIB_AVAILABLE_IN_2_36
|
||||
char * g_desktop_app_info_get_string (GDesktopAppInfo *info,
|
||||
const char *key);
|
||||
GLIB_AVAILABLE_IN_2_56
|
||||
char * g_desktop_app_info_get_locale_string (GDesktopAppInfo *info,
|
||||
const char *key);
|
||||
GLIB_AVAILABLE_IN_2_36
|
||||
gboolean g_desktop_app_info_get_boolean (GDesktopAppInfo *info,
|
||||
const char *key);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_60
|
||||
gchar ** g_desktop_app_info_get_string_list (GDesktopAppInfo *info,
|
||||
const char *key,
|
||||
gsize *length);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
const gchar * const * g_desktop_app_info_list_actions (GDesktopAppInfo *info);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
void g_desktop_app_info_launch_action (GDesktopAppInfo *info,
|
||||
const gchar *action_name,
|
||||
GAppLaunchContext *launch_context);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
gchar * g_desktop_app_info_get_action_name (GDesktopAppInfo *info,
|
||||
const gchar *action_name);
|
||||
|
||||
#define G_TYPE_DESKTOP_APP_INFO_LOOKUP (g_desktop_app_info_lookup_get_type ()) GLIB_DEPRECATED_MACRO_IN_2_28
|
||||
#define G_DESKTOP_APP_INFO_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP, GDesktopAppInfoLookup)) GLIB_DEPRECATED_MACRO_IN_2_28
|
||||
#define G_IS_DESKTOP_APP_INFO_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP)) GLIB_DEPRECATED_MACRO_IN_2_28
|
||||
#define G_DESKTOP_APP_INFO_LOOKUP_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP, GDesktopAppInfoLookupIface)) GLIB_DEPRECATED_MACRO_IN_2_28
|
||||
|
||||
/**
|
||||
* G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME:
|
||||
*
|
||||
* Extension point for default handler to URI association. See
|
||||
* [Extending GIO][extending-gio].
|
||||
*
|
||||
* Deprecated: 2.28: The #GDesktopAppInfoLookup interface is deprecated and
|
||||
* unused by GIO.
|
||||
*/
|
||||
#define G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME "gio-desktop-app-info-lookup" GLIB_DEPRECATED_MACRO_IN_2_28
|
||||
|
||||
/**
|
||||
* GDesktopAppInfoLookupIface:
|
||||
* @get_default_for_uri_scheme: Virtual method for
|
||||
* g_desktop_app_info_lookup_get_default_for_uri_scheme().
|
||||
*
|
||||
* Interface that is used by backends to associate default
|
||||
* handlers with URI schemes.
|
||||
*/
|
||||
typedef struct _GDesktopAppInfoLookup GDesktopAppInfoLookup;
|
||||
typedef struct _GDesktopAppInfoLookupIface GDesktopAppInfoLookupIface;
|
||||
|
||||
struct _GDesktopAppInfoLookupIface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
GAppInfo * (* get_default_for_uri_scheme) (GDesktopAppInfoLookup *lookup,
|
||||
const char *uri_scheme);
|
||||
};
|
||||
|
||||
GLIB_DEPRECATED
|
||||
GType g_desktop_app_info_lookup_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_DEPRECATED
|
||||
GAppInfo *g_desktop_app_info_lookup_get_default_for_uri_scheme (GDesktopAppInfoLookup *lookup,
|
||||
const char *uri_scheme);
|
||||
|
||||
/**
|
||||
* GDesktopAppLaunchCallback:
|
||||
* @appinfo: a #GDesktopAppInfo
|
||||
* @pid: Process identifier
|
||||
* @user_data: User data
|
||||
*
|
||||
* During invocation, g_desktop_app_info_launch_uris_as_manager() may
|
||||
* create one or more child processes. This callback is invoked once
|
||||
* for each, providing the process ID.
|
||||
*/
|
||||
typedef void (*GDesktopAppLaunchCallback) (GDesktopAppInfo *appinfo,
|
||||
GPid pid,
|
||||
gpointer user_data);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_28
|
||||
gboolean g_desktop_app_info_launch_uris_as_manager (GDesktopAppInfo *appinfo,
|
||||
GList *uris,
|
||||
GAppLaunchContext *launch_context,
|
||||
GSpawnFlags spawn_flags,
|
||||
GSpawnChildSetupFunc user_setup,
|
||||
gpointer user_setup_data,
|
||||
GDesktopAppLaunchCallback pid_callback,
|
||||
gpointer pid_callback_data,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_58
|
||||
gboolean g_desktop_app_info_launch_uris_as_manager_with_fds (GDesktopAppInfo *appinfo,
|
||||
GList *uris,
|
||||
GAppLaunchContext *launch_context,
|
||||
GSpawnFlags spawn_flags,
|
||||
GSpawnChildSetupFunc user_setup,
|
||||
gpointer user_setup_data,
|
||||
GDesktopAppLaunchCallback pid_callback,
|
||||
gpointer pid_callback_data,
|
||||
gint stdin_fd,
|
||||
gint stdout_fd,
|
||||
gint stderr_fd,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_40
|
||||
gchar *** g_desktop_app_info_search (const gchar *search_string);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_42
|
||||
GList *g_desktop_app_info_get_implementations (const gchar *interface);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DESKTOP_APP_INFO_H__ */
|
|
@ -0,0 +1,66 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2010 Christian Kellner
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Christian Kellner <gicmo@gnome.org>
|
||||
*/
|
||||
|
||||
#ifndef __G_FILE_DESCRIPTOR_BASED_H__
|
||||
#define __G_FILE_DESCRIPTOR_BASED_H__
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_FILE_DESCRIPTOR_BASED (g_file_descriptor_based_get_type ())
|
||||
#define G_FILE_DESCRIPTOR_BASED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_FILE_DESCRIPTOR_BASED, GFileDescriptorBased))
|
||||
#define G_IS_FILE_DESCRIPTOR_BASED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE_DESCRIPTOR_BASED))
|
||||
#define G_FILE_DESCRIPTOR_BASED_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_FILE_DESCRIPTOR_BASED, GFileDescriptorBasedIface))
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileDescriptorBased, g_object_unref)
|
||||
|
||||
/**
|
||||
* GFileDescriptorBased:
|
||||
*
|
||||
* An interface for file descriptor based io objects.
|
||||
**/
|
||||
typedef struct _GFileDescriptorBasedIface GFileDescriptorBasedIface;
|
||||
|
||||
/**
|
||||
* GFileDescriptorBasedIface:
|
||||
* @g_iface: The parent interface.
|
||||
* @get_fd: Gets the underlying file descriptor.
|
||||
*
|
||||
* An interface for file descriptor based io objects.
|
||||
**/
|
||||
struct _GFileDescriptorBasedIface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
/* Virtual Table */
|
||||
int (*get_fd) (GFileDescriptorBased *fd_based);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_file_descriptor_based_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
int g_file_descriptor_based_get_fd (GFileDescriptorBased *fd_based);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
#endif /* __G_FILE_DESCRIPTOR_BASED_H__ */
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright © 2009 Codethink Limited
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#ifndef __G_UNIX_CONNECTION_H__
|
||||
#define __G_UNIX_CONNECTION_H__
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_UNIX_CONNECTION (g_unix_connection_get_type ())
|
||||
#define G_UNIX_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_UNIX_CONNECTION, GUnixConnection))
|
||||
#define G_UNIX_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
|
||||
G_TYPE_UNIX_CONNECTION, GUnixConnectionClass))
|
||||
#define G_IS_UNIX_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
|
||||
G_TYPE_UNIX_CONNECTION))
|
||||
#define G_IS_UNIX_CONNECTION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
|
||||
G_TYPE_UNIX_CONNECTION))
|
||||
#define G_UNIX_CONNECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
|
||||
G_TYPE_UNIX_CONNECTION, GUnixConnectionClass))
|
||||
|
||||
typedef struct _GUnixConnection GUnixConnection;
|
||||
typedef struct _GUnixConnectionPrivate GUnixConnectionPrivate;
|
||||
typedef struct _GUnixConnectionClass GUnixConnectionClass;
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixConnection, g_object_unref)
|
||||
|
||||
struct _GUnixConnectionClass
|
||||
{
|
||||
GSocketConnectionClass parent_class;
|
||||
};
|
||||
|
||||
struct _GUnixConnection
|
||||
{
|
||||
GSocketConnection parent_instance;
|
||||
GUnixConnectionPrivate *priv;
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_unix_connection_get_type (void);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_connection_send_fd (GUnixConnection *connection,
|
||||
gint fd,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gint g_unix_connection_receive_fd (GUnixConnection *connection,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_connection_send_credentials (GUnixConnection *connection,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_unix_connection_send_credentials_async (GUnixConnection *connection,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
gboolean g_unix_connection_send_credentials_finish (GUnixConnection *connection,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GCredentials *g_unix_connection_receive_credentials (GUnixConnection *connection,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_unix_connection_receive_credentials_async (GUnixConnection *connection,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GCredentials *g_unix_connection_receive_credentials_finish (GUnixConnection *connection,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_UNIX_CONNECTION_H__ */
|
|
@ -0,0 +1,87 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2010 Red Hat, Inc.
|
||||
* Copyright (C) 2009 Codethink Limited
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_UNIX_CREDENTIALS_MESSAGE_H__
|
||||
#define __G_UNIX_CREDENTIALS_MESSAGE_H__
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_UNIX_CREDENTIALS_MESSAGE (g_unix_credentials_message_get_type ())
|
||||
#define G_UNIX_CREDENTIALS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_CREDENTIALS_MESSAGE, GUnixCredentialsMessage))
|
||||
#define G_UNIX_CREDENTIALS_MESSAGE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), G_TYPE_UNIX_CREDENTIALS_MESSAGE, GUnixCredentialsMessageClass))
|
||||
#define G_IS_UNIX_CREDENTIALS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_CREDENTIALS_MESSAGE))
|
||||
#define G_IS_UNIX_CREDENTIALS_MESSAGE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), G_TYPE_UNIX_CREDENTIALS_MESSAGE))
|
||||
#define G_UNIX_CREDENTIALS_MESSAGE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_UNIX_CREDENTIALS_MESSAGE, GUnixCredentialsMessageClass))
|
||||
|
||||
typedef struct _GUnixCredentialsMessagePrivate GUnixCredentialsMessagePrivate;
|
||||
typedef struct _GUnixCredentialsMessageClass GUnixCredentialsMessageClass;
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixCredentialsMessage, g_object_unref)
|
||||
|
||||
/**
|
||||
* GUnixCredentialsMessageClass:
|
||||
*
|
||||
* Class structure for #GUnixCredentialsMessage.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
struct _GUnixCredentialsMessageClass
|
||||
{
|
||||
GSocketControlMessageClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
};
|
||||
|
||||
/**
|
||||
* GUnixCredentialsMessage:
|
||||
*
|
||||
* The #GUnixCredentialsMessage structure contains only private data
|
||||
* and should only be accessed using the provided API.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
struct _GUnixCredentialsMessage
|
||||
{
|
||||
GSocketControlMessage parent_instance;
|
||||
GUnixCredentialsMessagePrivate *priv;
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_unix_credentials_message_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GSocketControlMessage *g_unix_credentials_message_new (void);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GSocketControlMessage *g_unix_credentials_message_new_with_credentials (GCredentials *credentials);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GCredentials *g_unix_credentials_message_get_credentials (GUnixCredentialsMessage *message);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_credentials_message_is_supported (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_UNIX_CREDENTIALS_MESSAGE_H__ */
|
|
@ -0,0 +1,95 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright © 2009 Codethink Limited
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#ifndef __G_UNIX_FD_LIST_H__
|
||||
#define __G_UNIX_FD_LIST_H__
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_UNIX_FD_LIST (g_unix_fd_list_get_type ())
|
||||
#define G_UNIX_FD_LIST(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_UNIX_FD_LIST, GUnixFDList))
|
||||
#define G_UNIX_FD_LIST_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
|
||||
G_TYPE_UNIX_FD_LIST, GUnixFDListClass))
|
||||
#define G_IS_UNIX_FD_LIST(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
|
||||
G_TYPE_UNIX_FD_LIST))
|
||||
#define G_IS_UNIX_FD_LIST_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
|
||||
G_TYPE_UNIX_FD_LIST))
|
||||
#define G_UNIX_FD_LIST_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
|
||||
G_TYPE_UNIX_FD_LIST, GUnixFDListClass))
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixFDList, g_object_unref)
|
||||
|
||||
typedef struct _GUnixFDListPrivate GUnixFDListPrivate;
|
||||
typedef struct _GUnixFDListClass GUnixFDListClass;
|
||||
|
||||
struct _GUnixFDListClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
};
|
||||
|
||||
struct _GUnixFDList
|
||||
{
|
||||
GObject parent_instance;
|
||||
GUnixFDListPrivate *priv;
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_unix_fd_list_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GUnixFDList * g_unix_fd_list_new (void);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GUnixFDList * g_unix_fd_list_new_from_array (const gint *fds,
|
||||
gint n_fds);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gint g_unix_fd_list_append (GUnixFDList *list,
|
||||
gint fd,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gint g_unix_fd_list_get_length (GUnixFDList *list);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gint g_unix_fd_list_get (GUnixFDList *list,
|
||||
gint index_,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gint * g_unix_fd_list_peek_fds (GUnixFDList *list,
|
||||
gint *length);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gint * g_unix_fd_list_steal_fds (GUnixFDList *list,
|
||||
gint *length);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_UNIX_FD_LIST_H__ */
|
|
@ -0,0 +1,84 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright © 2009 Codethink Limited
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#ifndef __G_UNIX_FD_MESSAGE_H__
|
||||
#define __G_UNIX_FD_MESSAGE_H__
|
||||
|
||||
#include <gio/gio.h>
|
||||
#include <gio/gunixfdlist.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_UNIX_FD_MESSAGE (g_unix_fd_message_get_type ())
|
||||
#define G_UNIX_FD_MESSAGE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_UNIX_FD_MESSAGE, GUnixFDMessage))
|
||||
#define G_UNIX_FD_MESSAGE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
|
||||
G_TYPE_UNIX_FD_MESSAGE, GUnixFDMessageClass))
|
||||
#define G_IS_UNIX_FD_MESSAGE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
|
||||
G_TYPE_UNIX_FD_MESSAGE))
|
||||
#define G_IS_UNIX_FD_MESSAGE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
|
||||
G_TYPE_UNIX_FD_MESSAGE))
|
||||
#define G_UNIX_FD_MESSAGE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
|
||||
G_TYPE_UNIX_FD_MESSAGE, GUnixFDMessageClass))
|
||||
|
||||
typedef struct _GUnixFDMessagePrivate GUnixFDMessagePrivate;
|
||||
typedef struct _GUnixFDMessageClass GUnixFDMessageClass;
|
||||
typedef struct _GUnixFDMessage GUnixFDMessage;
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixFDMessage, g_object_unref)
|
||||
|
||||
struct _GUnixFDMessageClass
|
||||
{
|
||||
GSocketControlMessageClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
};
|
||||
|
||||
struct _GUnixFDMessage
|
||||
{
|
||||
GSocketControlMessage parent_instance;
|
||||
GUnixFDMessagePrivate *priv;
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_unix_fd_message_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GSocketControlMessage * g_unix_fd_message_new_with_fd_list (GUnixFDList *fd_list);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GSocketControlMessage * g_unix_fd_message_new (void);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GUnixFDList * g_unix_fd_message_get_fd_list (GUnixFDMessage *message);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gint * g_unix_fd_message_steal_fds (GUnixFDMessage *message,
|
||||
gint *length);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_fd_message_append_fd (GUnixFDMessage *message,
|
||||
gint fd,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_UNIX_FD_MESSAGE_H__ */
|
|
@ -0,0 +1,83 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_UNIX_INPUT_STREAM_H__
|
||||
#define __G_UNIX_INPUT_STREAM_H__
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_UNIX_INPUT_STREAM (g_unix_input_stream_get_type ())
|
||||
#define G_UNIX_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_INPUT_STREAM, GUnixInputStream))
|
||||
#define G_UNIX_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_INPUT_STREAM, GUnixInputStreamClass))
|
||||
#define G_IS_UNIX_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_INPUT_STREAM))
|
||||
#define G_IS_UNIX_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_UNIX_INPUT_STREAM))
|
||||
#define G_UNIX_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_UNIX_INPUT_STREAM, GUnixInputStreamClass))
|
||||
|
||||
/**
|
||||
* GUnixInputStream:
|
||||
*
|
||||
* Implements #GInputStream for reading from selectable unix file descriptors
|
||||
**/
|
||||
typedef struct _GUnixInputStream GUnixInputStream;
|
||||
typedef struct _GUnixInputStreamClass GUnixInputStreamClass;
|
||||
typedef struct _GUnixInputStreamPrivate GUnixInputStreamPrivate;
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixInputStream, g_object_unref)
|
||||
|
||||
struct _GUnixInputStream
|
||||
{
|
||||
GInputStream parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GUnixInputStreamPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GUnixInputStreamClass
|
||||
{
|
||||
GInputStreamClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_unix_input_stream_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GInputStream * g_unix_input_stream_new (gint fd,
|
||||
gboolean close_fd);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_unix_input_stream_set_close_fd (GUnixInputStream *stream,
|
||||
gboolean close_fd);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_input_stream_get_close_fd (GUnixInputStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gint g_unix_input_stream_get_fd (GUnixInputStream *stream);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_UNIX_INPUT_STREAM_H__ */
|
|
@ -0,0 +1,167 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_UNIX_MOUNTS_H__
|
||||
#define __G_UNIX_MOUNTS_H__
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* GUnixMountEntry:
|
||||
*
|
||||
* Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>).
|
||||
* This corresponds roughly to a mtab entry.
|
||||
**/
|
||||
typedef struct _GUnixMountEntry GUnixMountEntry;
|
||||
|
||||
#define G_TYPE_UNIX_MOUNT_ENTRY (g_unix_mount_entry_get_type ())
|
||||
GLIB_AVAILABLE_IN_2_54
|
||||
GType g_unix_mount_entry_get_type (void) G_GNUC_CONST;
|
||||
|
||||
/**
|
||||
* GUnixMountPoint:
|
||||
*
|
||||
* Defines a Unix mount point (e.g. <filename>/dev</filename>).
|
||||
* This corresponds roughly to a fstab entry.
|
||||
**/
|
||||
typedef struct _GUnixMountPoint GUnixMountPoint;
|
||||
|
||||
#define G_TYPE_UNIX_MOUNT_POINT (g_unix_mount_point_get_type ())
|
||||
GLIB_AVAILABLE_IN_2_54
|
||||
GType g_unix_mount_point_get_type (void) G_GNUC_CONST;
|
||||
|
||||
/**
|
||||
* GUnixMountMonitor:
|
||||
*
|
||||
* Watches #GUnixMounts for changes.
|
||||
**/
|
||||
typedef struct _GUnixMountMonitor GUnixMountMonitor;
|
||||
typedef struct _GUnixMountMonitorClass GUnixMountMonitorClass;
|
||||
|
||||
#define G_TYPE_UNIX_MOUNT_MONITOR (g_unix_mount_monitor_get_type ())
|
||||
#define G_UNIX_MOUNT_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_MOUNT_MONITOR, GUnixMountMonitor))
|
||||
#define G_UNIX_MOUNT_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_MOUNT_MONITOR, GUnixMountMonitorClass))
|
||||
#define G_IS_UNIX_MOUNT_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_MOUNT_MONITOR))
|
||||
#define G_IS_UNIX_MOUNT_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_UNIX_MOUNT_MONITOR))
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixMountMonitor, g_object_unref)
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_unix_mount_free (GUnixMountEntry *mount_entry);
|
||||
GLIB_AVAILABLE_IN_2_54
|
||||
GUnixMountEntry *g_unix_mount_copy (GUnixMountEntry *mount_entry);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_unix_mount_point_free (GUnixMountPoint *mount_point);
|
||||
GLIB_AVAILABLE_IN_2_54
|
||||
GUnixMountPoint *g_unix_mount_point_copy (GUnixMountPoint *mount_point);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gint g_unix_mount_compare (GUnixMountEntry *mount1,
|
||||
GUnixMountEntry *mount2);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const char * g_unix_mount_get_mount_path (GUnixMountEntry *mount_entry);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const char * g_unix_mount_get_device_path (GUnixMountEntry *mount_entry);
|
||||
GLIB_AVAILABLE_IN_2_60
|
||||
const char * g_unix_mount_get_root_path (GUnixMountEntry *mount_entry);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const char * g_unix_mount_get_fs_type (GUnixMountEntry *mount_entry);
|
||||
GLIB_AVAILABLE_IN_2_58
|
||||
const char * g_unix_mount_get_options (GUnixMountEntry *mount_entry);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_mount_is_readonly (GUnixMountEntry *mount_entry);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_mount_is_system_internal (GUnixMountEntry *mount_entry);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_mount_guess_can_eject (GUnixMountEntry *mount_entry);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_mount_guess_should_display (GUnixMountEntry *mount_entry);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char * g_unix_mount_guess_name (GUnixMountEntry *mount_entry);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIcon * g_unix_mount_guess_icon (GUnixMountEntry *mount_entry);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIcon * g_unix_mount_guess_symbolic_icon (GUnixMountEntry *mount_entry);
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixMountEntry, g_unix_mount_free)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixMountPoint, g_unix_mount_point_free)
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gint g_unix_mount_point_compare (GUnixMountPoint *mount1,
|
||||
GUnixMountPoint *mount2);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const char * g_unix_mount_point_get_mount_path (GUnixMountPoint *mount_point);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const char * g_unix_mount_point_get_device_path (GUnixMountPoint *mount_point);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const char * g_unix_mount_point_get_fs_type (GUnixMountPoint *mount_point);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
const char * g_unix_mount_point_get_options (GUnixMountPoint *mount_point);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_mount_point_is_readonly (GUnixMountPoint *mount_point);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_mount_point_is_user_mountable (GUnixMountPoint *mount_point);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_mount_point_is_loopback (GUnixMountPoint *mount_point);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_mount_point_guess_can_eject (GUnixMountPoint *mount_point);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char * g_unix_mount_point_guess_name (GUnixMountPoint *mount_point);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIcon * g_unix_mount_point_guess_icon (GUnixMountPoint *mount_point);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIcon * g_unix_mount_point_guess_symbolic_icon (GUnixMountPoint *mount_point);
|
||||
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GList * g_unix_mount_points_get (guint64 *time_read);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GList * g_unix_mounts_get (guint64 *time_read);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GUnixMountEntry *g_unix_mount_at (const char *mount_path,
|
||||
guint64 *time_read);
|
||||
GLIB_AVAILABLE_IN_2_52
|
||||
GUnixMountEntry *g_unix_mount_for (const char *file_path,
|
||||
guint64 *time_read);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_mounts_changed_since (guint64 time);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_mount_points_changed_since (guint64 time);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_unix_mount_monitor_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
GUnixMountMonitor *g_unix_mount_monitor_get (void);
|
||||
GLIB_DEPRECATED_IN_2_44_FOR(g_unix_mount_monitor_get)
|
||||
GUnixMountMonitor *g_unix_mount_monitor_new (void);
|
||||
GLIB_DEPRECATED_IN_2_44
|
||||
void g_unix_mount_monitor_set_rate_limit (GUnixMountMonitor *mount_monitor,
|
||||
int limit_msec);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_is_mount_path_system_internal (const char *mount_path);
|
||||
GLIB_AVAILABLE_IN_2_56
|
||||
gboolean g_unix_is_system_fs_type (const char *fs_type);
|
||||
GLIB_AVAILABLE_IN_2_56
|
||||
gboolean g_unix_is_system_device_path (const char *device_path);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_UNIX_MOUNTS_H__ */
|
|
@ -0,0 +1,82 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_UNIX_OUTPUT_STREAM_H__
|
||||
#define __G_UNIX_OUTPUT_STREAM_H__
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_UNIX_OUTPUT_STREAM (g_unix_output_stream_get_type ())
|
||||
#define G_UNIX_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_OUTPUT_STREAM, GUnixOutputStream))
|
||||
#define G_UNIX_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_OUTPUT_STREAM, GUnixOutputStreamClass))
|
||||
#define G_IS_UNIX_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_OUTPUT_STREAM))
|
||||
#define G_IS_UNIX_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_UNIX_OUTPUT_STREAM))
|
||||
#define G_UNIX_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_UNIX_OUTPUT_STREAM, GUnixOutputStreamClass))
|
||||
|
||||
/**
|
||||
* GUnixOutputStream:
|
||||
*
|
||||
* Implements #GOutputStream for outputting to selectable unix file descriptors
|
||||
**/
|
||||
typedef struct _GUnixOutputStream GUnixOutputStream;
|
||||
typedef struct _GUnixOutputStreamClass GUnixOutputStreamClass;
|
||||
typedef struct _GUnixOutputStreamPrivate GUnixOutputStreamPrivate;
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixOutputStream, g_object_unref)
|
||||
|
||||
struct _GUnixOutputStream
|
||||
{
|
||||
GOutputStream parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GUnixOutputStreamPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GUnixOutputStreamClass
|
||||
{
|
||||
GOutputStreamClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_unix_output_stream_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GOutputStream * g_unix_output_stream_new (gint fd,
|
||||
gboolean close_fd);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_unix_output_stream_set_close_fd (GUnixOutputStream *stream,
|
||||
gboolean close_fd);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_output_stream_get_close_fd (GUnixOutputStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gint g_unix_output_stream_get_fd (GUnixOutputStream *stream);
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_UNIX_OUTPUT_STREAM_H__ */
|
|
@ -0,0 +1,81 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Christian Kellner <gicmo@gnome.org>
|
||||
* Samuel Cormier-Iijima <sciyoshi@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_UNIX_SOCKET_ADDRESS_H__
|
||||
#define __G_UNIX_SOCKET_ADDRESS_H__
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_UNIX_SOCKET_ADDRESS (g_unix_socket_address_get_type ())
|
||||
#define G_UNIX_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_UNIX_SOCKET_ADDRESS, GUnixSocketAddress))
|
||||
#define G_UNIX_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_UNIX_SOCKET_ADDRESS, GUnixSocketAddressClass))
|
||||
#define G_IS_UNIX_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_SOCKET_ADDRESS))
|
||||
#define G_IS_UNIX_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_UNIX_SOCKET_ADDRESS))
|
||||
#define G_UNIX_SOCKET_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_UNIX_SOCKET_ADDRESS, GUnixSocketAddressClass))
|
||||
|
||||
typedef struct _GUnixSocketAddress GUnixSocketAddress;
|
||||
typedef struct _GUnixSocketAddressClass GUnixSocketAddressClass;
|
||||
typedef struct _GUnixSocketAddressPrivate GUnixSocketAddressPrivate;
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixSocketAddress, g_object_unref)
|
||||
|
||||
struct _GUnixSocketAddress
|
||||
{
|
||||
GSocketAddress parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GUnixSocketAddressPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GUnixSocketAddressClass
|
||||
{
|
||||
GSocketAddressClass parent_class;
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_unix_socket_address_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GSocketAddress *g_unix_socket_address_new (const gchar *path);
|
||||
GLIB_DEPRECATED_FOR(g_unix_socket_address_new_with_type)
|
||||
GSocketAddress *g_unix_socket_address_new_abstract (const gchar *path,
|
||||
gint path_len);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GSocketAddress *g_unix_socket_address_new_with_type (const gchar *path,
|
||||
gint path_len,
|
||||
GUnixSocketAddressType type);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const char * g_unix_socket_address_get_path (GUnixSocketAddress *address);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gsize g_unix_socket_address_get_path_len (GUnixSocketAddress *address);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GUnixSocketAddressType g_unix_socket_address_get_address_type (GUnixSocketAddress *address);
|
||||
GLIB_DEPRECATED
|
||||
gboolean g_unix_socket_address_get_is_abstract (GUnixSocketAddress *address);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_unix_socket_address_abstract_names_supported (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_UNIX_SOCKET_ADDRESS_H__ */
|
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* Copyright © 2010 Codethink Limited
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#ifndef __G_ACTION_H__
|
||||
#define __G_ACTION_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_ACTION (g_action_get_type ())
|
||||
#define G_ACTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_ACTION, GAction))
|
||||
#define G_IS_ACTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_ACTION))
|
||||
#define G_ACTION_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
|
||||
G_TYPE_ACTION, GActionInterface))
|
||||
|
||||
typedef struct _GActionInterface GActionInterface;
|
||||
|
||||
struct _GActionInterface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
/* virtual functions */
|
||||
const gchar * (* get_name) (GAction *action);
|
||||
const GVariantType * (* get_parameter_type) (GAction *action);
|
||||
const GVariantType * (* get_state_type) (GAction *action);
|
||||
GVariant * (* get_state_hint) (GAction *action);
|
||||
|
||||
gboolean (* get_enabled) (GAction *action);
|
||||
GVariant * (* get_state) (GAction *action);
|
||||
|
||||
void (* change_state) (GAction *action,
|
||||
GVariant *value);
|
||||
void (* activate) (GAction *action,
|
||||
GVariant *parameter);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
GType g_action_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar * g_action_get_name (GAction *action);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const GVariantType * g_action_get_parameter_type (GAction *action);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const GVariantType * g_action_get_state_type (GAction *action);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant * g_action_get_state_hint (GAction *action);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_action_get_enabled (GAction *action);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant * g_action_get_state (GAction *action);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_action_change_state (GAction *action,
|
||||
GVariant *value);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_action_activate (GAction *action,
|
||||
GVariant *parameter);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_28
|
||||
gboolean g_action_name_is_valid (const gchar *action_name);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
gboolean g_action_parse_detailed_name (const gchar *detailed_name,
|
||||
gchar **action_name,
|
||||
GVariant **target_value,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
gchar * g_action_print_detailed_name (const gchar *action_name,
|
||||
GVariant *target_value);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_ACTION_H__ */
|
|
@ -0,0 +1,161 @@
|
|||
/*
|
||||
* Copyright © 2010 Codethink Limited
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#ifndef __G_ACTION_GROUP_H__
|
||||
#define __G_ACTION_GROUP_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
#define G_TYPE_ACTION_GROUP (g_action_group_get_type ())
|
||||
#define G_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_ACTION_GROUP, GActionGroup))
|
||||
#define G_IS_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
|
||||
G_TYPE_ACTION_GROUP))
|
||||
#define G_ACTION_GROUP_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
|
||||
G_TYPE_ACTION_GROUP, GActionGroupInterface))
|
||||
|
||||
typedef struct _GActionGroupInterface GActionGroupInterface;
|
||||
|
||||
struct _GActionGroupInterface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
/* virtual functions */
|
||||
gboolean (* has_action) (GActionGroup *action_group,
|
||||
const gchar *action_name);
|
||||
|
||||
gchar ** (* list_actions) (GActionGroup *action_group);
|
||||
|
||||
gboolean (* get_action_enabled) (GActionGroup *action_group,
|
||||
const gchar *action_name);
|
||||
|
||||
const GVariantType * (* get_action_parameter_type) (GActionGroup *action_group,
|
||||
const gchar *action_name);
|
||||
|
||||
const GVariantType * (* get_action_state_type) (GActionGroup *action_group,
|
||||
const gchar *action_name);
|
||||
|
||||
GVariant * (* get_action_state_hint) (GActionGroup *action_group,
|
||||
const gchar *action_name);
|
||||
|
||||
GVariant * (* get_action_state) (GActionGroup *action_group,
|
||||
const gchar *action_name);
|
||||
|
||||
void (* change_action_state) (GActionGroup *action_group,
|
||||
const gchar *action_name,
|
||||
GVariant *value);
|
||||
|
||||
void (* activate_action) (GActionGroup *action_group,
|
||||
const gchar *action_name,
|
||||
GVariant *parameter);
|
||||
|
||||
/* signals */
|
||||
void (* action_added) (GActionGroup *action_group,
|
||||
const gchar *action_name);
|
||||
void (* action_removed) (GActionGroup *action_group,
|
||||
const gchar *action_name);
|
||||
void (* action_enabled_changed) (GActionGroup *action_group,
|
||||
const gchar *action_name,
|
||||
gboolean enabled);
|
||||
void (* action_state_changed) (GActionGroup *action_group,
|
||||
const gchar *action_name,
|
||||
GVariant *state);
|
||||
|
||||
/* more virtual functions */
|
||||
gboolean (* query_action) (GActionGroup *action_group,
|
||||
const gchar *action_name,
|
||||
gboolean *enabled,
|
||||
const GVariantType **parameter_type,
|
||||
const GVariantType **state_type,
|
||||
GVariant **state_hint,
|
||||
GVariant **state);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_action_group_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_action_group_has_action (GActionGroup *action_group,
|
||||
const gchar *action_name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar ** g_action_group_list_actions (GActionGroup *action_group);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const GVariantType * g_action_group_get_action_parameter_type (GActionGroup *action_group,
|
||||
const gchar *action_name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const GVariantType * g_action_group_get_action_state_type (GActionGroup *action_group,
|
||||
const gchar *action_name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant * g_action_group_get_action_state_hint (GActionGroup *action_group,
|
||||
const gchar *action_name);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_action_group_get_action_enabled (GActionGroup *action_group,
|
||||
const gchar *action_name);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant * g_action_group_get_action_state (GActionGroup *action_group,
|
||||
const gchar *action_name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_action_group_change_action_state (GActionGroup *action_group,
|
||||
const gchar *action_name,
|
||||
GVariant *value);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_action_group_activate_action (GActionGroup *action_group,
|
||||
const gchar *action_name,
|
||||
GVariant *parameter);
|
||||
|
||||
/* signals */
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_action_group_action_added (GActionGroup *action_group,
|
||||
const gchar *action_name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_action_group_action_removed (GActionGroup *action_group,
|
||||
const gchar *action_name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_action_group_action_enabled_changed (GActionGroup *action_group,
|
||||
const gchar *action_name,
|
||||
gboolean enabled);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_action_group_action_state_changed (GActionGroup *action_group,
|
||||
const gchar *action_name,
|
||||
GVariant *state);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
gboolean g_action_group_query_action (GActionGroup *action_group,
|
||||
const gchar *action_name,
|
||||
gboolean *enabled,
|
||||
const GVariantType **parameter_type,
|
||||
const GVariantType **state_type,
|
||||
GVariant **state_hint,
|
||||
GVariant **state);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_ACTION_GROUP_H__ */
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright © 2010 Codethink Limited
|
||||
* Copyright © 2011 Canonical Limited
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __G_ACTION_GROUP_EXPORTER_H__
|
||||
#define __G_ACTION_GROUP_EXPORTER_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
guint g_dbus_connection_export_action_group (GDBusConnection *connection,
|
||||
const gchar *object_path,
|
||||
GActionGroup *action_group,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_dbus_connection_unexport_action_group (GDBusConnection *connection,
|
||||
guint export_id);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_ACTION_GROUP_EXPORTER_H__ */
|
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
* Copyright © 2010 Codethink Limited
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#ifndef __G_ACTION_MAP_H__
|
||||
#define __G_ACTION_MAP_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
#define G_TYPE_ACTION_MAP (g_action_map_get_type ())
|
||||
#define G_ACTION_MAP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_ACTION_MAP, GActionMap))
|
||||
#define G_IS_ACTION_MAP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
|
||||
G_TYPE_ACTION_MAP))
|
||||
#define G_ACTION_MAP_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
|
||||
G_TYPE_ACTION_MAP, GActionMapInterface))
|
||||
|
||||
typedef struct _GActionMapInterface GActionMapInterface;
|
||||
typedef struct _GActionEntry GActionEntry;
|
||||
|
||||
struct _GActionMapInterface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
GAction * (* lookup_action) (GActionMap *action_map,
|
||||
const gchar *action_name);
|
||||
void (* add_action) (GActionMap *action_map,
|
||||
GAction *action);
|
||||
void (* remove_action) (GActionMap *action_map,
|
||||
const gchar *action_name);
|
||||
};
|
||||
|
||||
struct _GActionEntry
|
||||
{
|
||||
const gchar *name;
|
||||
|
||||
void (* activate) (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data);
|
||||
|
||||
const gchar *parameter_type;
|
||||
|
||||
const gchar *state;
|
||||
|
||||
void (* change_state) (GSimpleAction *action,
|
||||
GVariant *value,
|
||||
gpointer user_data);
|
||||
|
||||
/*< private >*/
|
||||
gsize padding[3];
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GType g_action_map_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GAction * g_action_map_lookup_action (GActionMap *action_map,
|
||||
const gchar *action_name);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_action_map_add_action (GActionMap *action_map,
|
||||
GAction *action);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_action_map_remove_action (GActionMap *action_map,
|
||||
const gchar *action_name);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_action_map_add_action_entries (GActionMap *action_map,
|
||||
const GActionEntry *entries,
|
||||
gint n_entries,
|
||||
gpointer user_data);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_ACTION_MAP_H__ */
|
|
@ -0,0 +1,347 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_APP_INFO_H__
|
||||
#define __G_APP_INFO_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_APP_INFO (g_app_info_get_type ())
|
||||
#define G_APP_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_APP_INFO, GAppInfo))
|
||||
#define G_IS_APP_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_APP_INFO))
|
||||
#define G_APP_INFO_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_APP_INFO, GAppInfoIface))
|
||||
|
||||
#define G_TYPE_APP_LAUNCH_CONTEXT (g_app_launch_context_get_type ())
|
||||
#define G_APP_LAUNCH_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_APP_LAUNCH_CONTEXT, GAppLaunchContext))
|
||||
#define G_APP_LAUNCH_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_APP_LAUNCH_CONTEXT, GAppLaunchContextClass))
|
||||
#define G_IS_APP_LAUNCH_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_APP_LAUNCH_CONTEXT))
|
||||
#define G_IS_APP_LAUNCH_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_APP_LAUNCH_CONTEXT))
|
||||
#define G_APP_LAUNCH_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_APP_LAUNCH_CONTEXT, GAppLaunchContextClass))
|
||||
|
||||
typedef struct _GAppLaunchContextClass GAppLaunchContextClass;
|
||||
typedef struct _GAppLaunchContextPrivate GAppLaunchContextPrivate;
|
||||
|
||||
/**
|
||||
* GAppInfo:
|
||||
*
|
||||
* Information about an installed application and methods to launch
|
||||
* it (with file arguments).
|
||||
*/
|
||||
|
||||
/**
|
||||
* GAppInfoIface:
|
||||
* @g_iface: The parent interface.
|
||||
* @dup: Copies a #GAppInfo.
|
||||
* @equal: Checks two #GAppInfos for equality.
|
||||
* @get_id: Gets a string identifier for a #GAppInfo.
|
||||
* @get_name: Gets the name of the application for a #GAppInfo.
|
||||
* @get_description: Gets a short description for the application described by the #GAppInfo.
|
||||
* @get_executable: Gets the executable name for the #GAppInfo.
|
||||
* @get_icon: Gets the #GIcon for the #GAppInfo.
|
||||
* @launch: Launches an application specified by the #GAppInfo.
|
||||
* @supports_uris: Indicates whether the application specified supports launching URIs.
|
||||
* @supports_files: Indicates whether the application specified accepts filename arguments.
|
||||
* @launch_uris: Launches an application with a list of URIs.
|
||||
* @should_show: Returns whether an application should be shown (e.g. when getting a list of installed applications).
|
||||
* [FreeDesktop.Org Startup Notification Specification](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt).
|
||||
* @set_as_default_for_type: Sets an application as default for a given content type.
|
||||
* @set_as_default_for_extension: Sets an application as default for a given file extension.
|
||||
* @add_supports_type: Adds to the #GAppInfo information about supported file types.
|
||||
* @can_remove_supports_type: Checks for support for removing supported file types from a #GAppInfo.
|
||||
* @remove_supports_type: Removes a supported application type from a #GAppInfo.
|
||||
* @can_delete: Checks if a #GAppInfo can be deleted. Since 2.20
|
||||
* @do_delete: Deletes a #GAppInfo. Since 2.20
|
||||
* @get_commandline: Gets the commandline for the #GAppInfo. Since 2.20
|
||||
* @get_display_name: Gets the display name for the #GAppInfo. Since 2.24
|
||||
* @set_as_last_used_for_type: Sets the application as the last used. See g_app_info_set_as_last_used_for_type().
|
||||
* @get_supported_types: Retrieves the list of content types that @app_info claims to support.
|
||||
* @launch_uris_async: Asynchronously launches an application with a list of URIs. (Since: 2.60)
|
||||
* @launch_uris_finish: Finishes an operation started with @launch_uris_async. (Since: 2.60)
|
||||
|
||||
* Application Information interface, for operating system portability.
|
||||
*/
|
||||
typedef struct _GAppInfoIface GAppInfoIface;
|
||||
|
||||
struct _GAppInfoIface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
/* Virtual Table */
|
||||
|
||||
GAppInfo * (* dup) (GAppInfo *appinfo);
|
||||
gboolean (* equal) (GAppInfo *appinfo1,
|
||||
GAppInfo *appinfo2);
|
||||
const char * (* get_id) (GAppInfo *appinfo);
|
||||
const char * (* get_name) (GAppInfo *appinfo);
|
||||
const char * (* get_description) (GAppInfo *appinfo);
|
||||
const char * (* get_executable) (GAppInfo *appinfo);
|
||||
GIcon * (* get_icon) (GAppInfo *appinfo);
|
||||
gboolean (* launch) (GAppInfo *appinfo,
|
||||
GList *files,
|
||||
GAppLaunchContext *context,
|
||||
GError **error);
|
||||
gboolean (* supports_uris) (GAppInfo *appinfo);
|
||||
gboolean (* supports_files) (GAppInfo *appinfo);
|
||||
gboolean (* launch_uris) (GAppInfo *appinfo,
|
||||
GList *uris,
|
||||
GAppLaunchContext *context,
|
||||
GError **error);
|
||||
gboolean (* should_show) (GAppInfo *appinfo);
|
||||
|
||||
/* For changing associations */
|
||||
gboolean (* set_as_default_for_type) (GAppInfo *appinfo,
|
||||
const char *content_type,
|
||||
GError **error);
|
||||
gboolean (* set_as_default_for_extension) (GAppInfo *appinfo,
|
||||
const char *extension,
|
||||
GError **error);
|
||||
gboolean (* add_supports_type) (GAppInfo *appinfo,
|
||||
const char *content_type,
|
||||
GError **error);
|
||||
gboolean (* can_remove_supports_type) (GAppInfo *appinfo);
|
||||
gboolean (* remove_supports_type) (GAppInfo *appinfo,
|
||||
const char *content_type,
|
||||
GError **error);
|
||||
gboolean (* can_delete) (GAppInfo *appinfo);
|
||||
gboolean (* do_delete) (GAppInfo *appinfo);
|
||||
const char * (* get_commandline) (GAppInfo *appinfo);
|
||||
const char * (* get_display_name) (GAppInfo *appinfo);
|
||||
gboolean (* set_as_last_used_for_type) (GAppInfo *appinfo,
|
||||
const char *content_type,
|
||||
GError **error);
|
||||
const char ** (* get_supported_types) (GAppInfo *appinfo);
|
||||
void (* launch_uris_async) (GAppInfo *appinfo,
|
||||
GList *uris,
|
||||
GAppLaunchContext *context,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (* launch_uris_finish) (GAppInfo *appinfo,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_app_info_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GAppInfo * g_app_info_create_from_commandline (const char *commandline,
|
||||
const char *application_name,
|
||||
GAppInfoCreateFlags flags,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GAppInfo * g_app_info_dup (GAppInfo *appinfo);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_app_info_equal (GAppInfo *appinfo1,
|
||||
GAppInfo *appinfo2);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const char *g_app_info_get_id (GAppInfo *appinfo);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const char *g_app_info_get_name (GAppInfo *appinfo);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const char *g_app_info_get_display_name (GAppInfo *appinfo);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const char *g_app_info_get_description (GAppInfo *appinfo);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const char *g_app_info_get_executable (GAppInfo *appinfo);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const char *g_app_info_get_commandline (GAppInfo *appinfo);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIcon * g_app_info_get_icon (GAppInfo *appinfo);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_app_info_launch (GAppInfo *appinfo,
|
||||
GList *files,
|
||||
GAppLaunchContext *context,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_app_info_supports_uris (GAppInfo *appinfo);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_app_info_supports_files (GAppInfo *appinfo);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_app_info_launch_uris (GAppInfo *appinfo,
|
||||
GList *uris,
|
||||
GAppLaunchContext *context,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_2_60
|
||||
void g_app_info_launch_uris_async (GAppInfo *appinfo,
|
||||
GList *uris,
|
||||
GAppLaunchContext *context,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_2_60
|
||||
gboolean g_app_info_launch_uris_finish (GAppInfo *appinfo,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_app_info_should_show (GAppInfo *appinfo);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_app_info_set_as_default_for_type (GAppInfo *appinfo,
|
||||
const char *content_type,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_app_info_set_as_default_for_extension (GAppInfo *appinfo,
|
||||
const char *extension,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_app_info_add_supports_type (GAppInfo *appinfo,
|
||||
const char *content_type,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_app_info_can_remove_supports_type (GAppInfo *appinfo);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_app_info_remove_supports_type (GAppInfo *appinfo,
|
||||
const char *content_type,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
const char **g_app_info_get_supported_types (GAppInfo *appinfo);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_app_info_can_delete (GAppInfo *appinfo);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_app_info_delete (GAppInfo *appinfo);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_app_info_set_as_last_used_for_type (GAppInfo *appinfo,
|
||||
const char *content_type,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GList * g_app_info_get_all (void);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GList * g_app_info_get_all_for_type (const char *content_type);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GList * g_app_info_get_recommended_for_type (const gchar *content_type);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GList * g_app_info_get_fallback_for_type (const gchar *content_type);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_app_info_reset_type_associations (const char *content_type);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GAppInfo *g_app_info_get_default_for_type (const char *content_type,
|
||||
gboolean must_support_uris);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GAppInfo *g_app_info_get_default_for_uri_scheme (const char *uri_scheme);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_app_info_launch_default_for_uri (const char *uri,
|
||||
GAppLaunchContext *context,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_50
|
||||
void g_app_info_launch_default_for_uri_async (const char *uri,
|
||||
GAppLaunchContext *context,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_2_50
|
||||
gboolean g_app_info_launch_default_for_uri_finish (GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
|
||||
/**
|
||||
* GAppLaunchContext:
|
||||
*
|
||||
* Integrating the launch with the launching application. This is used to
|
||||
* handle for instance startup notification and launching the new application
|
||||
* on the same screen as the launching window.
|
||||
*/
|
||||
struct _GAppLaunchContext
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GAppLaunchContextPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GAppLaunchContextClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
char * (* get_display) (GAppLaunchContext *context,
|
||||
GAppInfo *info,
|
||||
GList *files);
|
||||
char * (* get_startup_notify_id) (GAppLaunchContext *context,
|
||||
GAppInfo *info,
|
||||
GList *files);
|
||||
void (* launch_failed) (GAppLaunchContext *context,
|
||||
const char *startup_notify_id);
|
||||
void (* launched) (GAppLaunchContext *context,
|
||||
GAppInfo *info,
|
||||
GVariant *platform_data);
|
||||
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_app_launch_context_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GAppLaunchContext *g_app_launch_context_new (void);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_app_launch_context_setenv (GAppLaunchContext *context,
|
||||
const char *variable,
|
||||
const char *value);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_app_launch_context_unsetenv (GAppLaunchContext *context,
|
||||
const char *variable);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
char ** g_app_launch_context_get_environment (GAppLaunchContext *context);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char * g_app_launch_context_get_display (GAppLaunchContext *context,
|
||||
GAppInfo *info,
|
||||
GList *files);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char * g_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
|
||||
GAppInfo *info,
|
||||
GList *files);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_app_launch_context_launch_failed (GAppLaunchContext *context,
|
||||
const char * startup_notify_id);
|
||||
|
||||
#define G_TYPE_APP_INFO_MONITOR (g_app_info_monitor_get_type ())
|
||||
#define G_APP_INFO_MONITOR(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_APP_INFO_MONITOR, GAppInfoMonitor))
|
||||
#define G_IS_APP_INFO_MONITOR(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
|
||||
G_TYPE_APP_INFO_MONITOR))
|
||||
|
||||
typedef struct _GAppInfoMonitor GAppInfoMonitor;
|
||||
|
||||
GLIB_AVAILABLE_IN_2_40
|
||||
GType g_app_info_monitor_get_type (void);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_40
|
||||
GAppInfoMonitor * g_app_info_monitor_get (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_APP_INFO_H__ */
|
|
@ -0,0 +1,252 @@
|
|||
/*
|
||||
* Copyright © 2010 Codethink Limited
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#ifndef __G_APPLICATION_H__
|
||||
#define __G_APPLICATION_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_APPLICATION (g_application_get_type ())
|
||||
#define G_APPLICATION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_APPLICATION, GApplication))
|
||||
#define G_APPLICATION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
|
||||
G_TYPE_APPLICATION, GApplicationClass))
|
||||
#define G_IS_APPLICATION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_APPLICATION))
|
||||
#define G_IS_APPLICATION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_APPLICATION))
|
||||
#define G_APPLICATION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
|
||||
G_TYPE_APPLICATION, GApplicationClass))
|
||||
|
||||
typedef struct _GApplicationPrivate GApplicationPrivate;
|
||||
typedef struct _GApplicationClass GApplicationClass;
|
||||
|
||||
struct _GApplication
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
|
||||
GApplicationPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GApplicationClass
|
||||
{
|
||||
/*< private >*/
|
||||
GObjectClass parent_class;
|
||||
|
||||
/*< public >*/
|
||||
/* signals */
|
||||
void (* startup) (GApplication *application);
|
||||
|
||||
void (* activate) (GApplication *application);
|
||||
|
||||
void (* open) (GApplication *application,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
const gchar *hint);
|
||||
|
||||
int (* command_line) (GApplication *application,
|
||||
GApplicationCommandLine *command_line);
|
||||
|
||||
/* vfuncs */
|
||||
|
||||
/**
|
||||
* GApplicationClass::local_command_line:
|
||||
* @application: a #GApplication
|
||||
* @arguments: (inout) (array zero-terminated=1): array of command line arguments
|
||||
* @exit_status: (out): exit status to fill after processing the command line.
|
||||
*
|
||||
* This virtual function is always invoked in the local instance. It
|
||||
* gets passed a pointer to a %NULL-terminated copy of @argv and is
|
||||
* expected to remove arguments that it handled (shifting up remaining
|
||||
* arguments).
|
||||
*
|
||||
* The last argument to local_command_line() is a pointer to the @status
|
||||
* variable which can used to set the exit status that is returned from
|
||||
* g_application_run().
|
||||
*
|
||||
* See g_application_run() for more details on #GApplication startup.
|
||||
*
|
||||
* Returns: %TRUE if the commandline has been completely handled
|
||||
*/
|
||||
gboolean (* local_command_line) (GApplication *application,
|
||||
gchar ***arguments,
|
||||
int *exit_status);
|
||||
|
||||
void (* before_emit) (GApplication *application,
|
||||
GVariant *platform_data);
|
||||
void (* after_emit) (GApplication *application,
|
||||
GVariant *platform_data);
|
||||
void (* add_platform_data) (GApplication *application,
|
||||
GVariantBuilder *builder);
|
||||
void (* quit_mainloop) (GApplication *application);
|
||||
void (* run_mainloop) (GApplication *application);
|
||||
void (* shutdown) (GApplication *application);
|
||||
|
||||
gboolean (* dbus_register) (GApplication *application,
|
||||
GDBusConnection *connection,
|
||||
const gchar *object_path,
|
||||
GError **error);
|
||||
void (* dbus_unregister) (GApplication *application,
|
||||
GDBusConnection *connection,
|
||||
const gchar *object_path);
|
||||
gint (* handle_local_options)(GApplication *application,
|
||||
GVariantDict *options);
|
||||
gboolean (* name_lost) (GApplication *application);
|
||||
|
||||
/*< private >*/
|
||||
gpointer padding[7];
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_application_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_application_id_is_valid (const gchar *application_id);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GApplication * g_application_new (const gchar *application_id,
|
||||
GApplicationFlags flags);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar * g_application_get_application_id (GApplication *application);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_application_set_application_id (GApplication *application,
|
||||
const gchar *application_id);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
GDBusConnection * g_application_get_dbus_connection (GApplication *application);
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
const gchar * g_application_get_dbus_object_path (GApplication *application);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint g_application_get_inactivity_timeout (GApplication *application);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_application_set_inactivity_timeout (GApplication *application,
|
||||
guint inactivity_timeout);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GApplicationFlags g_application_get_flags (GApplication *application);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_application_set_flags (GApplication *application,
|
||||
GApplicationFlags flags);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_42
|
||||
const gchar * g_application_get_resource_base_path (GApplication *application);
|
||||
GLIB_AVAILABLE_IN_2_42
|
||||
void g_application_set_resource_base_path (GApplication *application,
|
||||
const gchar *resource_path);
|
||||
|
||||
GLIB_DEPRECATED
|
||||
void g_application_set_action_group (GApplication *application,
|
||||
GActionGroup *action_group);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_40
|
||||
void g_application_add_main_option_entries (GApplication *application,
|
||||
const GOptionEntry *entries);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_42
|
||||
void g_application_add_main_option (GApplication *application,
|
||||
const char *long_name,
|
||||
char short_name,
|
||||
GOptionFlags flags,
|
||||
GOptionArg arg,
|
||||
const char *description,
|
||||
const char *arg_description);
|
||||
GLIB_AVAILABLE_IN_2_40
|
||||
void g_application_add_option_group (GApplication *application,
|
||||
GOptionGroup *group);
|
||||
GLIB_AVAILABLE_IN_2_56
|
||||
void g_application_set_option_context_parameter_string (GApplication *application,
|
||||
const gchar *parameter_string);
|
||||
GLIB_AVAILABLE_IN_2_56
|
||||
void g_application_set_option_context_summary (GApplication *application,
|
||||
const gchar *summary);
|
||||
GLIB_AVAILABLE_IN_2_56
|
||||
void g_application_set_option_context_description (GApplication *application,
|
||||
const gchar *description);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_application_get_is_registered (GApplication *application);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_application_get_is_remote (GApplication *application);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_application_register (GApplication *application,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_application_hold (GApplication *application);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_application_release (GApplication *application);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_application_activate (GApplication *application);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_application_open (GApplication *application,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
const gchar *hint);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
int g_application_run (GApplication *application,
|
||||
int argc,
|
||||
char **argv);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_application_quit (GApplication *application);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GApplication * g_application_get_default (void);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_application_set_default (GApplication *application);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
void g_application_mark_busy (GApplication *application);
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
void g_application_unmark_busy (GApplication *application);
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
gboolean g_application_get_is_busy (GApplication *application);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_40
|
||||
void g_application_send_notification (GApplication *application,
|
||||
const gchar *id,
|
||||
GNotification *notification);
|
||||
GLIB_AVAILABLE_IN_2_40
|
||||
void g_application_withdraw_notification (GApplication *application,
|
||||
const gchar *id);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
void g_application_bind_busy_property (GApplication *application,
|
||||
gpointer object,
|
||||
const gchar *property);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
void g_application_unbind_busy_property (GApplication *application,
|
||||
gpointer object,
|
||||
const gchar *property);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_APPLICATION_H__ */
|
|
@ -0,0 +1,122 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright © 2010 Codethink Limited
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#ifndef __G_APPLICATION_COMMAND_LINE_H__
|
||||
#define __G_APPLICATION_COMMAND_LINE_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_APPLICATION_COMMAND_LINE (g_application_command_line_get_type ())
|
||||
#define G_APPLICATION_COMMAND_LINE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_APPLICATION_COMMAND_LINE, \
|
||||
GApplicationCommandLine))
|
||||
#define G_APPLICATION_COMMAND_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
|
||||
G_TYPE_APPLICATION_COMMAND_LINE, \
|
||||
GApplicationCommandLineClass))
|
||||
#define G_IS_APPLICATION_COMMAND_LINE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
|
||||
G_TYPE_APPLICATION_COMMAND_LINE))
|
||||
#define G_IS_APPLICATION_COMMAND_LINE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
|
||||
G_TYPE_APPLICATION_COMMAND_LINE))
|
||||
#define G_APPLICATION_COMMAND_LINE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
|
||||
G_TYPE_APPLICATION_COMMAND_LINE, \
|
||||
GApplicationCommandLineClass))
|
||||
|
||||
typedef struct _GApplicationCommandLinePrivate GApplicationCommandLinePrivate;
|
||||
typedef struct _GApplicationCommandLineClass GApplicationCommandLineClass;
|
||||
|
||||
struct _GApplicationCommandLine
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
|
||||
GApplicationCommandLinePrivate *priv;
|
||||
};
|
||||
|
||||
struct _GApplicationCommandLineClass
|
||||
{
|
||||
/*< private >*/
|
||||
GObjectClass parent_class;
|
||||
|
||||
void (* print_literal) (GApplicationCommandLine *cmdline,
|
||||
const gchar *message);
|
||||
void (* printerr_literal) (GApplicationCommandLine *cmdline,
|
||||
const gchar *message);
|
||||
GInputStream * (* get_stdin) (GApplicationCommandLine *cmdline);
|
||||
|
||||
gpointer padding[11];
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_application_command_line_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar ** g_application_command_line_get_arguments (GApplicationCommandLine *cmdline,
|
||||
int *argc);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_40
|
||||
GVariantDict * g_application_command_line_get_options_dict (GApplicationCommandLine *cmdline);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_36
|
||||
GInputStream * g_application_command_line_get_stdin (GApplicationCommandLine *cmdline);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar * const * g_application_command_line_get_environ (GApplicationCommandLine *cmdline);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar * g_application_command_line_getenv (GApplicationCommandLine *cmdline,
|
||||
const gchar *name);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar * g_application_command_line_get_cwd (GApplicationCommandLine *cmdline);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_application_command_line_get_is_remote (GApplicationCommandLine *cmdline);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_application_command_line_print (GApplicationCommandLine *cmdline,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF(2, 3);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_application_command_line_printerr (GApplicationCommandLine *cmdline,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF(2, 3);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
int g_application_command_line_get_exit_status (GApplicationCommandLine *cmdline);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_application_command_line_set_exit_status (GApplicationCommandLine *cmdline,
|
||||
int exit_status);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant * g_application_command_line_get_platform_data (GApplicationCommandLine *cmdline);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_36
|
||||
GFile * g_application_command_line_create_file_for_arg (GApplicationCommandLine *cmdline,
|
||||
const gchar *arg);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_APPLICATION_COMMAND_LINE_H__ */
|
|
@ -0,0 +1,130 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2009 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_ASYNC_INITABLE_H__
|
||||
#define __G_ASYNC_INITABLE_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
#include <gio/ginitable.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_ASYNC_INITABLE (g_async_initable_get_type ())
|
||||
#define G_ASYNC_INITABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_ASYNC_INITABLE, GAsyncInitable))
|
||||
#define G_IS_ASYNC_INITABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_ASYNC_INITABLE))
|
||||
#define G_ASYNC_INITABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_ASYNC_INITABLE, GAsyncInitableIface))
|
||||
#define G_TYPE_IS_ASYNC_INITABLE(type) (g_type_is_a ((type), G_TYPE_ASYNC_INITABLE))
|
||||
|
||||
/**
|
||||
* GAsyncInitable:
|
||||
*
|
||||
* Interface for asynchronously initializable objects.
|
||||
*
|
||||
* Since: 2.22
|
||||
**/
|
||||
typedef struct _GAsyncInitableIface GAsyncInitableIface;
|
||||
|
||||
/**
|
||||
* GAsyncInitableIface:
|
||||
* @g_iface: The parent interface.
|
||||
* @init_async: Starts initialization of the object.
|
||||
* @init_finish: Finishes initialization of the object.
|
||||
*
|
||||
* Provides an interface for asynchronous initializing object such that
|
||||
* initialization may fail.
|
||||
*
|
||||
* Since: 2.22
|
||||
**/
|
||||
struct _GAsyncInitableIface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
/* Virtual Table */
|
||||
|
||||
void (* init_async) (GAsyncInitable *initable,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (* init_finish) (GAsyncInitable *initable,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_async_initable_get_type (void) G_GNUC_CONST;
|
||||
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_async_initable_init_async (GAsyncInitable *initable,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_async_initable_init_finish (GAsyncInitable *initable,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_async_initable_new_async (GType object_type,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data,
|
||||
const gchar *first_property_name,
|
||||
...);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
GLIB_DEPRECATED_IN_2_54_FOR(g_object_new_with_properties and g_async_initable_init_async)
|
||||
void g_async_initable_newv_async (GType object_type,
|
||||
guint n_parameters,
|
||||
GParameter *parameters,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_async_initable_new_valist_async (GType object_type,
|
||||
const gchar *first_property_name,
|
||||
va_list var_args,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GObject *g_async_initable_new_finish (GAsyncInitable *initable,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
#endif /* __G_ASYNC_INITABLE_H__ */
|
|
@ -0,0 +1,85 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_ASYNC_RESULT_H__
|
||||
#define __G_ASYNC_RESULT_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_ASYNC_RESULT (g_async_result_get_type ())
|
||||
#define G_ASYNC_RESULT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_ASYNC_RESULT, GAsyncResult))
|
||||
#define G_IS_ASYNC_RESULT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_ASYNC_RESULT))
|
||||
#define G_ASYNC_RESULT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_ASYNC_RESULT, GAsyncResultIface))
|
||||
|
||||
/**
|
||||
* GAsyncResult:
|
||||
*
|
||||
* Holds results information for an asynchronous operation,
|
||||
* usually passed directly to an asynchronous _finish() operation.
|
||||
**/
|
||||
typedef struct _GAsyncResultIface GAsyncResultIface;
|
||||
|
||||
|
||||
/**
|
||||
* GAsyncResultIface:
|
||||
* @g_iface: The parent interface.
|
||||
* @get_user_data: Gets the user data passed to the callback.
|
||||
* @get_source_object: Gets the source object that issued the asynchronous operation.
|
||||
* @is_tagged: Checks if a result is tagged with a particular source.
|
||||
*
|
||||
* Interface definition for #GAsyncResult.
|
||||
**/
|
||||
struct _GAsyncResultIface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
/* Virtual Table */
|
||||
|
||||
gpointer (* get_user_data) (GAsyncResult *res);
|
||||
GObject * (* get_source_object) (GAsyncResult *res);
|
||||
|
||||
gboolean (* is_tagged) (GAsyncResult *res,
|
||||
gpointer source_tag);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_async_result_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gpointer g_async_result_get_user_data (GAsyncResult *res);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GObject *g_async_result_get_source_object (GAsyncResult *res);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
gboolean g_async_result_legacy_propagate_error (GAsyncResult *res,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
gboolean g_async_result_is_tagged (GAsyncResult *res,
|
||||
gpointer source_tag);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_ASYNC_RESULT_H__ */
|
|
@ -0,0 +1,133 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Christian Kellner <gicmo@gnome.org>
|
||||
*/
|
||||
|
||||
#ifndef __G_BUFFERED_INPUT_STREAM_H__
|
||||
#define __G_BUFFERED_INPUT_STREAM_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gfilterinputstream.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_BUFFERED_INPUT_STREAM (g_buffered_input_stream_get_type ())
|
||||
#define G_BUFFERED_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_BUFFERED_INPUT_STREAM, GBufferedInputStream))
|
||||
#define G_BUFFERED_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_BUFFERED_INPUT_STREAM, GBufferedInputStreamClass))
|
||||
#define G_IS_BUFFERED_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_BUFFERED_INPUT_STREAM))
|
||||
#define G_IS_BUFFERED_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_BUFFERED_INPUT_STREAM))
|
||||
#define G_BUFFERED_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_BUFFERED_INPUT_STREAM, GBufferedInputStreamClass))
|
||||
|
||||
/**
|
||||
* GBufferedInputStream:
|
||||
*
|
||||
* Implements #GFilterInputStream with a sized input buffer.
|
||||
**/
|
||||
typedef struct _GBufferedInputStreamClass GBufferedInputStreamClass;
|
||||
typedef struct _GBufferedInputStreamPrivate GBufferedInputStreamPrivate;
|
||||
|
||||
struct _GBufferedInputStream
|
||||
{
|
||||
GFilterInputStream parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GBufferedInputStreamPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GBufferedInputStreamClass
|
||||
{
|
||||
GFilterInputStreamClass parent_class;
|
||||
|
||||
gssize (* fill) (GBufferedInputStream *stream,
|
||||
gssize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
/* Async ops: (optional in derived classes) */
|
||||
void (* fill_async) (GBufferedInputStream *stream,
|
||||
gssize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gssize (* fill_finish) (GBufferedInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
};
|
||||
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_buffered_input_stream_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GInputStream* g_buffered_input_stream_new (GInputStream *base_stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GInputStream* g_buffered_input_stream_new_sized (GInputStream *base_stream,
|
||||
gsize size);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gsize g_buffered_input_stream_get_buffer_size (GBufferedInputStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_buffered_input_stream_set_buffer_size (GBufferedInputStream *stream,
|
||||
gsize size);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gsize g_buffered_input_stream_get_available (GBufferedInputStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gsize g_buffered_input_stream_peek (GBufferedInputStream *stream,
|
||||
void *buffer,
|
||||
gsize offset,
|
||||
gsize count);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const void* g_buffered_input_stream_peek_buffer (GBufferedInputStream *stream,
|
||||
gsize *count);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gssize g_buffered_input_stream_fill (GBufferedInputStream *stream,
|
||||
gssize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_buffered_input_stream_fill_async (GBufferedInputStream *stream,
|
||||
gssize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gssize g_buffered_input_stream_fill_finish (GBufferedInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
int g_buffered_input_stream_read_byte (GBufferedInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_BUFFERED_INPUT_STREAM_H__ */
|
|
@ -0,0 +1,86 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Christian Kellner <gicmo@gnome.org>
|
||||
*/
|
||||
|
||||
#ifndef __G_BUFFERED_OUTPUT_STREAM_H__
|
||||
#define __G_BUFFERED_OUTPUT_STREAM_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gfilteroutputstream.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_BUFFERED_OUTPUT_STREAM (g_buffered_output_stream_get_type ())
|
||||
#define G_BUFFERED_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_BUFFERED_OUTPUT_STREAM, GBufferedOutputStream))
|
||||
#define G_BUFFERED_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_BUFFERED_OUTPUT_STREAM, GBufferedOutputStreamClass))
|
||||
#define G_IS_BUFFERED_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_BUFFERED_OUTPUT_STREAM))
|
||||
#define G_IS_BUFFERED_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_BUFFERED_OUTPUT_STREAM))
|
||||
#define G_BUFFERED_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_BUFFERED_OUTPUT_STREAM, GBufferedOutputStreamClass))
|
||||
|
||||
/**
|
||||
* GBufferedOutputStream:
|
||||
*
|
||||
* An implementation of #GFilterOutputStream with a sized buffer.
|
||||
**/
|
||||
typedef struct _GBufferedOutputStreamClass GBufferedOutputStreamClass;
|
||||
typedef struct _GBufferedOutputStreamPrivate GBufferedOutputStreamPrivate;
|
||||
|
||||
struct _GBufferedOutputStream
|
||||
{
|
||||
GFilterOutputStream parent_instance;
|
||||
|
||||
/*< protected >*/
|
||||
GBufferedOutputStreamPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GBufferedOutputStreamClass
|
||||
{
|
||||
GFilterOutputStreamClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
};
|
||||
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_buffered_output_stream_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GOutputStream* g_buffered_output_stream_new (GOutputStream *base_stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GOutputStream* g_buffered_output_stream_new_sized (GOutputStream *base_stream,
|
||||
gsize size);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gsize g_buffered_output_stream_get_buffer_size (GBufferedOutputStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_buffered_output_stream_set_buffer_size (GBufferedOutputStream *stream,
|
||||
gsize size);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_buffered_output_stream_get_auto_grow (GBufferedOutputStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_buffered_output_stream_set_auto_grow (GBufferedOutputStream *stream,
|
||||
gboolean auto_grow);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_BUFFERED_OUTPUT_STREAM_H__ */
|
|
@ -0,0 +1,52 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#ifndef __G_BYTES_ICON_H__
|
||||
#define __G_BYTES_ICON_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_BYTES_ICON (g_bytes_icon_get_type ())
|
||||
#define G_BYTES_ICON(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_BYTES_ICON, GBytesIcon))
|
||||
#define G_IS_BYTES_ICON(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_BYTES_ICON))
|
||||
|
||||
/**
|
||||
* GBytesIcon:
|
||||
*
|
||||
* Gets an icon for a #GBytes. Implements #GLoadableIcon.
|
||||
**/
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
GType g_bytes_icon_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
GIcon * g_bytes_icon_new (GBytes *bytes);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
GBytes * g_bytes_icon_get_bytes (GBytesIcon *icon);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_BYTES_ICON_H__ */
|
|
@ -0,0 +1,118 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_CANCELLABLE_H__
|
||||
#define __G_CANCELLABLE_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_CANCELLABLE (g_cancellable_get_type ())
|
||||
#define G_CANCELLABLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CANCELLABLE, GCancellable))
|
||||
#define G_CANCELLABLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CANCELLABLE, GCancellableClass))
|
||||
#define G_IS_CANCELLABLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CANCELLABLE))
|
||||
#define G_IS_CANCELLABLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CANCELLABLE))
|
||||
#define G_CANCELLABLE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CANCELLABLE, GCancellableClass))
|
||||
|
||||
/**
|
||||
* GCancellable:
|
||||
*
|
||||
* Allows actions to be cancelled.
|
||||
*/
|
||||
typedef struct _GCancellableClass GCancellableClass;
|
||||
typedef struct _GCancellablePrivate GCancellablePrivate;
|
||||
|
||||
struct _GCancellable
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GCancellablePrivate *priv;
|
||||
};
|
||||
|
||||
struct _GCancellableClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
void (* cancelled) (GCancellable *cancellable);
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_cancellable_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GCancellable *g_cancellable_new (void);
|
||||
|
||||
/* These are only safe to call inside a cancellable op */
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_cancellable_is_cancelled (GCancellable *cancellable);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_cancellable_set_error_if_cancelled (GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
int g_cancellable_get_fd (GCancellable *cancellable);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_cancellable_make_pollfd (GCancellable *cancellable,
|
||||
GPollFD *pollfd);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_cancellable_release_fd (GCancellable *cancellable);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GSource * g_cancellable_source_new (GCancellable *cancellable);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GCancellable *g_cancellable_get_current (void);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_cancellable_push_current (GCancellable *cancellable);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_cancellable_pop_current (GCancellable *cancellable);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_cancellable_reset (GCancellable *cancellable);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gulong g_cancellable_connect (GCancellable *cancellable,
|
||||
GCallback callback,
|
||||
gpointer data,
|
||||
GDestroyNotify data_destroy_func);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_cancellable_disconnect (GCancellable *cancellable,
|
||||
gulong handler_id);
|
||||
|
||||
|
||||
/* This is safe to call from another thread */
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_cancellable_cancel (GCancellable *cancellable);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_CANCELLABLE_H__ */
|
|
@ -0,0 +1,63 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2009 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_CHARSET_CONVERTER_H__
|
||||
#define __G_CHARSET_CONVERTER_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gconverter.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_CHARSET_CONVERTER (g_charset_converter_get_type ())
|
||||
#define G_CHARSET_CONVERTER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CHARSET_CONVERTER, GCharsetConverter))
|
||||
#define G_CHARSET_CONVERTER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CHARSET_CONVERTER, GCharsetConverterClass))
|
||||
#define G_IS_CHARSET_CONVERTER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CHARSET_CONVERTER))
|
||||
#define G_IS_CHARSET_CONVERTER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CHARSET_CONVERTER))
|
||||
#define G_CHARSET_CONVERTER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CHARSET_CONVERTER, GCharsetConverterClass))
|
||||
|
||||
typedef struct _GCharsetConverterClass GCharsetConverterClass;
|
||||
|
||||
struct _GCharsetConverterClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_charset_converter_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GCharsetConverter *g_charset_converter_new (const gchar *to_charset,
|
||||
const gchar *from_charset,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_charset_converter_set_use_fallback (GCharsetConverter *converter,
|
||||
gboolean use_fallback);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_charset_converter_get_use_fallback (GCharsetConverter *converter);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint g_charset_converter_get_num_fallbacks (GCharsetConverter *converter);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_CHARSET_CONVERTER_H__ */
|
|
@ -0,0 +1,82 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_CONTENT_TYPE_H__
|
||||
#define __G_CONTENT_TYPE_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_content_type_equals (const gchar *type1,
|
||||
const gchar *type2);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_content_type_is_a (const gchar *type,
|
||||
const gchar *supertype);
|
||||
GLIB_AVAILABLE_IN_2_52
|
||||
gboolean g_content_type_is_mime_type (const gchar *type,
|
||||
const gchar *mime_type);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_content_type_is_unknown (const gchar *type);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar * g_content_type_get_description (const gchar *type);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar * g_content_type_get_mime_type (const gchar *type);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIcon * g_content_type_get_icon (const gchar *type);
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
GIcon * g_content_type_get_symbolic_icon (const gchar *type);
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
gchar * g_content_type_get_generic_icon_name (const gchar *type);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_content_type_can_be_executable (const gchar *type);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar * g_content_type_from_mime_type (const gchar *mime_type);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar * g_content_type_guess (const gchar *filename,
|
||||
const guchar *data,
|
||||
gsize data_size,
|
||||
gboolean *result_uncertain);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar ** g_content_type_guess_for_tree (GFile *root);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GList * g_content_types_get_registered (void);
|
||||
|
||||
/*< private >*/
|
||||
#ifndef __GTK_DOC_IGNORE__
|
||||
GLIB_AVAILABLE_IN_2_60
|
||||
const gchar * const *g_content_type_get_mime_dirs (void);
|
||||
GLIB_AVAILABLE_IN_2_60
|
||||
void g_content_type_set_mime_dirs (const gchar * const *dirs);
|
||||
#endif /* __GTK_DOC_IGNORE__ */
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_CONTENT_TYPE_H__ */
|
|
@ -0,0 +1,96 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2009 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_CONVERTER_H__
|
||||
#define __G_CONVERTER_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_CONVERTER (g_converter_get_type ())
|
||||
#define G_CONVERTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_CONVERTER, GConverter))
|
||||
#define G_IS_CONVERTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_CONVERTER))
|
||||
#define G_CONVERTER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_CONVERTER, GConverterIface))
|
||||
|
||||
/**
|
||||
* GConverter:
|
||||
*
|
||||
* Seek object for streaming operations.
|
||||
*
|
||||
* Since: 2.24
|
||||
**/
|
||||
typedef struct _GConverterIface GConverterIface;
|
||||
|
||||
/**
|
||||
* GConverterIface:
|
||||
* @g_iface: The parent interface.
|
||||
* @convert: Converts data.
|
||||
* @reset: Reverts the internal state of the converter to its initial state.
|
||||
*
|
||||
* Provides an interface for converting data from one type
|
||||
* to another type. The conversion can be stateful
|
||||
* and may fail at any place.
|
||||
*
|
||||
* Since: 2.24
|
||||
**/
|
||||
struct _GConverterIface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
/* Virtual Table */
|
||||
|
||||
GConverterResult (* convert) (GConverter *converter,
|
||||
const void *inbuf,
|
||||
gsize inbuf_size,
|
||||
void *outbuf,
|
||||
gsize outbuf_size,
|
||||
GConverterFlags flags,
|
||||
gsize *bytes_read,
|
||||
gsize *bytes_written,
|
||||
GError **error);
|
||||
void (* reset) (GConverter *converter);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_converter_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GConverterResult g_converter_convert (GConverter *converter,
|
||||
const void *inbuf,
|
||||
gsize inbuf_size,
|
||||
void *outbuf,
|
||||
gsize outbuf_size,
|
||||
GConverterFlags flags,
|
||||
gsize *bytes_read,
|
||||
gsize *bytes_written,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_converter_reset (GConverter *converter);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
#endif /* __G_CONVERTER_H__ */
|
|
@ -0,0 +1,80 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2009 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_CONVERTER_INPUT_STREAM_H__
|
||||
#define __G_CONVERTER_INPUT_STREAM_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gfilterinputstream.h>
|
||||
#include <gio/gconverter.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_CONVERTER_INPUT_STREAM (g_converter_input_stream_get_type ())
|
||||
#define G_CONVERTER_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CONVERTER_INPUT_STREAM, GConverterInputStream))
|
||||
#define G_CONVERTER_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CONVERTER_INPUT_STREAM, GConverterInputStreamClass))
|
||||
#define G_IS_CONVERTER_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CONVERTER_INPUT_STREAM))
|
||||
#define G_IS_CONVERTER_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CONVERTER_INPUT_STREAM))
|
||||
#define G_CONVERTER_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CONVERTER_INPUT_STREAM, GConverterInputStreamClass))
|
||||
|
||||
/**
|
||||
* GConverterInputStream:
|
||||
*
|
||||
* An implementation of #GFilterInputStream that allows data
|
||||
* conversion.
|
||||
**/
|
||||
typedef struct _GConverterInputStreamClass GConverterInputStreamClass;
|
||||
typedef struct _GConverterInputStreamPrivate GConverterInputStreamPrivate;
|
||||
|
||||
struct _GConverterInputStream
|
||||
{
|
||||
GFilterInputStream parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GConverterInputStreamPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GConverterInputStreamClass
|
||||
{
|
||||
GFilterInputStreamClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_converter_input_stream_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GInputStream *g_converter_input_stream_new (GInputStream *base_stream,
|
||||
GConverter *converter);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GConverter *g_converter_input_stream_get_converter (GConverterInputStream *converter_stream);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_CONVERTER_INPUT_STREAM_H__ */
|
|
@ -0,0 +1,80 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2009 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_CONVERTER_OUTPUT_STREAM_H__
|
||||
#define __G_CONVERTER_OUTPUT_STREAM_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gfilteroutputstream.h>
|
||||
#include <gio/gconverter.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_CONVERTER_OUTPUT_STREAM (g_converter_output_stream_get_type ())
|
||||
#define G_CONVERTER_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CONVERTER_OUTPUT_STREAM, GConverterOutputStream))
|
||||
#define G_CONVERTER_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CONVERTER_OUTPUT_STREAM, GConverterOutputStreamClass))
|
||||
#define G_IS_CONVERTER_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CONVERTER_OUTPUT_STREAM))
|
||||
#define G_IS_CONVERTER_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CONVERTER_OUTPUT_STREAM))
|
||||
#define G_CONVERTER_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CONVERTER_OUTPUT_STREAM, GConverterOutputStreamClass))
|
||||
|
||||
/**
|
||||
* GConverterOutputStream:
|
||||
*
|
||||
* An implementation of #GFilterOutputStream that allows data
|
||||
* conversion.
|
||||
**/
|
||||
typedef struct _GConverterOutputStreamClass GConverterOutputStreamClass;
|
||||
typedef struct _GConverterOutputStreamPrivate GConverterOutputStreamPrivate;
|
||||
|
||||
struct _GConverterOutputStream
|
||||
{
|
||||
GFilterOutputStream parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GConverterOutputStreamPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GConverterOutputStreamClass
|
||||
{
|
||||
GFilterOutputStreamClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_converter_output_stream_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GOutputStream *g_converter_output_stream_new (GOutputStream *base_stream,
|
||||
GConverter *converter);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GConverter *g_converter_output_stream_get_converter (GConverterOutputStream *converter_stream);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_CONVERTER_OUTPUT_STREAM_H__ */
|
|
@ -0,0 +1,85 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_CREDENTIALS_H__
|
||||
#define __G_CREDENTIALS_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
#ifdef G_OS_UNIX
|
||||
/* To get the uid_t type */
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_CREDENTIALS (g_credentials_get_type ())
|
||||
#define G_CREDENTIALS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_CREDENTIALS, GCredentials))
|
||||
#define G_CREDENTIALS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_CREDENTIALS, GCredentialsClass))
|
||||
#define G_CREDENTIALS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_CREDENTIALS, GCredentialsClass))
|
||||
#define G_IS_CREDENTIALS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_CREDENTIALS))
|
||||
#define G_IS_CREDENTIALS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_CREDENTIALS))
|
||||
|
||||
typedef struct _GCredentialsClass GCredentialsClass;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_credentials_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GCredentials *g_credentials_new (void);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar *g_credentials_to_string (GCredentials *credentials);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gpointer g_credentials_get_native (GCredentials *credentials,
|
||||
GCredentialsType native_type);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_credentials_set_native (GCredentials *credentials,
|
||||
GCredentialsType native_type,
|
||||
gpointer native);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_credentials_is_same_user (GCredentials *credentials,
|
||||
GCredentials *other_credentials,
|
||||
GError **error);
|
||||
|
||||
#ifdef G_OS_UNIX
|
||||
GLIB_AVAILABLE_IN_2_36
|
||||
pid_t g_credentials_get_unix_pid (GCredentials *credentials,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
uid_t g_credentials_get_unix_user (GCredentials *credentials,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_credentials_set_unix_user (GCredentials *credentials,
|
||||
uid_t uid,
|
||||
GError **error);
|
||||
#endif
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_PROXY_H__ */
|
|
@ -0,0 +1,144 @@
|
|||
/*
|
||||
* Copyright 2015 Collabora Ltd.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Philip Withnall <philip.withnall@collabora.co.uk>
|
||||
*/
|
||||
|
||||
#ifndef __G_DATAGRAM_BASED_H__
|
||||
#define __G_DATAGRAM_BASED_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DATAGRAM_BASED (g_datagram_based_get_type ())
|
||||
#define G_DATAGRAM_BASED(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_DATAGRAM_BASED, GDatagramBased))
|
||||
#define G_IS_DATAGRAM_BASED(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
|
||||
G_TYPE_DATAGRAM_BASED))
|
||||
#define G_DATAGRAM_BASED_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
|
||||
G_TYPE_DATAGRAM_BASED, \
|
||||
GDatagramBasedInterface))
|
||||
#define G_TYPE_IS_DATAGRAM_BASED(type) (g_type_is_a ((type), \
|
||||
G_TYPE_DATAGRAM_BASED))
|
||||
|
||||
/**
|
||||
* GDatagramBased:
|
||||
*
|
||||
* Interface for socket-like objects with datagram semantics.
|
||||
*
|
||||
* Since: 2.48
|
||||
*/
|
||||
typedef struct _GDatagramBasedInterface GDatagramBasedInterface;
|
||||
|
||||
/**
|
||||
* GDatagramBasedInterface:
|
||||
* @g_iface: The parent interface.
|
||||
* @receive_messages: Virtual method for g_datagram_based_receive_messages().
|
||||
* @send_messages: Virtual method for g_datagram_based_send_messages().
|
||||
* @create_source: Virtual method for g_datagram_based_create_source().
|
||||
* @condition_check: Virtual method for g_datagram_based_condition_check().
|
||||
* @condition_wait: Virtual method for
|
||||
* g_datagram_based_condition_wait().
|
||||
*
|
||||
* Provides an interface for socket-like objects which have datagram semantics,
|
||||
* following the Berkeley sockets API. The interface methods are thin wrappers
|
||||
* around the corresponding virtual methods, and no pre-processing of inputs is
|
||||
* implemented — so implementations of this API must handle all functionality
|
||||
* documented in the interface methods.
|
||||
*
|
||||
* Since: 2.48
|
||||
*/
|
||||
struct _GDatagramBasedInterface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
/* Virtual table */
|
||||
gint (*receive_messages) (GDatagramBased *datagram_based,
|
||||
GInputMessage *messages,
|
||||
guint num_messages,
|
||||
gint flags,
|
||||
gint64 timeout,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
gint (*send_messages) (GDatagramBased *datagram_based,
|
||||
GOutputMessage *messages,
|
||||
guint num_messages,
|
||||
gint flags,
|
||||
gint64 timeout,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GSource *(*create_source) (GDatagramBased *datagram_based,
|
||||
GIOCondition condition,
|
||||
GCancellable *cancellable);
|
||||
GIOCondition (*condition_check) (GDatagramBased *datagram_based,
|
||||
GIOCondition condition);
|
||||
gboolean (*condition_wait) (GDatagramBased *datagram_based,
|
||||
GIOCondition condition,
|
||||
gint64 timeout,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
GType
|
||||
g_datagram_based_get_type (void);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
gint
|
||||
g_datagram_based_receive_messages (GDatagramBased *datagram_based,
|
||||
GInputMessage *messages,
|
||||
guint num_messages,
|
||||
gint flags,
|
||||
gint64 timeout,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
gint
|
||||
g_datagram_based_send_messages (GDatagramBased *datagram_based,
|
||||
GOutputMessage *messages,
|
||||
guint num_messages,
|
||||
gint flags,
|
||||
gint64 timeout,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
GSource *
|
||||
g_datagram_based_create_source (GDatagramBased *datagram_based,
|
||||
GIOCondition condition,
|
||||
GCancellable *cancellable);
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
GIOCondition
|
||||
g_datagram_based_condition_check (GDatagramBased *datagram_based,
|
||||
GIOCondition condition);
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
gboolean
|
||||
g_datagram_based_condition_wait (GDatagramBased *datagram_based,
|
||||
GIOCondition condition,
|
||||
gint64 timeout,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DATAGRAM_BASED_H__ */
|
|
@ -0,0 +1,180 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DATA_INPUT_STREAM_H__
|
||||
#define __G_DATA_INPUT_STREAM_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gbufferedinputstream.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DATA_INPUT_STREAM (g_data_input_stream_get_type ())
|
||||
#define G_DATA_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DATA_INPUT_STREAM, GDataInputStream))
|
||||
#define G_DATA_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DATA_INPUT_STREAM, GDataInputStreamClass))
|
||||
#define G_IS_DATA_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DATA_INPUT_STREAM))
|
||||
#define G_IS_DATA_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DATA_INPUT_STREAM))
|
||||
#define G_DATA_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DATA_INPUT_STREAM, GDataInputStreamClass))
|
||||
|
||||
/**
|
||||
* GDataInputStream:
|
||||
*
|
||||
* An implementation of #GBufferedInputStream that allows for high-level
|
||||
* data manipulation of arbitrary data (including binary operations).
|
||||
**/
|
||||
typedef struct _GDataInputStreamClass GDataInputStreamClass;
|
||||
typedef struct _GDataInputStreamPrivate GDataInputStreamPrivate;
|
||||
|
||||
struct _GDataInputStream
|
||||
{
|
||||
GBufferedInputStream parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GDataInputStreamPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GDataInputStreamClass
|
||||
{
|
||||
GBufferedInputStreamClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_data_input_stream_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDataInputStream * g_data_input_stream_new (GInputStream *base_stream);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_data_input_stream_set_byte_order (GDataInputStream *stream,
|
||||
GDataStreamByteOrder order);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDataStreamByteOrder g_data_input_stream_get_byte_order (GDataInputStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_data_input_stream_set_newline_type (GDataInputStream *stream,
|
||||
GDataStreamNewlineType type);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDataStreamNewlineType g_data_input_stream_get_newline_type (GDataInputStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guchar g_data_input_stream_read_byte (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gint16 g_data_input_stream_read_int16 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint16 g_data_input_stream_read_uint16 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gint32 g_data_input_stream_read_int32 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint32 g_data_input_stream_read_uint32 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gint64 g_data_input_stream_read_int64 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint64 g_data_input_stream_read_uint64 (GDataInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char * g_data_input_stream_read_line (GDataInputStream *stream,
|
||||
gsize *length,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
char * g_data_input_stream_read_line_utf8 (GDataInputStream *stream,
|
||||
gsize *length,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_data_input_stream_read_line_async (GDataInputStream *stream,
|
||||
gint io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char * g_data_input_stream_read_line_finish (GDataInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
gsize *length,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
char * g_data_input_stream_read_line_finish_utf8(GDataInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
gsize *length,
|
||||
GError **error);
|
||||
GLIB_DEPRECATED_IN_2_56_FOR (g_data_input_stream_read_upto)
|
||||
char * g_data_input_stream_read_until (GDataInputStream *stream,
|
||||
const gchar *stop_chars,
|
||||
gsize *length,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_DEPRECATED_IN_2_56_FOR (g_data_input_stream_read_upto_async)
|
||||
void g_data_input_stream_read_until_async (GDataInputStream *stream,
|
||||
const gchar *stop_chars,
|
||||
gint io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_DEPRECATED_IN_2_56_FOR (g_data_input_stream_read_upto_finish)
|
||||
char * g_data_input_stream_read_until_finish (GDataInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
gsize *length,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char * g_data_input_stream_read_upto (GDataInputStream *stream,
|
||||
const gchar *stop_chars,
|
||||
gssize stop_chars_len,
|
||||
gsize *length,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_data_input_stream_read_upto_async (GDataInputStream *stream,
|
||||
const gchar *stop_chars,
|
||||
gssize stop_chars_len,
|
||||
gint io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char * g_data_input_stream_read_upto_finish (GDataInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
gsize *length,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DATA_INPUT_STREAM_H__ */
|
|
@ -0,0 +1,125 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DATA_OUTPUT_STREAM_H__
|
||||
#define __G_DATA_OUTPUT_STREAM_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gfilteroutputstream.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DATA_OUTPUT_STREAM (g_data_output_stream_get_type ())
|
||||
#define G_DATA_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DATA_OUTPUT_STREAM, GDataOutputStream))
|
||||
#define G_DATA_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DATA_OUTPUT_STREAM, GDataOutputStreamClass))
|
||||
#define G_IS_DATA_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DATA_OUTPUT_STREAM))
|
||||
#define G_IS_DATA_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DATA_OUTPUT_STREAM))
|
||||
#define G_DATA_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DATA_OUTPUT_STREAM, GDataOutputStreamClass))
|
||||
|
||||
/**
|
||||
* GDataOutputStream:
|
||||
*
|
||||
* An implementation of #GBufferedOutputStream that allows for high-level
|
||||
* data manipulation of arbitrary data (including binary operations).
|
||||
**/
|
||||
typedef struct _GDataOutputStream GDataOutputStream;
|
||||
typedef struct _GDataOutputStreamClass GDataOutputStreamClass;
|
||||
typedef struct _GDataOutputStreamPrivate GDataOutputStreamPrivate;
|
||||
|
||||
struct _GDataOutputStream
|
||||
{
|
||||
GFilterOutputStream parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GDataOutputStreamPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GDataOutputStreamClass
|
||||
{
|
||||
GFilterOutputStreamClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
};
|
||||
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_data_output_stream_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDataOutputStream * g_data_output_stream_new (GOutputStream *base_stream);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_data_output_stream_set_byte_order (GDataOutputStream *stream,
|
||||
GDataStreamByteOrder order);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDataStreamByteOrder g_data_output_stream_get_byte_order (GDataOutputStream *stream);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_data_output_stream_put_byte (GDataOutputStream *stream,
|
||||
guchar data,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_data_output_stream_put_int16 (GDataOutputStream *stream,
|
||||
gint16 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_data_output_stream_put_uint16 (GDataOutputStream *stream,
|
||||
guint16 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_data_output_stream_put_int32 (GDataOutputStream *stream,
|
||||
gint32 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_data_output_stream_put_uint32 (GDataOutputStream *stream,
|
||||
guint32 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_data_output_stream_put_int64 (GDataOutputStream *stream,
|
||||
gint64 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_data_output_stream_put_uint64 (GDataOutputStream *stream,
|
||||
guint64 data,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_data_output_stream_put_string (GDataOutputStream *stream,
|
||||
const char *str,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DATA_OUTPUT_STREAM_H__ */
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright © 2010 Codethink Limited
|
||||
* Copyright © 2011 Canonical Limited
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_ACTION_GROUP_H__
|
||||
#define __G_DBUS_ACTION_GROUP_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include "giotypes.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DBUS_ACTION_GROUP (g_dbus_action_group_get_type ())
|
||||
#define G_DBUS_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_DBUS_ACTION_GROUP, GDBusActionGroup))
|
||||
#define G_DBUS_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
|
||||
G_TYPE_DBUS_ACTION_GROUP, GDBusActionGroupClass))
|
||||
#define G_IS_DBUS_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
|
||||
G_TYPE_DBUS_ACTION_GROUP))
|
||||
#define G_IS_DBUS_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
|
||||
G_TYPE_DBUS_ACTION_GROUP))
|
||||
#define G_DBUS_ACTION_GROUP_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
|
||||
G_TYPE_DBUS_ACTION_GROUP, GDBusActionGroupClass))
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_action_group_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GDBusActionGroup * g_dbus_action_group_get (GDBusConnection *connection,
|
||||
const gchar *bus_name,
|
||||
const gchar *object_path);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_ACTION_GROUP_H__ */
|
|
@ -0,0 +1,65 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_ADDRESS_H__
|
||||
#define __G_DBUS_ADDRESS_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GLIB_AVAILABLE_IN_2_36
|
||||
gchar *g_dbus_address_escape_value (const gchar *string);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_is_address (const gchar *string);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_is_supported_address (const gchar *string,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_address_get_stream (const gchar *address,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIOStream *g_dbus_address_get_stream_finish (GAsyncResult *res,
|
||||
gchar **out_guid,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIOStream *g_dbus_address_get_stream_sync (const gchar *address,
|
||||
gchar **out_guid,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar *g_dbus_address_get_for_bus_sync (GBusType bus_type,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_ADDRESS_H__ */
|
|
@ -0,0 +1,51 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_AUTH_OBSERVER_H__
|
||||
#define __G_DBUS_AUTH_OBSERVER_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DBUS_AUTH_OBSERVER (g_dbus_auth_observer_get_type ())
|
||||
#define G_DBUS_AUTH_OBSERVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_AUTH_OBSERVER, GDBusAuthObserver))
|
||||
#define G_IS_DBUS_AUTH_OBSERVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_AUTH_OBSERVER))
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_auth_observer_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusAuthObserver *g_dbus_auth_observer_new (void);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_auth_observer_authorize_authenticated_peer (GDBusAuthObserver *observer,
|
||||
GIOStream *stream,
|
||||
GCredentials *credentials);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
gboolean g_dbus_auth_observer_allow_mechanism (GDBusAuthObserver *observer,
|
||||
const gchar *mechanism);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* _G_DBUS_AUTH_OBSERVER_H__ */
|
|
@ -0,0 +1,683 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_CONNECTION_H__
|
||||
#define __G_DBUS_CONNECTION_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DBUS_CONNECTION (g_dbus_connection_get_type ())
|
||||
#define G_DBUS_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_CONNECTION, GDBusConnection))
|
||||
#define G_IS_DBUS_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_CONNECTION))
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_connection_get_type (void) G_GNUC_CONST;
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_bus_get (GBusType bus_type,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusConnection *g_bus_get_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusConnection *g_bus_get_sync (GBusType bus_type,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_connection_new (GIOStream *stream,
|
||||
const gchar *guid,
|
||||
GDBusConnectionFlags flags,
|
||||
GDBusAuthObserver *observer,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusConnection *g_dbus_connection_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusConnection *g_dbus_connection_new_sync (GIOStream *stream,
|
||||
const gchar *guid,
|
||||
GDBusConnectionFlags flags,
|
||||
GDBusAuthObserver *observer,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_connection_new_for_address (const gchar *address,
|
||||
GDBusConnectionFlags flags,
|
||||
GDBusAuthObserver *observer,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusConnection *g_dbus_connection_new_for_address_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusConnection *g_dbus_connection_new_for_address_sync (const gchar *address,
|
||||
GDBusConnectionFlags flags,
|
||||
GDBusAuthObserver *observer,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_connection_start_message_processing (GDBusConnection *connection);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_connection_is_closed (GDBusConnection *connection);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIOStream *g_dbus_connection_get_stream (GDBusConnection *connection);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_connection_get_guid (GDBusConnection *connection);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_connection_get_unique_name (GDBusConnection *connection);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GCredentials *g_dbus_connection_get_peer_credentials (GDBusConnection *connection);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
guint32 g_dbus_connection_get_last_serial (GDBusConnection *connection);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_connection_get_exit_on_close (GDBusConnection *connection);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_connection_set_exit_on_close (GDBusConnection *connection,
|
||||
gboolean exit_on_close);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusCapabilityFlags g_dbus_connection_get_capabilities (GDBusConnection *connection);
|
||||
GLIB_AVAILABLE_IN_2_60
|
||||
GDBusConnectionFlags g_dbus_connection_get_flags (GDBusConnection *connection);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_connection_close (GDBusConnection *connection,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_connection_close_finish (GDBusConnection *connection,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_connection_close_sync (GDBusConnection *connection,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_connection_flush (GDBusConnection *connection,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_connection_flush_finish (GDBusConnection *connection,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_connection_flush_sync (GDBusConnection *connection,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_connection_send_message (GDBusConnection *connection,
|
||||
GDBusMessage *message,
|
||||
GDBusSendMessageFlags flags,
|
||||
volatile guint32 *out_serial,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_connection_send_message_with_reply (GDBusConnection *connection,
|
||||
GDBusMessage *message,
|
||||
GDBusSendMessageFlags flags,
|
||||
gint timeout_msec,
|
||||
volatile guint32 *out_serial,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMessage *g_dbus_connection_send_message_with_reply_finish (GDBusConnection *connection,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMessage *g_dbus_connection_send_message_with_reply_sync (GDBusConnection *connection,
|
||||
GDBusMessage *message,
|
||||
GDBusSendMessageFlags flags,
|
||||
gint timeout_msec,
|
||||
volatile guint32 *out_serial,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_connection_emit_signal (GDBusConnection *connection,
|
||||
const gchar *destination_bus_name,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
const gchar *signal_name,
|
||||
GVariant *parameters,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_connection_call (GDBusConnection *connection,
|
||||
const gchar *bus_name,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
const gchar *method_name,
|
||||
GVariant *parameters,
|
||||
const GVariantType *reply_type,
|
||||
GDBusCallFlags flags,
|
||||
gint timeout_msec,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant *g_dbus_connection_call_finish (GDBusConnection *connection,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant *g_dbus_connection_call_sync (GDBusConnection *connection,
|
||||
const gchar *bus_name,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
const gchar *method_name,
|
||||
GVariant *parameters,
|
||||
const GVariantType *reply_type,
|
||||
GDBusCallFlags flags,
|
||||
gint timeout_msec,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
void g_dbus_connection_call_with_unix_fd_list (GDBusConnection *connection,
|
||||
const gchar *bus_name,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
const gchar *method_name,
|
||||
GVariant *parameters,
|
||||
const GVariantType *reply_type,
|
||||
GDBusCallFlags flags,
|
||||
gint timeout_msec,
|
||||
GUnixFDList *fd_list,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
GVariant *g_dbus_connection_call_with_unix_fd_list_finish (GDBusConnection *connection,
|
||||
GUnixFDList **out_fd_list,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
GVariant *g_dbus_connection_call_with_unix_fd_list_sync (GDBusConnection *connection,
|
||||
const gchar *bus_name,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
const gchar *method_name,
|
||||
GVariant *parameters,
|
||||
const GVariantType *reply_type,
|
||||
GDBusCallFlags flags,
|
||||
gint timeout_msec,
|
||||
GUnixFDList *fd_list,
|
||||
GUnixFDList **out_fd_list,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
/**
|
||||
* GDBusInterfaceMethodCallFunc:
|
||||
* @connection: A #GDBusConnection.
|
||||
* @sender: The unique bus name of the remote caller.
|
||||
* @object_path: The object path that the method was invoked on.
|
||||
* @interface_name: The D-Bus interface name the method was invoked on.
|
||||
* @method_name: The name of the method that was invoked.
|
||||
* @parameters: A #GVariant tuple with parameters.
|
||||
* @invocation: (transfer full): A #GDBusMethodInvocation object that must be used to return a value or error.
|
||||
* @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
|
||||
*
|
||||
* The type of the @method_call function in #GDBusInterfaceVTable.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
typedef void (*GDBusInterfaceMethodCallFunc) (GDBusConnection *connection,
|
||||
const gchar *sender,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
const gchar *method_name,
|
||||
GVariant *parameters,
|
||||
GDBusMethodInvocation *invocation,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* GDBusInterfaceGetPropertyFunc:
|
||||
* @connection: A #GDBusConnection.
|
||||
* @sender: The unique bus name of the remote caller.
|
||||
* @object_path: The object path that the method was invoked on.
|
||||
* @interface_name: The D-Bus interface name for the property.
|
||||
* @property_name: The name of the property to get the value of.
|
||||
* @error: Return location for error.
|
||||
* @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
|
||||
*
|
||||
* The type of the @get_property function in #GDBusInterfaceVTable.
|
||||
*
|
||||
* Returns: A #GVariant with the value for @property_name or %NULL if
|
||||
* @error is set. If the returned #GVariant is floating, it is
|
||||
* consumed - otherwise its reference count is decreased by one.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
typedef GVariant *(*GDBusInterfaceGetPropertyFunc) (GDBusConnection *connection,
|
||||
const gchar *sender,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
const gchar *property_name,
|
||||
GError **error,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* GDBusInterfaceSetPropertyFunc:
|
||||
* @connection: A #GDBusConnection.
|
||||
* @sender: The unique bus name of the remote caller.
|
||||
* @object_path: The object path that the method was invoked on.
|
||||
* @interface_name: The D-Bus interface name for the property.
|
||||
* @property_name: The name of the property to get the value of.
|
||||
* @value: The value to set the property to.
|
||||
* @error: Return location for error.
|
||||
* @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
|
||||
*
|
||||
* The type of the @set_property function in #GDBusInterfaceVTable.
|
||||
*
|
||||
* Returns: %TRUE if the property was set to @value, %FALSE if @error is set.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
typedef gboolean (*GDBusInterfaceSetPropertyFunc) (GDBusConnection *connection,
|
||||
const gchar *sender,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
const gchar *property_name,
|
||||
GVariant *value,
|
||||
GError **error,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* GDBusInterfaceVTable:
|
||||
* @method_call: Function for handling incoming method calls.
|
||||
* @get_property: Function for getting a property.
|
||||
* @set_property: Function for setting a property.
|
||||
*
|
||||
* Virtual table for handling properties and method calls for a D-Bus
|
||||
* interface.
|
||||
*
|
||||
* Since 2.38, if you want to handle getting/setting D-Bus properties
|
||||
* asynchronously, give %NULL as your get_property() or set_property()
|
||||
* function. The D-Bus call will be directed to your @method_call function,
|
||||
* with the provided @interface_name set to "org.freedesktop.DBus.Properties".
|
||||
*
|
||||
* Ownership of the #GDBusMethodInvocation object passed to the
|
||||
* method_call() function is transferred to your handler; you must
|
||||
* call one of the methods of #GDBusMethodInvocation to return a reply
|
||||
* (possibly empty), or an error. These functions also take ownership
|
||||
* of the passed-in invocation object, so unless the invocation
|
||||
* object has otherwise been referenced, it will be then be freed.
|
||||
* Calling one of these functions may be done within your
|
||||
* method_call() implementation but it also can be done at a later
|
||||
* point to handle the method asynchronously.
|
||||
*
|
||||
* The usual checks on the validity of the calls is performed. For
|
||||
* `Get` calls, an error is automatically returned if the property does
|
||||
* not exist or the permissions do not allow access. The same checks are
|
||||
* performed for `Set` calls, and the provided value is also checked for
|
||||
* being the correct type.
|
||||
*
|
||||
* For both `Get` and `Set` calls, the #GDBusMethodInvocation
|
||||
* passed to the @method_call handler can be queried with
|
||||
* g_dbus_method_invocation_get_property_info() to get a pointer
|
||||
* to the #GDBusPropertyInfo of the property.
|
||||
*
|
||||
* If you have readable properties specified in your interface info,
|
||||
* you must ensure that you either provide a non-%NULL @get_property()
|
||||
* function or provide implementations of both the `Get` and `GetAll`
|
||||
* methods on org.freedesktop.DBus.Properties interface in your @method_call
|
||||
* function. Note that the required return type of the `Get` call is
|
||||
* `(v)`, not the type of the property. `GetAll` expects a return value
|
||||
* of type `a{sv}`.
|
||||
*
|
||||
* If you have writable properties specified in your interface info,
|
||||
* you must ensure that you either provide a non-%NULL @set_property()
|
||||
* function or provide an implementation of the `Set` call. If implementing
|
||||
* the call, you must return the value of type %G_VARIANT_TYPE_UNIT.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
struct _GDBusInterfaceVTable
|
||||
{
|
||||
GDBusInterfaceMethodCallFunc method_call;
|
||||
GDBusInterfaceGetPropertyFunc get_property;
|
||||
GDBusInterfaceSetPropertyFunc set_property;
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion - also remember to update
|
||||
* gdbusconnection.c:_g_dbus_interface_vtable_copy() when
|
||||
* changing this.
|
||||
*/
|
||||
gpointer padding[8];
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint g_dbus_connection_register_object (GDBusConnection *connection,
|
||||
const gchar *object_path,
|
||||
GDBusInterfaceInfo *interface_info,
|
||||
const GDBusInterfaceVTable *vtable,
|
||||
gpointer user_data,
|
||||
GDestroyNotify user_data_free_func,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_2_46
|
||||
guint g_dbus_connection_register_object_with_closures (GDBusConnection *connection,
|
||||
const gchar *object_path,
|
||||
GDBusInterfaceInfo *interface_info,
|
||||
GClosure *method_call_closure,
|
||||
GClosure *get_property_closure,
|
||||
GClosure *set_property_closure,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_connection_unregister_object (GDBusConnection *connection,
|
||||
guint registration_id);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* GDBusSubtreeEnumerateFunc:
|
||||
* @connection: A #GDBusConnection.
|
||||
* @sender: The unique bus name of the remote caller.
|
||||
* @object_path: The object path that was registered with g_dbus_connection_register_subtree().
|
||||
* @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
|
||||
*
|
||||
* The type of the @enumerate function in #GDBusSubtreeVTable.
|
||||
*
|
||||
* This function is called when generating introspection data and also
|
||||
* when preparing to dispatch incoming messages in the event that the
|
||||
* %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not
|
||||
* specified (ie: to verify that the object path is valid).
|
||||
*
|
||||
* Hierarchies are not supported; the items that you return should not
|
||||
* contain the '/' character.
|
||||
*
|
||||
* The return value will be freed with g_strfreev().
|
||||
*
|
||||
* Returns: A newly allocated array of strings for node names that are children of @object_path.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
typedef gchar** (*GDBusSubtreeEnumerateFunc) (GDBusConnection *connection,
|
||||
const gchar *sender,
|
||||
const gchar *object_path,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* GDBusSubtreeIntrospectFunc:
|
||||
* @connection: A #GDBusConnection.
|
||||
* @sender: The unique bus name of the remote caller.
|
||||
* @object_path: The object path that was registered with g_dbus_connection_register_subtree().
|
||||
* @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
|
||||
* @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
|
||||
*
|
||||
* The type of the @introspect function in #GDBusSubtreeVTable.
|
||||
*
|
||||
* Subtrees are flat. @node, if non-%NULL, is always exactly one
|
||||
* segment of the object path (ie: it never contains a slash).
|
||||
*
|
||||
* This function should return %NULL to indicate that there is no object
|
||||
* at this node.
|
||||
*
|
||||
* If this function returns non-%NULL, the return value is expected to
|
||||
* be a %NULL-terminated array of pointers to #GDBusInterfaceInfo
|
||||
* structures describing the interfaces implemented by @node. This
|
||||
* array will have g_dbus_interface_info_unref() called on each item
|
||||
* before being freed with g_free().
|
||||
*
|
||||
* The difference between returning %NULL and an array containing zero
|
||||
* items is that the standard DBus interfaces will returned to the
|
||||
* remote introspector in the empty array case, but not in the %NULL
|
||||
* case.
|
||||
*
|
||||
* Returns: A %NULL-terminated array of pointers to #GDBusInterfaceInfo, or %NULL.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
typedef GDBusInterfaceInfo ** (*GDBusSubtreeIntrospectFunc) (GDBusConnection *connection,
|
||||
const gchar *sender,
|
||||
const gchar *object_path,
|
||||
const gchar *node,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* GDBusSubtreeDispatchFunc:
|
||||
* @connection: A #GDBusConnection.
|
||||
* @sender: The unique bus name of the remote caller.
|
||||
* @object_path: The object path that was registered with g_dbus_connection_register_subtree().
|
||||
* @interface_name: The D-Bus interface name that the method call or property access is for.
|
||||
* @node: A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree.
|
||||
* @out_user_data: (nullable) (not optional): Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL).
|
||||
* @user_data: The @user_data #gpointer passed to g_dbus_connection_register_subtree().
|
||||
*
|
||||
* The type of the @dispatch function in #GDBusSubtreeVTable.
|
||||
*
|
||||
* Subtrees are flat. @node, if non-%NULL, is always exactly one
|
||||
* segment of the object path (ie: it never contains a slash).
|
||||
*
|
||||
* Returns: A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
typedef const GDBusInterfaceVTable * (*GDBusSubtreeDispatchFunc) (GDBusConnection *connection,
|
||||
const gchar *sender,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
const gchar *node,
|
||||
gpointer *out_user_data,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* GDBusSubtreeVTable:
|
||||
* @enumerate: Function for enumerating child nodes.
|
||||
* @introspect: Function for introspecting a child node.
|
||||
* @dispatch: Function for dispatching a remote call on a child node.
|
||||
*
|
||||
* Virtual table for handling subtrees registered with g_dbus_connection_register_subtree().
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
struct _GDBusSubtreeVTable
|
||||
{
|
||||
GDBusSubtreeEnumerateFunc enumerate;
|
||||
GDBusSubtreeIntrospectFunc introspect;
|
||||
GDBusSubtreeDispatchFunc dispatch;
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion - also remember to update
|
||||
* gdbusconnection.c:_g_dbus_subtree_vtable_copy() when
|
||||
* changing this.
|
||||
*/
|
||||
gpointer padding[8];
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint g_dbus_connection_register_subtree (GDBusConnection *connection,
|
||||
const gchar *object_path,
|
||||
const GDBusSubtreeVTable *vtable,
|
||||
GDBusSubtreeFlags flags,
|
||||
gpointer user_data,
|
||||
GDestroyNotify user_data_free_func,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_connection_unregister_subtree (GDBusConnection *connection,
|
||||
guint registration_id);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* GDBusSignalCallback:
|
||||
* @connection: A #GDBusConnection.
|
||||
* @sender_name: The unique bus name of the sender of the signal.
|
||||
* @object_path: The object path that the signal was emitted on.
|
||||
* @interface_name: The name of the interface.
|
||||
* @signal_name: The name of the signal.
|
||||
* @parameters: A #GVariant tuple with parameters for the signal.
|
||||
* @user_data: User data passed when subscribing to the signal.
|
||||
*
|
||||
* Signature for callback function used in g_dbus_connection_signal_subscribe().
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
typedef void (*GDBusSignalCallback) (GDBusConnection *connection,
|
||||
const gchar *sender_name,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
const gchar *signal_name,
|
||||
GVariant *parameters,
|
||||
gpointer user_data);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint g_dbus_connection_signal_subscribe (GDBusConnection *connection,
|
||||
const gchar *sender,
|
||||
const gchar *interface_name,
|
||||
const gchar *member,
|
||||
const gchar *object_path,
|
||||
const gchar *arg0,
|
||||
GDBusSignalFlags flags,
|
||||
GDBusSignalCallback callback,
|
||||
gpointer user_data,
|
||||
GDestroyNotify user_data_free_func);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_connection_signal_unsubscribe (GDBusConnection *connection,
|
||||
guint subscription_id);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* GDBusMessageFilterFunction:
|
||||
* @connection: (transfer none): A #GDBusConnection.
|
||||
* @message: (transfer full): A locked #GDBusMessage that the filter function takes ownership of.
|
||||
* @incoming: %TRUE if it is a message received from the other peer, %FALSE if it is
|
||||
* a message to be sent to the other peer.
|
||||
* @user_data: User data passed when adding the filter.
|
||||
*
|
||||
* Signature for function used in g_dbus_connection_add_filter().
|
||||
*
|
||||
* A filter function is passed a #GDBusMessage and expected to return
|
||||
* a #GDBusMessage too. Passive filter functions that don't modify the
|
||||
* message can simply return the @message object:
|
||||
* |[
|
||||
* static GDBusMessage *
|
||||
* passive_filter (GDBusConnection *connection
|
||||
* GDBusMessage *message,
|
||||
* gboolean incoming,
|
||||
* gpointer user_data)
|
||||
* {
|
||||
* // inspect @message
|
||||
* return message;
|
||||
* }
|
||||
* ]|
|
||||
* Filter functions that wants to drop a message can simply return %NULL:
|
||||
* |[
|
||||
* static GDBusMessage *
|
||||
* drop_filter (GDBusConnection *connection
|
||||
* GDBusMessage *message,
|
||||
* gboolean incoming,
|
||||
* gpointer user_data)
|
||||
* {
|
||||
* if (should_drop_message)
|
||||
* {
|
||||
* g_object_unref (message);
|
||||
* message = NULL;
|
||||
* }
|
||||
* return message;
|
||||
* }
|
||||
* ]|
|
||||
* Finally, a filter function may modify a message by copying it:
|
||||
* |[
|
||||
* static GDBusMessage *
|
||||
* modifying_filter (GDBusConnection *connection
|
||||
* GDBusMessage *message,
|
||||
* gboolean incoming,
|
||||
* gpointer user_data)
|
||||
* {
|
||||
* GDBusMessage *copy;
|
||||
* GError *error;
|
||||
*
|
||||
* error = NULL;
|
||||
* copy = g_dbus_message_copy (message, &error);
|
||||
* // handle @error being set
|
||||
* g_object_unref (message);
|
||||
*
|
||||
* // modify @copy
|
||||
*
|
||||
* return copy;
|
||||
* }
|
||||
* ]|
|
||||
* If the returned #GDBusMessage is different from @message and cannot
|
||||
* be sent on @connection (it could use features, such as file
|
||||
* descriptors, not compatible with @connection), then a warning is
|
||||
* logged to standard error. Applications can
|
||||
* check this ahead of time using g_dbus_message_to_blob() passing a
|
||||
* #GDBusCapabilityFlags value obtained from @connection.
|
||||
*
|
||||
* Returns: (transfer full) (nullable): A #GDBusMessage that will be freed with
|
||||
* g_object_unref() or %NULL to drop the message. Passive filter
|
||||
* functions can simply return the passed @message object.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
typedef GDBusMessage *(*GDBusMessageFilterFunction) (GDBusConnection *connection,
|
||||
GDBusMessage *message,
|
||||
gboolean incoming,
|
||||
gpointer user_data);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint g_dbus_connection_add_filter (GDBusConnection *connection,
|
||||
GDBusMessageFilterFunction filter_function,
|
||||
gpointer user_data,
|
||||
GDestroyNotify user_data_free_func);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_connection_remove_filter (GDBusConnection *connection,
|
||||
guint filter_id);
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_CONNECTION_H__ */
|
|
@ -0,0 +1,109 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_ERROR_H__
|
||||
#define __G_DBUS_ERROR_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* G_DBUS_ERROR:
|
||||
*
|
||||
* Error domain for errors generated by a remote message bus. Errors
|
||||
* in this domain will be from the #GDBusError enumeration. See
|
||||
* #GError for more information on error domains.
|
||||
*
|
||||
* Note that this error domain is intended only for
|
||||
* returning errors from a remote message bus process. Errors
|
||||
* generated locally in-process by e.g. #GDBusConnection should use the
|
||||
* %G_IO_ERROR domain.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
#define G_DBUS_ERROR g_dbus_error_quark()
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GQuark g_dbus_error_quark (void);
|
||||
|
||||
/* Used by applications to check, get and strip the D-Bus error name */
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_error_is_remote_error (const GError *error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar *g_dbus_error_get_remote_error (const GError *error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_error_strip_remote_error (GError *error);
|
||||
|
||||
/**
|
||||
* GDBusErrorEntry:
|
||||
* @error_code: An error code.
|
||||
* @dbus_error_name: The D-Bus error name to associate with @error_code.
|
||||
*
|
||||
* Struct used in g_dbus_error_register_error_domain().
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
struct _GDBusErrorEntry
|
||||
{
|
||||
gint error_code;
|
||||
const gchar *dbus_error_name;
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_error_register_error (GQuark error_domain,
|
||||
gint error_code,
|
||||
const gchar *dbus_error_name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_error_unregister_error (GQuark error_domain,
|
||||
gint error_code,
|
||||
const gchar *dbus_error_name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_error_register_error_domain (const gchar *error_domain_quark_name,
|
||||
volatile gsize *quark_volatile,
|
||||
const GDBusErrorEntry *entries,
|
||||
guint num_entries);
|
||||
|
||||
/* Only used by object mappings to map back and forth to GError */
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GError *g_dbus_error_new_for_dbus_error (const gchar *dbus_error_name,
|
||||
const gchar *dbus_error_message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_error_set_dbus_error (GError **error,
|
||||
const gchar *dbus_error_name,
|
||||
const gchar *dbus_error_message,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF(4, 5);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_error_set_dbus_error_valist (GError **error,
|
||||
const gchar *dbus_error_name,
|
||||
const gchar *dbus_error_message,
|
||||
const gchar *format,
|
||||
va_list var_args) G_GNUC_PRINTF(4, 0);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar *g_dbus_error_encode_gerror (const GError *error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_ERROR_H__ */
|
|
@ -0,0 +1,81 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_INTERFACE_H__
|
||||
#define __G_DBUS_INTERFACE_H__
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DBUS_INTERFACE (g_dbus_interface_get_type())
|
||||
#define G_DBUS_INTERFACE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_INTERFACE, GDBusInterface))
|
||||
#define G_IS_DBUS_INTERFACE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_INTERFACE))
|
||||
#define G_DBUS_INTERFACE_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), G_TYPE_DBUS_INTERFACE, GDBusInterfaceIface))
|
||||
|
||||
/**
|
||||
* GDBusInterface:
|
||||
*
|
||||
* Base type for D-Bus interfaces.
|
||||
*
|
||||
* Since: 2.30
|
||||
*/
|
||||
|
||||
typedef struct _GDBusInterfaceIface GDBusInterfaceIface;
|
||||
|
||||
/**
|
||||
* GDBusInterfaceIface:
|
||||
* @parent_iface: The parent interface.
|
||||
* @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_get_info().
|
||||
* @get_object: Gets the enclosing #GDBusObject. See g_dbus_interface_get_object().
|
||||
* @set_object: Sets the enclosing #GDBusObject. See g_dbus_interface_set_object().
|
||||
* @dup_object: Gets a reference to the enclosing #GDBusObject. See g_dbus_interface_dup_object(). Added in 2.32.
|
||||
*
|
||||
* Base type for D-Bus interfaces.
|
||||
*
|
||||
* Since: 2.30
|
||||
*/
|
||||
struct _GDBusInterfaceIface
|
||||
{
|
||||
GTypeInterface parent_iface;
|
||||
|
||||
/* Virtual Functions */
|
||||
GDBusInterfaceInfo *(*get_info) (GDBusInterface *interface_);
|
||||
GDBusObject *(*get_object) (GDBusInterface *interface_);
|
||||
void (*set_object) (GDBusInterface *interface_,
|
||||
GDBusObject *object);
|
||||
GDBusObject *(*dup_object) (GDBusInterface *interface_);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_interface_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusInterfaceInfo *g_dbus_interface_get_info (GDBusInterface *interface_);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusObject *g_dbus_interface_get_object (GDBusInterface *interface_);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_interface_set_object (GDBusInterface *interface_,
|
||||
GDBusObject *object);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GDBusObject *g_dbus_interface_dup_object (GDBusInterface *interface_);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_INTERFACE_H__ */
|
|
@ -0,0 +1,127 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_INTERFACE_SKELETON_H__
|
||||
#define __G_DBUS_INTERFACE_SKELETON_H__
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DBUS_INTERFACE_SKELETON (g_dbus_interface_skeleton_get_type ())
|
||||
#define G_DBUS_INTERFACE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_INTERFACE_SKELETON, GDBusInterfaceSkeleton))
|
||||
#define G_DBUS_INTERFACE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_INTERFACE_SKELETON, GDBusInterfaceSkeletonClass))
|
||||
#define G_DBUS_INTERFACE_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_INTERFACE_SKELETON, GDBusInterfaceSkeletonClass))
|
||||
#define G_IS_DBUS_INTERFACE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_INTERFACE_SKELETON))
|
||||
#define G_IS_DBUS_INTERFACE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_INTERFACE_SKELETON))
|
||||
|
||||
typedef struct _GDBusInterfaceSkeletonClass GDBusInterfaceSkeletonClass;
|
||||
typedef struct _GDBusInterfaceSkeletonPrivate GDBusInterfaceSkeletonPrivate;
|
||||
|
||||
/**
|
||||
* GDBusInterfaceSkeleton:
|
||||
*
|
||||
* The #GDBusInterfaceSkeleton structure contains private data and should
|
||||
* only be accessed using the provided API.
|
||||
*
|
||||
* Since: 2.30
|
||||
*/
|
||||
struct _GDBusInterfaceSkeleton
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
GDBusInterfaceSkeletonPrivate *priv;
|
||||
};
|
||||
|
||||
/**
|
||||
* GDBusInterfaceSkeletonClass:
|
||||
* @parent_class: The parent class.
|
||||
* @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_skeleton_get_info() for details.
|
||||
* @get_vtable: Returns a #GDBusInterfaceVTable. See g_dbus_interface_skeleton_get_vtable() for details.
|
||||
* @get_properties: Returns a #GVariant with all properties. See g_dbus_interface_skeleton_get_properties().
|
||||
* @flush: Emits outstanding changes, if any. See g_dbus_interface_skeleton_flush().
|
||||
* @g_authorize_method: Signal class handler for the #GDBusInterfaceSkeleton::g-authorize-method signal.
|
||||
*
|
||||
* Class structure for #GDBusInterfaceSkeleton.
|
||||
*
|
||||
* Since: 2.30
|
||||
*/
|
||||
struct _GDBusInterfaceSkeletonClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
/* Virtual Functions */
|
||||
GDBusInterfaceInfo *(*get_info) (GDBusInterfaceSkeleton *interface_);
|
||||
GDBusInterfaceVTable *(*get_vtable) (GDBusInterfaceSkeleton *interface_);
|
||||
GVariant *(*get_properties) (GDBusInterfaceSkeleton *interface_);
|
||||
void (*flush) (GDBusInterfaceSkeleton *interface_);
|
||||
|
||||
/*< private >*/
|
||||
gpointer vfunc_padding[8];
|
||||
/*< public >*/
|
||||
|
||||
/* Signals */
|
||||
gboolean (*g_authorize_method) (GDBusInterfaceSkeleton *interface_,
|
||||
GDBusMethodInvocation *invocation);
|
||||
|
||||
/*< private >*/
|
||||
gpointer signal_padding[8];
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_interface_skeleton_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusInterfaceSkeletonFlags g_dbus_interface_skeleton_get_flags (GDBusInterfaceSkeleton *interface_);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_interface_skeleton_set_flags (GDBusInterfaceSkeleton *interface_,
|
||||
GDBusInterfaceSkeletonFlags flags);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusInterfaceInfo *g_dbus_interface_skeleton_get_info (GDBusInterfaceSkeleton *interface_);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusInterfaceVTable *g_dbus_interface_skeleton_get_vtable (GDBusInterfaceSkeleton *interface_);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant *g_dbus_interface_skeleton_get_properties (GDBusInterfaceSkeleton *interface_);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_interface_skeleton_flush (GDBusInterfaceSkeleton *interface_);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_interface_skeleton_export (GDBusInterfaceSkeleton *interface_,
|
||||
GDBusConnection *connection,
|
||||
const gchar *object_path,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_interface_skeleton_unexport (GDBusInterfaceSkeleton *interface_);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_interface_skeleton_unexport_from_connection (GDBusInterfaceSkeleton *interface_,
|
||||
GDBusConnection *connection);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusConnection *g_dbus_interface_skeleton_get_connection (GDBusInterfaceSkeleton *interface_);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GList *g_dbus_interface_skeleton_get_connections (GDBusInterfaceSkeleton *interface_);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_interface_skeleton_has_connection (GDBusInterfaceSkeleton *interface_,
|
||||
GDBusConnection *connection);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_interface_skeleton_get_object_path (GDBusInterfaceSkeleton *interface_);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_INTERFACE_SKELETON_H */
|
|
@ -0,0 +1,325 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_INTROSPECTION_H__
|
||||
#define __G_DBUS_INTROSPECTION_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* GDBusAnnotationInfo:
|
||||
* @ref_count: The reference count or -1 if statically allocated.
|
||||
* @key: The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated".
|
||||
* @value: The value of the annotation.
|
||||
* @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
|
||||
*
|
||||
* Information about an annotation.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
struct _GDBusAnnotationInfo
|
||||
{
|
||||
/*< public >*/
|
||||
volatile gint ref_count;
|
||||
gchar *key;
|
||||
gchar *value;
|
||||
GDBusAnnotationInfo **annotations;
|
||||
};
|
||||
|
||||
/**
|
||||
* GDBusArgInfo:
|
||||
* @ref_count: The reference count or -1 if statically allocated.
|
||||
* @name: Name of the argument, e.g. @unix_user_id.
|
||||
* @signature: D-Bus signature of the argument (a single complete type).
|
||||
* @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
|
||||
*
|
||||
* Information about an argument for a method or a signal.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
struct _GDBusArgInfo
|
||||
{
|
||||
/*< public >*/
|
||||
volatile gint ref_count;
|
||||
gchar *name;
|
||||
gchar *signature;
|
||||
GDBusAnnotationInfo **annotations;
|
||||
};
|
||||
|
||||
/**
|
||||
* GDBusMethodInfo:
|
||||
* @ref_count: The reference count or -1 if statically allocated.
|
||||
* @name: The name of the D-Bus method, e.g. @RequestName.
|
||||
* @in_args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no in arguments.
|
||||
* @out_args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no out arguments.
|
||||
* @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
|
||||
*
|
||||
* Information about a method on an D-Bus interface.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
struct _GDBusMethodInfo
|
||||
{
|
||||
/*< public >*/
|
||||
volatile gint ref_count;
|
||||
gchar *name;
|
||||
GDBusArgInfo **in_args;
|
||||
GDBusArgInfo **out_args;
|
||||
GDBusAnnotationInfo **annotations;
|
||||
};
|
||||
|
||||
/**
|
||||
* GDBusSignalInfo:
|
||||
* @ref_count: The reference count or -1 if statically allocated.
|
||||
* @name: The name of the D-Bus signal, e.g. "NameOwnerChanged".
|
||||
* @args: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments.
|
||||
* @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
|
||||
*
|
||||
* Information about a signal on a D-Bus interface.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
struct _GDBusSignalInfo
|
||||
{
|
||||
/*< public >*/
|
||||
volatile gint ref_count;
|
||||
gchar *name;
|
||||
GDBusArgInfo **args;
|
||||
GDBusAnnotationInfo **annotations;
|
||||
};
|
||||
|
||||
/**
|
||||
* GDBusPropertyInfo:
|
||||
* @ref_count: The reference count or -1 if statically allocated.
|
||||
* @name: The name of the D-Bus property, e.g. "SupportedFilesystems".
|
||||
* @signature: The D-Bus signature of the property (a single complete type).
|
||||
* @flags: Access control flags for the property.
|
||||
* @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
|
||||
*
|
||||
* Information about a D-Bus property on a D-Bus interface.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
struct _GDBusPropertyInfo
|
||||
{
|
||||
/*< public >*/
|
||||
volatile gint ref_count;
|
||||
gchar *name;
|
||||
gchar *signature;
|
||||
GDBusPropertyInfoFlags flags;
|
||||
GDBusAnnotationInfo **annotations;
|
||||
};
|
||||
|
||||
/**
|
||||
* GDBusInterfaceInfo:
|
||||
* @ref_count: The reference count or -1 if statically allocated.
|
||||
* @name: The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties".
|
||||
* @methods: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods.
|
||||
* @signals: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals.
|
||||
* @properties: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties.
|
||||
* @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
|
||||
*
|
||||
* Information about a D-Bus interface.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
struct _GDBusInterfaceInfo
|
||||
{
|
||||
/*< public >*/
|
||||
volatile gint ref_count;
|
||||
gchar *name;
|
||||
GDBusMethodInfo **methods;
|
||||
GDBusSignalInfo **signals;
|
||||
GDBusPropertyInfo **properties;
|
||||
GDBusAnnotationInfo **annotations;
|
||||
};
|
||||
|
||||
/**
|
||||
* GDBusNodeInfo:
|
||||
* @ref_count: The reference count or -1 if statically allocated.
|
||||
* @path: The path of the node or %NULL if omitted. Note that this may be a relative path. See the D-Bus specification for more details.
|
||||
* @interfaces: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces.
|
||||
* @nodes: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes.
|
||||
* @annotations: (array zero-terminated=1): A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations.
|
||||
*
|
||||
* Information about nodes in a remote object hierarchy.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
struct _GDBusNodeInfo
|
||||
{
|
||||
/*< public >*/
|
||||
volatile gint ref_count;
|
||||
gchar *path;
|
||||
GDBusInterfaceInfo **interfaces;
|
||||
GDBusNodeInfo **nodes;
|
||||
GDBusAnnotationInfo **annotations;
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_annotation_info_lookup (GDBusAnnotationInfo **annotations,
|
||||
const gchar *name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMethodInfo *g_dbus_interface_info_lookup_method (GDBusInterfaceInfo *info,
|
||||
const gchar *name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusSignalInfo *g_dbus_interface_info_lookup_signal (GDBusInterfaceInfo *info,
|
||||
const gchar *name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusPropertyInfo *g_dbus_interface_info_lookup_property (GDBusInterfaceInfo *info,
|
||||
const gchar *name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_interface_info_cache_build (GDBusInterfaceInfo *info);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_interface_info_cache_release (GDBusInterfaceInfo *info);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_interface_info_generate_xml (GDBusInterfaceInfo *info,
|
||||
guint indent,
|
||||
GString *string_builder);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusNodeInfo *g_dbus_node_info_new_for_xml (const gchar *xml_data,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusInterfaceInfo *g_dbus_node_info_lookup_interface (GDBusNodeInfo *info,
|
||||
const gchar *name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_node_info_generate_xml (GDBusNodeInfo *info,
|
||||
guint indent,
|
||||
GString *string_builder);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusNodeInfo *g_dbus_node_info_ref (GDBusNodeInfo *info);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusInterfaceInfo *g_dbus_interface_info_ref (GDBusInterfaceInfo *info);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMethodInfo *g_dbus_method_info_ref (GDBusMethodInfo *info);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusSignalInfo *g_dbus_signal_info_ref (GDBusSignalInfo *info);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusPropertyInfo *g_dbus_property_info_ref (GDBusPropertyInfo *info);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusArgInfo *g_dbus_arg_info_ref (GDBusArgInfo *info);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusAnnotationInfo *g_dbus_annotation_info_ref (GDBusAnnotationInfo *info);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_node_info_unref (GDBusNodeInfo *info);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_interface_info_unref (GDBusInterfaceInfo *info);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_method_info_unref (GDBusMethodInfo *info);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_signal_info_unref (GDBusSignalInfo *info);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_property_info_unref (GDBusPropertyInfo *info);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_arg_info_unref (GDBusArgInfo *info);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_annotation_info_unref (GDBusAnnotationInfo *info);
|
||||
|
||||
/**
|
||||
* G_TYPE_DBUS_NODE_INFO:
|
||||
*
|
||||
* The #GType for a boxed type holding a #GDBusNodeInfo.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
#define G_TYPE_DBUS_NODE_INFO (g_dbus_node_info_get_type ())
|
||||
|
||||
/**
|
||||
* G_TYPE_DBUS_INTERFACE_INFO:
|
||||
*
|
||||
* The #GType for a boxed type holding a #GDBusInterfaceInfo.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
#define G_TYPE_DBUS_INTERFACE_INFO (g_dbus_interface_info_get_type ())
|
||||
|
||||
/**
|
||||
* G_TYPE_DBUS_METHOD_INFO:
|
||||
*
|
||||
* The #GType for a boxed type holding a #GDBusMethodInfo.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
#define G_TYPE_DBUS_METHOD_INFO (g_dbus_method_info_get_type ())
|
||||
|
||||
/**
|
||||
* G_TYPE_DBUS_SIGNAL_INFO:
|
||||
*
|
||||
* The #GType for a boxed type holding a #GDBusSignalInfo.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
#define G_TYPE_DBUS_SIGNAL_INFO (g_dbus_signal_info_get_type ())
|
||||
|
||||
/**
|
||||
* G_TYPE_DBUS_PROPERTY_INFO:
|
||||
*
|
||||
* The #GType for a boxed type holding a #GDBusPropertyInfo.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
#define G_TYPE_DBUS_PROPERTY_INFO (g_dbus_property_info_get_type ())
|
||||
|
||||
/**
|
||||
* G_TYPE_DBUS_ARG_INFO:
|
||||
*
|
||||
* The #GType for a boxed type holding a #GDBusArgInfo.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
#define G_TYPE_DBUS_ARG_INFO (g_dbus_arg_info_get_type ())
|
||||
|
||||
/**
|
||||
* G_TYPE_DBUS_ANNOTATION_INFO:
|
||||
*
|
||||
* The #GType for a boxed type holding a #GDBusAnnotationInfo.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
#define G_TYPE_DBUS_ANNOTATION_INFO (g_dbus_annotation_info_get_type ())
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_node_info_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_interface_info_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_method_info_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_signal_info_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_property_info_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_arg_info_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_annotation_info_get_type (void) G_GNUC_CONST;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_INTROSPECTION_H__ */
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright © 2011 Canonical Ltd.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_MENU_MODEL_H__
|
||||
#define __G_DBUS_MENU_MODEL_H__
|
||||
|
||||
#include <gio/gdbusconnection.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DBUS_MENU_MODEL (g_dbus_menu_model_get_type ())
|
||||
#define G_DBUS_MENU_MODEL(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_DBUS_MENU_MODEL, GDBusMenuModel))
|
||||
#define G_IS_DBUS_MENU_MODEL(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
|
||||
G_TYPE_DBUS_MENU_MODEL))
|
||||
|
||||
typedef struct _GDBusMenuModel GDBusMenuModel;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_menu_model_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMenuModel * g_dbus_menu_model_get (GDBusConnection *connection,
|
||||
const gchar *bus_name,
|
||||
const gchar *object_path);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_MENU_MODEL_H__ */
|
|
@ -0,0 +1,197 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_MESSAGE_H__
|
||||
#define __G_DBUS_MESSAGE_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DBUS_MESSAGE (g_dbus_message_get_type ())
|
||||
#define G_DBUS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_MESSAGE, GDBusMessage))
|
||||
#define G_IS_DBUS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_MESSAGE))
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_message_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMessage *g_dbus_message_new (void);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMessage *g_dbus_message_new_signal (const gchar *path,
|
||||
const gchar *interface_,
|
||||
const gchar *signal);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMessage *g_dbus_message_new_method_call (const gchar *name,
|
||||
const gchar *path,
|
||||
const gchar *interface_,
|
||||
const gchar *method);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMessage *g_dbus_message_new_method_reply (GDBusMessage *method_call_message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMessage *g_dbus_message_new_method_error (GDBusMessage *method_call_message,
|
||||
const gchar *error_name,
|
||||
const gchar *error_message_format,
|
||||
...) G_GNUC_PRINTF(3, 4);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMessage *g_dbus_message_new_method_error_valist (GDBusMessage *method_call_message,
|
||||
const gchar *error_name,
|
||||
const gchar *error_message_format,
|
||||
va_list var_args);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMessage *g_dbus_message_new_method_error_literal (GDBusMessage *method_call_message,
|
||||
const gchar *error_name,
|
||||
const gchar *error_message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar *g_dbus_message_print (GDBusMessage *message,
|
||||
guint indent);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_message_get_locked (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_lock (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMessage *g_dbus_message_copy (GDBusMessage *message,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMessageByteOrder g_dbus_message_get_byte_order (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_set_byte_order (GDBusMessage *message,
|
||||
GDBusMessageByteOrder byte_order);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMessageType g_dbus_message_get_message_type (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_set_message_type (GDBusMessage *message,
|
||||
GDBusMessageType type);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMessageFlags g_dbus_message_get_flags (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_set_flags (GDBusMessage *message,
|
||||
GDBusMessageFlags flags);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint32 g_dbus_message_get_serial (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_set_serial (GDBusMessage *message,
|
||||
guint32 serial);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant *g_dbus_message_get_header (GDBusMessage *message,
|
||||
GDBusMessageHeaderField header_field);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_set_header (GDBusMessage *message,
|
||||
GDBusMessageHeaderField header_field,
|
||||
GVariant *value);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guchar *g_dbus_message_get_header_fields (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant *g_dbus_message_get_body (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_set_body (GDBusMessage *message,
|
||||
GVariant *body);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GUnixFDList *g_dbus_message_get_unix_fd_list (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_set_unix_fd_list (GDBusMessage *message,
|
||||
GUnixFDList *fd_list);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint32 g_dbus_message_get_reply_serial (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_set_reply_serial (GDBusMessage *message,
|
||||
guint32 value);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_message_get_interface (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_set_interface (GDBusMessage *message,
|
||||
const gchar *value);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_message_get_member (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_set_member (GDBusMessage *message,
|
||||
const gchar *value);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_message_get_path (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_set_path (GDBusMessage *message,
|
||||
const gchar *value);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_message_get_sender (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_set_sender (GDBusMessage *message,
|
||||
const gchar *value);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_message_get_destination (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_set_destination (GDBusMessage *message,
|
||||
const gchar *value);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_message_get_error_name (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_set_error_name (GDBusMessage *message,
|
||||
const gchar *value);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_message_get_signature (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_set_signature (GDBusMessage *message,
|
||||
const gchar *value);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint32 g_dbus_message_get_num_unix_fds (GDBusMessage *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_message_set_num_unix_fds (GDBusMessage *message,
|
||||
guint32 value);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_message_get_arg0 (GDBusMessage *message);
|
||||
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMessage *g_dbus_message_new_from_blob (guchar *blob,
|
||||
gsize blob_len,
|
||||
GDBusCapabilityFlags capabilities,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gssize g_dbus_message_bytes_needed (guchar *blob,
|
||||
gsize blob_len,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guchar *g_dbus_message_to_blob (GDBusMessage *message,
|
||||
gsize *out_size,
|
||||
GDBusCapabilityFlags capabilities,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_message_to_gerror (GDBusMessage *message,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_MESSAGE_H__ */
|
|
@ -0,0 +1,97 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_METHOD_INVOCATION_H__
|
||||
#define __G_DBUS_METHOD_INVOCATION_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DBUS_METHOD_INVOCATION (g_dbus_method_invocation_get_type ())
|
||||
#define G_DBUS_METHOD_INVOCATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_METHOD_INVOCATION, GDBusMethodInvocation))
|
||||
#define G_IS_DBUS_METHOD_INVOCATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_METHOD_INVOCATION))
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_method_invocation_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_method_invocation_get_sender (GDBusMethodInvocation *invocation);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_method_invocation_get_object_path (GDBusMethodInvocation *invocation);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_method_invocation_get_interface_name (GDBusMethodInvocation *invocation);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_method_invocation_get_method_name (GDBusMethodInvocation *invocation);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const GDBusMethodInfo *g_dbus_method_invocation_get_method_info (GDBusMethodInvocation *invocation);
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
const GDBusPropertyInfo *g_dbus_method_invocation_get_property_info (GDBusMethodInvocation *invocation);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusConnection *g_dbus_method_invocation_get_connection (GDBusMethodInvocation *invocation);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusMessage *g_dbus_method_invocation_get_message (GDBusMethodInvocation *invocation);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant *g_dbus_method_invocation_get_parameters (GDBusMethodInvocation *invocation);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gpointer g_dbus_method_invocation_get_user_data (GDBusMethodInvocation *invocation);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_method_invocation_return_value (GDBusMethodInvocation *invocation,
|
||||
GVariant *parameters);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_method_invocation_return_value_with_unix_fd_list (GDBusMethodInvocation *invocation,
|
||||
GVariant *parameters,
|
||||
GUnixFDList *fd_list);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_method_invocation_return_error (GDBusMethodInvocation *invocation,
|
||||
GQuark domain,
|
||||
gint code,
|
||||
const gchar *format,
|
||||
...) G_GNUC_PRINTF(4, 5);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_method_invocation_return_error_valist (GDBusMethodInvocation *invocation,
|
||||
GQuark domain,
|
||||
gint code,
|
||||
const gchar *format,
|
||||
va_list var_args)
|
||||
G_GNUC_PRINTF(4, 0);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_method_invocation_return_error_literal (GDBusMethodInvocation *invocation,
|
||||
GQuark domain,
|
||||
gint code,
|
||||
const gchar *message);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_method_invocation_return_gerror (GDBusMethodInvocation *invocation,
|
||||
const GError *error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_method_invocation_take_error (GDBusMethodInvocation *invocation,
|
||||
GError *error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_method_invocation_return_dbus_error (GDBusMethodInvocation *invocation,
|
||||
const gchar *error_name,
|
||||
const gchar *error_message);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_METHOD_INVOCATION_H__ */
|
|
@ -0,0 +1,115 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_NAME_OWNING_H__
|
||||
#define __G_DBUS_NAME_OWNING_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* GBusAcquiredCallback:
|
||||
* @connection: The #GDBusConnection to a message bus.
|
||||
* @name: The name that is requested to be owned.
|
||||
* @user_data: User data passed to g_bus_own_name().
|
||||
*
|
||||
* Invoked when a connection to a message bus has been obtained.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
typedef void (*GBusAcquiredCallback) (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* GBusNameAcquiredCallback:
|
||||
* @connection: The #GDBusConnection on which to acquired the name.
|
||||
* @name: The name being owned.
|
||||
* @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
|
||||
*
|
||||
* Invoked when the name is acquired.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
typedef void (*GBusNameAcquiredCallback) (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* GBusNameLostCallback:
|
||||
* @connection: The #GDBusConnection on which to acquire the name or %NULL if
|
||||
* the connection was disconnected.
|
||||
* @name: The name being owned.
|
||||
* @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
|
||||
*
|
||||
* Invoked when the name is lost or @connection has been closed.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
typedef void (*GBusNameLostCallback) (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
gpointer user_data);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint g_bus_own_name (GBusType bus_type,
|
||||
const gchar *name,
|
||||
GBusNameOwnerFlags flags,
|
||||
GBusAcquiredCallback bus_acquired_handler,
|
||||
GBusNameAcquiredCallback name_acquired_handler,
|
||||
GBusNameLostCallback name_lost_handler,
|
||||
gpointer user_data,
|
||||
GDestroyNotify user_data_free_func);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint g_bus_own_name_on_connection (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
GBusNameOwnerFlags flags,
|
||||
GBusNameAcquiredCallback name_acquired_handler,
|
||||
GBusNameLostCallback name_lost_handler,
|
||||
gpointer user_data,
|
||||
GDestroyNotify user_data_free_func);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint g_bus_own_name_with_closures (GBusType bus_type,
|
||||
const gchar *name,
|
||||
GBusNameOwnerFlags flags,
|
||||
GClosure *bus_acquired_closure,
|
||||
GClosure *name_acquired_closure,
|
||||
GClosure *name_lost_closure);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint g_bus_own_name_on_connection_with_closures (
|
||||
GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
GBusNameOwnerFlags flags,
|
||||
GClosure *name_acquired_closure,
|
||||
GClosure *name_lost_closure);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_bus_unown_name (guint owner_id);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_NAME_OWNING_H__ */
|
|
@ -0,0 +1,102 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_NAME_WATCHING_H__
|
||||
#define __G_DBUS_NAME_WATCHING_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* GBusNameAppearedCallback:
|
||||
* @connection: The #GDBusConnection the name is being watched on.
|
||||
* @name: The name being watched.
|
||||
* @name_owner: Unique name of the owner of the name being watched.
|
||||
* @user_data: User data passed to g_bus_watch_name().
|
||||
*
|
||||
* Invoked when the name being watched is known to have to have an owner.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
typedef void (*GBusNameAppearedCallback) (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
const gchar *name_owner,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* GBusNameVanishedCallback:
|
||||
* @connection: The #GDBusConnection the name is being watched on, or
|
||||
* %NULL.
|
||||
* @name: The name being watched.
|
||||
* @user_data: User data passed to g_bus_watch_name().
|
||||
*
|
||||
* Invoked when the name being watched is known not to have to have an owner.
|
||||
*
|
||||
* This is also invoked when the #GDBusConnection on which the watch was
|
||||
* established has been closed. In that case, @connection will be
|
||||
* %NULL.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
typedef void (*GBusNameVanishedCallback) (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint g_bus_watch_name (GBusType bus_type,
|
||||
const gchar *name,
|
||||
GBusNameWatcherFlags flags,
|
||||
GBusNameAppearedCallback name_appeared_handler,
|
||||
GBusNameVanishedCallback name_vanished_handler,
|
||||
gpointer user_data,
|
||||
GDestroyNotify user_data_free_func);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint g_bus_watch_name_on_connection (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
GBusNameWatcherFlags flags,
|
||||
GBusNameAppearedCallback name_appeared_handler,
|
||||
GBusNameVanishedCallback name_vanished_handler,
|
||||
gpointer user_data,
|
||||
GDestroyNotify user_data_free_func);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint g_bus_watch_name_with_closures (GBusType bus_type,
|
||||
const gchar *name,
|
||||
GBusNameWatcherFlags flags,
|
||||
GClosure *name_appeared_closure,
|
||||
GClosure *name_vanished_closure);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint g_bus_watch_name_on_connection_with_closures (
|
||||
GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
GBusNameWatcherFlags flags,
|
||||
GClosure *name_appeared_closure,
|
||||
GClosure *name_vanished_closure);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_bus_unwatch_name (guint watcher_id);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_NAME_WATCHING_H__ */
|
|
@ -0,0 +1,78 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_OBJECT_H__
|
||||
#define __G_DBUS_OBJECT_H__
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DBUS_OBJECT (g_dbus_object_get_type())
|
||||
#define G_DBUS_OBJECT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT, GDBusObject))
|
||||
#define G_IS_DBUS_OBJECT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT))
|
||||
#define G_DBUS_OBJECT_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), G_TYPE_DBUS_OBJECT, GDBusObjectIface))
|
||||
|
||||
typedef struct _GDBusObjectIface GDBusObjectIface;
|
||||
|
||||
/**
|
||||
* GDBusObjectIface:
|
||||
* @parent_iface: The parent interface.
|
||||
* @get_object_path: Returns the object path. See g_dbus_object_get_object_path().
|
||||
* @get_interfaces: Returns all interfaces. See g_dbus_object_get_interfaces().
|
||||
* @get_interface: Returns an interface by name. See g_dbus_object_get_interface().
|
||||
* @interface_added: Signal handler for the #GDBusObject::interface-added signal.
|
||||
* @interface_removed: Signal handler for the #GDBusObject::interface-removed signal.
|
||||
*
|
||||
* Base object type for D-Bus objects.
|
||||
*
|
||||
* Since: 2.30
|
||||
*/
|
||||
struct _GDBusObjectIface
|
||||
{
|
||||
GTypeInterface parent_iface;
|
||||
|
||||
/* Virtual Functions */
|
||||
const gchar *(*get_object_path) (GDBusObject *object);
|
||||
GList *(*get_interfaces) (GDBusObject *object);
|
||||
GDBusInterface *(*get_interface) (GDBusObject *object,
|
||||
const gchar *interface_name);
|
||||
|
||||
/* Signals */
|
||||
void (*interface_added) (GDBusObject *object,
|
||||
GDBusInterface *interface_);
|
||||
void (*interface_removed) (GDBusObject *object,
|
||||
GDBusInterface *interface_);
|
||||
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_object_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_object_get_object_path (GDBusObject *object);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GList *g_dbus_object_get_interfaces (GDBusObject *object);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusInterface *g_dbus_object_get_interface (GDBusObject *object,
|
||||
const gchar *interface_name);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_OBJECT_H__ */
|
|
@ -0,0 +1,94 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_OBJECT_MANAGER_H__
|
||||
#define __G_DBUS_OBJECT_MANAGER_H__
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DBUS_OBJECT_MANAGER (g_dbus_object_manager_get_type())
|
||||
#define G_DBUS_OBJECT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_MANAGER, GDBusObjectManager))
|
||||
#define G_IS_DBUS_OBJECT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_MANAGER))
|
||||
#define G_DBUS_OBJECT_MANAGER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), G_TYPE_DBUS_OBJECT_MANAGER, GDBusObjectManagerIface))
|
||||
|
||||
typedef struct _GDBusObjectManagerIface GDBusObjectManagerIface;
|
||||
|
||||
/**
|
||||
* GDBusObjectManagerIface:
|
||||
* @parent_iface: The parent interface.
|
||||
* @get_object_path: Virtual function for g_dbus_object_manager_get_object_path().
|
||||
* @get_objects: Virtual function for g_dbus_object_manager_get_objects().
|
||||
* @get_object: Virtual function for g_dbus_object_manager_get_object().
|
||||
* @get_interface: Virtual function for g_dbus_object_manager_get_interface().
|
||||
* @object_added: Signal handler for the #GDBusObjectManager::object-added signal.
|
||||
* @object_removed: Signal handler for the #GDBusObjectManager::object-removed signal.
|
||||
* @interface_added: Signal handler for the #GDBusObjectManager::interface-added signal.
|
||||
* @interface_removed: Signal handler for the #GDBusObjectManager::interface-removed signal.
|
||||
*
|
||||
* Base type for D-Bus object managers.
|
||||
*
|
||||
* Since: 2.30
|
||||
*/
|
||||
struct _GDBusObjectManagerIface
|
||||
{
|
||||
GTypeInterface parent_iface;
|
||||
|
||||
/* Virtual Functions */
|
||||
const gchar *(*get_object_path) (GDBusObjectManager *manager);
|
||||
GList *(*get_objects) (GDBusObjectManager *manager);
|
||||
GDBusObject *(*get_object) (GDBusObjectManager *manager,
|
||||
const gchar *object_path);
|
||||
GDBusInterface *(*get_interface) (GDBusObjectManager *manager,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name);
|
||||
|
||||
/* Signals */
|
||||
void (*object_added) (GDBusObjectManager *manager,
|
||||
GDBusObject *object);
|
||||
void (*object_removed) (GDBusObjectManager *manager,
|
||||
GDBusObject *object);
|
||||
|
||||
void (*interface_added) (GDBusObjectManager *manager,
|
||||
GDBusObject *object,
|
||||
GDBusInterface *interface_);
|
||||
void (*interface_removed) (GDBusObjectManager *manager,
|
||||
GDBusObject *object,
|
||||
GDBusInterface *interface_);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_object_manager_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_object_manager_get_object_path (GDBusObjectManager *manager);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GList *g_dbus_object_manager_get_objects (GDBusObjectManager *manager);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusObject *g_dbus_object_manager_get_object (GDBusObjectManager *manager,
|
||||
const gchar *object_path);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusInterface *g_dbus_object_manager_get_interface (GDBusObjectManager *manager,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_OBJECT_MANAGER_H__ */
|
|
@ -0,0 +1,146 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_OBJECT_MANAGER_CLIENT_H__
|
||||
#define __G_DBUS_OBJECT_MANAGER_CLIENT_H__
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DBUS_OBJECT_MANAGER_CLIENT (g_dbus_object_manager_client_get_type ())
|
||||
#define G_DBUS_OBJECT_MANAGER_CLIENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT, GDBusObjectManagerClient))
|
||||
#define G_DBUS_OBJECT_MANAGER_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT, GDBusObjectManagerClientClass))
|
||||
#define G_DBUS_OBJECT_MANAGER_CLIENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT, GDBusObjectManagerClientClass))
|
||||
#define G_IS_DBUS_OBJECT_MANAGER_CLIENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT))
|
||||
#define G_IS_DBUS_OBJECT_MANAGER_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_MANAGER_CLIENT))
|
||||
|
||||
typedef struct _GDBusObjectManagerClientClass GDBusObjectManagerClientClass;
|
||||
typedef struct _GDBusObjectManagerClientPrivate GDBusObjectManagerClientPrivate;
|
||||
|
||||
/**
|
||||
* GDBusObjectManagerClient:
|
||||
*
|
||||
* The #GDBusObjectManagerClient structure contains private data and should
|
||||
* only be accessed using the provided API.
|
||||
*
|
||||
* Since: 2.30
|
||||
*/
|
||||
struct _GDBusObjectManagerClient
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
GDBusObjectManagerClientPrivate *priv;
|
||||
};
|
||||
|
||||
/**
|
||||
* GDBusObjectManagerClientClass:
|
||||
* @parent_class: The parent class.
|
||||
* @interface_proxy_signal: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-signal signal.
|
||||
* @interface_proxy_properties_changed: Signal class handler for the #GDBusObjectManagerClient::interface-proxy-properties-changed signal.
|
||||
*
|
||||
* Class structure for #GDBusObjectManagerClient.
|
||||
*
|
||||
* Since: 2.30
|
||||
*/
|
||||
struct _GDBusObjectManagerClientClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
/* signals */
|
||||
void (*interface_proxy_signal) (GDBusObjectManagerClient *manager,
|
||||
GDBusObjectProxy *object_proxy,
|
||||
GDBusProxy *interface_proxy,
|
||||
const gchar *sender_name,
|
||||
const gchar *signal_name,
|
||||
GVariant *parameters);
|
||||
|
||||
void (*interface_proxy_properties_changed) (GDBusObjectManagerClient *manager,
|
||||
GDBusObjectProxy *object_proxy,
|
||||
GDBusProxy *interface_proxy,
|
||||
GVariant *changed_properties,
|
||||
const gchar* const *invalidated_properties);
|
||||
|
||||
/*< private >*/
|
||||
gpointer padding[8];
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_object_manager_client_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_object_manager_client_new (GDBusConnection *connection,
|
||||
GDBusObjectManagerClientFlags flags,
|
||||
const gchar *name,
|
||||
const gchar *object_path,
|
||||
GDBusProxyTypeFunc get_proxy_type_func,
|
||||
gpointer get_proxy_type_user_data,
|
||||
GDestroyNotify get_proxy_type_destroy_notify,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusObjectManager *g_dbus_object_manager_client_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusObjectManager *g_dbus_object_manager_client_new_sync (GDBusConnection *connection,
|
||||
GDBusObjectManagerClientFlags flags,
|
||||
const gchar *name,
|
||||
const gchar *object_path,
|
||||
GDBusProxyTypeFunc get_proxy_type_func,
|
||||
gpointer get_proxy_type_user_data,
|
||||
GDestroyNotify get_proxy_type_destroy_notify,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_object_manager_client_new_for_bus (GBusType bus_type,
|
||||
GDBusObjectManagerClientFlags flags,
|
||||
const gchar *name,
|
||||
const gchar *object_path,
|
||||
GDBusProxyTypeFunc get_proxy_type_func,
|
||||
gpointer get_proxy_type_user_data,
|
||||
GDestroyNotify get_proxy_type_destroy_notify,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusObjectManager *g_dbus_object_manager_client_new_for_bus_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusObjectManager *g_dbus_object_manager_client_new_for_bus_sync (GBusType bus_type,
|
||||
GDBusObjectManagerClientFlags flags,
|
||||
const gchar *name,
|
||||
const gchar *object_path,
|
||||
GDBusProxyTypeFunc get_proxy_type_func,
|
||||
gpointer get_proxy_type_user_data,
|
||||
GDestroyNotify get_proxy_type_destroy_notify,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusConnection *g_dbus_object_manager_client_get_connection (GDBusObjectManagerClient *manager);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusObjectManagerClientFlags g_dbus_object_manager_client_get_flags (GDBusObjectManagerClient *manager);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_object_manager_client_get_name (GDBusObjectManagerClient *manager);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar *g_dbus_object_manager_client_get_name_owner (GDBusObjectManagerClient *manager);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_OBJECT_MANAGER_CLIENT_H */
|
|
@ -0,0 +1,93 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_OBJECT_MANAGER_SERVER_H__
|
||||
#define __G_DBUS_OBJECT_MANAGER_SERVER_H__
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DBUS_OBJECT_MANAGER_SERVER (g_dbus_object_manager_server_get_type ())
|
||||
#define G_DBUS_OBJECT_MANAGER_SERVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_MANAGER_SERVER, GDBusObjectManagerServer))
|
||||
#define G_DBUS_OBJECT_MANAGER_SERVER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_MANAGER_SERVER, GDBusObjectManagerServerClass))
|
||||
#define G_DBUS_OBJECT_MANAGER_SERVER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_MANAGER_SERVER, GDBusObjectManagerServerClass))
|
||||
#define G_IS_DBUS_OBJECT_MANAGER_SERVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_MANAGER_SERVER))
|
||||
#define G_IS_DBUS_OBJECT_MANAGER_SERVER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_MANAGER_SERVER))
|
||||
|
||||
typedef struct _GDBusObjectManagerServerClass GDBusObjectManagerServerClass;
|
||||
typedef struct _GDBusObjectManagerServerPrivate GDBusObjectManagerServerPrivate;
|
||||
|
||||
/**
|
||||
* GDBusObjectManagerServer:
|
||||
*
|
||||
* The #GDBusObjectManagerServer structure contains private data and should
|
||||
* only be accessed using the provided API.
|
||||
*
|
||||
* Since: 2.30
|
||||
*/
|
||||
struct _GDBusObjectManagerServer
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
GDBusObjectManagerServerPrivate *priv;
|
||||
};
|
||||
|
||||
/**
|
||||
* GDBusObjectManagerServerClass:
|
||||
* @parent_class: The parent class.
|
||||
*
|
||||
* Class structure for #GDBusObjectManagerServer.
|
||||
*
|
||||
* Since: 2.30
|
||||
*/
|
||||
struct _GDBusObjectManagerServerClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
gpointer padding[8];
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_object_manager_server_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusObjectManagerServer *g_dbus_object_manager_server_new (const gchar *object_path);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusConnection *g_dbus_object_manager_server_get_connection (GDBusObjectManagerServer *manager);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_object_manager_server_set_connection (GDBusObjectManagerServer *manager,
|
||||
GDBusConnection *connection);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_object_manager_server_export (GDBusObjectManagerServer *manager,
|
||||
GDBusObjectSkeleton *object);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_object_manager_server_export_uniquely (GDBusObjectManagerServer *manager,
|
||||
GDBusObjectSkeleton *object);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_object_manager_server_is_exported (GDBusObjectManagerServer *manager,
|
||||
GDBusObjectSkeleton *object);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_object_manager_server_unexport (GDBusObjectManagerServer *manager,
|
||||
const gchar *object_path);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_OBJECT_MANAGER_SERVER_H */
|
|
@ -0,0 +1,79 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_OBJECT_PROXY_H__
|
||||
#define __G_DBUS_OBJECT_PROXY_H__
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DBUS_OBJECT_PROXY (g_dbus_object_proxy_get_type ())
|
||||
#define G_DBUS_OBJECT_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_PROXY, GDBusObjectProxy))
|
||||
#define G_DBUS_OBJECT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_PROXY, GDBusObjectProxyClass))
|
||||
#define G_DBUS_OBJECT_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_PROXY, GDBusObjectProxyClass))
|
||||
#define G_IS_DBUS_OBJECT_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_PROXY))
|
||||
#define G_IS_DBUS_OBJECT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_PROXY))
|
||||
|
||||
typedef struct _GDBusObjectProxyClass GDBusObjectProxyClass;
|
||||
typedef struct _GDBusObjectProxyPrivate GDBusObjectProxyPrivate;
|
||||
|
||||
/**
|
||||
* GDBusObjectProxy:
|
||||
*
|
||||
* The #GDBusObjectProxy structure contains private data and should
|
||||
* only be accessed using the provided API.
|
||||
*
|
||||
* Since: 2.30
|
||||
*/
|
||||
struct _GDBusObjectProxy
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
GDBusObjectProxyPrivate *priv;
|
||||
};
|
||||
|
||||
/**
|
||||
* GDBusObjectProxyClass:
|
||||
* @parent_class: The parent class.
|
||||
*
|
||||
* Class structure for #GDBusObjectProxy.
|
||||
*
|
||||
* Since: 2.30
|
||||
*/
|
||||
struct _GDBusObjectProxyClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
gpointer padding[8];
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_object_proxy_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusObjectProxy *g_dbus_object_proxy_new (GDBusConnection *connection,
|
||||
const gchar *object_path);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusConnection *g_dbus_object_proxy_get_connection (GDBusObjectProxy *proxy);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_OBJECT_PROXY_H */
|
|
@ -0,0 +1,96 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_OBJECT_SKELETON_H__
|
||||
#define __G_DBUS_OBJECT_SKELETON_H__
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DBUS_OBJECT_SKELETON (g_dbus_object_skeleton_get_type ())
|
||||
#define G_DBUS_OBJECT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_OBJECT_SKELETON, GDBusObjectSkeleton))
|
||||
#define G_DBUS_OBJECT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_OBJECT_SKELETON, GDBusObjectSkeletonClass))
|
||||
#define G_DBUS_OBJECT_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_OBJECT_SKELETON, GDBusObjectSkeletonClass))
|
||||
#define G_IS_DBUS_OBJECT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_OBJECT_SKELETON))
|
||||
#define G_IS_DBUS_OBJECT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_OBJECT_SKELETON))
|
||||
|
||||
typedef struct _GDBusObjectSkeletonClass GDBusObjectSkeletonClass;
|
||||
typedef struct _GDBusObjectSkeletonPrivate GDBusObjectSkeletonPrivate;
|
||||
|
||||
/**
|
||||
* GDBusObjectSkeleton:
|
||||
*
|
||||
* The #GDBusObjectSkeleton structure contains private data and should only be
|
||||
* accessed using the provided API.
|
||||
*
|
||||
* Since: 2.30
|
||||
*/
|
||||
struct _GDBusObjectSkeleton
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
GDBusObjectSkeletonPrivate *priv;
|
||||
};
|
||||
|
||||
/**
|
||||
* GDBusObjectSkeletonClass:
|
||||
* @parent_class: The parent class.
|
||||
* @authorize_method: Signal class handler for the #GDBusObjectSkeleton::authorize-method signal.
|
||||
*
|
||||
* Class structure for #GDBusObjectSkeleton.
|
||||
*
|
||||
* Since: 2.30
|
||||
*/
|
||||
struct _GDBusObjectSkeletonClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
/* Signals */
|
||||
gboolean (*authorize_method) (GDBusObjectSkeleton *object,
|
||||
GDBusInterfaceSkeleton *interface_,
|
||||
GDBusMethodInvocation *invocation);
|
||||
|
||||
/*< private >*/
|
||||
gpointer padding[8];
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_object_skeleton_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusObjectSkeleton *g_dbus_object_skeleton_new (const gchar *object_path);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_object_skeleton_flush (GDBusObjectSkeleton *object);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_object_skeleton_add_interface (GDBusObjectSkeleton *object,
|
||||
GDBusInterfaceSkeleton *interface_);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_object_skeleton_remove_interface (GDBusObjectSkeleton *object,
|
||||
GDBusInterfaceSkeleton *interface_);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_object_skeleton_remove_interface_by_name (GDBusObjectSkeleton *object,
|
||||
const gchar *interface_name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_object_skeleton_set_object_path (GDBusObjectSkeleton *object,
|
||||
const gchar *object_path);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_OBJECT_SKELETON_H */
|
|
@ -0,0 +1,214 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_PROXY_H__
|
||||
#define __G_DBUS_PROXY_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
#include <gio/gdbusintrospection.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DBUS_PROXY (g_dbus_proxy_get_type ())
|
||||
#define G_DBUS_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_PROXY, GDBusProxy))
|
||||
#define G_DBUS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_PROXY, GDBusProxyClass))
|
||||
#define G_DBUS_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_PROXY, GDBusProxyClass))
|
||||
#define G_IS_DBUS_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_PROXY))
|
||||
#define G_IS_DBUS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_PROXY))
|
||||
|
||||
typedef struct _GDBusProxyClass GDBusProxyClass;
|
||||
typedef struct _GDBusProxyPrivate GDBusProxyPrivate;
|
||||
|
||||
/**
|
||||
* GDBusProxy:
|
||||
*
|
||||
* The #GDBusProxy structure contains only private data and
|
||||
* should only be accessed using the provided API.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
struct _GDBusProxy
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
GDBusProxyPrivate *priv;
|
||||
};
|
||||
|
||||
/**
|
||||
* GDBusProxyClass:
|
||||
* @g_properties_changed: Signal class handler for the #GDBusProxy::g-properties-changed signal.
|
||||
* @g_signal: Signal class handler for the #GDBusProxy::g-signal signal.
|
||||
*
|
||||
* Class structure for #GDBusProxy.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
struct _GDBusProxyClass
|
||||
{
|
||||
/*< private >*/
|
||||
GObjectClass parent_class;
|
||||
|
||||
/*< public >*/
|
||||
/* Signals */
|
||||
void (*g_properties_changed) (GDBusProxy *proxy,
|
||||
GVariant *changed_properties,
|
||||
const gchar* const *invalidated_properties);
|
||||
void (*g_signal) (GDBusProxy *proxy,
|
||||
const gchar *sender_name,
|
||||
const gchar *signal_name,
|
||||
GVariant *parameters);
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
gpointer padding[32];
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_proxy_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_proxy_new (GDBusConnection *connection,
|
||||
GDBusProxyFlags flags,
|
||||
GDBusInterfaceInfo *info,
|
||||
const gchar *name,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusProxy *g_dbus_proxy_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusProxy *g_dbus_proxy_new_sync (GDBusConnection *connection,
|
||||
GDBusProxyFlags flags,
|
||||
GDBusInterfaceInfo *info,
|
||||
const gchar *name,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_proxy_new_for_bus (GBusType bus_type,
|
||||
GDBusProxyFlags flags,
|
||||
GDBusInterfaceInfo *info,
|
||||
const gchar *name,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusProxy *g_dbus_proxy_new_for_bus_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusProxy *g_dbus_proxy_new_for_bus_sync (GBusType bus_type,
|
||||
GDBusProxyFlags flags,
|
||||
GDBusInterfaceInfo *info,
|
||||
const gchar *name,
|
||||
const gchar *object_path,
|
||||
const gchar *interface_name,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusConnection *g_dbus_proxy_get_connection (GDBusProxy *proxy);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusProxyFlags g_dbus_proxy_get_flags (GDBusProxy *proxy);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_proxy_get_name (GDBusProxy *proxy);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar *g_dbus_proxy_get_name_owner (GDBusProxy *proxy);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_proxy_get_object_path (GDBusProxy *proxy);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_proxy_get_interface_name (GDBusProxy *proxy);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gint g_dbus_proxy_get_default_timeout (GDBusProxy *proxy);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_proxy_set_default_timeout (GDBusProxy *proxy,
|
||||
gint timeout_msec);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusInterfaceInfo *g_dbus_proxy_get_interface_info (GDBusProxy *proxy);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_proxy_set_interface_info (GDBusProxy *proxy,
|
||||
GDBusInterfaceInfo *info);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant *g_dbus_proxy_get_cached_property (GDBusProxy *proxy,
|
||||
const gchar *property_name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_proxy_set_cached_property (GDBusProxy *proxy,
|
||||
const gchar *property_name,
|
||||
GVariant *value);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar **g_dbus_proxy_get_cached_property_names (GDBusProxy *proxy);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_proxy_call (GDBusProxy *proxy,
|
||||
const gchar *method_name,
|
||||
GVariant *parameters,
|
||||
GDBusCallFlags flags,
|
||||
gint timeout_msec,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant *g_dbus_proxy_call_finish (GDBusProxy *proxy,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant *g_dbus_proxy_call_sync (GDBusProxy *proxy,
|
||||
const gchar *method_name,
|
||||
GVariant *parameters,
|
||||
GDBusCallFlags flags,
|
||||
gint timeout_msec,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_proxy_call_with_unix_fd_list (GDBusProxy *proxy,
|
||||
const gchar *method_name,
|
||||
GVariant *parameters,
|
||||
GDBusCallFlags flags,
|
||||
gint timeout_msec,
|
||||
GUnixFDList *fd_list,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant *g_dbus_proxy_call_with_unix_fd_list_finish (GDBusProxy *proxy,
|
||||
GUnixFDList **out_fd_list,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant *g_dbus_proxy_call_with_unix_fd_list_sync (GDBusProxy *proxy,
|
||||
const gchar *method_name,
|
||||
GVariant *parameters,
|
||||
GDBusCallFlags flags,
|
||||
gint timeout_msec,
|
||||
GUnixFDList *fd_list,
|
||||
GUnixFDList **out_fd_list,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_PROXY_H__ */
|
|
@ -0,0 +1,60 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_SERVER_H__
|
||||
#define __G_DBUS_SERVER_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DBUS_SERVER (g_dbus_server_get_type ())
|
||||
#define G_DBUS_SERVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_SERVER, GDBusServer))
|
||||
#define G_IS_DBUS_SERVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_SERVER))
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_dbus_server_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusServer *g_dbus_server_new_sync (const gchar *address,
|
||||
GDBusServerFlags flags,
|
||||
const gchar *guid,
|
||||
GDBusAuthObserver *observer,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_server_get_client_address (GDBusServer *server);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_dbus_server_get_guid (GDBusServer *server);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDBusServerFlags g_dbus_server_get_flags (GDBusServer *server);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_server_start (GDBusServer *server);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_server_stop (GDBusServer *server);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_server_is_active (GDBusServer *server);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_SERVER_H__ */
|
|
@ -0,0 +1,55 @@
|
|||
/* GDBus - GLib D-Bus Library
|
||||
*
|
||||
* Copyright (C) 2008-2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DBUS_UTILS_H__
|
||||
#define __G_DBUS_UTILS_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_is_guid (const gchar *string);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar *g_dbus_generate_guid (void);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_is_name (const gchar *string);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_is_unique_name (const gchar *string);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_is_member_name (const gchar *string);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_dbus_is_interface_name (const gchar *string);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_dbus_gvariant_to_gvalue (GVariant *value,
|
||||
GValue *out_gvalue);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVariant *g_dbus_gvalue_to_gvariant (const GValue *gvalue,
|
||||
const GVariantType *type);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DBUS_UTILS_H__ */
|
|
@ -0,0 +1,272 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
* David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_DRIVE_H__
|
||||
#define __G_DRIVE_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE:
|
||||
*
|
||||
* The string used to obtain a Unix device path with g_drive_get_identifier().
|
||||
*
|
||||
* Since: 2.58
|
||||
*/
|
||||
#define G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE "unix-device"
|
||||
|
||||
#define G_TYPE_DRIVE (g_drive_get_type ())
|
||||
#define G_DRIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DRIVE, GDrive))
|
||||
#define G_IS_DRIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DRIVE))
|
||||
#define G_DRIVE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_DRIVE, GDriveIface))
|
||||
|
||||
/**
|
||||
* GDriveIface:
|
||||
* @g_iface: The parent interface.
|
||||
* @changed: Signal emitted when the drive is changed.
|
||||
* @disconnected: The removed signal that is emitted when the #GDrive have been disconnected. If the recipient is holding references to the object they should release them so the object can be finalized.
|
||||
* @eject_button: Signal emitted when the physical eject button (if any) of a drive have been pressed.
|
||||
* @get_name: Returns the name for the given #GDrive.
|
||||
* @get_icon: Returns a #GIcon for the given #GDrive.
|
||||
* @has_volumes: Returns %TRUE if the #GDrive has mountable volumes.
|
||||
* @get_volumes: Returns a list #GList of #GVolume for the #GDrive.
|
||||
* @is_removable: Returns %TRUE if the #GDrive and/or its media is considered removable by the user. Since 2.50.
|
||||
* @is_media_removable: Returns %TRUE if the #GDrive supports removal and insertion of media.
|
||||
* @has_media: Returns %TRUE if the #GDrive has media inserted.
|
||||
* @is_media_check_automatic: Returns %TRUE if the #GDrive is capabable of automatically detecting media changes.
|
||||
* @can_poll_for_media: Returns %TRUE if the #GDrive is capable of manually polling for media change.
|
||||
* @can_eject: Returns %TRUE if the #GDrive can eject media.
|
||||
* @eject: Ejects a #GDrive.
|
||||
* @eject_finish: Finishes an eject operation.
|
||||
* @poll_for_media: Poll for media insertion/removal on a #GDrive.
|
||||
* @poll_for_media_finish: Finishes a media poll operation.
|
||||
* @get_identifier: Returns the identifier of the given kind, or %NULL if
|
||||
* the #GDrive doesn't have one.
|
||||
* @enumerate_identifiers: Returns an array strings listing the kinds
|
||||
* of identifiers which the #GDrive has.
|
||||
* @get_start_stop_type: Gets a #GDriveStartStopType with details about starting/stopping the drive. Since 2.22.
|
||||
* @can_stop: Returns %TRUE if a #GDrive can be stopped. Since 2.22.
|
||||
* @stop: Stops a #GDrive. Since 2.22.
|
||||
* @stop_finish: Finishes a stop operation. Since 2.22.
|
||||
* @can_start: Returns %TRUE if a #GDrive can be started. Since 2.22.
|
||||
* @can_start_degraded: Returns %TRUE if a #GDrive can be started degraded. Since 2.22.
|
||||
* @start: Starts a #GDrive. Since 2.22.
|
||||
* @start_finish: Finishes a start operation. Since 2.22.
|
||||
* @stop_button: Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22.
|
||||
* @eject_with_operation: Starts ejecting a #GDrive using a #GMountOperation. Since 2.22.
|
||||
* @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
|
||||
* @get_sort_key: Gets a key used for sorting #GDrive instances or %NULL if no such key exists. Since 2.32.
|
||||
* @get_symbolic_icon: Returns a symbolic #GIcon for the given #GDrive. Since 2.34.
|
||||
*
|
||||
* Interface for creating #GDrive implementations.
|
||||
*/
|
||||
typedef struct _GDriveIface GDriveIface;
|
||||
|
||||
struct _GDriveIface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
/* signals */
|
||||
void (* changed) (GDrive *drive);
|
||||
void (* disconnected) (GDrive *drive);
|
||||
void (* eject_button) (GDrive *drive);
|
||||
|
||||
/* Virtual Table */
|
||||
char * (* get_name) (GDrive *drive);
|
||||
GIcon * (* get_icon) (GDrive *drive);
|
||||
gboolean (* has_volumes) (GDrive *drive);
|
||||
GList * (* get_volumes) (GDrive *drive);
|
||||
gboolean (* is_media_removable) (GDrive *drive);
|
||||
gboolean (* has_media) (GDrive *drive);
|
||||
gboolean (* is_media_check_automatic) (GDrive *drive);
|
||||
gboolean (* can_eject) (GDrive *drive);
|
||||
gboolean (* can_poll_for_media) (GDrive *drive);
|
||||
void (* eject) (GDrive *drive,
|
||||
GMountUnmountFlags flags,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (* eject_finish) (GDrive *drive,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
void (* poll_for_media) (GDrive *drive,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (* poll_for_media_finish) (GDrive *drive,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
char * (* get_identifier) (GDrive *drive,
|
||||
const char *kind);
|
||||
char ** (* enumerate_identifiers) (GDrive *drive);
|
||||
|
||||
GDriveStartStopType (* get_start_stop_type) (GDrive *drive);
|
||||
|
||||
gboolean (* can_start) (GDrive *drive);
|
||||
gboolean (* can_start_degraded) (GDrive *drive);
|
||||
void (* start) (GDrive *drive,
|
||||
GDriveStartFlags flags,
|
||||
GMountOperation *mount_operation,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (* start_finish) (GDrive *drive,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
gboolean (* can_stop) (GDrive *drive);
|
||||
void (* stop) (GDrive *drive,
|
||||
GMountUnmountFlags flags,
|
||||
GMountOperation *mount_operation,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (* stop_finish) (GDrive *drive,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
/* signal, not VFunc */
|
||||
void (* stop_button) (GDrive *drive);
|
||||
|
||||
void (* eject_with_operation) (GDrive *drive,
|
||||
GMountUnmountFlags flags,
|
||||
GMountOperation *mount_operation,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (* eject_with_operation_finish) (GDrive *drive,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
const gchar * (* get_sort_key) (GDrive *drive);
|
||||
GIcon * (* get_symbolic_icon) (GDrive *drive);
|
||||
gboolean (* is_removable) (GDrive *drive);
|
||||
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_drive_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char * g_drive_get_name (GDrive *drive);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIcon * g_drive_get_icon (GDrive *drive);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIcon * g_drive_get_symbolic_icon (GDrive *drive);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_drive_has_volumes (GDrive *drive);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GList * g_drive_get_volumes (GDrive *drive);
|
||||
GLIB_AVAILABLE_IN_2_50
|
||||
gboolean g_drive_is_removable (GDrive *drive);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_drive_is_media_removable (GDrive *drive);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_drive_has_media (GDrive *drive);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_drive_is_media_check_automatic (GDrive *drive);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_drive_can_poll_for_media (GDrive *drive);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_drive_can_eject (GDrive *drive);
|
||||
GLIB_DEPRECATED_FOR(g_drive_eject_with_operation)
|
||||
void g_drive_eject (GDrive *drive,
|
||||
GMountUnmountFlags flags,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
GLIB_DEPRECATED_FOR(g_drive_eject_with_operation_finish)
|
||||
gboolean g_drive_eject_finish (GDrive *drive,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_drive_poll_for_media (GDrive *drive,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_drive_poll_for_media_finish (GDrive *drive,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char * g_drive_get_identifier (GDrive *drive,
|
||||
const char *kind);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char ** g_drive_enumerate_identifiers (GDrive *drive);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDriveStartStopType g_drive_get_start_stop_type (GDrive *drive);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_drive_can_start (GDrive *drive);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_drive_can_start_degraded (GDrive *drive);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_drive_start (GDrive *drive,
|
||||
GDriveStartFlags flags,
|
||||
GMountOperation *mount_operation,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_drive_start_finish (GDrive *drive,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_drive_can_stop (GDrive *drive);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_drive_stop (GDrive *drive,
|
||||
GMountUnmountFlags flags,
|
||||
GMountOperation *mount_operation,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_drive_stop_finish (GDrive *drive,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_drive_eject_with_operation (GDrive *drive,
|
||||
GMountUnmountFlags flags,
|
||||
GMountOperation *mount_operation,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_drive_eject_with_operation_finish (GDrive *drive,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
const gchar *g_drive_get_sort_key (GDrive *drive);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DRIVE_H__ */
|
|
@ -0,0 +1,75 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright © 2010 Red Hat, Inc.
|
||||
* Copyright © 2015 Collabora, Ltd.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __G_DTLS_CLIENT_CONNECTION_H__
|
||||
#define __G_DTLS_CLIENT_CONNECTION_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gdtlsconnection.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DTLS_CLIENT_CONNECTION (g_dtls_client_connection_get_type ())
|
||||
#define G_DTLS_CLIENT_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_DTLS_CLIENT_CONNECTION, GDtlsClientConnection))
|
||||
#define G_IS_DTLS_CLIENT_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_DTLS_CLIENT_CONNECTION))
|
||||
#define G_DTLS_CLIENT_CONNECTION_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_DTLS_CLIENT_CONNECTION, GDtlsClientConnectionInterface))
|
||||
|
||||
typedef struct _GDtlsClientConnectionInterface GDtlsClientConnectionInterface;
|
||||
|
||||
/**
|
||||
* GDtlsClientConnectionInterface:
|
||||
* @g_iface: The parent interface.
|
||||
*
|
||||
* vtable for a #GDtlsClientConnection implementation.
|
||||
*
|
||||
* Since: 2.48
|
||||
*/
|
||||
struct _GDtlsClientConnectionInterface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
GType g_dtls_client_connection_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
GDatagramBased *g_dtls_client_connection_new (GDatagramBased *base_socket,
|
||||
GSocketConnectable *server_identity,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
GTlsCertificateFlags g_dtls_client_connection_get_validation_flags (GDtlsClientConnection *conn);
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
void g_dtls_client_connection_set_validation_flags (GDtlsClientConnection *conn,
|
||||
GTlsCertificateFlags flags);
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
GSocketConnectable *g_dtls_client_connection_get_server_identity (GDtlsClientConnection *conn);
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
void g_dtls_client_connection_set_server_identity (GDtlsClientConnection *conn,
|
||||
GSocketConnectable *identity);
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
GList * g_dtls_client_connection_get_accepted_cas (GDtlsClientConnection *conn);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DTLS_CLIENT_CONNECTION_H__ */
|
|
@ -0,0 +1,206 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright © 2010 Red Hat, Inc.
|
||||
* Copyright © 2015 Collabora, Ltd.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __G_DTLS_CONNECTION_H__
|
||||
#define __G_DTLS_CONNECTION_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gdatagrambased.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DTLS_CONNECTION (g_dtls_connection_get_type ())
|
||||
#define G_DTLS_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_DTLS_CONNECTION, GDtlsConnection))
|
||||
#define G_IS_DTLS_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_DTLS_CONNECTION))
|
||||
#define G_DTLS_CONNECTION_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_DTLS_CONNECTION, GDtlsConnectionInterface))
|
||||
|
||||
typedef struct _GDtlsConnectionInterface GDtlsConnectionInterface;
|
||||
|
||||
/**
|
||||
* GDtlsConnectionInterface:
|
||||
* @g_iface: The parent interface.
|
||||
* @accept_certificate: Check whether to accept a certificate.
|
||||
* @handshake: Perform a handshake operation.
|
||||
* @handshake_async: Start an asynchronous handshake operation.
|
||||
* @handshake_finish: Finish an asynchronous handshake operation.
|
||||
* @shutdown: Shut down one or both directions of the connection.
|
||||
* @shutdown_async: Start an asynchronous shutdown operation.
|
||||
* @shutdown_finish: Finish an asynchronous shutdown operation.
|
||||
* @set_advertised_protocols: Set APLN protocol list
|
||||
* @get_negotiated_protocol: Retrieve ALPN-negotiated protocol
|
||||
*
|
||||
* Virtual method table for a #GDtlsConnection implementation.
|
||||
*
|
||||
* Since: 2.48
|
||||
*/
|
||||
struct _GDtlsConnectionInterface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
/* signals */
|
||||
gboolean (*accept_certificate) (GDtlsConnection *connection,
|
||||
GTlsCertificate *peer_cert,
|
||||
GTlsCertificateFlags errors);
|
||||
|
||||
/* methods */
|
||||
gboolean (*handshake) (GDtlsConnection *conn,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
void (*handshake_async) (GDtlsConnection *conn,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (*handshake_finish) (GDtlsConnection *conn,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
gboolean (*shutdown) (GDtlsConnection *conn,
|
||||
gboolean shutdown_read,
|
||||
gboolean shutdown_write,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
void (*shutdown_async) (GDtlsConnection *conn,
|
||||
gboolean shutdown_read,
|
||||
gboolean shutdown_write,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (*shutdown_finish) (GDtlsConnection *conn,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
void (*set_advertised_protocols) (GDtlsConnection *conn,
|
||||
const gchar * const *protocols);
|
||||
const gchar *(*get_negotiated_protocol) (GDtlsConnection *conn);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
GType g_dtls_connection_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
void g_dtls_connection_set_database (GDtlsConnection *conn,
|
||||
GTlsDatabase *database);
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
GTlsDatabase *g_dtls_connection_get_database (GDtlsConnection *conn);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
void g_dtls_connection_set_certificate (GDtlsConnection *conn,
|
||||
GTlsCertificate *certificate);
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
GTlsCertificate *g_dtls_connection_get_certificate (GDtlsConnection *conn);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
void g_dtls_connection_set_interaction (GDtlsConnection *conn,
|
||||
GTlsInteraction *interaction);
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
GTlsInteraction *g_dtls_connection_get_interaction (GDtlsConnection *conn);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
GTlsCertificate *g_dtls_connection_get_peer_certificate (GDtlsConnection *conn);
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
GTlsCertificateFlags g_dtls_connection_get_peer_certificate_errors (GDtlsConnection *conn);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
void g_dtls_connection_set_require_close_notify (GDtlsConnection *conn,
|
||||
gboolean require_close_notify);
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
gboolean g_dtls_connection_get_require_close_notify (GDtlsConnection *conn);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
GLIB_DEPRECATED_IN_2_60
|
||||
void g_dtls_connection_set_rehandshake_mode (GDtlsConnection *conn,
|
||||
GTlsRehandshakeMode mode);
|
||||
GLIB_DEPRECATED_IN_2_60
|
||||
GTlsRehandshakeMode g_dtls_connection_get_rehandshake_mode (GDtlsConnection *conn);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
gboolean g_dtls_connection_handshake (GDtlsConnection *conn,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
void g_dtls_connection_handshake_async (GDtlsConnection *conn,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
gboolean g_dtls_connection_handshake_finish (GDtlsConnection *conn,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
gboolean g_dtls_connection_shutdown (GDtlsConnection *conn,
|
||||
gboolean shutdown_read,
|
||||
gboolean shutdown_write,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
void g_dtls_connection_shutdown_async (GDtlsConnection *conn,
|
||||
gboolean shutdown_read,
|
||||
gboolean shutdown_write,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
gboolean g_dtls_connection_shutdown_finish (GDtlsConnection *conn,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
gboolean g_dtls_connection_close (GDtlsConnection *conn,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
void g_dtls_connection_close_async (GDtlsConnection *conn,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
gboolean g_dtls_connection_close_finish (GDtlsConnection *conn,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
/*< protected >*/
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
gboolean g_dtls_connection_emit_accept_certificate (GDtlsConnection *conn,
|
||||
GTlsCertificate *peer_cert,
|
||||
GTlsCertificateFlags errors);
|
||||
GLIB_AVAILABLE_IN_2_60
|
||||
void g_dtls_connection_set_advertised_protocols (GDtlsConnection *conn,
|
||||
const gchar * const *protocols);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_60
|
||||
const gchar * g_dtls_connection_get_negotiated_protocol (GDtlsConnection *conn);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DTLS_CONNECTION_H__ */
|
|
@ -0,0 +1,69 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright © 2010 Red Hat, Inc.
|
||||
* Copyright © 2015 Collabora, Ltd.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __G_DTLS_SERVER_CONNECTION_H__
|
||||
#define __G_DTLS_SERVER_CONNECTION_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gdtlsconnection.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_DTLS_SERVER_CONNECTION (g_dtls_server_connection_get_type ())
|
||||
#define G_DTLS_SERVER_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), G_TYPE_DTLS_SERVER_CONNECTION, GDtlsServerConnection))
|
||||
#define G_IS_DTLS_SERVER_CONNECTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_DTLS_SERVER_CONNECTION))
|
||||
#define G_DTLS_SERVER_CONNECTION_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_DTLS_SERVER_CONNECTION, GDtlsServerConnectionInterface))
|
||||
|
||||
/**
|
||||
* GDtlsServerConnection:
|
||||
*
|
||||
* DTLS server-side connection. This is the server-side implementation
|
||||
* of a #GDtlsConnection.
|
||||
*
|
||||
* Since: 2.48
|
||||
*/
|
||||
typedef struct _GDtlsServerConnectionInterface GDtlsServerConnectionInterface;
|
||||
|
||||
/**
|
||||
* GDtlsServerConnectionInterface:
|
||||
* @g_iface: The parent interface.
|
||||
*
|
||||
* vtable for a #GDtlsServerConnection implementation.
|
||||
*
|
||||
* Since: 2.48
|
||||
*/
|
||||
struct _GDtlsServerConnectionInterface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
GType g_dtls_server_connection_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_2_48
|
||||
GDatagramBased *g_dtls_server_connection_new (GDatagramBased *base_socket,
|
||||
GTlsCertificate *certificate,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_DTLS_SERVER_CONNECTION_H__ */
|
|
@ -0,0 +1,61 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2008 Clemens N. Buss <cebuzz@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __G_EMBLEM_H__
|
||||
#define __G_EMBLEM_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gioenums.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_EMBLEM (g_emblem_get_type ())
|
||||
#define G_EMBLEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_EMBLEM, GEmblem))
|
||||
#define G_EMBLEM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_EMBLEM, GEmblemClass))
|
||||
#define G_IS_EMBLEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_EMBLEM))
|
||||
#define G_IS_EMBLEM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_EMBLEM))
|
||||
#define G_EMBLEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_EMBLEM, GEmblemClass))
|
||||
|
||||
/**
|
||||
* GEmblem:
|
||||
*
|
||||
* An object for Emblems
|
||||
*/
|
||||
typedef struct _GEmblem GEmblem;
|
||||
typedef struct _GEmblemClass GEmblemClass;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_emblem_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GEmblem *g_emblem_new (GIcon *icon);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GEmblem *g_emblem_new_with_origin (GIcon *icon,
|
||||
GEmblemOrigin origin);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIcon *g_emblem_get_icon (GEmblem *emblem);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GEmblemOrigin g_emblem_get_origin (GEmblem *emblem);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_EMBLEM_H__ */
|
|
@ -0,0 +1,81 @@
|
|||
/* Gio - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Matthias Clasen <mclasen@redhat.com>
|
||||
* Clemens N. Buss <cebuzz@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_EMBLEMED_ICON_H__
|
||||
#define __G_EMBLEMED_ICON_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gicon.h>
|
||||
#include <gio/gemblem.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_EMBLEMED_ICON (g_emblemed_icon_get_type ())
|
||||
#define G_EMBLEMED_ICON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_EMBLEMED_ICON, GEmblemedIcon))
|
||||
#define G_EMBLEMED_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_EMBLEMED_ICON, GEmblemedIconClass))
|
||||
#define G_IS_EMBLEMED_ICON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_EMBLEMED_ICON))
|
||||
#define G_IS_EMBLEMED_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_EMBLEMED_ICON))
|
||||
#define G_EMBLEMED_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_EMBLEMED_ICON, GEmblemedIconClass))
|
||||
|
||||
/**
|
||||
* GEmblemedIcon:
|
||||
*
|
||||
* An implementation of #GIcon for icons with emblems.
|
||||
**/
|
||||
typedef struct _GEmblemedIcon GEmblemedIcon;
|
||||
typedef struct _GEmblemedIconClass GEmblemedIconClass;
|
||||
typedef struct _GEmblemedIconPrivate GEmblemedIconPrivate;
|
||||
|
||||
struct _GEmblemedIcon
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GEmblemedIconPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GEmblemedIconClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_emblemed_icon_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIcon *g_emblemed_icon_new (GIcon *icon,
|
||||
GEmblem *emblem);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIcon *g_emblemed_icon_get_icon (GEmblemedIcon *emblemed);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GList *g_emblemed_icon_get_emblems (GEmblemedIcon *emblemed);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_emblemed_icon_add_emblem (GEmblemedIcon *emblemed,
|
||||
GEmblem *emblem);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_emblemed_icon_clear_emblems (GEmblemedIcon *emblemed);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_EMBLEMED_ICON_H__ */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,84 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_FILE_ATTRIBUTE_H__
|
||||
#define __G_FILE_ATTRIBUTE_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* GFileAttributeInfo:
|
||||
* @name: the name of the attribute.
|
||||
* @type: the #GFileAttributeType type of the attribute.
|
||||
* @flags: a set of #GFileAttributeInfoFlags.
|
||||
*
|
||||
* Information about a specific attribute.
|
||||
**/
|
||||
struct _GFileAttributeInfo
|
||||
{
|
||||
char *name;
|
||||
GFileAttributeType type;
|
||||
GFileAttributeInfoFlags flags;
|
||||
};
|
||||
|
||||
/**
|
||||
* GFileAttributeInfoList:
|
||||
* @infos: an array of #GFileAttributeInfos.
|
||||
* @n_infos: the number of values in the array.
|
||||
*
|
||||
* Acts as a lightweight registry for possible valid file attributes.
|
||||
* The registry stores Key-Value pair formats as #GFileAttributeInfos.
|
||||
**/
|
||||
struct _GFileAttributeInfoList
|
||||
{
|
||||
GFileAttributeInfo *infos;
|
||||
int n_infos;
|
||||
};
|
||||
|
||||
#define G_TYPE_FILE_ATTRIBUTE_INFO_LIST (g_file_attribute_info_list_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_file_attribute_info_list_get_type (void);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GFileAttributeInfoList * g_file_attribute_info_list_new (void);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GFileAttributeInfoList * g_file_attribute_info_list_ref (GFileAttributeInfoList *list);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_file_attribute_info_list_unref (GFileAttributeInfoList *list);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GFileAttributeInfoList * g_file_attribute_info_list_dup (GFileAttributeInfoList *list);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const GFileAttributeInfo *g_file_attribute_info_list_lookup (GFileAttributeInfoList *list,
|
||||
const char *name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_file_attribute_info_list_add (GFileAttributeInfoList *list,
|
||||
const char *name,
|
||||
GFileAttributeType type,
|
||||
GFileAttributeInfoFlags flags);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_FILE_INFO_H__ */
|
|
@ -0,0 +1,152 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_FILE_ENUMERATOR_H__
|
||||
#define __G_FILE_ENUMERATOR_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_FILE_ENUMERATOR (g_file_enumerator_get_type ())
|
||||
#define G_FILE_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_ENUMERATOR, GFileEnumerator))
|
||||
#define G_FILE_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_ENUMERATOR, GFileEnumeratorClass))
|
||||
#define G_IS_FILE_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_ENUMERATOR))
|
||||
#define G_IS_FILE_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_ENUMERATOR))
|
||||
#define G_FILE_ENUMERATOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_ENUMERATOR, GFileEnumeratorClass))
|
||||
|
||||
/**
|
||||
* GFileEnumerator:
|
||||
*
|
||||
* A per matched file iterator.
|
||||
**/
|
||||
typedef struct _GFileEnumeratorClass GFileEnumeratorClass;
|
||||
typedef struct _GFileEnumeratorPrivate GFileEnumeratorPrivate;
|
||||
|
||||
struct _GFileEnumerator
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GFileEnumeratorPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GFileEnumeratorClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
/* Virtual Table */
|
||||
|
||||
GFileInfo * (* next_file) (GFileEnumerator *enumerator,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
gboolean (* close_fn) (GFileEnumerator *enumerator,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
void (* next_files_async) (GFileEnumerator *enumerator,
|
||||
int num_files,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GList * (* next_files_finish) (GFileEnumerator *enumerator,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
void (* close_async) (GFileEnumerator *enumerator,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (* close_finish) (GFileEnumerator *enumerator,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
void (*_g_reserved6) (void);
|
||||
void (*_g_reserved7) (void);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_file_enumerator_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GFileInfo *g_file_enumerator_next_file (GFileEnumerator *enumerator,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_file_enumerator_close (GFileEnumerator *enumerator,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_file_enumerator_next_files_async (GFileEnumerator *enumerator,
|
||||
int num_files,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GList * g_file_enumerator_next_files_finish (GFileEnumerator *enumerator,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_file_enumerator_close_async (GFileEnumerator *enumerator,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_file_enumerator_close_finish (GFileEnumerator *enumerator,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_file_enumerator_is_closed (GFileEnumerator *enumerator);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_file_enumerator_has_pending (GFileEnumerator *enumerator);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_file_enumerator_set_pending (GFileEnumerator *enumerator,
|
||||
gboolean pending);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GFile * g_file_enumerator_get_container (GFileEnumerator *enumerator);
|
||||
GLIB_AVAILABLE_IN_2_36
|
||||
GFile * g_file_enumerator_get_child (GFileEnumerator *enumerator,
|
||||
GFileInfo *info);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
gboolean g_file_enumerator_iterate (GFileEnumerator *direnum,
|
||||
GFileInfo **out_info,
|
||||
GFile **out_child,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_FILE_ENUMERATOR_H__ */
|
|
@ -0,0 +1,57 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_FILE_ICON_H__
|
||||
#define __G_FILE_ICON_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_FILE_ICON (g_file_icon_get_type ())
|
||||
#define G_FILE_ICON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_ICON, GFileIcon))
|
||||
#define G_FILE_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_ICON, GFileIconClass))
|
||||
#define G_IS_FILE_ICON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_ICON))
|
||||
#define G_IS_FILE_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_ICON))
|
||||
#define G_FILE_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_ICON, GFileIconClass))
|
||||
|
||||
/**
|
||||
* GFileIcon:
|
||||
*
|
||||
* Gets an icon for a #GFile. Implements #GLoadableIcon.
|
||||
**/
|
||||
typedef struct _GFileIconClass GFileIconClass;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_file_icon_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIcon * g_file_icon_new (GFile *file);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GFile * g_file_icon_get_file (GFileIcon *icon);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_FILE_ICON_H__ */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,114 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_FILE_INPUT_STREAM_H__
|
||||
#define __G_FILE_INPUT_STREAM_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/ginputstream.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_FILE_INPUT_STREAM (g_file_input_stream_get_type ())
|
||||
#define G_FILE_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_INPUT_STREAM, GFileInputStream))
|
||||
#define G_FILE_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_INPUT_STREAM, GFileInputStreamClass))
|
||||
#define G_IS_FILE_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_INPUT_STREAM))
|
||||
#define G_IS_FILE_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_INPUT_STREAM))
|
||||
#define G_FILE_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_INPUT_STREAM, GFileInputStreamClass))
|
||||
|
||||
/**
|
||||
* GFileInputStream:
|
||||
*
|
||||
* A subclass of GInputStream for opened files. This adds
|
||||
* a few file-specific operations and seeking.
|
||||
*
|
||||
* #GFileInputStream implements #GSeekable.
|
||||
**/
|
||||
typedef struct _GFileInputStreamClass GFileInputStreamClass;
|
||||
typedef struct _GFileInputStreamPrivate GFileInputStreamPrivate;
|
||||
|
||||
struct _GFileInputStream
|
||||
{
|
||||
GInputStream parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GFileInputStreamPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GFileInputStreamClass
|
||||
{
|
||||
GInputStreamClass parent_class;
|
||||
|
||||
goffset (* tell) (GFileInputStream *stream);
|
||||
gboolean (* can_seek) (GFileInputStream *stream);
|
||||
gboolean (* seek) (GFileInputStream *stream,
|
||||
goffset offset,
|
||||
GSeekType type,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GFileInfo * (* query_info) (GFileInputStream *stream,
|
||||
const char *attributes,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
void (* query_info_async) (GFileInputStream *stream,
|
||||
const char *attributes,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GFileInfo * (* query_info_finish) (GFileInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_file_input_stream_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GFileInfo *g_file_input_stream_query_info (GFileInputStream *stream,
|
||||
const char *attributes,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_file_input_stream_query_info_async (GFileInputStream *stream,
|
||||
const char *attributes,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GFileInfo *g_file_input_stream_query_info_finish (GFileInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_FILE_FILE_INPUT_STREAM_H__ */
|
|
@ -0,0 +1,121 @@
|
|||
/* GIO - GLib Input, Io and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_FILE_IO_STREAM_H__
|
||||
#define __G_FILE_IO_STREAM_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giostream.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_FILE_IO_STREAM (g_file_io_stream_get_type ())
|
||||
#define G_FILE_IO_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_IO_STREAM, GFileIOStream))
|
||||
#define G_FILE_IO_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_IO_STREAM, GFileIOStreamClass))
|
||||
#define G_IS_FILE_IO_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_IO_STREAM))
|
||||
#define G_IS_FILE_IO_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_IO_STREAM))
|
||||
#define G_FILE_IO_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_IO_STREAM, GFileIOStreamClass))
|
||||
|
||||
/**
|
||||
* GFileIOStream:
|
||||
*
|
||||
* A subclass of GIOStream for opened files. This adds
|
||||
* a few file-specific operations and seeking and truncating.
|
||||
*
|
||||
* #GFileIOStream implements GSeekable.
|
||||
**/
|
||||
typedef struct _GFileIOStreamClass GFileIOStreamClass;
|
||||
typedef struct _GFileIOStreamPrivate GFileIOStreamPrivate;
|
||||
|
||||
struct _GFileIOStream
|
||||
{
|
||||
GIOStream parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GFileIOStreamPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GFileIOStreamClass
|
||||
{
|
||||
GIOStreamClass parent_class;
|
||||
|
||||
goffset (* tell) (GFileIOStream *stream);
|
||||
gboolean (* can_seek) (GFileIOStream *stream);
|
||||
gboolean (* seek) (GFileIOStream *stream,
|
||||
goffset offset,
|
||||
GSeekType type,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
gboolean (* can_truncate) (GFileIOStream *stream);
|
||||
gboolean (* truncate_fn) (GFileIOStream *stream,
|
||||
goffset size,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GFileInfo * (* query_info) (GFileIOStream *stream,
|
||||
const char *attributes,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
void (* query_info_async) (GFileIOStream *stream,
|
||||
const char *attributes,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GFileInfo * (* query_info_finish) (GFileIOStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
char * (* get_etag) (GFileIOStream *stream);
|
||||
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_file_io_stream_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GFileInfo *g_file_io_stream_query_info (GFileIOStream *stream,
|
||||
const char *attributes,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_file_io_stream_query_info_async (GFileIOStream *stream,
|
||||
const char *attributes,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GFileInfo *g_file_io_stream_query_info_finish (GFileIOStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char * g_file_io_stream_get_etag (GFileIOStream *stream);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_FILE_FILE_IO_STREAM_H__ */
|
|
@ -0,0 +1,98 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_FILE_MONITOR_H__
|
||||
#define __G_FILE_MONITOR_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_FILE_MONITOR (g_file_monitor_get_type ())
|
||||
#define G_FILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_MONITOR, GFileMonitor))
|
||||
#define G_FILE_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_MONITOR, GFileMonitorClass))
|
||||
#define G_IS_FILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_MONITOR))
|
||||
#define G_IS_FILE_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_MONITOR))
|
||||
#define G_FILE_MONITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_MONITOR, GFileMonitorClass))
|
||||
|
||||
typedef struct _GFileMonitorClass GFileMonitorClass;
|
||||
typedef struct _GFileMonitorPrivate GFileMonitorPrivate;
|
||||
|
||||
/**
|
||||
* GFileMonitor:
|
||||
*
|
||||
* Watches for changes to a file.
|
||||
**/
|
||||
struct _GFileMonitor
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GFileMonitorPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GFileMonitorClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
/* Signals */
|
||||
void (* changed) (GFileMonitor *monitor,
|
||||
GFile *file,
|
||||
GFile *other_file,
|
||||
GFileMonitorEvent event_type);
|
||||
|
||||
/* Virtual Table */
|
||||
gboolean (* cancel) (GFileMonitor *monitor);
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_file_monitor_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_file_monitor_cancel (GFileMonitor *monitor);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_file_monitor_is_cancelled (GFileMonitor *monitor);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_file_monitor_set_rate_limit (GFileMonitor *monitor,
|
||||
gint limit_msecs);
|
||||
|
||||
|
||||
/* For implementations */
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_file_monitor_emit_event (GFileMonitor *monitor,
|
||||
GFile *child,
|
||||
GFile *other_file,
|
||||
GFileMonitorEvent event_type);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_FILE_MONITOR_H__ */
|
|
@ -0,0 +1,79 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_FILENAME_COMPLETER_H__
|
||||
#define __G_FILENAME_COMPLETER_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_FILENAME_COMPLETER (g_filename_completer_get_type ())
|
||||
#define G_FILENAME_COMPLETER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILENAME_COMPLETER, GFilenameCompleter))
|
||||
#define G_FILENAME_COMPLETER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILENAME_COMPLETER, GFilenameCompleterClass))
|
||||
#define G_FILENAME_COMPLETER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILENAME_COMPLETER, GFilenameCompleterClass))
|
||||
#define G_IS_FILENAME_COMPLETER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILENAME_COMPLETER))
|
||||
#define G_IS_FILENAME_COMPLETER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILENAME_COMPLETER))
|
||||
|
||||
/**
|
||||
* GFilenameCompleter:
|
||||
*
|
||||
* Completes filenames based on files that exist within the file system.
|
||||
**/
|
||||
typedef struct _GFilenameCompleterClass GFilenameCompleterClass;
|
||||
|
||||
struct _GFilenameCompleterClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
/*< public >*/
|
||||
/* signals */
|
||||
void (* got_completion_data) (GFilenameCompleter *filename_completer);
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_filename_completer_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GFilenameCompleter *g_filename_completer_new (void);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char * g_filename_completer_get_completion_suffix (GFilenameCompleter *completer,
|
||||
const char *initial_text);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char ** g_filename_completer_get_completions (GFilenameCompleter *completer,
|
||||
const char *initial_text);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_filename_completer_set_dirs_only (GFilenameCompleter *completer,
|
||||
gboolean dirs_only);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_FILENAME_COMPLETER_H__ */
|
|
@ -0,0 +1,122 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_FILE_OUTPUT_STREAM_H__
|
||||
#define __G_FILE_OUTPUT_STREAM_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/goutputstream.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_FILE_OUTPUT_STREAM (g_file_output_stream_get_type ())
|
||||
#define G_FILE_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_OUTPUT_STREAM, GFileOutputStream))
|
||||
#define G_FILE_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_OUTPUT_STREAM, GFileOutputStreamClass))
|
||||
#define G_IS_FILE_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILE_OUTPUT_STREAM))
|
||||
#define G_IS_FILE_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_OUTPUT_STREAM))
|
||||
#define G_FILE_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_OUTPUT_STREAM, GFileOutputStreamClass))
|
||||
|
||||
/**
|
||||
* GFileOutputStream:
|
||||
*
|
||||
* A subclass of GOutputStream for opened files. This adds
|
||||
* a few file-specific operations and seeking and truncating.
|
||||
*
|
||||
* #GFileOutputStream implements GSeekable.
|
||||
**/
|
||||
typedef struct _GFileOutputStreamClass GFileOutputStreamClass;
|
||||
typedef struct _GFileOutputStreamPrivate GFileOutputStreamPrivate;
|
||||
|
||||
struct _GFileOutputStream
|
||||
{
|
||||
GOutputStream parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GFileOutputStreamPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GFileOutputStreamClass
|
||||
{
|
||||
GOutputStreamClass parent_class;
|
||||
|
||||
goffset (* tell) (GFileOutputStream *stream);
|
||||
gboolean (* can_seek) (GFileOutputStream *stream);
|
||||
gboolean (* seek) (GFileOutputStream *stream,
|
||||
goffset offset,
|
||||
GSeekType type,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
gboolean (* can_truncate) (GFileOutputStream *stream);
|
||||
gboolean (* truncate_fn) (GFileOutputStream *stream,
|
||||
goffset size,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GFileInfo * (* query_info) (GFileOutputStream *stream,
|
||||
const char *attributes,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
void (* query_info_async) (GFileOutputStream *stream,
|
||||
const char *attributes,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GFileInfo * (* query_info_finish) (GFileOutputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
char * (* get_etag) (GFileOutputStream *stream);
|
||||
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_file_output_stream_get_type (void) G_GNUC_CONST;
|
||||
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GFileInfo *g_file_output_stream_query_info (GFileOutputStream *stream,
|
||||
const char *attributes,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_file_output_stream_query_info_async (GFileOutputStream *stream,
|
||||
const char *attributes,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GFileInfo *g_file_output_stream_query_info_finish (GFileOutputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char * g_file_output_stream_get_etag (GFileOutputStream *stream);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_FILE_FILE_OUTPUT_STREAM_H__ */
|
|
@ -0,0 +1,78 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Christian Kellner <gicmo@gnome.org>
|
||||
*/
|
||||
|
||||
#ifndef __G_FILTER_INPUT_STREAM_H__
|
||||
#define __G_FILTER_INPUT_STREAM_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/ginputstream.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_FILTER_INPUT_STREAM (g_filter_input_stream_get_type ())
|
||||
#define G_FILTER_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILTER_INPUT_STREAM, GFilterInputStream))
|
||||
#define G_FILTER_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILTER_INPUT_STREAM, GFilterInputStreamClass))
|
||||
#define G_IS_FILTER_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILTER_INPUT_STREAM))
|
||||
#define G_IS_FILTER_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILTER_INPUT_STREAM))
|
||||
#define G_FILTER_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILTER_INPUT_STREAM, GFilterInputStreamClass))
|
||||
|
||||
/**
|
||||
* GFilterInputStream:
|
||||
*
|
||||
* A base class for all input streams that work on an underlying stream.
|
||||
**/
|
||||
typedef struct _GFilterInputStreamClass GFilterInputStreamClass;
|
||||
|
||||
struct _GFilterInputStream
|
||||
{
|
||||
GInputStream parent_instance;
|
||||
|
||||
/*<protected >*/
|
||||
GInputStream *base_stream;
|
||||
};
|
||||
|
||||
struct _GFilterInputStreamClass
|
||||
{
|
||||
GInputStreamClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
};
|
||||
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_filter_input_stream_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GInputStream * g_filter_input_stream_get_base_stream (GFilterInputStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_filter_input_stream_get_close_base_stream (GFilterInputStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_filter_input_stream_set_close_base_stream (GFilterInputStream *stream,
|
||||
gboolean close_base);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_FILTER_INPUT_STREAM_H__ */
|
|
@ -0,0 +1,78 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Christian Kellner <gicmo@gnome.org>
|
||||
*/
|
||||
|
||||
#ifndef __G_FILTER_OUTPUT_STREAM_H__
|
||||
#define __G_FILTER_OUTPUT_STREAM_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/goutputstream.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_FILTER_OUTPUT_STREAM (g_filter_output_stream_get_type ())
|
||||
#define G_FILTER_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILTER_OUTPUT_STREAM, GFilterOutputStream))
|
||||
#define G_FILTER_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILTER_OUTPUT_STREAM, GFilterOutputStreamClass))
|
||||
#define G_IS_FILTER_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_FILTER_OUTPUT_STREAM))
|
||||
#define G_IS_FILTER_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILTER_OUTPUT_STREAM))
|
||||
#define G_FILTER_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILTER_OUTPUT_STREAM, GFilterOutputStreamClass))
|
||||
|
||||
/**
|
||||
* GFilterOutputStream:
|
||||
*
|
||||
* A base class for all output streams that work on an underlying stream.
|
||||
**/
|
||||
typedef struct _GFilterOutputStreamClass GFilterOutputStreamClass;
|
||||
|
||||
struct _GFilterOutputStream
|
||||
{
|
||||
GOutputStream parent_instance;
|
||||
|
||||
/*< protected >*/
|
||||
GOutputStream *base_stream;
|
||||
};
|
||||
|
||||
struct _GFilterOutputStreamClass
|
||||
{
|
||||
GOutputStreamClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
};
|
||||
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_filter_output_stream_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GOutputStream * g_filter_output_stream_get_base_stream (GFilterOutputStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_filter_output_stream_get_close_base_stream (GFilterOutputStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_filter_output_stream_set_close_base_stream (GFilterOutputStream *stream,
|
||||
gboolean close_base);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_FILTER_OUTPUT_STREAM_H__ */
|
|
@ -0,0 +1,102 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_ICON_H__
|
||||
#define __G_ICON_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_ICON (g_icon_get_type ())
|
||||
#define G_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_ICON, GIcon))
|
||||
#define G_IS_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_ICON))
|
||||
#define G_ICON_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_ICON, GIconIface))
|
||||
|
||||
/**
|
||||
* GIcon:
|
||||
*
|
||||
* An abstract type that specifies an icon.
|
||||
**/
|
||||
typedef struct _GIconIface GIconIface;
|
||||
|
||||
/**
|
||||
* GIconIface:
|
||||
* @g_iface: The parent interface.
|
||||
* @hash: A hash for a given #GIcon.
|
||||
* @equal: Checks if two #GIcons are equal.
|
||||
* @to_tokens: Serializes a #GIcon into tokens. The tokens must not
|
||||
* contain any whitespace. Don't implement if the #GIcon can't be
|
||||
* serialized (Since 2.20).
|
||||
* @from_tokens: Constructs a #GIcon from tokens. Set the #GError if
|
||||
* the tokens are malformed. Don't implement if the #GIcon can't be
|
||||
* serialized (Since 2.20).
|
||||
* @serialize: Serializes a #GIcon into a #GVariant. Since: 2.38
|
||||
*
|
||||
* GIconIface is used to implement GIcon types for various
|
||||
* different systems. See #GThemedIcon and #GLoadableIcon for
|
||||
* examples of how to implement this interface.
|
||||
*/
|
||||
struct _GIconIface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
/* Virtual Table */
|
||||
|
||||
guint (* hash) (GIcon *icon);
|
||||
gboolean (* equal) (GIcon *icon1,
|
||||
GIcon *icon2);
|
||||
gboolean (* to_tokens) (GIcon *icon,
|
||||
GPtrArray *tokens,
|
||||
gint *out_version);
|
||||
GIcon * (* from_tokens) (gchar **tokens,
|
||||
gint num_tokens,
|
||||
gint version,
|
||||
GError **error);
|
||||
|
||||
GVariant * (* serialize) (GIcon *icon);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_icon_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint g_icon_hash (gconstpointer icon);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_icon_equal (GIcon *icon1,
|
||||
GIcon *icon2);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar *g_icon_to_string (GIcon *icon);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIcon *g_icon_new_for_string (const gchar *str,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
GVariant * g_icon_serialize (GIcon *icon);
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
GIcon * g_icon_deserialize (GVariant *value);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_ICON_H__ */
|
|
@ -0,0 +1,124 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Christian Kellner <gicmo@gnome.org>
|
||||
* Samuel Cormier-Iijima <sciyoshi@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_INET_ADDRESS_H__
|
||||
#define __G_INET_ADDRESS_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_INET_ADDRESS (g_inet_address_get_type ())
|
||||
#define G_INET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INET_ADDRESS, GInetAddress))
|
||||
#define G_INET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_INET_ADDRESS, GInetAddressClass))
|
||||
#define G_IS_INET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INET_ADDRESS))
|
||||
#define G_IS_INET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INET_ADDRESS))
|
||||
#define G_INET_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_INET_ADDRESS, GInetAddressClass))
|
||||
|
||||
typedef struct _GInetAddressClass GInetAddressClass;
|
||||
typedef struct _GInetAddressPrivate GInetAddressPrivate;
|
||||
|
||||
struct _GInetAddress
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GInetAddressPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GInetAddressClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
gchar * (*to_string) (GInetAddress *address);
|
||||
const guint8 * (*to_bytes) (GInetAddress *address);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_inet_address_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GInetAddress * g_inet_address_new_from_string (const gchar *string);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GInetAddress * g_inet_address_new_from_bytes (const guint8 *bytes,
|
||||
GSocketFamily family);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GInetAddress * g_inet_address_new_loopback (GSocketFamily family);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GInetAddress * g_inet_address_new_any (GSocketFamily family);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_inet_address_equal (GInetAddress *address,
|
||||
GInetAddress *other_address);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar * g_inet_address_to_string (GInetAddress *address);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const guint8 * g_inet_address_to_bytes (GInetAddress *address);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gsize g_inet_address_get_native_size (GInetAddress *address);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GSocketFamily g_inet_address_get_family (GInetAddress *address);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_inet_address_get_is_any (GInetAddress *address);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_inet_address_get_is_loopback (GInetAddress *address);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_inet_address_get_is_link_local (GInetAddress *address);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_inet_address_get_is_site_local (GInetAddress *address);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_inet_address_get_is_multicast (GInetAddress *address);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_inet_address_get_is_mc_global (GInetAddress *address);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_inet_address_get_is_mc_link_local (GInetAddress *address);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_inet_address_get_is_mc_node_local (GInetAddress *address);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_inet_address_get_is_mc_org_local (GInetAddress *address);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_inet_address_get_is_mc_site_local (GInetAddress *address);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_INET_ADDRESS_H__ */
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright 2011 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __G_INET_ADDRESS_MASK_H__
|
||||
#define __G_INET_ADDRESS_MASK_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_INET_ADDRESS_MASK (g_inet_address_mask_get_type ())
|
||||
#define G_INET_ADDRESS_MASK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INET_ADDRESS_MASK, GInetAddressMask))
|
||||
#define G_INET_ADDRESS_MASK_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_INET_ADDRESS_MASK, GInetAddressMaskClass))
|
||||
#define G_IS_INET_ADDRESS_MASK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INET_ADDRESS_MASK))
|
||||
#define G_IS_INET_ADDRESS_MASK_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INET_ADDRESS_MASK))
|
||||
#define G_INET_ADDRESS_MASK_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_INET_ADDRESS_MASK, GInetAddressMaskClass))
|
||||
|
||||
typedef struct _GInetAddressMaskClass GInetAddressMaskClass;
|
||||
typedef struct _GInetAddressMaskPrivate GInetAddressMaskPrivate;
|
||||
|
||||
struct _GInetAddressMask
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GInetAddressMaskPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GInetAddressMaskClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GType g_inet_address_mask_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GInetAddressMask *g_inet_address_mask_new (GInetAddress *addr,
|
||||
guint length,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GInetAddressMask *g_inet_address_mask_new_from_string (const gchar *mask_string,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
gchar *g_inet_address_mask_to_string (GInetAddressMask *mask);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GSocketFamily g_inet_address_mask_get_family (GInetAddressMask *mask);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GInetAddress *g_inet_address_mask_get_address (GInetAddressMask *mask);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
guint g_inet_address_mask_get_length (GInetAddressMask *mask);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
gboolean g_inet_address_mask_matches (GInetAddressMask *mask,
|
||||
GInetAddress *address);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
gboolean g_inet_address_mask_equal (GInetAddressMask *mask,
|
||||
GInetAddressMask *mask2);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_INET_ADDRESS_MASK_H__ */
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Christian Kellner <gicmo@gnome.org>
|
||||
* Samuel Cormier-Iijima <sciyoshi@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_INET_SOCKET_ADDRESS_H__
|
||||
#define __G_INET_SOCKET_ADDRESS_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gsocketaddress.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_INET_SOCKET_ADDRESS (g_inet_socket_address_get_type ())
|
||||
#define G_INET_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INET_SOCKET_ADDRESS, GInetSocketAddress))
|
||||
#define G_INET_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_INET_SOCKET_ADDRESS, GInetSocketAddressClass))
|
||||
#define G_IS_INET_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INET_SOCKET_ADDRESS))
|
||||
#define G_IS_INET_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INET_SOCKET_ADDRESS))
|
||||
#define G_INET_SOCKET_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_INET_SOCKET_ADDRESS, GInetSocketAddressClass))
|
||||
|
||||
typedef struct _GInetSocketAddressClass GInetSocketAddressClass;
|
||||
typedef struct _GInetSocketAddressPrivate GInetSocketAddressPrivate;
|
||||
|
||||
struct _GInetSocketAddress
|
||||
{
|
||||
GSocketAddress parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GInetSocketAddressPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GInetSocketAddressClass
|
||||
{
|
||||
GSocketAddressClass parent_class;
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_inet_socket_address_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GSocketAddress *g_inet_socket_address_new (GInetAddress *address,
|
||||
guint16 port);
|
||||
GLIB_AVAILABLE_IN_2_40
|
||||
GSocketAddress *g_inet_socket_address_new_from_string (const char *address,
|
||||
guint port);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GInetAddress * g_inet_socket_address_get_address (GInetSocketAddress *address);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
guint16 g_inet_socket_address_get_port (GInetSocketAddress *address);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
guint32 g_inet_socket_address_get_flowinfo (GInetSocketAddress *address);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
guint32 g_inet_socket_address_get_scope_id (GInetSocketAddress *address);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_INET_SOCKET_ADDRESS_H__ */
|
|
@ -0,0 +1,105 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2009 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_INITABLE_H__
|
||||
#define __G_INITABLE_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_INITABLE (g_initable_get_type ())
|
||||
#define G_INITABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_INITABLE, GInitable))
|
||||
#define G_IS_INITABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_INITABLE))
|
||||
#define G_INITABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_INITABLE, GInitableIface))
|
||||
#define G_TYPE_IS_INITABLE(type) (g_type_is_a ((type), G_TYPE_INITABLE))
|
||||
|
||||
/**
|
||||
* GInitable:
|
||||
*
|
||||
* Interface for initializable objects.
|
||||
*
|
||||
* Since: 2.22
|
||||
**/
|
||||
typedef struct _GInitableIface GInitableIface;
|
||||
|
||||
/**
|
||||
* GInitableIface:
|
||||
* @g_iface: The parent interface.
|
||||
* @init: Initializes the object.
|
||||
*
|
||||
* Provides an interface for initializing object such that initialization
|
||||
* may fail.
|
||||
*
|
||||
* Since: 2.22
|
||||
**/
|
||||
struct _GInitableIface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
/* Virtual Table */
|
||||
|
||||
gboolean (* init) (GInitable *initable,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
};
|
||||
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_initable_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_initable_init (GInitable *initable,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gpointer g_initable_new (GType object_type,
|
||||
GCancellable *cancellable,
|
||||
GError **error,
|
||||
const gchar *first_property_name,
|
||||
...);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
GLIB_DEPRECATED_IN_2_54_FOR(g_object_new_with_properties and g_initable_init)
|
||||
gpointer g_initable_newv (GType object_type,
|
||||
guint n_parameters,
|
||||
GParameter *parameters,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GObject* g_initable_new_valist (GType object_type,
|
||||
const gchar *first_property_name,
|
||||
va_list var_args,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
#endif /* __G_INITABLE_H__ */
|
|
@ -0,0 +1,216 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_INPUT_STREAM_H__
|
||||
#define __G_INPUT_STREAM_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_INPUT_STREAM (g_input_stream_get_type ())
|
||||
#define G_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INPUT_STREAM, GInputStream))
|
||||
#define G_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_INPUT_STREAM, GInputStreamClass))
|
||||
#define G_IS_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INPUT_STREAM))
|
||||
#define G_IS_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INPUT_STREAM))
|
||||
#define G_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_INPUT_STREAM, GInputStreamClass))
|
||||
|
||||
/**
|
||||
* GInputStream:
|
||||
*
|
||||
* Base class for streaming input operations.
|
||||
**/
|
||||
typedef struct _GInputStreamClass GInputStreamClass;
|
||||
typedef struct _GInputStreamPrivate GInputStreamPrivate;
|
||||
|
||||
struct _GInputStream
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GInputStreamPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GInputStreamClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
/* Sync ops: */
|
||||
|
||||
gssize (* read_fn) (GInputStream *stream,
|
||||
void *buffer,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
gssize (* skip) (GInputStream *stream,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
gboolean (* close_fn) (GInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
/* Async ops: (optional in derived classes) */
|
||||
void (* read_async) (GInputStream *stream,
|
||||
void *buffer,
|
||||
gsize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gssize (* read_finish) (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
void (* skip_async) (GInputStream *stream,
|
||||
gsize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gssize (* skip_finish) (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
void (* close_async) (GInputStream *stream,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (* close_finish) (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_input_stream_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gssize g_input_stream_read (GInputStream *stream,
|
||||
void *buffer,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_input_stream_read_all (GInputStream *stream,
|
||||
void *buffer,
|
||||
gsize count,
|
||||
gsize *bytes_read,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
GBytes *g_input_stream_read_bytes (GInputStream *stream,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gssize g_input_stream_skip (GInputStream *stream,
|
||||
gsize count,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_input_stream_close (GInputStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_input_stream_read_async (GInputStream *stream,
|
||||
void *buffer,
|
||||
gsize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gssize g_input_stream_read_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
void g_input_stream_read_all_async (GInputStream *stream,
|
||||
void *buffer,
|
||||
gsize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
gboolean g_input_stream_read_all_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
gsize *bytes_read,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
void g_input_stream_read_bytes_async (GInputStream *stream,
|
||||
gsize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
GBytes *g_input_stream_read_bytes_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_input_stream_skip_async (GInputStream *stream,
|
||||
gsize count,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gssize g_input_stream_skip_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_input_stream_close_async (GInputStream *stream,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_input_stream_close_finish (GInputStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
/* For implementations: */
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_input_stream_is_closed (GInputStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_input_stream_has_pending (GInputStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_input_stream_set_pending (GInputStream *stream,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_input_stream_clear_pending (GInputStream *stream);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_INPUT_STREAM_H__ */
|
|
@ -0,0 +1,153 @@
|
|||
/*
|
||||
* Copyright © 2015 Canonical Limited
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAction, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GActionMap, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAppInfo, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAppLaunchContext, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAppInfoMonitor, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GApplicationCommandLine, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GApplication, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAsyncInitable, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAsyncResult, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GBufferedInputStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GBufferedOutputStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GBytesIcon, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GCancellable, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GCharsetConverter, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GConverter, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GConverterInputStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GConverterOutputStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GCredentials, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDatagramBased, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDataInputStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDataOutputStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusActionGroup, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusAuthObserver, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusConnection, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusInterface, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusInterfaceSkeleton, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusMenuModel, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusMessage, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusMethodInvocation, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusNodeInfo, g_dbus_node_info_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObject, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObjectManagerClient, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObjectManager, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObjectManagerServer, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObjectProxy, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusObjectSkeleton, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusProxy, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusServer, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDrive, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GEmblemedIcon, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GEmblem, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileEnumerator, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFile, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileAttributeInfoList, g_file_attribute_info_list_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileIcon, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileInfo, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileInputStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileIOStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileMonitor, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFilenameCompleter, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFileOutputStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFilterInputStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFilterOutputStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GIcon, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInetAddress, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInetAddressMask, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInetSocketAddress, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitable, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInputStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GIOModule, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GIOStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GLoadableIcon, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMemoryInputStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMemoryOutputStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMenu, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMenuItem, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMenuModel, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMenuAttributeIter, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMenuLinkIter, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMount, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMountOperation, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNativeVolumeMonitor, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNetworkAddress, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNetworkMonitor, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNetworkService, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GNotification, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GOutputStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPermission, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPollableInputStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPollableOutputStream, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPropertyAction, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GProxyAddressEnumerator, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GProxyAddress, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GProxy, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GProxyResolver, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GRemoteActionGroup, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GResolver, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GResource, g_resource_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSeekable, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettingsBackend, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettingsSchema, g_settings_schema_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettingsSchemaKey, g_settings_schema_key_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettingsSchemaSource, g_settings_schema_source_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettings, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimpleActionGroup, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimpleAction, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimpleAsyncResult, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimplePermission, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimpleProxyResolver, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketAddressEnumerator, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketAddress, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketClient, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketConnectable, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketConnection, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketControlMessage, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocket, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketListener, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSocketService, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSubprocess, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSubprocessLauncher, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTask, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTcpConnection, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTcpWrapperConnection, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTestDBus, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GThemedIcon, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GThreadedSocketService, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsBackend, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsCertificate, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsClientConnection, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsConnection, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsDatabase, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsFileDatabase, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsInteraction, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsPassword, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTlsServerConnection, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVfs, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVolume, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVolumeMonitor, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GZlibCompressor, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GZlibDecompressor, g_object_unref)
|
|
@ -0,0 +1,177 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_IO_H__
|
||||
#define __G_IO_H__
|
||||
|
||||
#define __GIO_GIO_H_INSIDE__
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
#include <gio/gaction.h>
|
||||
#include <gio/gactiongroup.h>
|
||||
#include <gio/gactiongroupexporter.h>
|
||||
#include <gio/gactionmap.h>
|
||||
#include <gio/gappinfo.h>
|
||||
#include <gio/gapplication.h>
|
||||
#include <gio/gapplicationcommandline.h>
|
||||
#include <gio/gasyncinitable.h>
|
||||
#include <gio/gasyncresult.h>
|
||||
#include <gio/gbufferedinputstream.h>
|
||||
#include <gio/gbufferedoutputstream.h>
|
||||
#include <gio/gbytesicon.h>
|
||||
#include <gio/gcancellable.h>
|
||||
#include <gio/gcharsetconverter.h>
|
||||
#include <gio/gcontenttype.h>
|
||||
#include <gio/gconverter.h>
|
||||
#include <gio/gconverterinputstream.h>
|
||||
#include <gio/gconverteroutputstream.h>
|
||||
#include <gio/gcredentials.h>
|
||||
#include <gio/gdatagrambased.h>
|
||||
#include <gio/gdatainputstream.h>
|
||||
#include <gio/gdataoutputstream.h>
|
||||
#include <gio/gdbusaddress.h>
|
||||
#include <gio/gdbusauthobserver.h>
|
||||
#include <gio/gdbusconnection.h>
|
||||
#include <gio/gdbuserror.h>
|
||||
#include <gio/gdbusintrospection.h>
|
||||
#include <gio/gdbusmessage.h>
|
||||
#include <gio/gdbusmethodinvocation.h>
|
||||
#include <gio/gdbusnameowning.h>
|
||||
#include <gio/gdbusnamewatching.h>
|
||||
#include <gio/gdbusproxy.h>
|
||||
#include <gio/gdbusserver.h>
|
||||
#include <gio/gdbusutils.h>
|
||||
#include <gio/gdrive.h>
|
||||
#include <gio/gdtlsclientconnection.h>
|
||||
#include <gio/gdtlsconnection.h>
|
||||
#include <gio/gdtlsserverconnection.h>
|
||||
#include <gio/gemblemedicon.h>
|
||||
#include <gio/gfileattribute.h>
|
||||
#include <gio/gfileenumerator.h>
|
||||
#include <gio/gfile.h>
|
||||
#include <gio/gfileicon.h>
|
||||
#include <gio/gfileinfo.h>
|
||||
#include <gio/gfileinputstream.h>
|
||||
#include <gio/gfileiostream.h>
|
||||
#include <gio/gfilemonitor.h>
|
||||
#include <gio/gfilenamecompleter.h>
|
||||
#include <gio/gfileoutputstream.h>
|
||||
#include <gio/gfilterinputstream.h>
|
||||
#include <gio/gfilteroutputstream.h>
|
||||
#include <gio/gicon.h>
|
||||
#include <gio/ginetaddress.h>
|
||||
#include <gio/ginetaddressmask.h>
|
||||
#include <gio/ginetsocketaddress.h>
|
||||
#include <gio/ginitable.h>
|
||||
#include <gio/ginputstream.h>
|
||||
#include <gio/gioenums.h>
|
||||
#include <gio/gioenumtypes.h>
|
||||
#include <gio/gioerror.h>
|
||||
#include <gio/giomodule.h>
|
||||
#include <gio/gioscheduler.h>
|
||||
#include <gio/giostream.h>
|
||||
#include <gio/gloadableicon.h>
|
||||
#include <gio/gmemoryinputstream.h>
|
||||
#include <gio/gmemoryoutputstream.h>
|
||||
#include <gio/gmount.h>
|
||||
#include <gio/gmountoperation.h>
|
||||
#include <gio/gnativesocketaddress.h>
|
||||
#include <gio/gnativevolumemonitor.h>
|
||||
#include <gio/gnetworkaddress.h>
|
||||
#include <gio/gnetworkmonitor.h>
|
||||
#include <gio/gnetworkservice.h>
|
||||
#include <gio/goutputstream.h>
|
||||
#include <gio/gpermission.h>
|
||||
#include <gio/gpollableinputstream.h>
|
||||
#include <gio/gpollableoutputstream.h>
|
||||
#include <gio/gpollableutils.h>
|
||||
#include <gio/gpropertyaction.h>
|
||||
#include <gio/gproxy.h>
|
||||
#include <gio/gproxyaddress.h>
|
||||
#include <gio/gproxyaddressenumerator.h>
|
||||
#include <gio/gproxyresolver.h>
|
||||
#include <gio/gresolver.h>
|
||||
#include <gio/gresource.h>
|
||||
#include <gio/gseekable.h>
|
||||
#include <gio/gsettingsschema.h>
|
||||
#include <gio/gsettings.h>
|
||||
#include <gio/gsimpleaction.h>
|
||||
#include <gio/gsimpleactiongroup.h>
|
||||
#include <gio/gsimpleasyncresult.h>
|
||||
#include <gio/gsimpleiostream.h>
|
||||
#include <gio/gsimplepermission.h>
|
||||
#include <gio/gsocketaddressenumerator.h>
|
||||
#include <gio/gsocketaddress.h>
|
||||
#include <gio/gsocketclient.h>
|
||||
#include <gio/gsocketconnectable.h>
|
||||
#include <gio/gsocketconnection.h>
|
||||
#include <gio/gsocketcontrolmessage.h>
|
||||
#include <gio/gsocket.h>
|
||||
#include <gio/gsocketlistener.h>
|
||||
#include <gio/gsocketservice.h>
|
||||
#include <gio/gsrvtarget.h>
|
||||
#include <gio/gsimpleproxyresolver.h>
|
||||
#include <gio/gtask.h>
|
||||
#include <gio/gsubprocess.h>
|
||||
#include <gio/gsubprocesslauncher.h>
|
||||
#include <gio/gtcpconnection.h>
|
||||
#include <gio/gtcpwrapperconnection.h>
|
||||
#include <gio/gtestdbus.h>
|
||||
#include <gio/gthemedicon.h>
|
||||
#include <gio/gthreadedsocketservice.h>
|
||||
#include <gio/gtlsbackend.h>
|
||||
#include <gio/gtlscertificate.h>
|
||||
#include <gio/gtlsclientconnection.h>
|
||||
#include <gio/gtlsconnection.h>
|
||||
#include <gio/gtlsdatabase.h>
|
||||
#include <gio/gtlsfiledatabase.h>
|
||||
#include <gio/gtlsinteraction.h>
|
||||
#include <gio/gtlsserverconnection.h>
|
||||
#include <gio/gtlspassword.h>
|
||||
#include <gio/gvfs.h>
|
||||
#include <gio/gvolume.h>
|
||||
#include <gio/gvolumemonitor.h>
|
||||
#include <gio/gzlibcompressor.h>
|
||||
#include <gio/gzlibdecompressor.h>
|
||||
#include <gio/gdbusinterface.h>
|
||||
#include <gio/gdbusinterfaceskeleton.h>
|
||||
#include <gio/gdbusobject.h>
|
||||
#include <gio/gdbusobjectskeleton.h>
|
||||
#include <gio/gdbusobjectproxy.h>
|
||||
#include <gio/gdbusobjectmanager.h>
|
||||
#include <gio/gdbusobjectmanagerclient.h>
|
||||
#include <gio/gdbusobjectmanagerserver.h>
|
||||
#include <gio/gdbusactiongroup.h>
|
||||
#include <gio/gremoteactiongroup.h>
|
||||
#include <gio/gmenumodel.h>
|
||||
#include <gio/gmenu.h>
|
||||
#include <gio/gmenuexporter.h>
|
||||
#include <gio/gdbusmenumodel.h>
|
||||
#include <gio/gnotification.h>
|
||||
#include <gio/glistmodel.h>
|
||||
#include <gio/gliststore.h>
|
||||
|
||||
#include <gio/gio-autocleanups.h>
|
||||
|
||||
#undef __GIO_GIO_H_INSIDE__
|
||||
|
||||
#endif /* __G_IO_H__ */
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,177 @@
|
|||
|
||||
/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */
|
||||
|
||||
#ifndef __GIO_ENUM_TYPES_H__
|
||||
#define __GIO_ENUM_TYPES_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* enumerations from "../gio/gioenums.h" */
|
||||
GLIB_AVAILABLE_IN_ALL GType g_app_info_create_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_APP_INFO_CREATE_FLAGS (g_app_info_create_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_converter_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_CONVERTER_FLAGS (g_converter_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_converter_result_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_CONVERTER_RESULT (g_converter_result_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_data_stream_byte_order_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DATA_STREAM_BYTE_ORDER (g_data_stream_byte_order_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_data_stream_newline_type_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DATA_STREAM_NEWLINE_TYPE (g_data_stream_newline_type_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_file_attribute_type_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_FILE_ATTRIBUTE_TYPE (g_file_attribute_type_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_file_attribute_info_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS (g_file_attribute_info_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_file_attribute_status_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_FILE_ATTRIBUTE_STATUS (g_file_attribute_status_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_file_query_info_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_FILE_QUERY_INFO_FLAGS (g_file_query_info_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_file_create_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_FILE_CREATE_FLAGS (g_file_create_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_file_measure_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_FILE_MEASURE_FLAGS (g_file_measure_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_mount_mount_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_MOUNT_MOUNT_FLAGS (g_mount_mount_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_mount_unmount_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_MOUNT_UNMOUNT_FLAGS (g_mount_unmount_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_drive_start_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DRIVE_START_FLAGS (g_drive_start_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_drive_start_stop_type_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DRIVE_START_STOP_TYPE (g_drive_start_stop_type_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_file_copy_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_FILE_COPY_FLAGS (g_file_copy_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_file_monitor_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_FILE_MONITOR_FLAGS (g_file_monitor_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_file_type_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_FILE_TYPE (g_file_type_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_filesystem_preview_type_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_FILESYSTEM_PREVIEW_TYPE (g_filesystem_preview_type_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_file_monitor_event_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_FILE_MONITOR_EVENT (g_file_monitor_event_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_io_error_enum_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_IO_ERROR_ENUM (g_io_error_enum_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_ask_password_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_ASK_PASSWORD_FLAGS (g_ask_password_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_password_save_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_PASSWORD_SAVE (g_password_save_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_mount_operation_result_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_MOUNT_OPERATION_RESULT (g_mount_operation_result_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_output_stream_splice_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_OUTPUT_STREAM_SPLICE_FLAGS (g_output_stream_splice_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_io_stream_splice_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_IO_STREAM_SPLICE_FLAGS (g_io_stream_splice_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_emblem_origin_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_EMBLEM_ORIGIN (g_emblem_origin_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_resolver_error_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_RESOLVER_ERROR (g_resolver_error_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_resolver_record_type_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_RESOLVER_RECORD_TYPE (g_resolver_record_type_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_resource_error_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_RESOURCE_ERROR (g_resource_error_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_resource_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_RESOURCE_FLAGS (g_resource_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_resource_lookup_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_RESOURCE_LOOKUP_FLAGS (g_resource_lookup_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_socket_family_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_SOCKET_FAMILY (g_socket_family_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_socket_type_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_SOCKET_TYPE (g_socket_type_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_socket_msg_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_SOCKET_MSG_FLAGS (g_socket_msg_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_socket_protocol_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_SOCKET_PROTOCOL (g_socket_protocol_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_zlib_compressor_format_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_ZLIB_COMPRESSOR_FORMAT (g_zlib_compressor_format_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_unix_socket_address_type_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_UNIX_SOCKET_ADDRESS_TYPE (g_unix_socket_address_type_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_bus_type_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_BUS_TYPE (g_bus_type_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_bus_name_owner_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_BUS_NAME_OWNER_FLAGS (g_bus_name_owner_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_bus_name_watcher_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_BUS_NAME_WATCHER_FLAGS (g_bus_name_watcher_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_dbus_proxy_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DBUS_PROXY_FLAGS (g_dbus_proxy_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_dbus_error_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DBUS_ERROR (g_dbus_error_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_dbus_connection_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DBUS_CONNECTION_FLAGS (g_dbus_connection_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_dbus_capability_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DBUS_CAPABILITY_FLAGS (g_dbus_capability_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_dbus_call_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DBUS_CALL_FLAGS (g_dbus_call_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_dbus_message_type_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DBUS_MESSAGE_TYPE (g_dbus_message_type_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_dbus_message_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DBUS_MESSAGE_FLAGS (g_dbus_message_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_dbus_message_header_field_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DBUS_MESSAGE_HEADER_FIELD (g_dbus_message_header_field_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_dbus_property_info_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DBUS_PROPERTY_INFO_FLAGS (g_dbus_property_info_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_dbus_subtree_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DBUS_SUBTREE_FLAGS (g_dbus_subtree_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_dbus_server_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DBUS_SERVER_FLAGS (g_dbus_server_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_dbus_signal_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DBUS_SIGNAL_FLAGS (g_dbus_signal_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_dbus_send_message_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DBUS_SEND_MESSAGE_FLAGS (g_dbus_send_message_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_credentials_type_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_CREDENTIALS_TYPE (g_credentials_type_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_dbus_message_byte_order_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DBUS_MESSAGE_BYTE_ORDER (g_dbus_message_byte_order_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_application_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_APPLICATION_FLAGS (g_application_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_tls_error_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_TLS_ERROR (g_tls_error_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_tls_certificate_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_TLS_CERTIFICATE_FLAGS (g_tls_certificate_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_tls_authentication_mode_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_TLS_AUTHENTICATION_MODE (g_tls_authentication_mode_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_tls_rehandshake_mode_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_TLS_REHANDSHAKE_MODE (g_tls_rehandshake_mode_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_tls_password_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_TLS_PASSWORD_FLAGS (g_tls_password_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_tls_interaction_result_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_TLS_INTERACTION_RESULT (g_tls_interaction_result_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_dbus_interface_skeleton_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DBUS_INTERFACE_SKELETON_FLAGS (g_dbus_interface_skeleton_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_dbus_object_manager_client_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_DBUS_OBJECT_MANAGER_CLIENT_FLAGS (g_dbus_object_manager_client_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_tls_database_verify_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_TLS_DATABASE_VERIFY_FLAGS (g_tls_database_verify_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_tls_database_lookup_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_TLS_DATABASE_LOOKUP_FLAGS (g_tls_database_lookup_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_tls_certificate_request_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_TLS_CERTIFICATE_REQUEST_FLAGS (g_tls_certificate_request_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_io_module_scope_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_IO_MODULE_SCOPE_FLAGS (g_io_module_scope_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_socket_client_event_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_SOCKET_CLIENT_EVENT (g_socket_client_event_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_socket_listener_event_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_SOCKET_LISTENER_EVENT (g_socket_listener_event_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_test_dbus_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_TEST_DBUS_FLAGS (g_test_dbus_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_subprocess_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_SUBPROCESS_FLAGS (g_subprocess_flags_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_notification_priority_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_NOTIFICATION_PRIORITY (g_notification_priority_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_network_connectivity_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_NETWORK_CONNECTIVITY (g_network_connectivity_get_type ())
|
||||
GLIB_AVAILABLE_IN_ALL GType g_pollable_return_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_POLLABLE_RETURN (g_pollable_return_get_type ())
|
||||
|
||||
/* enumerations from "../gio/gresolver.h" */
|
||||
GLIB_AVAILABLE_IN_ALL GType g_resolver_name_lookup_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_RESOLVER_NAME_LOOKUP_FLAGS (g_resolver_name_lookup_flags_get_type ())
|
||||
|
||||
/* enumerations from "../gio/gsettings.h" */
|
||||
GLIB_AVAILABLE_IN_ALL GType g_settings_bind_flags_get_type (void) G_GNUC_CONST;
|
||||
#define G_TYPE_SETTINGS_BIND_FLAGS (g_settings_bind_flags_get_type ())
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GIO_ENUM_TYPES_H__ */
|
||||
|
||||
/* Generated data ends here */
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_IO_ERROR_H__
|
||||
#define __G_IO_ERROR_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
#include <gio/gioenums.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* G_IO_ERROR:
|
||||
*
|
||||
* Error domain for GIO. Errors in this domain will be from the #GIOErrorEnum enumeration.
|
||||
* See #GError for more information on error domains.
|
||||
**/
|
||||
#define G_IO_ERROR g_io_error_quark()
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GQuark g_io_error_quark (void);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIOErrorEnum g_io_error_from_errno (gint err_no);
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIOErrorEnum g_io_error_from_win32_error (gint error_code);
|
||||
#endif
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_IO_ERROR_H__ */
|
|
@ -0,0 +1,193 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_IO_MODULE_H__
|
||||
#define __G_IO_MODULE_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
#include <gmodule.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GIOModuleScope GIOModuleScope;
|
||||
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
GIOModuleScope * g_io_module_scope_new (GIOModuleScopeFlags flags);
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
void g_io_module_scope_free (GIOModuleScope *scope);
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
void g_io_module_scope_block (GIOModuleScope *scope,
|
||||
const gchar *basename);
|
||||
|
||||
#define G_IO_TYPE_MODULE (g_io_module_get_type ())
|
||||
#define G_IO_MODULE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_IO_TYPE_MODULE, GIOModule))
|
||||
#define G_IO_MODULE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_IO_TYPE_MODULE, GIOModuleClass))
|
||||
#define G_IO_IS_MODULE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_IO_TYPE_MODULE))
|
||||
#define G_IO_IS_MODULE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_IO_TYPE_MODULE))
|
||||
#define G_IO_MODULE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_IO_TYPE_MODULE, GIOModuleClass))
|
||||
|
||||
/**
|
||||
* GIOModule:
|
||||
*
|
||||
* Opaque module base class for extending GIO.
|
||||
**/
|
||||
typedef struct _GIOModuleClass GIOModuleClass;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_io_module_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIOModule *g_io_module_new (const gchar *filename);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_io_modules_scan_all_in_directory (const char *dirname);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GList *g_io_modules_load_all_in_directory (const gchar *dirname);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
void g_io_modules_scan_all_in_directory_with_scope (const gchar *dirname,
|
||||
GIOModuleScope *scope);
|
||||
GLIB_AVAILABLE_IN_2_30
|
||||
GList *g_io_modules_load_all_in_directory_with_scope (const gchar *dirname,
|
||||
GIOModuleScope *scope);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIOExtensionPoint *g_io_extension_point_register (const char *name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIOExtensionPoint *g_io_extension_point_lookup (const char *name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_io_extension_point_set_required_type (GIOExtensionPoint *extension_point,
|
||||
GType type);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_io_extension_point_get_required_type (GIOExtensionPoint *extension_point);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GList *g_io_extension_point_get_extensions (GIOExtensionPoint *extension_point);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIOExtension * g_io_extension_point_get_extension_by_name (GIOExtensionPoint *extension_point,
|
||||
const char *name);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIOExtension * g_io_extension_point_implement (const char *extension_point_name,
|
||||
GType type,
|
||||
const char *extension_name,
|
||||
gint priority);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_io_extension_get_type (GIOExtension *extension);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const char * g_io_extension_get_name (GIOExtension *extension);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gint g_io_extension_get_priority (GIOExtension *extension);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GTypeClass* g_io_extension_ref_class (GIOExtension *extension);
|
||||
|
||||
|
||||
/* API for the modules to implement */
|
||||
|
||||
/**
|
||||
* g_io_module_load:
|
||||
* @module: a #GIOModule.
|
||||
*
|
||||
* Required API for GIO modules to implement.
|
||||
*
|
||||
* This function is run after the module has been loaded into GIO,
|
||||
* to initialize the module. Typically, this function will call
|
||||
* g_io_extension_point_implement().
|
||||
*
|
||||
* Since 2.56, this function should be named `g_io_<modulename>_load`, where
|
||||
* `modulename` is the plugin’s filename with the `lib` or `libgio` prefix and
|
||||
* everything after the first dot removed, and with `-` replaced with `_`
|
||||
* throughout. For example, `libgiognutls-helper.so` becomes `gnutls_helper`.
|
||||
* Using the new symbol names avoids name clashes when building modules
|
||||
* statically. The old symbol names continue to be supported, but cannot be used
|
||||
* for static builds.
|
||||
**/
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_io_module_load (GIOModule *module);
|
||||
|
||||
/**
|
||||
* g_io_module_unload:
|
||||
* @module: a #GIOModule.
|
||||
*
|
||||
* Required API for GIO modules to implement.
|
||||
*
|
||||
* This function is run when the module is being unloaded from GIO,
|
||||
* to finalize the module.
|
||||
*
|
||||
* Since 2.56, this function should be named `g_io_<modulename>_unload`, where
|
||||
* `modulename` is the plugin’s filename with the `lib` or `libgio` prefix and
|
||||
* everything after the first dot removed, and with `-` replaced with `_`
|
||||
* throughout. For example, `libgiognutls-helper.so` becomes `gnutls_helper`.
|
||||
* Using the new symbol names avoids name clashes when building modules
|
||||
* statically. The old symbol names continue to be supported, but cannot be used
|
||||
* for static builds.
|
||||
**/
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_io_module_unload (GIOModule *module);
|
||||
|
||||
/**
|
||||
* g_io_module_query:
|
||||
*
|
||||
* Optional API for GIO modules to implement.
|
||||
*
|
||||
* Should return a list of all the extension points that may be
|
||||
* implemented in this module.
|
||||
*
|
||||
* This method will not be called in normal use, however it may be
|
||||
* called when probing existing modules and recording which extension
|
||||
* points that this model is used for. This means we won't have to
|
||||
* load and initialize this module unless its needed.
|
||||
*
|
||||
* If this function is not implemented by the module the module will
|
||||
* always be loaded, initialized and then unloaded on application
|
||||
* startup so that it can register its extension points during init.
|
||||
*
|
||||
* Note that a module need not actually implement all the extension
|
||||
* points that g_io_module_query() returns, since the exact list of
|
||||
* extension may depend on runtime issues. However all extension
|
||||
* points actually implemented must be returned by g_io_module_query()
|
||||
* (if defined).
|
||||
*
|
||||
* When installing a module that implements g_io_module_query() you must
|
||||
* run gio-querymodules in order to build the cache files required for
|
||||
* lazy loading.
|
||||
*
|
||||
* Since 2.56, this function should be named `g_io_<modulename>_query`, where
|
||||
* `modulename` is the plugin’s filename with the `lib` or `libgio` prefix and
|
||||
* everything after the first dot removed, and with `-` replaced with `_`
|
||||
* throughout. For example, `libgiognutls-helper.so` becomes `gnutls_helper`.
|
||||
* Using the new symbol names avoids name clashes when building modules
|
||||
* statically. The old symbol names continue to be supported, but cannot be used
|
||||
* for static builds.
|
||||
*
|
||||
* Returns: (transfer full): A %NULL-terminated array of strings,
|
||||
* listing the supported extension points of the module. The array
|
||||
* must be suitable for freeing with g_strfreev().
|
||||
*
|
||||
* Since: 2.24
|
||||
**/
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char **g_io_module_query (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_IO_MODULE_H__ */
|
|
@ -0,0 +1,54 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_IO_SCHEDULER_H__
|
||||
#define __G_IO_SCHEDULER_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
GLIB_DEPRECATED_IN_2_36_FOR ("GThreadPool or g_task_run_in_thread")
|
||||
void g_io_scheduler_push_job (GIOSchedulerJobFunc job_func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify notify,
|
||||
gint io_priority,
|
||||
GCancellable *cancellable);
|
||||
GLIB_DEPRECATED_IN_2_36
|
||||
void g_io_scheduler_cancel_all_jobs (void);
|
||||
GLIB_DEPRECATED_IN_2_36_FOR (g_main_context_invoke)
|
||||
gboolean g_io_scheduler_job_send_to_mainloop (GIOSchedulerJob *job,
|
||||
GSourceFunc func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify notify);
|
||||
GLIB_DEPRECATED_IN_2_36_FOR (g_main_context_invoke)
|
||||
void g_io_scheduler_job_send_to_mainloop_async (GIOSchedulerJob *job,
|
||||
GSourceFunc func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify notify);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_IO_SCHEDULER_H__ */
|
|
@ -0,0 +1,135 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright © 2008, 2009 Codethink Limited
|
||||
* Copyright © 2009 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* See the included COPYING file for more information.
|
||||
*
|
||||
* Authors: Ryan Lortie <desrt@desrt.ca>
|
||||
* Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_IO_STREAM_H__
|
||||
#define __G_IO_STREAM_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/ginputstream.h>
|
||||
#include <gio/goutputstream.h>
|
||||
#include <gio/gcancellable.h>
|
||||
#include <gio/gioerror.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_IO_STREAM (g_io_stream_get_type ())
|
||||
#define G_IO_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_IO_STREAM, GIOStream))
|
||||
#define G_IO_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_IO_STREAM, GIOStreamClass))
|
||||
#define G_IS_IO_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_IO_STREAM))
|
||||
#define G_IS_IO_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_IO_STREAM))
|
||||
#define G_IO_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_IO_STREAM, GIOStreamClass))
|
||||
|
||||
typedef struct _GIOStreamPrivate GIOStreamPrivate;
|
||||
typedef struct _GIOStreamClass GIOStreamClass;
|
||||
|
||||
/**
|
||||
* GIOStream:
|
||||
*
|
||||
* Base class for read-write streams.
|
||||
**/
|
||||
struct _GIOStream
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GIOStreamPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GIOStreamClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
GInputStream * (*get_input_stream) (GIOStream *stream);
|
||||
GOutputStream * (*get_output_stream) (GIOStream *stream);
|
||||
|
||||
gboolean (* close_fn) (GIOStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
void (* close_async) (GIOStream *stream,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (* close_finish) (GIOStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
void (*_g_reserved6) (void);
|
||||
void (*_g_reserved7) (void);
|
||||
void (*_g_reserved8) (void);
|
||||
void (*_g_reserved9) (void);
|
||||
void (*_g_reserved10) (void);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_io_stream_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GInputStream * g_io_stream_get_input_stream (GIOStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GOutputStream *g_io_stream_get_output_stream (GIOStream *stream);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_io_stream_splice_async (GIOStream *stream1,
|
||||
GIOStream *stream2,
|
||||
GIOStreamSpliceFlags flags,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_io_stream_splice_finish (GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_io_stream_close (GIOStream *stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_io_stream_close_async (GIOStream *stream,
|
||||
int io_priority,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_io_stream_close_finish (GIOStream *stream,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_io_stream_is_closed (GIOStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_io_stream_has_pending (GIOStream *stream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_io_stream_set_pending (GIOStream *stream,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_io_stream_clear_pending (GIOStream *stream);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_IO_STREAM_H__ */
|
|
@ -0,0 +1,654 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, 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
|
||||
|
||||
#include <gio/gioenums.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GAppLaunchContext GAppLaunchContext;
|
||||
typedef struct _GAppInfo GAppInfo; /* Dummy typedef */
|
||||
typedef struct _GAsyncResult GAsyncResult; /* Dummy typedef */
|
||||
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 _GDatagramBased GDatagramBased;
|
||||
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:
|
||||
*
|
||||
* Opaque drive object.
|
||||
**/
|
||||
typedef struct _GDrive GDrive; /* Dummy typedef */
|
||||
typedef struct _GFileEnumerator GFileEnumerator;
|
||||
typedef struct _GFileMonitor GFileMonitor;
|
||||
typedef struct _GFilterInputStream GFilterInputStream;
|
||||
typedef struct _GFilterOutputStream GFilterOutputStream;
|
||||
|
||||
/**
|
||||
* GFile:
|
||||
*
|
||||
* A handle to an object implementing the #GFileIface interface.
|
||||
* Generally stores a location within the file system. Handles do not
|
||||
* necessarily represent files or directories that currently exist.
|
||||
**/
|
||||
typedef struct _GFile GFile; /* Dummy typedef */
|
||||
typedef struct _GFileInfo GFileInfo;
|
||||
|
||||
/**
|
||||
* GFileAttributeMatcher:
|
||||
*
|
||||
* Determines if a string matches a file attribute.
|
||||
**/
|
||||
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;
|
||||
typedef struct _GFileIcon GFileIcon;
|
||||
typedef struct _GFilenameCompleter GFilenameCompleter;
|
||||
|
||||
|
||||
typedef struct _GIcon GIcon; /* Dummy typedef */
|
||||
typedef struct _GInetAddress GInetAddress;
|
||||
typedef struct _GInetAddressMask GInetAddressMask;
|
||||
typedef struct _GInetSocketAddress GInetSocketAddress;
|
||||
typedef struct _GNativeSocketAddress GNativeSocketAddress;
|
||||
typedef struct _GInputStream GInputStream;
|
||||
typedef struct _GInitable GInitable;
|
||||
typedef struct _GIOModule GIOModule;
|
||||
typedef struct _GIOExtensionPoint GIOExtensionPoint;
|
||||
typedef struct _GIOExtension GIOExtension;
|
||||
|
||||
/**
|
||||
* GIOSchedulerJob:
|
||||
*
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* GMount:
|
||||
*
|
||||
* A handle to an object implementing the #GMountIface interface.
|
||||
**/
|
||||
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 _GSimpleIOStream GSimpleIOStream;
|
||||
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;
|
||||
|
||||
/**
|
||||
* GSocket:
|
||||
*
|
||||
* A lowlevel network socket object.
|
||||
*
|
||||
* Since: 2.22
|
||||
**/
|
||||
typedef struct _GSocket GSocket;
|
||||
|
||||
/**
|
||||
* GSocketControlMessage:
|
||||
*
|
||||
* Base class for socket-type specific control messages that can be sent and
|
||||
* received over #GSocket.
|
||||
**/
|
||||
typedef struct _GSocketControlMessage GSocketControlMessage;
|
||||
/**
|
||||
* GSocketClient:
|
||||
*
|
||||
* A helper class for network clients to make connections.
|
||||
*
|
||||
* Since: 2.22
|
||||
**/
|
||||
typedef struct _GSocketClient GSocketClient;
|
||||
/**
|
||||
* GSocketConnection:
|
||||
*
|
||||
* A socket connection GIOStream object for connection-oriented sockets.
|
||||
*
|
||||
* Since: 2.22
|
||||
**/
|
||||
typedef struct _GSocketConnection GSocketConnection;
|
||||
/**
|
||||
* GSocketListener:
|
||||
*
|
||||
* A helper class for network servers to listen for and accept connections.
|
||||
*
|
||||
* Since: 2.22
|
||||
**/
|
||||
typedef struct _GSocketListener GSocketListener;
|
||||
/**
|
||||
* GSocketService:
|
||||
*
|
||||
* A helper class for handling accepting incomming connections in the
|
||||
* glib mainloop.
|
||||
*
|
||||
* Since: 2.22
|
||||
**/
|
||||
typedef struct _GSocketService GSocketService;
|
||||
typedef struct _GSocketAddress GSocketAddress;
|
||||
typedef struct _GSocketAddressEnumerator GSocketAddressEnumerator;
|
||||
typedef struct _GSocketConnectable GSocketConnectable;
|
||||
typedef struct _GSrvTarget GSrvTarget;
|
||||
typedef struct _GTask GTask;
|
||||
/**
|
||||
* GTcpConnection:
|
||||
*
|
||||
* A #GSocketConnection for TCP/IP connections.
|
||||
*
|
||||
* Since: 2.22
|
||||
**/
|
||||
typedef struct _GTcpConnection GTcpConnection;
|
||||
typedef struct _GTcpWrapperConnection GTcpWrapperConnection;
|
||||
/**
|
||||
* GThreadedSocketService:
|
||||
*
|
||||
* 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 _GDtlsConnection GDtlsConnection;
|
||||
typedef struct _GDtlsClientConnection GDtlsClientConnection; /* Dummy typedef */
|
||||
typedef struct _GDtlsServerConnection GDtlsServerConnection; /* Dummy typedef */
|
||||
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.
|
||||
**/
|
||||
typedef struct _GVolume GVolume; /* Dummy typedef */
|
||||
typedef struct _GVolumeMonitor GVolumeMonitor;
|
||||
|
||||
/**
|
||||
* GAsyncReadyCallback:
|
||||
* @source_object: (nullable): the object the asynchronous operation was started with.
|
||||
* @res: a #GAsyncResult.
|
||||
* @user_data: user data passed to the callback.
|
||||
*
|
||||
* Type definition for a function that will be called back when an asynchronous
|
||||
* operation within GIO has been completed. #GAsyncReadyCallback
|
||||
* callbacks from #GTask are guaranteed to be invoked in a later
|
||||
* iteration of the
|
||||
* [thread-default main context][g-main-context-push-thread-default]
|
||||
* where the #GTask was created. All other users of
|
||||
* #GAsyncReadyCallback must likewise call it asynchronously in a
|
||||
* later iteration of the main context.
|
||||
**/
|
||||
typedef void (*GAsyncReadyCallback) (GObject *source_object,
|
||||
GAsyncResult *res,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* GFileProgressCallback:
|
||||
* @current_num_bytes: the current number of bytes in the operation.
|
||||
* @total_num_bytes: the total number of bytes in the operation.
|
||||
* @user_data: user data passed to the callback.
|
||||
*
|
||||
* When doing file operations that may take a while, such as moving
|
||||
* a file or copying a file, a progress callback is used to pass how
|
||||
* far along that operation is to the application.
|
||||
**/
|
||||
typedef void (*GFileProgressCallback) (goffset current_num_bytes,
|
||||
goffset total_num_bytes,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* GFileReadMoreCallback:
|
||||
* @file_contents: the data as currently read.
|
||||
* @file_size: the size of the data currently read.
|
||||
* @callback_data: (closure): data passed to the callback.
|
||||
*
|
||||
* When loading the partial contents of a file with g_file_load_partial_contents_async(),
|
||||
* it may become necessary to determine if any more data from the file should be loaded.
|
||||
* A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
|
||||
* should be read, or %FALSE otherwise.
|
||||
*
|
||||
* Returns: %TRUE if more data should be read back. %FALSE otherwise.
|
||||
**/
|
||||
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_MEASURE_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:
|
||||
* @job: a #GIOSchedulerJob.
|
||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||
* @user_data: the data to pass to callback function
|
||||
*
|
||||
* I/O Job function.
|
||||
*
|
||||
* Long-running jobs should periodically check the @cancellable
|
||||
* to see if they have been cancelled.
|
||||
*
|
||||
* Returns: %TRUE if this function should be called again to
|
||||
* complete the job, %FALSE if the job is complete (or cancelled)
|
||||
**/
|
||||
typedef gboolean (*GIOSchedulerJobFunc) (GIOSchedulerJob *job,
|
||||
GCancellable *cancellable,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* GSimpleAsyncThreadFunc:
|
||||
* @res: a #GSimpleAsyncResult.
|
||||
* @object: a #GObject.
|
||||
* @cancellable: optional #GCancellable object, %NULL to ignore.
|
||||
*
|
||||
* Simple thread function that runs an asynchronous operation and
|
||||
* checks for cancellation.
|
||||
**/
|
||||
typedef void (*GSimpleAsyncThreadFunc) (GSimpleAsyncResult *res,
|
||||
GObject *object,
|
||||
GCancellable *cancellable);
|
||||
|
||||
/**
|
||||
* GSocketSourceFunc:
|
||||
* @socket: the #GSocket
|
||||
* @condition: the current condition at the source fired.
|
||||
* @user_data: data passed in by the user.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Since: 2.22
|
||||
*/
|
||||
typedef gboolean (*GSocketSourceFunc) (GSocket *socket,
|
||||
GIOCondition condition,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* GDatagramBasedSourceFunc:
|
||||
* @datagram_based: the #GDatagramBased
|
||||
* @condition: the current condition at the source fired
|
||||
* @user_data: data passed in by the user
|
||||
*
|
||||
* This is the function type of the callback used for the #GSource
|
||||
* returned by g_datagram_based_create_source().
|
||||
*
|
||||
* Returns: %G_SOURCE_REMOVE if the source should be removed,
|
||||
* %G_SOURCE_CONTINUE otherwise
|
||||
*
|
||||
* Since: 2.48
|
||||
*/
|
||||
typedef gboolean (*GDatagramBasedSourceFunc) (GDatagramBased *datagram_based,
|
||||
GIOCondition condition,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* GInputVector:
|
||||
* @buffer: Pointer to a buffer where data will be written.
|
||||
* @size: the available size in @buffer.
|
||||
*
|
||||
* Structure used for scatter/gather data input.
|
||||
* 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
|
||||
*/
|
||||
typedef struct _GInputVector GInputVector;
|
||||
|
||||
struct _GInputVector {
|
||||
gpointer buffer;
|
||||
gsize size;
|
||||
};
|
||||
|
||||
/**
|
||||
* GInputMessage:
|
||||
* @address: (optional) (out) (transfer full): return location
|
||||
* for a #GSocketAddress, or %NULL
|
||||
* @vectors: (array length=num_vectors) (out): pointer to an
|
||||
* array of input vectors
|
||||
* @num_vectors: the number of input vectors pointed to by @vectors
|
||||
* @bytes_received: (out): will be set to the number of bytes that have been
|
||||
* received
|
||||
* @flags: (out): collection of #GSocketMsgFlags for the received message,
|
||||
* outputted by the call
|
||||
* @control_messages: (array length=num_control_messages) (optional)
|
||||
* (out) (transfer full): return location for a
|
||||
* caller-allocated array of #GSocketControlMessages, or %NULL
|
||||
* @num_control_messages: (out) (optional): return location for the number of
|
||||
* elements in @control_messages
|
||||
*
|
||||
* Structure used for scatter/gather data input when receiving multiple
|
||||
* messages or packets in one go. You generally pass in an array of empty
|
||||
* #GInputVectors and the operation will use all the buffers as if they
|
||||
* were one buffer, and will set @bytes_received to the total number of bytes
|
||||
* received across all #GInputVectors.
|
||||
*
|
||||
* This structure closely mirrors `struct mmsghdr` and `struct msghdr` from
|
||||
* the POSIX sockets API (see `man 2 recvmmsg`).
|
||||
*
|
||||
* If @address is non-%NULL then it is set to the source address the message
|
||||
* was received from, and the caller must free it afterwards.
|
||||
*
|
||||
* If @control_messages is non-%NULL then it is set to an array of control
|
||||
* messages received with the message (if any), and the caller must free it
|
||||
* afterwards. @num_control_messages is set to the number of elements in
|
||||
* this array, which may be zero.
|
||||
*
|
||||
* Flags relevant to this message will be returned in @flags. For example,
|
||||
* `MSG_EOR` or `MSG_TRUNC`.
|
||||
*
|
||||
* Since: 2.48
|
||||
*/
|
||||
typedef struct _GInputMessage GInputMessage;
|
||||
|
||||
struct _GInputMessage {
|
||||
GSocketAddress **address;
|
||||
|
||||
GInputVector *vectors;
|
||||
guint num_vectors;
|
||||
|
||||
gsize bytes_received;
|
||||
gint flags;
|
||||
|
||||
GSocketControlMessage ***control_messages;
|
||||
guint *num_control_messages;
|
||||
};
|
||||
|
||||
/**
|
||||
* GOutputVector:
|
||||
* @buffer: Pointer to a buffer of data to read.
|
||||
* @size: the size of @buffer.
|
||||
*
|
||||
* Structure used for scatter/gather data output.
|
||||
* 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
|
||||
*/
|
||||
typedef struct _GOutputVector GOutputVector;
|
||||
|
||||
struct _GOutputVector {
|
||||
gconstpointer buffer;
|
||||
gsize size;
|
||||
};
|
||||
|
||||
/**
|
||||
* GOutputMessage:
|
||||
* @address: (nullable): a #GSocketAddress, or %NULL
|
||||
* @vectors: pointer to an array of output vectors
|
||||
* @num_vectors: the number of output vectors pointed to by @vectors.
|
||||
* @bytes_sent: initialize to 0. Will be set to the number of bytes
|
||||
* that have been sent
|
||||
* @control_messages: (array length=num_control_messages) (nullable): a pointer
|
||||
* to an array of #GSocketControlMessages, or %NULL.
|
||||
* @num_control_messages: number of elements in @control_messages.
|
||||
*
|
||||
* Structure used for scatter/gather data output when sending multiple
|
||||
* messages or packets in one go. You generally pass in an array of
|
||||
* #GOutputVectors and the operation will use all the buffers as if they
|
||||
* were one buffer.
|
||||
*
|
||||
* If @address is %NULL then the message is sent to the default receiver
|
||||
* (as previously set by g_socket_connect()).
|
||||
*
|
||||
* Since: 2.44
|
||||
*/
|
||||
typedef struct _GOutputMessage GOutputMessage;
|
||||
|
||||
struct _GOutputMessage {
|
||||
GSocketAddress *address;
|
||||
|
||||
GOutputVector *vectors;
|
||||
guint num_vectors;
|
||||
|
||||
guint bytes_sent;
|
||||
|
||||
GSocketControlMessage **control_messages;
|
||||
guint num_control_messages;
|
||||
};
|
||||
|
||||
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: (nullable): 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
|
||||
|
||||
#endif /* __GIO_TYPES_H__ */
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright 2015 Lars Uebernickel
|
||||
* Copyright 2015 Ryan Lortie
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors:
|
||||
* Lars Uebernickel <lars@uebernic.de>
|
||||
* Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#ifndef __G_LIST_MODEL_H__
|
||||
#define __G_LIST_MODEL_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_LIST_MODEL g_list_model_get_type ()
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
G_DECLARE_INTERFACE(GListModel, g_list_model, G, LIST_MODEL, GObject)
|
||||
|
||||
struct _GListModelInterface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
GType (* get_item_type) (GListModel *list);
|
||||
|
||||
guint (* get_n_items) (GListModel *list);
|
||||
|
||||
gpointer (* get_item) (GListModel *list,
|
||||
guint position);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
GType g_list_model_get_item_type (GListModel *list);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
guint g_list_model_get_n_items (GListModel *list);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
gpointer g_list_model_get_item (GListModel *list,
|
||||
guint position);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
GObject * g_list_model_get_object (GListModel *list,
|
||||
guint position);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
void g_list_model_items_changed (GListModel *list,
|
||||
guint position,
|
||||
guint removed,
|
||||
guint added);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_LIST_MODEL_H__ */
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* Copyright 2015 Lars Uebernickel
|
||||
* Copyright 2015 Ryan Lortie
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors:
|
||||
* Lars Uebernickel <lars@uebernic.de>
|
||||
* Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#ifndef __G_LIST_STORE_H__
|
||||
#define __G_LIST_STORE_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_LIST_STORE (g_list_store_get_type ())
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
G_DECLARE_FINAL_TYPE(GListStore, g_list_store, G, LIST_STORE, GObject)
|
||||
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
GListStore * g_list_store_new (GType item_type);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
void g_list_store_insert (GListStore *store,
|
||||
guint position,
|
||||
gpointer item);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
guint g_list_store_insert_sorted (GListStore *store,
|
||||
gpointer item,
|
||||
GCompareDataFunc compare_func,
|
||||
gpointer user_data);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_46
|
||||
void g_list_store_sort (GListStore *store,
|
||||
GCompareDataFunc compare_func,
|
||||
gpointer user_data);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
void g_list_store_append (GListStore *store,
|
||||
gpointer item);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
void g_list_store_remove (GListStore *store,
|
||||
guint position);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
void g_list_store_remove_all (GListStore *store);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
void g_list_store_splice (GListStore *store,
|
||||
guint position,
|
||||
guint n_removals,
|
||||
gpointer *additions,
|
||||
guint n_additions);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_LIST_STORE_H__ */
|
|
@ -0,0 +1,99 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_LOADABLE_ICON_H__
|
||||
#define __G_LOADABLE_ICON_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_LOADABLE_ICON (g_loadable_icon_get_type ())
|
||||
#define G_LOADABLE_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_LOADABLE_ICON, GLoadableIcon))
|
||||
#define G_IS_LOADABLE_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_LOADABLE_ICON))
|
||||
#define G_LOADABLE_ICON_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_LOADABLE_ICON, GLoadableIconIface))
|
||||
|
||||
/**
|
||||
* GLoadableIcon:
|
||||
*
|
||||
* Generic type for all kinds of icons that can be loaded
|
||||
* as a stream.
|
||||
**/
|
||||
typedef struct _GLoadableIconIface GLoadableIconIface;
|
||||
|
||||
/**
|
||||
* GLoadableIconIface:
|
||||
* @g_iface: The parent interface.
|
||||
* @load: Loads an icon.
|
||||
* @load_async: Loads an icon asynchronously.
|
||||
* @load_finish: Finishes an asynchronous icon load.
|
||||
*
|
||||
* Interface for icons that can be loaded as a stream.
|
||||
**/
|
||||
struct _GLoadableIconIface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
/* Virtual Table */
|
||||
|
||||
GInputStream * (* load) (GLoadableIcon *icon,
|
||||
int size,
|
||||
char **type,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
void (* load_async) (GLoadableIcon *icon,
|
||||
int size,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GInputStream * (* load_finish) (GLoadableIcon *icon,
|
||||
GAsyncResult *res,
|
||||
char **type,
|
||||
GError **error);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_loadable_icon_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GInputStream *g_loadable_icon_load (GLoadableIcon *icon,
|
||||
int size,
|
||||
char **type,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_loadable_icon_load_async (GLoadableIcon *icon,
|
||||
int size,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GInputStream *g_loadable_icon_load_finish (GLoadableIcon *icon,
|
||||
GAsyncResult *res,
|
||||
char **type,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_LOADABLE_ICON_H__ */
|
|
@ -0,0 +1,90 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Christian Kellner <gicmo@gnome.org>
|
||||
*/
|
||||
|
||||
#ifndef __G_MEMORY_INPUT_STREAM_H__
|
||||
#define __G_MEMORY_INPUT_STREAM_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/ginputstream.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_MEMORY_INPUT_STREAM (g_memory_input_stream_get_type ())
|
||||
#define G_MEMORY_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_MEMORY_INPUT_STREAM, GMemoryInputStream))
|
||||
#define G_MEMORY_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_MEMORY_INPUT_STREAM, GMemoryInputStreamClass))
|
||||
#define G_IS_MEMORY_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_MEMORY_INPUT_STREAM))
|
||||
#define G_IS_MEMORY_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_MEMORY_INPUT_STREAM))
|
||||
#define G_MEMORY_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_MEMORY_INPUT_STREAM, GMemoryInputStreamClass))
|
||||
|
||||
/**
|
||||
* GMemoryInputStream:
|
||||
*
|
||||
* Implements #GInputStream for arbitrary memory chunks.
|
||||
**/
|
||||
typedef struct _GMemoryInputStreamClass GMemoryInputStreamClass;
|
||||
typedef struct _GMemoryInputStreamPrivate GMemoryInputStreamPrivate;
|
||||
|
||||
struct _GMemoryInputStream
|
||||
{
|
||||
GInputStream parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GMemoryInputStreamPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GMemoryInputStreamClass
|
||||
{
|
||||
GInputStreamClass parent_class;
|
||||
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
};
|
||||
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_memory_input_stream_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GInputStream * g_memory_input_stream_new (void);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GInputStream * g_memory_input_stream_new_from_data (const void *data,
|
||||
gssize len,
|
||||
GDestroyNotify destroy);
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
GInputStream * g_memory_input_stream_new_from_bytes (GBytes *bytes);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_memory_input_stream_add_data (GMemoryInputStream *stream,
|
||||
const void *data,
|
||||
gssize len,
|
||||
GDestroyNotify destroy);
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
void g_memory_input_stream_add_bytes (GMemoryInputStream *stream,
|
||||
GBytes *bytes);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_MEMORY_INPUT_STREAM_H__ */
|
|
@ -0,0 +1,107 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2007 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Christian Kellner <gicmo@gnome.org>
|
||||
*/
|
||||
|
||||
#ifndef __G_MEMORY_OUTPUT_STREAM_H__
|
||||
#define __G_MEMORY_OUTPUT_STREAM_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/goutputstream.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_MEMORY_OUTPUT_STREAM (g_memory_output_stream_get_type ())
|
||||
#define G_MEMORY_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_MEMORY_OUTPUT_STREAM, GMemoryOutputStream))
|
||||
#define G_MEMORY_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_MEMORY_OUTPUT_STREAM, GMemoryOutputStreamClass))
|
||||
#define G_IS_MEMORY_OUTPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_MEMORY_OUTPUT_STREAM))
|
||||
#define G_IS_MEMORY_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_MEMORY_OUTPUT_STREAM))
|
||||
#define G_MEMORY_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_MEMORY_OUTPUT_STREAM, GMemoryOutputStreamClass))
|
||||
|
||||
/**
|
||||
* GMemoryOutputStream:
|
||||
*
|
||||
* Implements #GOutputStream for arbitrary memory chunks.
|
||||
**/
|
||||
typedef struct _GMemoryOutputStreamClass GMemoryOutputStreamClass;
|
||||
typedef struct _GMemoryOutputStreamPrivate GMemoryOutputStreamPrivate;
|
||||
|
||||
struct _GMemoryOutputStream
|
||||
{
|
||||
GOutputStream parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
GMemoryOutputStreamPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GMemoryOutputStreamClass
|
||||
{
|
||||
GOutputStreamClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
void (*_g_reserved1) (void);
|
||||
void (*_g_reserved2) (void);
|
||||
void (*_g_reserved3) (void);
|
||||
void (*_g_reserved4) (void);
|
||||
void (*_g_reserved5) (void);
|
||||
};
|
||||
|
||||
/**
|
||||
* GReallocFunc:
|
||||
* @data: memory block to reallocate
|
||||
* @size: size to reallocate @data to
|
||||
*
|
||||
* Changes the size of the memory block pointed to by @data to
|
||||
* @size bytes.
|
||||
*
|
||||
* The function should have the same semantics as realloc().
|
||||
*
|
||||
* Returns: a pointer to the reallocated memory
|
||||
*/
|
||||
typedef gpointer (* GReallocFunc) (gpointer data,
|
||||
gsize size);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_memory_output_stream_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GOutputStream *g_memory_output_stream_new (gpointer data,
|
||||
gsize size,
|
||||
GReallocFunc realloc_function,
|
||||
GDestroyNotify destroy_function);
|
||||
GLIB_AVAILABLE_IN_2_36
|
||||
GOutputStream *g_memory_output_stream_new_resizable (void);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gpointer g_memory_output_stream_get_data (GMemoryOutputStream *ostream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gsize g_memory_output_stream_get_size (GMemoryOutputStream *ostream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gsize g_memory_output_stream_get_data_size (GMemoryOutputStream *ostream);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gpointer g_memory_output_stream_steal_data (GMemoryOutputStream *ostream);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
GBytes * g_memory_output_stream_steal_as_bytes (GMemoryOutputStream *ostream);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_MEMORY_OUTPUT_STREAM_H__ */
|
|
@ -0,0 +1,182 @@
|
|||
/*
|
||||
* Copyright © 2011 Canonical Ltd.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#ifndef __G_MENU_H__
|
||||
#define __G_MENU_H__
|
||||
|
||||
#include <gio/gmenumodel.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_MENU (g_menu_get_type ())
|
||||
#define G_MENU(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_MENU, GMenu))
|
||||
#define G_IS_MENU(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
|
||||
G_TYPE_MENU))
|
||||
|
||||
#define G_TYPE_MENU_ITEM (g_menu_item_get_type ())
|
||||
#define G_MENU_ITEM(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_MENU_ITEM, GMenuItem))
|
||||
#define G_IS_MENU_ITEM(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
|
||||
G_TYPE_MENU_ITEM))
|
||||
|
||||
typedef struct _GMenuItem GMenuItem;
|
||||
typedef struct _GMenu GMenu;
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GType g_menu_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GMenu * g_menu_new (void);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_freeze (GMenu *menu);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_insert_item (GMenu *menu,
|
||||
gint position,
|
||||
GMenuItem *item);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_prepend_item (GMenu *menu,
|
||||
GMenuItem *item);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_append_item (GMenu *menu,
|
||||
GMenuItem *item);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_remove (GMenu *menu,
|
||||
gint position);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
void g_menu_remove_all (GMenu *menu);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_insert (GMenu *menu,
|
||||
gint position,
|
||||
const gchar *label,
|
||||
const gchar *detailed_action);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_prepend (GMenu *menu,
|
||||
const gchar *label,
|
||||
const gchar *detailed_action);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_append (GMenu *menu,
|
||||
const gchar *label,
|
||||
const gchar *detailed_action);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_insert_section (GMenu *menu,
|
||||
gint position,
|
||||
const gchar *label,
|
||||
GMenuModel *section);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_prepend_section (GMenu *menu,
|
||||
const gchar *label,
|
||||
GMenuModel *section);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_append_section (GMenu *menu,
|
||||
const gchar *label,
|
||||
GMenuModel *section);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_insert_submenu (GMenu *menu,
|
||||
gint position,
|
||||
const gchar *label,
|
||||
GMenuModel *submenu);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_prepend_submenu (GMenu *menu,
|
||||
const gchar *label,
|
||||
GMenuModel *submenu);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_append_submenu (GMenu *menu,
|
||||
const gchar *label,
|
||||
GMenuModel *submenu);
|
||||
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GType g_menu_item_get_type (void) G_GNUC_CONST;
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GMenuItem * g_menu_item_new (const gchar *label,
|
||||
const gchar *detailed_action);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
GMenuItem * g_menu_item_new_from_model (GMenuModel *model,
|
||||
gint item_index);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GMenuItem * g_menu_item_new_submenu (const gchar *label,
|
||||
GMenuModel *submenu);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GMenuItem * g_menu_item_new_section (const gchar *label,
|
||||
GMenuModel *section);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
GVariant * g_menu_item_get_attribute_value (GMenuItem *menu_item,
|
||||
const gchar *attribute,
|
||||
const GVariantType *expected_type);
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
gboolean g_menu_item_get_attribute (GMenuItem *menu_item,
|
||||
const gchar *attribute,
|
||||
const gchar *format_string,
|
||||
...);
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
GMenuModel *g_menu_item_get_link (GMenuItem *menu_item,
|
||||
const gchar *link);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_item_set_attribute_value (GMenuItem *menu_item,
|
||||
const gchar *attribute,
|
||||
GVariant *value);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_item_set_attribute (GMenuItem *menu_item,
|
||||
const gchar *attribute,
|
||||
const gchar *format_string,
|
||||
...);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_item_set_link (GMenuItem *menu_item,
|
||||
const gchar *link,
|
||||
GMenuModel *model);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_item_set_label (GMenuItem *menu_item,
|
||||
const gchar *label);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_item_set_submenu (GMenuItem *menu_item,
|
||||
GMenuModel *submenu);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_item_set_section (GMenuItem *menu_item,
|
||||
GMenuModel *section);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_item_set_action_and_target_value (GMenuItem *menu_item,
|
||||
const gchar *action,
|
||||
GVariant *target_value);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_item_set_action_and_target (GMenuItem *menu_item,
|
||||
const gchar *action,
|
||||
const gchar *format_string,
|
||||
...);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_item_set_detailed_action (GMenuItem *menu_item,
|
||||
const gchar *detailed_action);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
void g_menu_item_set_icon (GMenuItem *menu_item,
|
||||
GIcon *icon);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_MENU_H__ */
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright © 2011 Canonical Ltd.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#ifndef __G_MENU_EXPORTER_H__
|
||||
#define __G_MENU_EXPORTER_H__
|
||||
|
||||
#include <gio/gdbusconnection.h>
|
||||
#include <gio/gmenumodel.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
guint g_dbus_connection_export_menu_model (GDBusConnection *connection,
|
||||
const gchar *object_path,
|
||||
GMenuModel *menu,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_dbus_connection_unexport_menu_model (GDBusConnection *connection,
|
||||
guint export_id);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_MENU_EXPORTER_H__ */
|
|
@ -0,0 +1,305 @@
|
|||
/*
|
||||
* Copyright © 2011 Canonical Ltd.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Ryan Lortie <desrt@desrt.ca>
|
||||
*/
|
||||
|
||||
#ifndef __G_MENU_MODEL_H__
|
||||
#define __G_MENU_MODEL_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* G_MENU_ATTRIBUTE_ACTION:
|
||||
*
|
||||
* The menu item attribute which holds the action name of the item. Action
|
||||
* names are namespaced with an identifier for the action group in which the
|
||||
* action resides. For example, "win." for window-specific actions and "app."
|
||||
* for application-wide actions.
|
||||
*
|
||||
* See also g_menu_model_get_item_attribute() and g_menu_item_set_attribute().
|
||||
*
|
||||
* Since: 2.32
|
||||
**/
|
||||
#define G_MENU_ATTRIBUTE_ACTION "action"
|
||||
|
||||
/**
|
||||
* G_MENU_ATTRIBUTE_ACTION_NAMESPACE:
|
||||
*
|
||||
* The menu item attribute that holds the namespace for all action names in
|
||||
* menus that are linked from this item.
|
||||
*
|
||||
* Since: 2.36
|
||||
**/
|
||||
#define G_MENU_ATTRIBUTE_ACTION_NAMESPACE "action-namespace"
|
||||
|
||||
/**
|
||||
* G_MENU_ATTRIBUTE_TARGET:
|
||||
*
|
||||
* The menu item attribute which holds the target with which the item's action
|
||||
* will be activated.
|
||||
*
|
||||
* See also g_menu_item_set_action_and_target()
|
||||
*
|
||||
* Since: 2.32
|
||||
**/
|
||||
#define G_MENU_ATTRIBUTE_TARGET "target"
|
||||
|
||||
/**
|
||||
* G_MENU_ATTRIBUTE_LABEL:
|
||||
*
|
||||
* The menu item attribute which holds the label of the item.
|
||||
*
|
||||
* Since: 2.32
|
||||
**/
|
||||
#define G_MENU_ATTRIBUTE_LABEL "label"
|
||||
|
||||
/**
|
||||
* G_MENU_ATTRIBUTE_ICON:
|
||||
*
|
||||
* The menu item attribute which holds the icon of the item.
|
||||
*
|
||||
* The icon is stored in the format returned by g_icon_serialize().
|
||||
*
|
||||
* This attribute is intended only to represent 'noun' icons such as
|
||||
* favicons for a webpage, or application icons. It should not be used
|
||||
* for 'verbs' (ie: stock icons).
|
||||
*
|
||||
* Since: 2.38
|
||||
**/
|
||||
#define G_MENU_ATTRIBUTE_ICON "icon"
|
||||
|
||||
/**
|
||||
* G_MENU_LINK_SUBMENU:
|
||||
*
|
||||
* The name of the link that associates a menu item with a submenu.
|
||||
*
|
||||
* See also g_menu_item_set_link().
|
||||
*
|
||||
* Since: 2.32
|
||||
**/
|
||||
#define G_MENU_LINK_SUBMENU "submenu"
|
||||
|
||||
/**
|
||||
* G_MENU_LINK_SECTION:
|
||||
*
|
||||
* The name of the link that associates a menu item with a section. The linked
|
||||
* menu will usually be shown in place of the menu item, using the item's label
|
||||
* as a header.
|
||||
*
|
||||
* See also g_menu_item_set_link().
|
||||
*
|
||||
* Since: 2.32
|
||||
**/
|
||||
#define G_MENU_LINK_SECTION "section"
|
||||
|
||||
#define G_TYPE_MENU_MODEL (g_menu_model_get_type ())
|
||||
#define G_MENU_MODEL(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_MENU_MODEL, GMenuModel))
|
||||
#define G_MENU_MODEL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
|
||||
G_TYPE_MENU_MODEL, GMenuModelClass))
|
||||
#define G_IS_MENU_MODEL(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
|
||||
G_TYPE_MENU_MODEL))
|
||||
#define G_IS_MENU_MODEL_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
|
||||
G_TYPE_MENU_MODEL))
|
||||
#define G_MENU_MODEL_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
|
||||
G_TYPE_MENU_MODEL, GMenuModelClass))
|
||||
|
||||
typedef struct _GMenuModelPrivate GMenuModelPrivate;
|
||||
typedef struct _GMenuModelClass GMenuModelClass;
|
||||
|
||||
typedef struct _GMenuAttributeIterPrivate GMenuAttributeIterPrivate;
|
||||
typedef struct _GMenuAttributeIterClass GMenuAttributeIterClass;
|
||||
typedef struct _GMenuAttributeIter GMenuAttributeIter;
|
||||
|
||||
typedef struct _GMenuLinkIterPrivate GMenuLinkIterPrivate;
|
||||
typedef struct _GMenuLinkIterClass GMenuLinkIterClass;
|
||||
typedef struct _GMenuLinkIter GMenuLinkIter;
|
||||
|
||||
struct _GMenuModel
|
||||
{
|
||||
GObject parent_instance;
|
||||
GMenuModelPrivate *priv;
|
||||
};
|
||||
|
||||
/**
|
||||
* GMenuModelClass::get_item_attributes:
|
||||
* @model: the #GMenuModel to query
|
||||
* @item_index: The #GMenuItem to query
|
||||
* @attributes: (out) (element-type utf8 GLib.Variant): Attributes on the item
|
||||
*
|
||||
* Gets all the attributes associated with the item in the menu model.
|
||||
*/
|
||||
/**
|
||||
* GMenuModelClass::get_item_links:
|
||||
* @model: the #GMenuModel to query
|
||||
* @item_index: The #GMenuItem to query
|
||||
* @links: (out) (element-type utf8 Gio.MenuModel): Links from the item
|
||||
*
|
||||
* Gets all the links associated with the item in the menu model.
|
||||
*/
|
||||
struct _GMenuModelClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
gboolean (*is_mutable) (GMenuModel *model);
|
||||
gint (*get_n_items) (GMenuModel *model);
|
||||
void (*get_item_attributes) (GMenuModel *model,
|
||||
gint item_index,
|
||||
GHashTable **attributes);
|
||||
GMenuAttributeIter * (*iterate_item_attributes) (GMenuModel *model,
|
||||
gint item_index);
|
||||
GVariant * (*get_item_attribute_value) (GMenuModel *model,
|
||||
gint item_index,
|
||||
const gchar *attribute,
|
||||
const GVariantType *expected_type);
|
||||
void (*get_item_links) (GMenuModel *model,
|
||||
gint item_index,
|
||||
GHashTable **links);
|
||||
GMenuLinkIter * (*iterate_item_links) (GMenuModel *model,
|
||||
gint item_index);
|
||||
GMenuModel * (*get_item_link) (GMenuModel *model,
|
||||
gint item_index,
|
||||
const gchar *link);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GType g_menu_model_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
gboolean g_menu_model_is_mutable (GMenuModel *model);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
gint g_menu_model_get_n_items (GMenuModel *model);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GMenuAttributeIter * g_menu_model_iterate_item_attributes (GMenuModel *model,
|
||||
gint item_index);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GVariant * g_menu_model_get_item_attribute_value (GMenuModel *model,
|
||||
gint item_index,
|
||||
const gchar *attribute,
|
||||
const GVariantType *expected_type);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
gboolean g_menu_model_get_item_attribute (GMenuModel *model,
|
||||
gint item_index,
|
||||
const gchar *attribute,
|
||||
const gchar *format_string,
|
||||
...);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GMenuLinkIter * g_menu_model_iterate_item_links (GMenuModel *model,
|
||||
gint item_index);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GMenuModel * g_menu_model_get_item_link (GMenuModel *model,
|
||||
gint item_index,
|
||||
const gchar *link);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
void g_menu_model_items_changed (GMenuModel *model,
|
||||
gint position,
|
||||
gint removed,
|
||||
gint added);
|
||||
|
||||
|
||||
#define G_TYPE_MENU_ATTRIBUTE_ITER (g_menu_attribute_iter_get_type ())
|
||||
#define G_MENU_ATTRIBUTE_ITER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_MENU_ATTRIBUTE_ITER, GMenuAttributeIter))
|
||||
#define G_MENU_ATTRIBUTE_ITER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
|
||||
G_TYPE_MENU_ATTRIBUTE_ITER, GMenuAttributeIterClass))
|
||||
#define G_IS_MENU_ATTRIBUTE_ITER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
|
||||
G_TYPE_MENU_ATTRIBUTE_ITER))
|
||||
#define G_IS_MENU_ATTRIBUTE_ITER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
|
||||
G_TYPE_MENU_ATTRIBUTE_ITER))
|
||||
#define G_MENU_ATTRIBUTE_ITER_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
|
||||
G_TYPE_MENU_ATTRIBUTE_ITER, GMenuAttributeIterClass))
|
||||
|
||||
struct _GMenuAttributeIter
|
||||
{
|
||||
GObject parent_instance;
|
||||
GMenuAttributeIterPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GMenuAttributeIterClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
gboolean (*get_next) (GMenuAttributeIter *iter,
|
||||
const gchar **out_name,
|
||||
GVariant **value);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GType g_menu_attribute_iter_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
gboolean g_menu_attribute_iter_get_next (GMenuAttributeIter *iter,
|
||||
const gchar **out_name,
|
||||
GVariant **value);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
gboolean g_menu_attribute_iter_next (GMenuAttributeIter *iter);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
const gchar * g_menu_attribute_iter_get_name (GMenuAttributeIter *iter);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GVariant * g_menu_attribute_iter_get_value (GMenuAttributeIter *iter);
|
||||
|
||||
|
||||
#define G_TYPE_MENU_LINK_ITER (g_menu_link_iter_get_type ())
|
||||
#define G_MENU_LINK_ITER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_MENU_LINK_ITER, GMenuLinkIter))
|
||||
#define G_MENU_LINK_ITER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
|
||||
G_TYPE_MENU_LINK_ITER, GMenuLinkIterClass))
|
||||
#define G_IS_MENU_LINK_ITER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
|
||||
G_TYPE_MENU_LINK_ITER))
|
||||
#define G_IS_MENU_LINK_ITER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
|
||||
G_TYPE_MENU_LINK_ITER))
|
||||
#define G_MENU_LINK_ITER_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
|
||||
G_TYPE_MENU_LINK_ITER, GMenuLinkIterClass))
|
||||
|
||||
struct _GMenuLinkIter
|
||||
{
|
||||
GObject parent_instance;
|
||||
GMenuLinkIterPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GMenuLinkIterClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
gboolean (*get_next) (GMenuLinkIter *iter,
|
||||
const gchar **out_link,
|
||||
GMenuModel **value);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GType g_menu_link_iter_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
gboolean g_menu_link_iter_get_next (GMenuLinkIter *iter,
|
||||
const gchar **out_link,
|
||||
GMenuModel **value);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
gboolean g_menu_link_iter_next (GMenuLinkIter *iter);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
const gchar * g_menu_link_iter_get_name (GMenuLinkIter *iter);
|
||||
GLIB_AVAILABLE_IN_2_32
|
||||
GMenuModel * g_menu_link_iter_get_value (GMenuLinkIter *iter);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_MENU_MODEL_H__ */
|
|
@ -0,0 +1,276 @@
|
|||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright (C) 2006-2008 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
* David Zeuthen <davidz@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __G_MOUNT_H__
|
||||
#define __G_MOUNT_H__
|
||||
|
||||
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/giotypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_MOUNT (g_mount_get_type ())
|
||||
#define G_MOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_MOUNT, GMount))
|
||||
#define G_IS_MOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_MOUNT))
|
||||
#define G_MOUNT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_MOUNT, GMountIface))
|
||||
|
||||
typedef struct _GMountIface GMountIface;
|
||||
|
||||
/**
|
||||
* GMountIface:
|
||||
* @g_iface: The parent interface.
|
||||
* @changed: Changed signal that is emitted when the mount's state has changed.
|
||||
* @unmounted: The unmounted signal that is emitted when the #GMount have been unmounted. If the recipient is holding references to the object they should release them so the object can be finalized.
|
||||
* @pre_unmount: The ::pre-unmount signal that is emitted when the #GMount will soon be emitted. If the recipient is somehow holding the mount open by keeping an open file on it it should close the file.
|
||||
* @get_root: Gets a #GFile to the root directory of the #GMount.
|
||||
* @get_name: Gets a string containing the name of the #GMount.
|
||||
* @get_icon: Gets a #GIcon for the #GMount.
|
||||
* @get_uuid: Gets the UUID for the #GMount. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available.
|
||||
* @get_volume: Gets a #GVolume the mount is located on. Returns %NULL if the #GMount is not associated with a #GVolume.
|
||||
* @get_drive: Gets a #GDrive the volume of the mount is located on. Returns %NULL if the #GMount is not associated with a #GDrive or a #GVolume. This is convenience method for getting the #GVolume and using that to get the #GDrive.
|
||||
* @can_unmount: Checks if a #GMount can be unmounted.
|
||||
* @can_eject: Checks if a #GMount can be ejected.
|
||||
* @unmount: Starts unmounting a #GMount.
|
||||
* @unmount_finish: Finishes an unmounting operation.
|
||||
* @eject: Starts ejecting a #GMount.
|
||||
* @eject_finish: Finishes an eject operation.
|
||||
* @remount: Starts remounting a #GMount.
|
||||
* @remount_finish: Finishes a remounting operation.
|
||||
* @guess_content_type: Starts guessing the type of the content of a #GMount.
|
||||
* See g_mount_guess_content_type() for more information on content
|
||||
* type guessing. This operation was added in 2.18.
|
||||
* @guess_content_type_finish: Finishes a content type guessing operation. Added in 2.18.
|
||||
* @guess_content_type_sync: Synchronous variant of @guess_content_type. Added in 2.18
|
||||
* @unmount_with_operation: Starts unmounting a #GMount using a #GMountOperation. Since 2.22.
|
||||
* @unmount_with_operation_finish: Finishes an unmounting operation using a #GMountOperation. Since 2.22.
|
||||
* @eject_with_operation: Starts ejecting a #GMount using a #GMountOperation. Since 2.22.
|
||||
* @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
|
||||
* @get_default_location: Gets a #GFile indication a start location that can be use as the entry point for this mount. Since 2.24.
|
||||
* @get_sort_key: Gets a key used for sorting #GMount instance or %NULL if no such key exists. Since 2.32.
|
||||
* @get_symbolic_icon: Gets a symbolic #GIcon for the #GMount. Since 2.34.
|
||||
*
|
||||
* Interface for implementing operations for mounts.
|
||||
**/
|
||||
struct _GMountIface
|
||||
{
|
||||
GTypeInterface g_iface;
|
||||
|
||||
/* signals */
|
||||
|
||||
void (* changed) (GMount *mount);
|
||||
void (* unmounted) (GMount *mount);
|
||||
|
||||
/* Virtual Table */
|
||||
|
||||
GFile * (* get_root) (GMount *mount);
|
||||
char * (* get_name) (GMount *mount);
|
||||
GIcon * (* get_icon) (GMount *mount);
|
||||
char * (* get_uuid) (GMount *mount);
|
||||
GVolume * (* get_volume) (GMount *mount);
|
||||
GDrive * (* get_drive) (GMount *mount);
|
||||
gboolean (* can_unmount) (GMount *mount);
|
||||
gboolean (* can_eject) (GMount *mount);
|
||||
|
||||
void (* unmount) (GMount *mount,
|
||||
GMountUnmountFlags flags,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (* unmount_finish) (GMount *mount,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
void (* eject) (GMount *mount,
|
||||
GMountUnmountFlags flags,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (* eject_finish) (GMount *mount,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
void (* remount) (GMount *mount,
|
||||
GMountMountFlags flags,
|
||||
GMountOperation *mount_operation,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (* remount_finish) (GMount *mount,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
void (* guess_content_type) (GMount *mount,
|
||||
gboolean force_rescan,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gchar ** (* guess_content_type_finish) (GMount *mount,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
gchar ** (* guess_content_type_sync) (GMount *mount,
|
||||
gboolean force_rescan,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
/* Signal, not VFunc */
|
||||
void (* pre_unmount) (GMount *mount);
|
||||
|
||||
void (* unmount_with_operation) (GMount *mount,
|
||||
GMountUnmountFlags flags,
|
||||
GMountOperation *mount_operation,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (* unmount_with_operation_finish) (GMount *mount,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
void (* eject_with_operation) (GMount *mount,
|
||||
GMountUnmountFlags flags,
|
||||
GMountOperation *mount_operation,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean (* eject_with_operation_finish) (GMount *mount,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
GFile * (* get_default_location) (GMount *mount);
|
||||
|
||||
const gchar * (* get_sort_key) (GMount *mount);
|
||||
GIcon * (* get_symbolic_icon) (GMount *mount);
|
||||
};
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GType g_mount_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GFile * g_mount_get_root (GMount *mount);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GFile * g_mount_get_default_location (GMount *mount);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char * g_mount_get_name (GMount *mount);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIcon * g_mount_get_icon (GMount *mount);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GIcon * g_mount_get_symbolic_icon (GMount *mount);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
char * g_mount_get_uuid (GMount *mount);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GVolume * g_mount_get_volume (GMount *mount);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GDrive * g_mount_get_drive (GMount *mount);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_mount_can_unmount (GMount *mount);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_mount_can_eject (GMount *mount);
|
||||
|
||||
GLIB_DEPRECATED_FOR(g_mount_unmount_with_operation)
|
||||
void g_mount_unmount (GMount *mount,
|
||||
GMountUnmountFlags flags,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
GLIB_DEPRECATED_FOR(g_mount_unmount_with_operation_finish)
|
||||
gboolean g_mount_unmount_finish (GMount *mount,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GLIB_DEPRECATED_FOR(g_mount_eject_with_operation)
|
||||
void g_mount_eject (GMount *mount,
|
||||
GMountUnmountFlags flags,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
GLIB_DEPRECATED_FOR(g_mount_eject_with_operation_finish)
|
||||
gboolean g_mount_eject_finish (GMount *mount,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_mount_remount (GMount *mount,
|
||||
GMountMountFlags flags,
|
||||
GMountOperation *mount_operation,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_mount_remount_finish (GMount *mount,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_mount_guess_content_type (GMount *mount,
|
||||
gboolean force_rescan,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar ** g_mount_guess_content_type_finish (GMount *mount,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar ** g_mount_guess_content_type_sync (GMount *mount,
|
||||
gboolean force_rescan,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_mount_is_shadowed (GMount *mount);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_mount_shadow (GMount *mount);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_mount_unshadow (GMount *mount);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_mount_unmount_with_operation (GMount *mount,
|
||||
GMountUnmountFlags flags,
|
||||
GMountOperation *mount_operation,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_mount_unmount_with_operation_finish (GMount *mount,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
void g_mount_eject_with_operation (GMount *mount,
|
||||
GMountUnmountFlags flags,
|
||||
GMountOperation *mount_operation,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_mount_eject_with_operation_finish (GMount *mount,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
const gchar *g_mount_get_sort_key (GMount *mount);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_MOUNT_H__ */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue