port: no need for custom enum to string converters
This commit is contained in:
@@ -46,38 +46,6 @@ typedef struct {
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
const char *
|
||||
mm_port_subsys_to_name (MMPortSubsys psubsys)
|
||||
{
|
||||
switch (psubsys) {
|
||||
case MM_PORT_SUBSYS_TTY:
|
||||
return "tty";
|
||||
case MM_PORT_SUBSYS_NET:
|
||||
return "net";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return "(unknown)";
|
||||
}
|
||||
|
||||
const char *
|
||||
mm_port_type_to_name (MMPortType ptype)
|
||||
{
|
||||
switch (ptype) {
|
||||
case MM_PORT_TYPE_AT:
|
||||
return "AT";
|
||||
case MM_PORT_TYPE_IGNORED:
|
||||
return "ignored";
|
||||
case MM_PORT_TYPE_QCDM:
|
||||
return "QCDM";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return "(unknown)";
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static GObject*
|
||||
constructor (GType type,
|
||||
guint n_construct_params,
|
||||
|
@@ -74,8 +74,4 @@ gboolean mm_port_get_connected (MMPort *self);
|
||||
|
||||
void mm_port_set_connected (MMPort *self, gboolean connected);
|
||||
|
||||
const char * mm_port_type_to_name (MMPortType ptype);
|
||||
|
||||
const char * mm_port_subsys_to_name (MMPortSubsys psubsys);
|
||||
|
||||
#endif /* MM_PORT_H */
|
||||
|
Reference in New Issue
Block a user