G_OBEX_DATA_REF,
} GObexDataPolicy;
+#define G_OBEX_ERROR_FIRST (0xff + 1)
+#define G_OBEX_PROTO_ERROR(code) ((code) < G_OBEX_ERROR_FIRST)
+
typedef enum {
- G_OBEX_ERROR_PARSE_ERROR,
+ G_OBEX_ERROR_PARSE_ERROR = G_OBEX_ERROR_FIRST,
G_OBEX_ERROR_INVALID_ARGS,
G_OBEX_ERROR_DISCONNECTED,
G_OBEX_ERROR_TIMEOUT,
rspcode = g_obex_packet_get_operation(rsp, &final);
if (rspcode != G_OBEX_RSP_SUCCESS && rspcode != G_OBEX_RSP_CONTINUE) {
- err = g_error_new(G_OBEX_ERROR, G_OBEX_ERROR_FAILED,
+ err = g_error_new(G_OBEX_ERROR, rspcode,
"Transfer failed (0x%02x)", rspcode);
goto failed;
}