1 /* libepc-1.0.vapi generated by vapigen, do not modify. */
4 [CCode (cheader_filename = "libepc/publisher.h")]
6 public class AuthContext {
7 public bool check_password (string password);
8 public unowned string get_key ();
9 public unowned string get_password ();
10 public unowned Epc.Publisher get_publisher ();
12 [CCode (cheader_filename = "libepc/consumer.h")]
13 public class Consumer : GLib.Object {
14 [CCode (has_construct_function = false)]
15 public Consumer (Epc.ServiceInfo service);
16 [CCode (has_construct_function = false)]
17 public Consumer.for_name (string name);
18 [CCode (has_construct_function = false)]
19 public Consumer.for_name_full (string name, string application, string domain);
20 public unowned string get_password ();
21 public Epc.Protocol get_protocol ();
22 public unowned string get_username ();
23 public bool is_publisher_resolved ();
24 public unowned GLib.List list (string pattern) throws GLib.Error;
25 public void* lookup (string key, out unowned size_t? length) throws GLib.Error;
26 public bool resolve_publisher (uint timeout);
27 public void set_password (string password);
28 public void set_protocol (Epc.Protocol protocol);
29 public void set_username (string username);
31 public string application { owned get; construct; }
33 public string domain { owned get; construct; }
35 public string hostname { owned get; construct; }
37 public string name { owned get; construct; }
38 public string password { get; set construct; }
40 public string path { owned get; construct; }
42 public int port { get; construct; }
43 public Epc.Protocol protocol { get; set construct; }
44 public string username { get; set construct; }
45 public virtual signal bool authenticate (string realm);
46 public virtual signal void publisher_resolved (Epc.Protocol protocol, string hostname, uint port);
48 [CCode (cheader_filename = "libepc/contents.h", ref_function = "epc_contents_ref", unref_function = "epc_contents_unref")]
50 public class Contents {
51 [CCode (has_construct_function = false)]
52 public Contents (string type, void* data, ssize_t length, GLib.DestroyNotify destroy_data);
53 [CCode (has_construct_function = false)]
54 public Contents.dup (string type, void* data, ssize_t length);
55 public void* get_data (size_t length);
56 public unowned string get_mime_type ();
57 public bool is_stream ();
58 public static unowned Epc.Contents stream_new (string type, Epc.ContentsReadFunc callback, GLib.DestroyNotify destroy_data);
59 public void* stream_read (size_t length);
61 [CCode (cheader_filename = "libepc/dispatcher.h")]
62 public class Dispatcher : GLib.Object {
63 [CCode (has_construct_function = false)]
64 public Dispatcher (string name);
65 public void add_service (Epc.AddressFamily protocol, string type, string domain, string host, uint16 port);
66 public void add_service_subtype (string type, string subtype);
67 public Epc.CollisionHandling get_collision_handling ();
68 public unowned string get_cookie ();
69 public unowned string get_name ();
71 public bool run () throws GLib.Error;
72 public void set_collision_handling (Epc.CollisionHandling method);
73 public void set_cookie (string cookie);
74 public void set_name (string name);
75 public void set_service_details (string type);
76 public Epc.CollisionHandling collision_handling { get; set construct; }
77 public string cookie { get; set construct; }
78 public string name { get; set construct; }
80 [CCode (cheader_filename = "libepc/publisher.h")]
81 public class Publisher : GLib.Object {
82 [CCode (has_construct_function = false)]
83 public Publisher (string? name, string application, string? domain);
84 public void add (string key, void* data, ssize_t length);
85 public void add_bookmark (string key, string label);
86 public void add_file (string key, string filename);
87 public void add_handler (string key, Epc.ContentsHandler handler, GLib.DestroyNotify destroy_data);
88 public static unowned string expand_name (string name) throws GLib.Error;
89 public Epc.AuthFlags get_auth_flags ();
90 public unowned string get_certificate_file ();
91 public Epc.CollisionHandling get_collision_handling ();
92 public unowned string get_contents_path ();
93 public unowned string get_path (string key);
94 public unowned string get_private_key_file ();
95 public Epc.Protocol get_protocol ();
96 public unowned string get_service_cookie ();
97 public unowned string get_service_domain ();
98 public unowned string get_service_name ();
99 public unowned string get_uri (string key) throws GLib.Error;
100 public bool has_key (string key);
101 public unowned GLib.List list (string pattern);
102 public void* lookup (string key);
104 public bool remove (string key);
105 public bool run () throws GLib.Error;
106 public bool run_async () throws GLib.Error;
107 public void set_auth_flags (Epc.AuthFlags flags);
108 public void set_auth_handler (string key, Epc.AuthHandler handler, GLib.DestroyNotify destroy_data);
109 public void set_collision_handling (Epc.CollisionHandling method);
110 public void set_contents_path (string path);
111 public void set_credentials (string certfile, string keyfile);
112 public void set_protocol (Epc.Protocol protocol);
113 public void set_service_cookie (string cookie);
114 public void set_service_name (string name);
116 public string application { owned get; set construct; }
117 public Epc.AuthFlags auth_flags { get; set construct; }
119 public string certificate_file { owned get; set construct; }
120 public Epc.CollisionHandling collision_handling { get; set construct; }
121 public string contents_path { get; set construct; }
123 public string private_key_file { owned get; set construct; }
124 public Epc.Protocol protocol { get; set construct; }
125 public string service_cookie { get; set construct; }
127 public string service_domain { owned get; set construct; }
128 public string service_name { get; set construct; }
130 [CCode (cheader_filename = "libepc/service-info.h", ref_function = "epc_service_info_ref", type_id = "epc_service_info_get_type ()", unref_function = "epc_service_info_unref")]
132 public class ServiceInfo {
133 public Epc.AddressFamily get_address_family ();
134 public unowned string get_detail (string name);
135 public unowned string get_host ();
136 public unowned string get_interface ();
137 public uint get_port ();
138 public unowned string get_service_type ();
140 [CCode (cheader_filename = "libepc/service-monitor.h")]
141 public class ServiceMonitor : GLib.Object {
142 [CCode (has_construct_function = false)]
143 public ServiceMonitor (string? application, string? domain, ...);
144 [CCode (has_construct_function = false)]
145 public ServiceMonitor.for_types (string? domain, ...);
146 [CCode (has_construct_function = false)]
147 public ServiceMonitor.for_types_strv (string? domain, string types);
148 public bool get_skip_our_own ();
149 public void set_skip_our_own (bool setting);
151 public string application { owned get; construct; }
153 public string domain { owned get; construct; }
154 [CCode (array_length = false, array_null_terminated = true)]
156 public string[] service_types { owned get; construct; }
157 public bool skip_our_own { get; set construct; }
158 public virtual signal void scanning_done (string type);
159 public virtual signal void service_found (string name, Epc.ServiceInfo info);
160 public virtual signal void service_removed (string name, string type);
162 [CCode (cheader_filename = "libepc/enums.h", cprefix = "EPC_ADDRESS_")]
163 public enum AddressFamily {
168 [CCode (cheader_filename = "libepc/enums.h", cprefix = "EPC_AUTH_")]
170 public enum AuthFlags {
174 [CCode (cheader_filename = "libepc/enums.h", cprefix = "EPC_COLLISIONS_")]
175 public enum CollisionHandling {
180 [CCode (cheader_filename = "libepc/enums.h", cprefix = "EPC_PROTOCOL_")]
181 public enum Protocol {
186 [CCode (cheader_filename = "libepc/service-type.h")]
187 public delegate bool AuthHandler (Epc.AuthContext context, string username);
188 [CCode (cheader_filename = "libepc/service-type.h")]
189 public delegate unowned Epc.Contents ContentsHandler (Epc.Publisher publisher, string key);
190 [CCode (cheader_filename = "libepc/service-type.h")]
191 public delegate bool ContentsReadFunc (Epc.Contents contents, void* buffer, size_t length);
192 [CCode (cheader_filename = "libepc/service-type.h")]
193 public const string SERVICE_TYPE_HTTP;
194 [CCode (cheader_filename = "libepc/service-type.h")]
195 public const string SERVICE_TYPE_HTTPS;
196 [CCode (cheader_filename = "libepc/service-type.h")]
197 public static unowned GLib.EnumClass address_family_get_class ();
198 [CCode (cheader_filename = "libepc/service-type.h")]
199 public static unowned GLib.FlagsClass auth_flags_get_class ();
200 [CCode (cheader_filename = "libepc/service-type.h")]
201 public static unowned string auth_flags_to_string (Epc.AuthFlags value);
202 [CCode (cheader_filename = "libepc/service-type.h")]
203 public static unowned GLib.EnumClass collision_handling_get_class ();
204 [CCode (cheader_filename = "libepc/service-type.h")]
205 public static unowned string collision_handling_to_string (Epc.CollisionHandling value);
206 [CCode (cheader_filename = "libepc/service-type.h")]
207 public static GLib.Quark http_error_quark ();
208 [CCode (cheader_filename = "libepc/service-type.h")]
209 public static unowned string protocol_build_uri (Epc.Protocol protocol, string hostname, uint16 port, string path);
210 [CCode (cheader_filename = "libepc/service-type.h")]
211 public static Epc.Protocol protocol_from_name (string name, Epc.Protocol fallback);
212 [CCode (cheader_filename = "libepc/service-type.h")]
213 public static unowned GLib.EnumClass protocol_get_class ();
214 [CCode (cheader_filename = "libepc/service-type.h")]
215 public static unowned string protocol_get_service_type (Epc.Protocol protocol);
216 [CCode (cheader_filename = "libepc/service-type.h")]
217 public static unowned string protocol_get_uri_scheme (Epc.Protocol protocol);
218 [CCode (cheader_filename = "libepc/service-type.h")]
219 public static unowned string protocol_to_string (Epc.Protocol value);
220 [CCode (cheader_filename = "libepc/service-type.h")]
221 public static unowned string service_type_get_base (string type);
222 [CCode (cheader_filename = "libepc/service-type.h")]
223 public static Epc.Protocol service_type_get_protocol (string service_type);
224 [CCode (cheader_filename = "libepc/service-type.h")]
225 public static unowned string service_type_list_supported (string application);
226 [CCode (cheader_filename = "libepc/service-type.h")]
227 public static unowned string service_type_new (Epc.Protocol protocol, string application);