summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2006-10-23 21:56:04 +0000
committerlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2006-10-23 21:56:04 +0000
commit3c4d2776058a440bb8d406cd85783898c14b2403 (patch)
tree4084e2a3d37ef9d24dd65eeb0cc84e9ad16c6939 /src
parent457c6293505e37da59a8af0338dd8688ba8acf13 (diff)
add two missing files
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@116 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src')
-rw-r--r--src/libgsmd/libgsmd_network.c18
-rw-r--r--src/libgsmd/libgsmd_phone.c23
2 files changed, 41 insertions, 0 deletions
diff --git a/src/libgsmd/libgsmd_network.c b/src/libgsmd/libgsmd_network.c
new file mode 100644
index 0000000..ae104b8
--- /dev/null
+++ b/src/libgsmd/libgsmd_network.c
@@ -0,0 +1,18 @@
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+#include <libgsmd/libgsmd.h>
+#include <libgsmd/misc.h>
+
+#include <gsmd/usock.h>
+#include <gsmd/event.h>
+
+#include "lgsm_internals.h"
+
+int lgsm_netreg_register(struct lgsm_handle *lh, int oper)
+{
+ /* FIXME: implement oper selection */
+ return lgsm_send_simple(lh, GSMD_MSG_NETWORK, GSMD_NETWORK_REGISTER);
+}
+
diff --git a/src/libgsmd/libgsmd_phone.c b/src/libgsmd/libgsmd_phone.c
new file mode 100644
index 0000000..e273ae5
--- /dev/null
+++ b/src/libgsmd/libgsmd_phone.c
@@ -0,0 +1,23 @@
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+#include <libgsmd/libgsmd.h>
+#include <libgsmd/misc.h>
+
+#include <gsmd/usock.h>
+#include <gsmd/event.h>
+
+#include "lgsm_internals.h"
+
+int lgsm_phone_power(struct lgsm_handle *lh, int power)
+{
+ int type;
+
+ if (power)
+ type = GSMD_PHONE_POWERUP;
+ else
+ type = GSMD_PHONE_POWERDOWN;
+
+ return lgsm_send_simple(lh, GSMD_MSG_PHONE, type);
+}
personal git repositories of Harald Welte. Your mileage may vary