return transfer;
}
+guint g_obex_put_req_pkt(GObex *obex, GObexPacket *req,
+ GObexDataProducer data_func, GObexFunc complete_func,
+ gpointer user_data, GError **err)
+{
+ struct transfer *transfer;
+
+ if (g_obex_packet_get_operation(req, NULL) != G_OBEX_OP_PUT)
+ return 0;
+
+ transfer = transfer_new(obex, G_OBEX_OP_PUT, complete_func, user_data);
+ transfer->data_producer = data_func;
+
+ g_obex_packet_add_body(req, put_get_data, transfer);
+
+ transfer->req_id = g_obex_send_req(obex, req, -1, transfer_response,
+ transfer, err);
+ if (transfer->req_id == 0) {
+ transfer_free(transfer);
+ return 0;
+ }
+
+ return transfer->id;
+}
+
guint g_obex_put_req(GObex *obex, GObexDataProducer data_func,
GObexFunc complete_func, gpointer user_data,
GError **err, guint8 first_hdr_id, ...)
return transfer->id;
}
+guint g_obex_get_req_pkt(GObex *obex, GObexPacket *req,
+ GObexDataConsumer data_func, GObexFunc complete_func,
+ gpointer user_data, GError **err)
+{
+ struct transfer *transfer;
+
+ if (g_obex_packet_get_operation(req, NULL) != G_OBEX_OP_GET)
+ return 0;
+
+ transfer = transfer_new(obex, G_OBEX_OP_GET, complete_func, user_data);
+ transfer->data_consumer = data_func;
+
+ transfer->req_id = g_obex_send_req(obex, req, -1, transfer_response,
+ transfer, err);
+ if (transfer->req_id == 0) {
+ transfer_free(transfer);
+ return 0;
+ }
+
+ return transfer->id;
+}
+
guint g_obex_get_req(GObex *obex, GObexDataConsumer data_func,
GObexFunc complete_func, gpointer user_data,
GError **err, guint8 first_hdr_id, ...)
GObexFunc complete_func, gpointer user_data,
GError **err, guint8 first_hdr_id, ...);
+guint g_obex_put_req_pkt(GObex *obex, GObexPacket *req,
+ GObexDataProducer data_func, GObexFunc complete_func,
+ gpointer user_data, GError **err);
+
guint g_obex_get_req(GObex *obex, GObexDataConsumer data_func,
GObexFunc complete_func, gpointer user_data,
GError **err, guint8 first_hdr_id, ...);
+guint g_obex_get_req_pkt(GObex *obex, GObexPacket *req,
+ GObexDataConsumer data_func, GObexFunc complete_func,
+ gpointer user_data, GError **err);
+
guint g_obex_put_rsp(GObex *obex, GObexPacket *req,
GObexDataConsumer data_func, GObexFunc complete_func,
gpointer user_data, GError **err,