docs: update Serial setting documentation
This commit is contained in:
@@ -27,6 +27,24 @@
|
|||||||
|
|
||||||
#include "nm-setting-serial.h"
|
#include "nm-setting-serial.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SECTION:nm-setting-serial
|
||||||
|
* @short_description: Describes connection properties for devices that use
|
||||||
|
* serial communications
|
||||||
|
* @include: nm-setting-serial.h
|
||||||
|
*
|
||||||
|
* The #NMSettingSerial object is a #NMSetting subclass that describes
|
||||||
|
* properties necessary for connections that may use serial communications,
|
||||||
|
* such as mobile broadband or analog telephone connections.
|
||||||
|
**/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* nm_setting_serial_error_quark:
|
||||||
|
*
|
||||||
|
* Registers an error quark for #NMSettingSerial if necessary.
|
||||||
|
*
|
||||||
|
* Returns: the error quark used for #NMSettingSerial errors.
|
||||||
|
**/
|
||||||
GQuark
|
GQuark
|
||||||
nm_setting_serial_error_quark (void)
|
nm_setting_serial_error_quark (void)
|
||||||
{
|
{
|
||||||
@@ -87,12 +105,25 @@ enum {
|
|||||||
LAST_PROP
|
LAST_PROP
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* nm_setting_serial_new:
|
||||||
|
*
|
||||||
|
* Creates a new #NMSettingSerial object with default values.
|
||||||
|
*
|
||||||
|
* Returns: (transfer full): the new empty #NMSettingSerial object
|
||||||
|
**/
|
||||||
NMSetting *
|
NMSetting *
|
||||||
nm_setting_serial_new (void)
|
nm_setting_serial_new (void)
|
||||||
{
|
{
|
||||||
return (NMSetting *) g_object_new (NM_TYPE_SETTING_SERIAL, NULL);
|
return (NMSetting *) g_object_new (NM_TYPE_SETTING_SERIAL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* nm_setting_serial_get_baud:
|
||||||
|
* @setting: the #NMSettingSerial
|
||||||
|
*
|
||||||
|
* Returns: the #NMSettingSerial:baud property of the setting
|
||||||
|
**/
|
||||||
guint
|
guint
|
||||||
nm_setting_serial_get_baud (NMSettingSerial *setting)
|
nm_setting_serial_get_baud (NMSettingSerial *setting)
|
||||||
{
|
{
|
||||||
@@ -101,6 +132,12 @@ nm_setting_serial_get_baud (NMSettingSerial *setting)
|
|||||||
return NM_SETTING_SERIAL_GET_PRIVATE (setting)->baud;
|
return NM_SETTING_SERIAL_GET_PRIVATE (setting)->baud;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* nm_setting_serial_get_bits:
|
||||||
|
* @setting: the #NMSettingSerial
|
||||||
|
*
|
||||||
|
* Returns: the #NMSettingSerial:bits property of the setting
|
||||||
|
**/
|
||||||
guint
|
guint
|
||||||
nm_setting_serial_get_bits (NMSettingSerial *setting)
|
nm_setting_serial_get_bits (NMSettingSerial *setting)
|
||||||
{
|
{
|
||||||
@@ -109,6 +146,12 @@ nm_setting_serial_get_bits (NMSettingSerial *setting)
|
|||||||
return NM_SETTING_SERIAL_GET_PRIVATE (setting)->bits;
|
return NM_SETTING_SERIAL_GET_PRIVATE (setting)->bits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* nm_setting_serial_get_parity:
|
||||||
|
* @setting: the #NMSettingSerial
|
||||||
|
*
|
||||||
|
* Returns: the #NMSettingSerial:parity property of the setting
|
||||||
|
**/
|
||||||
char
|
char
|
||||||
nm_setting_serial_get_parity (NMSettingSerial *setting)
|
nm_setting_serial_get_parity (NMSettingSerial *setting)
|
||||||
{
|
{
|
||||||
@@ -117,6 +160,12 @@ nm_setting_serial_get_parity (NMSettingSerial *setting)
|
|||||||
return NM_SETTING_SERIAL_GET_PRIVATE (setting)->parity;
|
return NM_SETTING_SERIAL_GET_PRIVATE (setting)->parity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* nm_setting_serial_get_stopbits:
|
||||||
|
* @setting: the #NMSettingSerial
|
||||||
|
*
|
||||||
|
* Returns: the #NMSettingSerial:stopbits property of the setting
|
||||||
|
**/
|
||||||
guint
|
guint
|
||||||
nm_setting_serial_get_stopbits (NMSettingSerial *setting)
|
nm_setting_serial_get_stopbits (NMSettingSerial *setting)
|
||||||
{
|
{
|
||||||
@@ -125,6 +174,12 @@ nm_setting_serial_get_stopbits (NMSettingSerial *setting)
|
|||||||
return NM_SETTING_SERIAL_GET_PRIVATE (setting)->stopbits;
|
return NM_SETTING_SERIAL_GET_PRIVATE (setting)->stopbits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* nm_setting_serial_get_send_delay:
|
||||||
|
* @setting: the #NMSettingSerial
|
||||||
|
*
|
||||||
|
* Returns: the #NMSettingSerial:send-delay property of the setting
|
||||||
|
**/
|
||||||
guint64
|
guint64
|
||||||
nm_setting_serial_get_send_delay (NMSettingSerial *setting)
|
nm_setting_serial_get_send_delay (NMSettingSerial *setting)
|
||||||
{
|
{
|
||||||
|
@@ -39,8 +39,16 @@ G_BEGIN_DECLS
|
|||||||
|
|
||||||
#define NM_SETTING_SERIAL_SETTING_NAME "serial"
|
#define NM_SETTING_SERIAL_SETTING_NAME "serial"
|
||||||
|
|
||||||
typedef enum
|
/**
|
||||||
{
|
* NMSettingSerialError:
|
||||||
|
* @NM_SETTING_SERIAL_ERROR_UNKNOWN: unknown or unclassified error
|
||||||
|
* @NM_SETTING_SERIAL_ERROR_INVALID_PROPERTY: the property was invalid
|
||||||
|
* @NM_SETTING_SERIAL_ERROR_MISSING_PROPERTY: the property was missing and is
|
||||||
|
* required
|
||||||
|
* @NM_SETTING_SERIAL_ERROR_MISSING_PPP_SETTING: one of the properties of the
|
||||||
|
* setting requires the connection to contain an #NMSettingPPP setting
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
NM_SETTING_SERIAL_ERROR_UNKNOWN = 0,
|
NM_SETTING_SERIAL_ERROR_UNKNOWN = 0,
|
||||||
NM_SETTING_SERIAL_ERROR_INVALID_PROPERTY,
|
NM_SETTING_SERIAL_ERROR_INVALID_PROPERTY,
|
||||||
NM_SETTING_SERIAL_ERROR_MISSING_PROPERTY,
|
NM_SETTING_SERIAL_ERROR_MISSING_PROPERTY,
|
||||||
|
Reference in New Issue
Block a user