Convert BTIF code from C to C++
Modifications required:
* added proper casting
* moved variable definitions before goto statements
* added 'extern "C"' markers where needed
* renamed 'operator' to 'operator_name'
Bug: 28485365
Change-Id: I903357967387207e678866c02e008f047f8263f6
diff --git a/osi/include/socket.h b/osi/include/socket.h
index 2833290..ac49921 100644
--- a/osi/include/socket.h
+++ b/osi/include/socket.h
@@ -23,6 +23,10 @@
#include <stdint.h>
#include <sys/types.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct reactor_t reactor_t;
typedef struct socket_t socket_t;
typedef uint16_t port_t;
@@ -98,3 +102,7 @@
// Unregisters |socket| from whichever reactor it is registered with, if any. This
// function is idempotent.
void socket_unregister(socket_t *socket);
+
+#ifdef __cplusplus
+}
+#endif
\ No newline at end of file