![]() | ![]() | ![]() | Libbtctl Reference Manual | ![]() |
---|
BtctlObex — GObject OBEX server
struct BtctlObex; BtctlObex* btctl_obex_new (void); gboolean btctl_obex_is_initialised (BtctlObex *bo); void btctl_obex_set_response (BtctlObex *bo, gboolean resp); void btctl_obex_cancel_operation (BtctlObex *bo); void btctl_obex_cancel_operation_forcibly (BtctlObex *bo); #define BTCTL_OBEX_ERR_PARSE #define BTCTL_OBEX_ERR_LINK #define BTCTL_OBEX_ERR_ABORT
struct BtctlObex { GObject obj; BtctlObexserverSource *source; gboolean response; guint32 sdphandle; };
BtctlObex* btctl_obex_new (void);
Create a new Bluetooth OBEX object. This will attempt to open an OBEX server socket. Use btctl_obex_is_initialised() to check whether this was successful.
Returns : | a pointer to the controller object if successful, otherwise NULL. |
gboolean btctl_obex_is_initialised (BtctlObex *bo);
Check if OBEX was able to initialise OK. If not, we won't be able to do anything.
bo : | Bluetooth OBEX object. |
Returns : | TRUE if initialised OK. |
void btctl_obex_set_response (BtctlObex *bo, gboolean resp);
Sets TRUE or FALSE response in signal handlers that must decide whether an operation can proceed or not.
bo : | Bluetooth OBEX object. |
resp : | Boolean response. |
void btctl_obex_cancel_operation (BtctlObex *bo);
Requests the cancel of a currently running transfer, disconnecting the client.
bo : | Bluetooth OBEX object. |
void btctl_obex_cancel_operation_forcibly (BtctlObex *bo);
Forcibly causes the closing of a client connection. Use if the client isn't responding to a cancel request, e.g. where the connection's timing out.
bo : | Bluetooth OBEX object. |
#define BTCTL_OBEX_ERR_PARSE 0x01
A parse error has occured on incoming packets. Usually this happens when the connection is aborted.
<< OBEX Server | BtctlObexserverSource >> |