~ubuntu-branches/ubuntu/vivid/modemmanager/vivid-proposed

« back to all changes in this revision

Viewing changes to plugins/mm-modem-zte.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2011-08-07 01:47:27 UTC
  • mfrom: (16.1.3 oneiric)
  • Revision ID: james.westby@ubuntu.com-20110807014727-ssze4jx65jrjltg9
Tags: 0.5-1
debian/rules: override dh_autoreconf in a nicer way so we don't have to
clean up manually afterwards.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include "mm-modem-helpers.h"
27
27
#include "mm-modem-simple.h"
28
28
#include "mm-modem-icera.h"
 
29
#include "mm-modem-gsm-ussd.h"
29
30
 
30
31
static void modem_init (MMModem *modem_class);
31
32
static void modem_icera_init (MMModemIcera *icera_class);
32
33
static void modem_simple_init (MMModemSimple *simple_class);
 
34
static void modem_gsm_ussd_init (MMModemGsmUssd *ussd_class);
33
35
 
34
36
G_DEFINE_TYPE_EXTENDED (MMModemZte, mm_modem_zte, MM_TYPE_GENERIC_GSM, 0,
35
37
                        G_IMPLEMENT_INTERFACE (MM_TYPE_MODEM, modem_init)
36
38
                        G_IMPLEMENT_INTERFACE (MM_TYPE_MODEM_ICERA, modem_icera_init)
37
 
                        G_IMPLEMENT_INTERFACE (MM_TYPE_MODEM_SIMPLE, modem_simple_init))
 
39
                        G_IMPLEMENT_INTERFACE (MM_TYPE_MODEM_SIMPLE, modem_simple_init)
 
40
                        G_IMPLEMENT_INTERFACE (MM_TYPE_MODEM_GSM_USSD, modem_gsm_ussd_init)
 
41
)
38
42
 
39
43
#define MM_MODEM_ZTE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MM_TYPE_MODEM_ZTE, MMModemZtePrivate))
40
44
 
683
687
 
684
688
/*****************************************************************************/
685
689
 
 
690
static char*
 
691
ussd_encode (MMModemGsmUssd *self, const char* command, guint *scheme)
 
692
{
 
693
    char *cmd;
 
694
 
 
695
    *scheme = MM_MODEM_GSM_USSD_SCHEME_7BIT;
 
696
    cmd = g_strdup (command);
 
697
 
 
698
    return cmd;
 
699
}
 
700
 
 
701
/*****************************************************************************/
 
702
 
686
703
static void
687
704
modem_init (MMModem *modem_class)
688
705
{
710
727
}
711
728
 
712
729
static void
 
730
modem_gsm_ussd_init (MMModemGsmUssd *ussd_class)
 
731
{
 
732
    ussd_class->encode = ussd_encode;
 
733
}
 
734
 
 
735
static void
713
736
dispose (GObject *object)
714
737
{
715
738
    MMModemZte *self = MM_MODEM_ZTE (object);