core: add mm_port_subsys_to_name()
This commit is contained in:
@@ -46,6 +46,20 @@ 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)
|
||||
{
|
||||
|
||||
@@ -78,5 +78,7 @@ 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