iface-modem-3gpp-ussd: allow subclassing encode/decode

This commit is contained in:
Aleksander Morgado
2012-03-15 14:14:57 +01:00
parent 5d330154a5
commit 3ea437d522
2 changed files with 31 additions and 0 deletions
+17
View File
@@ -42,6 +42,23 @@ mm_iface_modem_3gpp_ussd_bind_simple_status (MMIfaceModem3gppUssd *self,
/*****************************************************************************/
gchar *
mm_iface_modem_3gpp_ussd_encode (MMIfaceModem3gppUssd *self,
const gchar *command,
guint *scheme)
{
return MM_IFACE_MODEM_3GPP_USSD_GET_INTERFACE (self)->encode (self, command, scheme);
}
gchar *
mm_iface_modem_3gpp_ussd_decode (MMIfaceModem3gppUssd *self,
const gchar *reply)
{
return MM_IFACE_MODEM_3GPP_USSD_GET_INTERFACE (self)->decode (self, reply);
}
/*****************************************************************************/
void
mm_iface_modem_3gpp_ussd_update_state (MMIfaceModem3gppUssd *self,
MMModem3gppUssdSessionState new_state)
+14
View File
@@ -74,6 +74,13 @@ struct _MMIfaceModem3gppUssd {
gboolean (*cleanup_unsolicited_result_codes_finish) (MMIfaceModem3gppUssd *self,
GAsyncResult *res,
GError **error);
/* Encode/Decode */
gchar * (*encode) (MMIfaceModem3gppUssd *self,
const gchar *command,
guint *scheme);
gchar * (*decode) (MMIfaceModem3gppUssd *self,
const gchar *reply);
};
GType mm_iface_modem_3gpp_ussd_get_type (void);
@@ -111,6 +118,13 @@ void mm_iface_modem_3gpp_ussd_update_network_notification (MMIfaceModem3gppUssd
void mm_iface_modem_3gpp_ussd_update_network_request (MMIfaceModem3gppUssd *self,
const gchar *network_request);
/* Encode/Decode USSD */
gchar *mm_iface_modem_3gpp_ussd_encode (MMIfaceModem3gppUssd *self,
const gchar *command,
guint *scheme);
gchar *mm_iface_modem_3gpp_ussd_decode (MMIfaceModem3gppUssd *self,
const gchar *reply);
/* Shutdown USSD interface */
void mm_iface_modem_3gpp_ussd_shutdown (MMIfaceModem3gppUssd *self);