1 #ifndef __MSGPORT_ERROR_H
2 #define __MSGPORT_ERROR_H
6 #define MSGPORT_ERROR_QUARK (msgport_error_quark())
10 typedef enum _MsgPortError
12 MSGPORT_ERROR_IO_ERROR = 100,
13 MSGPORT_ERROR_OUT_OF_MEMORY,
14 MSGPORT_ERROR_INVALID_PARAMS,
15 MSGPORT_ERROR_NOT_FOUND,
16 MSGPORT_ERROR_ALREADY_EXISTING,
17 MSGPORT_ERROR_CERTIFICATE_MISMATCH,
23 msgport_error_quark ();
25 #define msgport_error_new(id, msg, args...) \
26 g_error_new (MSGPORT_ERROR_QUARK, id, msg, ##args)
28 #define msgport_error_port_existing_new(app_id, port_name) \
29 msgport_error_new (MSGPORT_ERROR_ALREADY_EXISTING, \
30 "port already existing with name '%s' on application '%s'", port_name, app_id)
32 #define msgport_error_no_memory_new() \
33 msgport_error_new (MSGPORT_ERROR_OUT_OF_MEMORY, "no memomry")
35 #define msgport_error_port_not_found(app_id, port_name) \
36 msgport_error_new (MSGPORT_ERROR_NOT_FOUND, "port not found with name '%s' on application '%s'", port_name, app_id)
38 #define msgport_error_port_id_not_found_new(service_id) \
39 msgport_error_new (MSGPORT_ERROR_NOT_FOUND, "no port found with id '%d'", service_id);
41 #define msgport_error_unknown_new() \
42 msgport_error_new (MSGPORT_ERROR_UNKNOWN, "unknown");
46 #endif /* __MSGPORT_ERROR_H */