| vapi/gnome-keyring-1.vapi |
| 1 | /* gnome-keyring-1.vapi generated by vapigen, do not modify. */ |
| 2 | |
| 3 | [CCode (cprefix = "GnomeKeyring", lower_case_cprefix = "gnome_keyring_")] |
| 4 | namespace GnomeKeyring { |
| 5 | [Compact] |
| 6 | [CCode (copy_function = "gnome_keyring_access_control_copy", cheader_filename = "gnome-keyring.h")] |
| 7 | public class AccessControl { |
| 8 | public unowned GnomeKeyring.AccessControl copy (); |
| 9 | [CCode (has_construct_function = false)] |
| 10 | public AccessControl (GnomeKeyring.ApplicationRef application, GnomeKeyring.AccessType types_allowed); |
| 11 | } |
| 12 | [Compact] |
| 13 | [CCode (copy_function = "gnome_keyring_application_ref_copy", cheader_filename = "gnome-keyring.h")] |
| 14 | public class ApplicationRef { |
| 15 | public unowned GnomeKeyring.ApplicationRef copy (); |
| 16 | [CCode (has_construct_function = false)] |
| 17 | public ApplicationRef (); |
| 18 | } |
| 19 | [Compact] |
| 20 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 21 | public class AttributeList { |
| 22 | AttributeList (); |
| 23 | public GnomeKeyring.Attribute[] data; |
| 24 | public uint len; |
| 25 | public void append_string (string name, string value); |
| 26 | public void append_uint32 (string name, uint32 value); |
| 27 | public unowned GnomeKeyring.AttributeList copy (); |
| 28 | public GnomeKeyring.Attribute index (int i); |
| 29 | } |
| 30 | [Compact] |
| 31 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 32 | public class Found { |
| 33 | public weak GnomeKeyring.AttributeList attributes; |
| 34 | public uint item_id; |
| 35 | public weak string keyring; |
| 36 | public weak string secret; |
| 37 | public static void list_free (GLib.List found_list); |
| 38 | } |
| 39 | [Compact] |
| 40 | [CCode (copy_function = "gnome_keyring_info_copy", cheader_filename = "gnome-keyring.h")] |
| 41 | public class Info { |
| 42 | public unowned GnomeKeyring.Info copy (); |
| 43 | public ulong get_ctime (); |
| 44 | public bool get_is_locked (); |
| 45 | public bool get_lock_on_idle (); |
| 46 | public uint32 get_lock_timeout (); |
| 47 | public ulong get_mtime (); |
| 48 | public void set_lock_on_idle (bool value); |
| 49 | public void set_lock_timeout (uint32 value); |
| 50 | } |
| 51 | [Compact] |
| 52 | [CCode (copy_function = "gnome_keyring_item_info_copy", cheader_filename = "gnome-keyring.h")] |
| 53 | public class ItemInfo { |
| 54 | public unowned GnomeKeyring.ItemInfo copy (); |
| 55 | public ulong get_ctime (); |
| 56 | public unowned string get_display_name (); |
| 57 | public ulong get_mtime (); |
| 58 | public unowned string get_secret (); |
| 59 | [CCode (has_construct_function = false)] |
| 60 | public ItemInfo (); |
| 61 | public void set_display_name (string value); |
| 62 | public void set_secret (string value); |
| 63 | public void set_type (GnomeKeyring.ItemType type); |
| 64 | } |
| 65 | [Compact] |
| 66 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 67 | public class NetworkPasswordData { |
| 68 | public weak string authtype; |
| 69 | public weak string domain; |
| 70 | public uint32 item_id; |
| 71 | public weak string keyring; |
| 72 | public weak string object; |
| 73 | public weak string password; |
| 74 | public uint32 port; |
| 75 | public weak string protocol; |
| 76 | public weak string server; |
| 77 | public weak string user; |
| 78 | } |
| 79 | |
| 80 | [Compact] |
| 81 | public struct PasswordSchemaAttribute { |
| 82 | public unowned string name; |
| 83 | public GnomeKeyring.AttributeType type; |
| 84 | } |
| 85 | |
| 86 | [Compact] |
| 87 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 88 | public struct PasswordSchema { |
| 89 | public GnomeKeyring.ItemType item_type; |
| 90 | public PasswordSchemaAttribute[] attributes; |
| 91 | } |
| 92 | |
| 93 | [Compact] |
| 94 | public struct AttributeValue { |
| 95 | public uint integer; |
| 96 | public string @string; |
| 97 | } |
| 98 | [CCode (type_id = "GNOME_KEYRING_TYPE_ATTRIBUTE", cheader_filename = "gnome-keyring.h")] |
| 99 | public struct Attribute { |
| 100 | public unowned string name; |
| 101 | public unowned GnomeKeyring.AttributeType type; |
| 102 | public unowned AttributeValue value; |
| 103 | } |
| 104 | [CCode (cprefix = "GNOME_KEYRING_ACCESS_", has_type_id = "0", cheader_filename = "gnome-keyring.h")] |
| 105 | public enum AccessRestriction { |
| 106 | ASK, |
| 107 | DENY, |
| 108 | ALLOW |
| 109 | } |
| 110 | [CCode (cprefix = "GNOME_KEYRING_ACCESS_", has_type_id = "0", cheader_filename = "gnome-keyring.h")] |
| 111 | public enum AccessType { |
| 112 | READ, |
| 113 | WRITE, |
| 114 | REMOVE |
| 115 | } |
| 116 | [CCode (cprefix = "GNOME_KEYRING_ATTRIBUTE_TYPE_", has_type_id = "0", cheader_filename = "gnome-keyring.h")] |
| 117 | public enum AttributeType { |
| 118 | STRING, |
| 119 | UINT32 |
| 120 | } |
| 121 | [CCode (cprefix = "GNOME_KEYRING_ITEM_INFO_", has_type_id = "0", cheader_filename = "gnome-keyring.h")] |
| 122 | public enum ItemInfoFlags { |
| 123 | BASICS, |
| 124 | SECRET |
| 125 | } |
| 126 | [CCode (cprefix = "GNOME_KEYRING_ITEM_", has_type_id = "0", cheader_filename = "gnome-keyring.h")] |
| 127 | public enum ItemType { |
| 128 | GENERIC_SECRET, |
| 129 | NETWORK_PASSWORD, |
| 130 | NOTE, |
| 131 | CHAINED_KEYRING_PASSWORD, |
| 132 | ENCRYPTION_KEY_PASSWORD, |
| 133 | LAST_TYPE |
| 134 | } |
| 135 | [CCode (cprefix = "GNOME_KEYRING_RESULT_", has_type_id = "0", cheader_filename = "gnome-keyring.h")] |
| 136 | public enum Result { |
| 137 | OK, |
| 138 | DENIED, |
| 139 | NO_KEYRING_DAEMON, |
| 140 | ALREADY_UNLOCKED, |
| 141 | NO_SUCH_KEYRING, |
| 142 | BAD_ARGUMENTS, |
| 143 | IO_ERROR, |
| 144 | CANCELLED, |
| 145 | KEYRING_ALREADY_EXISTS, |
| 146 | NO_MATCH |
| 147 | } |
| 148 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 149 | public delegate void OperationDoneCallback (GnomeKeyring.Result result); |
| 150 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 151 | public delegate void OperationGetAttributesCallback (GnomeKeyring.Result result, GnomeKeyring.AttributeList attributes); |
| 152 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 153 | public delegate void OperationGetIntCallback (GnomeKeyring.Result result, uint32 val); |
| 154 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 155 | public delegate void OperationGetItemInfoCallback (GnomeKeyring.Result result, GnomeKeyring.ItemInfo info); |
| 156 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 157 | public delegate void OperationGetKeyringInfoCallback (GnomeKeyring.Result result, GnomeKeyring.Info info); |
| 158 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 159 | public delegate void OperationGetListCallback (GnomeKeyring.Result result, GLib.List list); |
| 160 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 161 | public delegate void OperationGetStringCallback (GnomeKeyring.Result result, string str); |
| 162 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 163 | public const string DEFAULT; |
| 164 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 165 | public const int GNOME_KEYRING_ITEM_APPLICATION_SECRET; |
| 166 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 167 | public const int GNOME_KEYRING_ITEM_INFO_ALL; |
| 168 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 169 | public const int GNOME_KEYRING_ITEM_TYPE_MASK; |
| 170 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 171 | public const string GNOME_KEYRING_SESSION; |
| 172 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 173 | public const GnomeKeyring.PasswordSchema NETWORK_PASSWORD; |
| 174 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 175 | public static unowned GLib.List acl_copy (GLib.List list); |
| 176 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 177 | public static void acl_free (GLib.List acl); |
| 178 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 179 | public static void cancel_request (void* request); |
| 180 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 181 | public static void* change_password (string keyring, string? original, string? password, owned GnomeKeyring.OperationDoneCallback callback); |
| 182 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 183 | public static GnomeKeyring.Result change_password_sync (string keyring, string? original, string? password); |
| 184 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 185 | public static void* create (string keyring_name, string? password, owned GnomeKeyring.OperationDoneCallback callback); |
| 186 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 187 | public static GnomeKeyring.Result create_sync (string keyring_name, string? password); |
| 188 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 189 | public static GnomeKeyring.Result daemon_prepare_environment_sync (); |
| 190 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 191 | public static GnomeKeyring.Result daemon_set_display_sync (string display); |
| 192 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 193 | public static void* @delete (string keyring, GnomeKeyring.OperationDoneCallback callback, void* data, GLib.DestroyNotify destroy_data); |
| 194 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 195 | public static void* delete_password (GnomeKeyring.PasswordSchema schema, owned GnomeKeyring.OperationDoneCallback callback, ...); |
| 196 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 197 | public static GnomeKeyring.Result delete_password_sync (GnomeKeyring.PasswordSchema schema, ...); |
| 198 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 199 | public static GnomeKeyring.Result delete_sync (string keyring); |
| 200 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 201 | public static void* find_items (GnomeKeyring.ItemType type, GnomeKeyring.AttributeList attributes, owned GnomeKeyring.OperationGetListCallback callback); |
| 202 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 203 | public static GnomeKeyring.Result find_items_sync (GnomeKeyring.ItemType type, GnomeKeyring.AttributeList attributes, out GLib.List found); |
| 204 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 205 | public static void* find_itemsv (GnomeKeyring.ItemType type, owned GnomeKeyring.OperationGetListCallback callback, ...); |
| 206 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 207 | public static GnomeKeyring.Result find_itemsv_sync (GnomeKeyring.ItemType type, GLib.List found, ...); |
| 208 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 209 | public static void* find_network_password (string? user, string? domain, string? server, string? object, string? protocol, string? authtype, uint32 port, owned GnomeKeyring.OperationGetListCallback callback); |
| 210 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 211 | public static GnomeKeyring.Result find_network_password_sync (string? user, string? domain, string? server, string? object, string? protocol, string? authtype, uint32 port, out unowned GLib.List results); |
| 212 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 213 | public static void* find_password (GnomeKeyring.PasswordSchema schema, owned GnomeKeyring.OperationGetStringCallback callback, ...); |
| 214 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 215 | public static GnomeKeyring.Result find_password_sync (GnomeKeyring.PasswordSchema schema, out unowned string password, ...); |
| 216 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 217 | public static void free_password (string password); |
| 218 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 219 | public static void* get_default_keyring (owned GnomeKeyring.OperationGetStringCallback callback); |
| 220 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 221 | public static GnomeKeyring.Result get_default_keyring_sync (out unowned string keyring); |
| 222 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 223 | public static void* get_info (string? keyring, owned GnomeKeyring.OperationGetKeyringInfoCallback callback); |
| 224 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 225 | public static GnomeKeyring.Result get_info_sync (string? keyring, out unowned GnomeKeyring.Info info); |
| 226 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 227 | public static bool is_available (); |
| 228 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 229 | public static GnomeKeyring.AccessType item_ac_get_access_type (GnomeKeyring.AccessControl ac); |
| 230 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 231 | public static unowned string item_ac_get_display_name (GnomeKeyring.AccessControl ac); |
| 232 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 233 | public static unowned string item_ac_get_path_name (GnomeKeyring.AccessControl ac); |
| 234 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 235 | public static void item_ac_set_access_type (GnomeKeyring.AccessControl ac, GnomeKeyring.AccessType value); |
| 236 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 237 | public static void item_ac_set_display_name (GnomeKeyring.AccessControl ac, string value); |
| 238 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 239 | public static void item_ac_set_path_name (GnomeKeyring.AccessControl ac, string value); |
| 240 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 241 | public static void* item_create (string? keyring, GnomeKeyring.ItemType type, string display_name, GnomeKeyring.AttributeList attributes, string secret, bool update_if_exists, owned GnomeKeyring.OperationGetIntCallback callback); |
| 242 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 243 | public static GnomeKeyring.Result item_create_sync (string? keyring, GnomeKeyring.ItemType type, string display_name, GnomeKeyring.AttributeList attributes, string secret, bool update_if_exists, uint32 item_id); |
| 244 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 245 | public static void* item_delete (string? keyring, uint32 id, owned GnomeKeyring.OperationDoneCallback callback); |
| 246 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 247 | public static GnomeKeyring.Result item_delete_sync (string? keyring, uint32 id); |
| 248 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 249 | public static void* item_get_acl (string? keyring, uint32 id, owned GnomeKeyring.OperationGetListCallback callback); |
| 250 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 251 | public static GnomeKeyring.Result item_get_acl_sync (string? keyring, uint32 id, GLib.List acl); |
| 252 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 253 | public static void* item_get_attributes (string? keyring, uint32 id, owned GnomeKeyring.OperationGetAttributesCallback callback); |
| 254 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 255 | public static GnomeKeyring.Result item_get_attributes_sync (string? keyring, uint32 id, out unowned GnomeKeyring.AttributeList attributes); |
| 256 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 257 | public static void* item_get_info (string? keyring, uint32 id, owned GnomeKeyring.OperationGetItemInfoCallback callback); |
| 258 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 259 | public static void* item_get_info_full (string? keyring, uint32 id, uint32 flags, owned GnomeKeyring.OperationGetItemInfoCallback callback); |
| 260 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 261 | public static GnomeKeyring.Result item_get_info_full_sync (string? keyring, uint32 id, uint32 flags, out unowned GnomeKeyring.ItemInfo info); |
| 262 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 263 | public static unowned GnomeKeyring.Result? item_get_info_sync (string keyring, uint32 id, out unowned GnomeKeyring.ItemInfo info); |
| 264 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 265 | public static void* item_grant_access_rights (string? keyring, string display_name, string full_path, uint32 id, GnomeKeyring.AccessType rights, owned GnomeKeyring.OperationDoneCallback callback); |
| 266 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 267 | public static GnomeKeyring.Result item_grant_access_rights_sync (string? keyring, string display_name, string full_path, uint32 id, GnomeKeyring.AccessType rights); |
| 268 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 269 | public static void* item_set_acl (string? keyring, uint32 id, GLib.List acl, owned GnomeKeyring.OperationDoneCallback callback); |
| 270 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 271 | public static GnomeKeyring.Result item_set_acl_sync (string? keyring, uint32 id, GLib.List acl); |
| 272 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 273 | public static void* item_set_attributes (string? keyring, uint32 id, GnomeKeyring.AttributeList attributes, owned GnomeKeyring.OperationDoneCallback callback); |
| 274 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 275 | public static GnomeKeyring.Result item_set_attributes_sync (string? keyring, uint32 id, GnomeKeyring.AttributeList attributes); |
| 276 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 277 | public static void* item_set_info (string? keyring, uint32 id, GnomeKeyring.ItemInfo info, owned GnomeKeyring.OperationDoneCallback callback); |
| 278 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 279 | public static GnomeKeyring.Result item_set_info_sync (string? keyring, uint32 id, GnomeKeyring.ItemInfo info); |
| 280 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 281 | public static void* list_item_ids (string? keyring, owned GnomeKeyring.OperationGetListCallback callback); |
| 282 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 283 | public static GnomeKeyring.Result list_item_ids_sync (string? keyring, out GLib.List<uint> ids); |
| 284 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 285 | public static void* list_keyring_names (owned GnomeKeyring.OperationGetListCallback callback); |
| 286 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 287 | public static GnomeKeyring.Result list_keyring_names_sync (GLib.List keyrings); |
| 288 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 289 | public static void* @lock (string keyring, GnomeKeyring.OperationDoneCallback callback, void* data, GLib.DestroyNotify destroy_data); |
| 290 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 291 | public static void* lock_all (owned GnomeKeyring.OperationDoneCallback callback); |
| 292 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 293 | public static GnomeKeyring.Result lock_all_sync (); |
| 294 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 295 | public static GnomeKeyring.Result lock_sync (string? keyring); |
| 296 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 297 | public static void* memory_alloc (ulong sz); |
| 298 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 299 | public static void memory_free (void* p); |
| 300 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 301 | public static bool memory_is_secure (void* p); |
| 302 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 303 | public static void* memory_realloc (void* p, ulong sz); |
| 304 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 305 | public static unowned string memory_strdup (string str); |
| 306 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 307 | public static void* memory_try_alloc (ulong sz); |
| 308 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 309 | public static void* memory_try_realloc (void* p, ulong sz); |
| 310 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 311 | public static void network_password_free (GnomeKeyring.NetworkPasswordData data); |
| 312 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 313 | public static void network_password_list_free (GLib.List list); |
| 314 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 315 | public static unowned string result_to_message (GnomeKeyring.Result res); |
| 316 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 317 | public static void* set_default_keyring (string keyring, owned GnomeKeyring.OperationDoneCallback callback); |
| 318 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 319 | public static GnomeKeyring.Result set_default_keyring_sync (string keyring); |
| 320 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 321 | public static void* set_info (string? keyring, GnomeKeyring.Info info, owned GnomeKeyring.OperationDoneCallback callback); |
| 322 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 323 | public static GnomeKeyring.Result set_info_sync (string? keyring, GnomeKeyring.Info info); |
| 324 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 325 | public static void* set_network_password (string? keyring, string? user, string? domain, string? server, string? object, string? protocol, string? authtype, uint32 port, string? password, owned GnomeKeyring.OperationGetIntCallback callback); |
| 326 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 327 | public static GnomeKeyring.Result set_network_password_sync (string? keyring, string? user, string? domain, string? server, string? object, string? protocol, string? authtype, uint32 port, string? password, uint32 item_id); |
| 328 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 329 | public static void* store_password (GnomeKeyring.PasswordSchema schema, string? keyring, string display_name, string password, owned GnomeKeyring.OperationDoneCallback callback, ...); |
| 330 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 331 | public static GnomeKeyring.Result store_password_sync (GnomeKeyring.PasswordSchema schema, string? keyring, string display_name, string password, ...); |
| 332 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 333 | public static void string_list_free (GLib.List strings); |
| 334 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 335 | public static void* unlock (string? keyring, string? password, owned GnomeKeyring.OperationDoneCallback callback); |
| 336 | [CCode (cheader_filename = "gnome-keyring.h")] |
| 337 | public static GnomeKeyring.Result unlock_sync (string? keyring, string? password); |
| 338 | } |
| vapi/rest.vapi |
| 1 | /* rest.vapi |
| 2 | * |
| 3 | * Copyright (C) 2009 Adrien Bustany |
| 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Lesser General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2.1 of the License, or (at your option) any later version. |
| 9 | |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Lesser General Public License for more details. |
| 14 | |
| 15 | * You should have received a copy of the GNU Lesser General Public |
| 16 | * License along with this library; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | * |
| 19 | * Author: |
| 20 | * Adrien Bustany <madcat@mymadcat.com> |
| 21 | */ |
| 22 | |
| 23 | using GLib; |
| 24 | |
| 25 | [CCode (lower_case_cprefix = "rest_", cheader_filename = "rest/rest-proxy.h,rest/rest-xml-parser.h")] |
| 26 | namespace Rest { |
| 27 | class ProxyCall : Object { |
| 28 | Quark error_quark (); |
| 29 | |
| 30 | public unowned string method {get; set;} |
| 31 | public void set_function (string function); |
| 32 | |
| 33 | public void add_header (string header, string value); |
| 34 | public void add_headers (...); |
| 35 | public unowned string lookup_header (string header); |
| 36 | public void remove_header (string header); |
| 37 | |
| 38 | public void add_param (string param, string value); |
| 39 | public void add_params (...); |
| 40 | public unowned string lookup_param (string param); |
| 41 | public void remove_param (string param); |
| 42 | public HashTable<string, string> get_params (); |
| 43 | |
| 44 | public bool run (out MainLoop loop) throws Error; |
| 45 | |
| 46 | public delegate void AsyncCallback (Object weak_object, void *user_data); |
| 47 | |
| 48 | public bool call_async (AsyncCallback callback, Object weak_object, void *user_data) throws Error; |
| 49 | |
| 50 | public bool cancel () throws Error; |
| 51 | |
| 52 | public unowned string lookup_response_header (string header); |
| 53 | public HashTable<string, string> get_response_headers (); |
| 54 | public long get_payload_length (); |
| 55 | public unowned string get_payload (); |
| 56 | public uint get_status_code (); |
| 57 | public unowned string get_status_message (); |
| 58 | } |
| 59 | |
| 60 | class Proxy : Object { |
| 61 | [CCode (cname = "RestProxyError", cprefix = "REST_PROXY_ERROR_")] |
| 62 | enum Error { |
| 63 | CANCELLED = 1, |
| 64 | RESOLUTION, |
| 65 | CONNECTION, |
| 66 | SSL, |
| 67 | IO, |
| 68 | FAILED, |
| 69 | |
| 70 | HTTP_MULTIPLE_CHOICES = 300, |
| 71 | HTTP_MOVED_PERMANENTLY = 301, |
| 72 | HTTP_FOUND = 302, |
| 73 | HTTP_SEE_OTHER = 303, |
| 74 | HTTP_NOT_MODIFIED = 304, |
| 75 | HTTP_USE_PROXY = 305, |
| 76 | HTTP_THREEOHSIX = 306, |
| 77 | HTTP_TEMPORARY_REDIRECT = 307, |
| 78 | HTTP_BAD_REQUEST = 400, |
| 79 | HTTP_UNAUTHORIZED = 401, |
| 80 | HTTP_FOUROHTWO = 402, |
| 81 | HTTP_FORBIDDEN = 403, |
| 82 | HTTP_NOT_FOUND = 404, |
| 83 | HTTP_METHOD_NOT_ALLOWED = 405, |
| 84 | HTTP_NOT_ACCEPTABLE = 406, |
| 85 | HTTP_PROXY_AUTHENTICATION_REQUIRED = 407, |
| 86 | HTTP_REQUEST_TIMEOUT = 408, |
| 87 | HTTP_CONFLICT = 409, |
| 88 | HTTP_GONE = 410, |
| 89 | HTTP_LENGTH_REQUIRED = 411, |
| 90 | HTTP_PRECONDITION_FAILED = 412, |
| 91 | HTTP_REQUEST_ENTITY_TOO_LARGE = 413, |
| 92 | HTTP_REQUEST_URI_TOO_LONG = 414, |
| 93 | HTTP_UNSUPPORTED_MEDIA_TYPE = 415, |
| 94 | HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416, |
| 95 | HTTP_EXPECTATION_FAILED = 417, |
| 96 | HTTP_INTERNAL_SERVER_ERROR = 500, |
| 97 | HTTP_NOT_IMPLEMENTED = 501, |
| 98 | HTTP_BAD_GATEWAY = 502, |
| 99 | HTTP_SERVICE_UNAVAILABLE = 503, |
| 100 | HTTP_GATEWAY_TIMEOUT = 504, |
| 101 | HTTP_HTTP_VERSION_NOT_SUPPORTED = 505, |
| 102 | } |
| 103 | |
| 104 | public Quark error_quark (); |
| 105 | |
| 106 | Proxy (string url_format, bool binding_required); |
| 107 | public bool bind (...); |
| 108 | public unowned string set_user_agent {get; set; } |
| 109 | public ProxyCall new_call (); |
| 110 | public bool simple_run (string[] payload, long len, ...) throws Error; |
| 111 | } |
| 112 | |
| 113 | class XmlNode { |
| 114 | XmlNode (); |
| 115 | |
| 116 | public string name; |
| 117 | public string content; |
| 118 | public HashTable<string, XmlNode> children; |
| 119 | public HashTable<string, string> attrs; |
| 120 | public unowned XmlNode next; |
| 121 | |
| 122 | public unowned string get_attr (string attr_name); |
| 123 | public weak XmlNode find (string tag); |
| 124 | } |
| 125 | |
| 126 | class XmlParser : Object { |
| 127 | XmlParser (); |
| 128 | |
| 129 | public unowned XmlNode parse_from_data (string data, long len); |
| 130 | } |
| 131 | } |