Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
OBject EXchange
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===OpenObex=== OpenObex is an open-source implementation of OBEX in [[C programming language|C]]. It provides functions for connecting over [[IrDA]], [[Bluetooth]], [[USB]] and [[TCP/IP]], building objects and handling received data. An example schema of a client application is: <syntaxhighlight lang="cpp"> void callback_function(...) { /* process received data */ } int main() { OBEX_Init(..., callback_function); OBEX_TransportConnect(...); object = OBEX_ObjectNew(...); OBEX_ObjectAddHeader(object, ...); OBEX_ObjectAddHeader(object, ...); OBEX_Request(..., object); while (...) OBEX_HandleInput(...) object = OBEX_ObjectNew(...); OBEX_ObjectAddHeader(object, ...); OBEX_Request(..., object); while (...) OBEX_HandleInput(...) /* ... */ OBEX_TransportDisconnect(handle); OBEX_Cleanup(handle); } </syntaxhighlight> Objects are sent by <code>OBEX_Request</code>. After calling <code>OBEX_HandleInput</code>, received data is processed in the callback function (which was specified when calling <code>OBEX_Init</code>). The callback function can determine whether the response has been completely received, and therefore whether the main program can exit from the <code>while</code> loop it is executing.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)