Changes the interface command API from static lib to a dynamic one
Change-Id: I9116491a3f5dfc4590ffab367a224fde37a4fd50
diff --git a/InterfaceController.h b/InterfaceController.h
index dbedc13..e31cc11 100644
--- a/InterfaceController.h
+++ b/InterfaceController.h
@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -21,23 +21,24 @@
#include <net/if.h>
typedef struct android_wifi_priv_cmd {
- char *buf;
- int used_len;
- int total_len;
+ char *buf;
+ int used_len;
+ int total_len;
} android_wifi_priv_cmd;
#define INTERFACE_MAX_BUFFER_SIZE 256
class InterfaceController {
- int iSock;
- char *iBuf;
+ public:
+ InterfaceController();
+ virtual ~InterfaceController();
+ int interfaceCommand(int argc, char *argv[], char **rbuf);
- int sendCommand(char *iface, char *cmd, char *buf, int buf_len);
-public:
- InterfaceController();
- virtual ~InterfaceController();
-
- int interfaceCommand(int argc, char *argv[], char **rbuf);
+ private:
+ void *libh_;
+ int (*sendCommand_)(int argc, char *argv[], char **rbuf);
+ int (*sendCommandInit_)(void);
+ int (*sendCommandFini_)(void);
};
#endif