Skip to content

Instantly share code, notes, and snippets.

@grindhold
Last active March 9, 2018 21:48
Show Gist options
  • Save grindhold/cf784de3faf8ef6c9fbcf1ce1e24e493 to your computer and use it in GitHub Desktop.
Save grindhold/cf784de3faf8ef6c9fbcf1ce1e24e493 to your computer and use it in GitHub Desktop.
/* gelektra-4.0.vapi generated by vapigen, do not modify. */
[CCode (cprefix = "GElektra", gir_namespace = "GElektra", gir_version = "4.0", lower_case_cprefix = "gelektra_")]
namespace GElektra {
[CCode (cheader_filename = "GElektra-4.0.h", type_id = "gelektra_kdb_get_type ()")]
public class Kdb : GLib.Object {
[CCode (has_construct_function = false)]
protected Kdb ();
public int close (GElektra.Key error);
public int @get (GElektra.KeySet returned, GElektra.Key parent);
public void gi_open (GElektra.Key error);
[CCode (cname = "gelektra_kdb_open", has_construct_function = false)]
public Kdb.open (GElektra.Key error);
public int @set (GElektra.KeySet returned, GElektra.Key parent);
}
[CCode (cheader_filename = "GElektra-4.0.h", type_id = "gelektra_key_get_type ()")]
public class Key : GLib.Object {
[CCode (has_construct_function = false)]
protected Key ();
public ssize_t addbasename (string basename);
public int clear ();
public int cmp (GElektra.Key other);
public int copyallmeta (GElektra.Key dest);
public int copymeta (GElektra.Key dest, string name);
public GElektra.Key currentmeta ();
public ssize_t decref ();
public GElektra.Key dup ();
public bool equal (GElektra.Key other);
public ssize_t getbasenamesize ();
public ssize_t getfullnamesize ();
public GElektra.Key getmeta (string name);
public ssize_t getnamesize ();
public ssize_t getref ();
public ssize_t getvaluesize ();
[CCode (array_length_pos = 0.1, array_length_type = "gssize")]
public uint8[] gi_getbinary ();
public string gi_getstring ();
public void gi_init (string name, int flags, string? value, [CCode (array_length_cname = "data_size", array_length_pos = 4.1, array_length_type = "gsize")] uint8[]? data);
[CCode (cname = "gelektra_key_gi_make", has_construct_function = false)]
public Key.gi_make (GElektra.Key key);
public bool hasmeta (string name);
public ssize_t incref ();
public bool isbelow (GElektra.Key other);
public bool isbeloworsame (GElektra.Key other);
public bool isbinary ();
public bool isdirectbelow (GElektra.Key other);
public bool isinactive ();
public bool isnull ();
public bool isstring ();
public bool issystem ();
public bool isuser ();
public bool isvalid ();
public GElektra.Key nextmeta ();
public int rewindmeta ();
public ssize_t setbasename (string basename);
public ssize_t setbinary ([CCode (array_length_cname = "size", array_length_pos = 1.1, array_length_type = "gsize")] uint8[] data);
public ssize_t setmeta (string name, string value);
public ssize_t setname (string name);
public ssize_t setstring (string value);
[NoAccessorMethod]
public string basename { owned get; set; }
[NoAccessorMethod]
public string fullname { owned get; }
[NoAccessorMethod]
public string name { owned get; set; }
}
[CCode (cheader_filename = "GElektra-4.0.h", lower_case_csuffix = "keyset", type_id = "gelektra_keyset_get_type ()")]
public class KeySet : GLib.Object {
[CCode (has_construct_function = false)]
protected KeySet ();
public GElektra.Key atcursor (ssize_t pos);
public int clear ();
public GElektra.Key current ();
public GElektra.KeySet cut (GElektra.Key point);
public GElektra.KeySet dup ();
public ssize_t getcursor ();
public ssize_t gi_append (GElektra.Key key);
public ssize_t gi_append_keyset (GElektra.KeySet append);
public GElektra.Key head ();
public ssize_t len ();
public GElektra.Key lookup (GElektra.Key key, GElektra.KdbOptions options);
public GElektra.Key lookup_byname (string name, GElektra.KdbOptions options);
public GElektra.Key next ();
public GElektra.Key pop ();
public int resize (size_t alloc);
public int rewind ();
public int setcursor (ssize_t pos);
public GElektra.Key tail ();
}
[CCode (cheader_filename = "GElektra-4.0.h", cprefix = "GELEKTRA_KDB_O_", has_type_id = false)]
public enum KdbOptions {
NONE,
DEL,
POP,
NODIR,
DIRONLY,
NOREMOVE,
REMOVEONLY,
INACTIVE,
SYNC,
SORT,
NORECURSIVE,
NOCASE,
WITHOWNER,
NOALL
}
[CCode (cheader_filename = "GElektra-4.0.h", cprefix = "GELEKTRA_KEY_", has_type_id = false)]
public enum KeySwitch {
FLAGS,
END,
NAME,
VALUE,
OWNER,
COMMENT,
BINARY,
UID,
GID,
MODE,
ATIME,
MTIME,
CTIME,
SIZE,
FUNC,
DIR,
META,
NULL,
CASCADING_NAME,
META_NAME
}
[CCode (cheader_filename = "GElektra-4.0.h", cname = "gelektra_func_t", has_target = false)]
public delegate void func_t ();
[CCode (cheader_filename = "GElektra-4.0.h", cname = "GELEKTRA_DB_HOME")]
public const string DB_HOME;
[CCode (cheader_filename = "GElektra-4.0.h", cname = "GELEKTRA_DB_SYSTEM")]
public const string DB_SYSTEM;
[CCode (cheader_filename = "GElektra-4.0.h", cname = "GELEKTRA_DB_USER")]
public const string DB_USER;
[CCode (cheader_filename = "GElektra-4.0.h", cname = "GELEKTRA_DEBUG")]
public const int DEBUG;
[CCode (cheader_filename = "GElektra-4.0.h", cname = "GELEKTRA_VERSION")]
public const string VERSION;
[CCode (cheader_filename = "GElektra-4.0.h", cname = "GELEKTRA_VERSION_MAJOR")]
public const int VERSION_MAJOR;
[CCode (cheader_filename = "GElektra-4.0.h", cname = "GELEKTRA_VERSION_MICRO")]
public const int VERSION_MICRO;
[CCode (cheader_filename = "GElektra-4.0.h", cname = "GELEKTRA_VERSION_MINOR")]
public const int VERSION_MINOR;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment