From 2c401887aa4e03815fe76f87fa0a4a6ab2a019ec Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 19 Jul 2011 11:07:39 -0500 Subject: [PATCH] docs: document the PPPoE setting --- libnm-util/nm-setting-pppoe.c | 42 +++++++++++++++++++++++++++++++++++ libnm-util/nm-setting-pppoe.h | 12 ++++++++-- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/libnm-util/nm-setting-pppoe.c b/libnm-util/nm-setting-pppoe.c index 18dd7983a4..249b7678d1 100644 --- a/libnm-util/nm-setting-pppoe.c +++ b/libnm-util/nm-setting-pppoe.c @@ -28,6 +28,23 @@ #include "nm-setting-ppp.h" #include "nm-setting-private.h" +/** + * SECTION:nm-setting-pppoe + * @short_description: Describes PPPoE connection properties + * @include: nm-setting-pppoe.h + * + * The #NMSettingPPPOE object is a #NMSetting subclass that describes + * properties necessary for connection to networks that require PPPoE connections + * to provide IP transport, for example cable or DSL modems. + **/ + +/** + * nm_setting_pppoe_error_quark: + * + * Registers an error quark for #NMSettingPPPOE if necessary. + * + * Returns: the error quark used for #NMSettingPPPOE errors. + **/ GQuark nm_setting_pppoe_error_quark (void) { @@ -85,12 +102,25 @@ enum { LAST_PROP }; +/** + * nm_setting_pppoe_new: + * + * Creates a new #NMSettingPPPOE object with default values. + * + * Returns: the new empty #NMSettingPPPOE object + **/ NMSetting * nm_setting_pppoe_new (void) { return (NMSetting *) g_object_new (NM_TYPE_SETTING_PPPOE, NULL); } +/** + * nm_setting_pppoe_get_service: + * @setting: the #NMSettingPPPOE + * + * Returns: the #NMSettingPPPOE:service property of the setting + **/ const char * nm_setting_pppoe_get_service (NMSettingPPPOE *setting) { @@ -99,6 +129,12 @@ nm_setting_pppoe_get_service (NMSettingPPPOE *setting) return NM_SETTING_PPPOE_GET_PRIVATE (setting)->service; } +/** + * nm_setting_pppoe_get_service: + * @setting: the #NMSettingPPPOE + * + * Returns: the #NMSettingPPPOE:username property of the setting + **/ const char * nm_setting_pppoe_get_username (NMSettingPPPOE *setting) { @@ -107,6 +143,12 @@ nm_setting_pppoe_get_username (NMSettingPPPOE *setting) return NM_SETTING_PPPOE_GET_PRIVATE (setting)->username; } +/** + * nm_setting_pppoe_get_service: + * @setting: the #NMSettingPPPOE + * + * Returns: the #NMSettingPPPOE:password property of the setting + **/ const char * nm_setting_pppoe_get_password (NMSettingPPPOE *setting) { diff --git a/libnm-util/nm-setting-pppoe.h b/libnm-util/nm-setting-pppoe.h index d163decb4c..aef6bd686e 100644 --- a/libnm-util/nm-setting-pppoe.h +++ b/libnm-util/nm-setting-pppoe.h @@ -39,8 +39,16 @@ G_BEGIN_DECLS #define NM_SETTING_PPPOE_SETTING_NAME "pppoe" -typedef enum -{ +/** + * NMSettingPPPOEError: + * @NM_SETTING_PPPOE_ERROR_UNKNOWN: unknown or unclassified error + * @NM_SETTING_PPPOE_ERROR_INVALID_PROPERTY: the property was invalid + * @NM_SETTING_PPPOE_ERROR_MISSING_PROPERTY: the property was missing and is + * required + * @NM_SETTING_PPPOE_ERROR_MISSING_PPP_SETTING: the connection + * did not contain a required PPP setting for PPP related options + */ +typedef enum { NM_SETTING_PPPOE_ERROR_UNKNOWN = 0, NM_SETTING_PPPOE_ERROR_INVALID_PROPERTY, NM_SETTING_PPPOE_ERROR_MISSING_PROPERTY,