diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libgsmd/libgsmd_network.c | 18 | ||||
-rw-r--r-- | src/libgsmd/libgsmd_phone.c | 23 |
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); +} |