<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="NMSettingConnection">
<refmeta>
<refentrytitle role="top_of_page">NMSettingConnection</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBNM-UTIL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>NMSettingConnection</refname>
<refpurpose>Describes general connection properties</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>

#include &lt;nm-setting-connection.h&gt;


#define             <link linkend="NM-SETTING-CONNECTION-SETTING-NAME:CAPS">NM_SETTING_CONNECTION_SETTING_NAME</link>
enum                <link linkend="NMSettingConnectionError">NMSettingConnectionError</link>;
#define             <link linkend="NM-TYPE-SETTING-CONNECTION-ERROR:CAPS">NM_TYPE_SETTING_CONNECTION_ERROR</link>
#define             <link linkend="NM-SETTING-CONNECTION-ERROR:CAPS">NM_SETTING_CONNECTION_ERROR</link>
<link linkend="GQuark">GQuark</link>              <link linkend="nm-setting-connection-error-quark">nm_setting_connection_error_quark</link>   (void);
#define             <link linkend="NM-SETTING-CONNECTION-ID:CAPS">NM_SETTING_CONNECTION_ID</link>
#define             <link linkend="NM-SETTING-CONNECTION-UUID:CAPS">NM_SETTING_CONNECTION_UUID</link>
#define             <link linkend="NM-SETTING-CONNECTION-TYPE:CAPS">NM_SETTING_CONNECTION_TYPE</link>
#define             <link linkend="NM-SETTING-CONNECTION-AUTOCONNECT:CAPS">NM_SETTING_CONNECTION_AUTOCONNECT</link>
#define             <link linkend="NM-SETTING-CONNECTION-TIMESTAMP:CAPS">NM_SETTING_CONNECTION_TIMESTAMP</link>
#define             <link linkend="NM-SETTING-CONNECTION-READ-ONLY:CAPS">NM_SETTING_CONNECTION_READ_ONLY</link>
                    <link linkend="NMSettingConnection-struct">NMSettingConnection</link>;
<link linkend="GType">GType</link>               <link linkend="nm-setting-connection-get-type">nm_setting_connection_get_type</link>      (void);
<link linkend="NMSetting">NMSetting</link>*          <link linkend="nm-setting-connection-new">nm_setting_connection_new</link>           (void);
const <link linkend="char">char</link>*         <link linkend="nm-setting-connection-get-id">nm_setting_connection_get_id</link>        (<link linkend="NMSettingConnection">NMSettingConnection</link> *setting);
const <link linkend="char">char</link>*         <link linkend="nm-setting-connection-get-uuid">nm_setting_connection_get_uuid</link>      (<link linkend="NMSettingConnection">NMSettingConnection</link> *setting);
const <link linkend="char">char</link>*         <link linkend="nm-setting-connection-get-connection-type">nm_setting_connection_get_connection_type</link>
                                                        (<link linkend="NMSettingConnection">NMSettingConnection</link> *setting);
<link linkend="gboolean">gboolean</link>            <link linkend="nm-setting-connection-get-autoconnect">nm_setting_connection_get_autoconnect</link>
                                                        (<link linkend="NMSettingConnection">NMSettingConnection</link> *setting);
<link linkend="guint64">guint64</link>             <link linkend="nm-setting-connection-get-timestamp">nm_setting_connection_get_timestamp</link> (<link linkend="NMSettingConnection">NMSettingConnection</link> *setting);
<link linkend="gboolean">gboolean</link>            <link linkend="nm-setting-connection-get-read-only">nm_setting_connection_get_read_only</link> (<link linkend="NMSettingConnection">NMSettingConnection</link> *setting);

</synopsis>
</refsynopsisdiv>

<refsect1 role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>

  <link linkend="GObject">GObject</link>
   +----<link linkend="NMSetting">NMSetting</link>
         +----NMSettingConnection
</synopsis>

</refsect1>





<refsect1 role="properties">
<title role="properties.title">Properties</title>
<synopsis>

  &quot;<link linkend="NMSettingConnection--autoconnect">autoconnect</link>&quot;              <link linkend="gboolean">gboolean</link>              : Read / Write / Construct
  &quot;<link linkend="NMSettingConnection--id">id</link>&quot;                       <link linkend="gchararray">gchararray</link>            : Read / Write
  &quot;<link linkend="NMSettingConnection--read-only">read-only</link>&quot;                <link linkend="gboolean">gboolean</link>              : Read / Write / Construct
  &quot;<link linkend="NMSettingConnection--timestamp">timestamp</link>&quot;                <link linkend="guint64">guint64</link>               : Read / Write / Construct
  &quot;<link linkend="NMSettingConnection--type">type</link>&quot;                     <link linkend="gchararray">gchararray</link>            : Read / Write
  &quot;<link linkend="NMSettingConnection--uuid">uuid</link>&quot;                     <link linkend="gchararray">gchararray</link>            : Read / Write
</synopsis>
</refsect1>



<refsect1 role="desc">
<title role="desc.title">Description</title>
<para>
The <link linkend="NMSettingConnection"><type>NMSettingConnection</type></link> object is a <link linkend="NMSetting"><type>NMSetting</type></link> subclass that describes
properties that apply to all <link linkend="NMConnection"><type>NMConnection</type></link> objects, regardless of what type
of network connection they describe.  Each <link linkend="NMConnection"><type>NMConnection</type></link> object must contain
a <link linkend="NMSettingConnection"><type>NMSettingConnection</type></link> setting.</para>
<para>

</para>
</refsect1>

<refsect1 role="details">
<title role="details.title">Details</title>
<refsect2>
<title><anchor id="NM-SETTING-CONNECTION-SETTING-NAME:CAPS" role="macro"/>NM_SETTING_CONNECTION_SETTING_NAME</title>
<indexterm><primary>NM_SETTING_CONNECTION_SETTING_NAME</primary></indexterm><programlisting>#define NM_SETTING_CONNECTION_SETTING_NAME "connection"
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="NMSettingConnectionError" role="enum"/>enum NMSettingConnectionError</title>
<indexterm><primary>NMSettingConnectionError</primary></indexterm><programlisting>typedef enum
{
	NM_SETTING_CONNECTION_ERROR_UNKNOWN = 0,
	NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY,
	NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY,
	NM_SETTING_CONNECTION_ERROR_TYPE_SETTING_NOT_FOUND
} NMSettingConnectionError;
</programlisting>
<para>
Describes errors that may result from operations involving a
<link linkend="NMSettingConnection"><type>NMSettingConnection</type></link>.</para>
<para>

</para><variablelist role="enum">
<varlistentry>
<term><anchor id="NM-SETTING-CONNECTION-ERROR-UNKNOWN:CAPS" role="constant"/><literal>NM_SETTING_CONNECTION_ERROR_UNKNOWN</literal></term>
<listitem><simpara> unknown or unclassified error
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="NM-SETTING-CONNECTION-ERROR-INVALID-PROPERTY:CAPS" role="constant"/><literal>NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY</literal></term>
<listitem><simpara> the property's value is
  invalid
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="NM-SETTING-CONNECTION-ERROR-MISSING-PROPERTY:CAPS" role="constant"/><literal>NM_SETTING_CONNECTION_ERROR_MISSING_PROPERTY</literal></term>
<listitem><simpara> a required property is not
  present
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="NM-SETTING-CONNECTION-ERROR-TYPE-SETTING-NOT-FOUND:CAPS" role="constant"/><literal>NM_SETTING_CONNECTION_ERROR_TYPE_SETTING_NOT_FOUND</literal></term>
<listitem><simpara> the <link linkend="NMSetting"><type>NMSetting</type></link> object
  referenced by the setting name contained in the
  <link linkend="NMSettingConnection--type"><type>"type"</type></link> property was not present in the <link linkend="NMConnection"><type>NMConnection</type></link>
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="NM-TYPE-SETTING-CONNECTION-ERROR:CAPS" role="macro"/>NM_TYPE_SETTING_CONNECTION_ERROR</title>
<indexterm><primary>NM_TYPE_SETTING_CONNECTION_ERROR</primary></indexterm><programlisting>#define NM_TYPE_SETTING_CONNECTION_ERROR (nm_setting_connection_error_get_type ()) 
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="NM-SETTING-CONNECTION-ERROR:CAPS" role="macro"/>NM_SETTING_CONNECTION_ERROR</title>
<indexterm><primary>NM_SETTING_CONNECTION_ERROR</primary></indexterm><programlisting>#define NM_SETTING_CONNECTION_ERROR nm_setting_connection_error_quark ()
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="nm-setting-connection-error-quark" role="function"/>nm_setting_connection_error_quark ()</title>
<indexterm><primary>nm_setting_connection_error_quark</primary></indexterm><programlisting><link linkend="GQuark">GQuark</link>              nm_setting_connection_error_quark   (void);</programlisting>
<para>
Registers an error quark for <link linkend="NMSettingConnection"><type>NMSettingConnection</type></link> if necessary.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the error quark used for <link linkend="NMSettingConnection"><type>NMSettingConnection</type></link> errors.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="NM-SETTING-CONNECTION-ID:CAPS" role="macro"/>NM_SETTING_CONNECTION_ID</title>
<indexterm><primary>NM_SETTING_CONNECTION_ID</primary></indexterm><programlisting>#define NM_SETTING_CONNECTION_ID          "id"
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="NM-SETTING-CONNECTION-UUID:CAPS" role="macro"/>NM_SETTING_CONNECTION_UUID</title>
<indexterm><primary>NM_SETTING_CONNECTION_UUID</primary></indexterm><programlisting>#define NM_SETTING_CONNECTION_UUID        "uuid"
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="NM-SETTING-CONNECTION-TYPE:CAPS" role="macro"/>NM_SETTING_CONNECTION_TYPE</title>
<indexterm><primary>NM_SETTING_CONNECTION_TYPE</primary></indexterm><programlisting>#define NM_SETTING_CONNECTION_TYPE        "type"
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="NM-SETTING-CONNECTION-AUTOCONNECT:CAPS" role="macro"/>NM_SETTING_CONNECTION_AUTOCONNECT</title>
<indexterm><primary>NM_SETTING_CONNECTION_AUTOCONNECT</primary></indexterm><programlisting>#define NM_SETTING_CONNECTION_AUTOCONNECT "autoconnect"
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="NM-SETTING-CONNECTION-TIMESTAMP:CAPS" role="macro"/>NM_SETTING_CONNECTION_TIMESTAMP</title>
<indexterm><primary>NM_SETTING_CONNECTION_TIMESTAMP</primary></indexterm><programlisting>#define NM_SETTING_CONNECTION_TIMESTAMP   "timestamp"
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="NM-SETTING-CONNECTION-READ-ONLY:CAPS" role="macro"/>NM_SETTING_CONNECTION_READ_ONLY</title>
<indexterm><primary>NM_SETTING_CONNECTION_READ_ONLY</primary></indexterm><programlisting>#define NM_SETTING_CONNECTION_READ_ONLY   "read-only"
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="NMSettingConnection-struct" role="struct"/>NMSettingConnection</title>
<indexterm><primary>NMSettingConnection</primary></indexterm><programlisting>typedef struct _NMSettingConnection NMSettingConnection;</programlisting>
<para>
The NMSettingConnection struct contains only private data.
It should only be accessed through the functions described below.</para>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="nm-setting-connection-get-type" role="function"/>nm_setting_connection_get_type ()</title>
<indexterm><primary>nm_setting_connection_get_type</primary></indexterm><programlisting><link linkend="GType">GType</link>               nm_setting_connection_get_type      (void);</programlisting>
<para>
Returns the <link linkend="NMSettingConnection--type"><type>"type"</type></link> property of the connection.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the connection type
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="nm-setting-connection-new" role="function"/>nm_setting_connection_new ()</title>
<indexterm><primary>nm_setting_connection_new</primary></indexterm><programlisting><link linkend="NMSetting">NMSetting</link>*          nm_setting_connection_new           (void);</programlisting>
<para>
Creates a new <link linkend="NMSettingConnection"><type>NMSettingConnection</type></link> object with default values.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the new empty <link linkend="NMSettingConnection"><type>NMSettingConnection</type></link> object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="nm-setting-connection-get-id" role="function"/>nm_setting_connection_get_id ()</title>
<indexterm><primary>nm_setting_connection_get_id</primary></indexterm><programlisting>const <link linkend="char">char</link>*         nm_setting_connection_get_id        (<link linkend="NMSettingConnection">NMSettingConnection</link> *setting);</programlisting>
<para>
Returns the <link linkend="NMSettingConnection--id"><type>"id"</type></link> property of the connection.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>setting</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="NMSettingConnection"><type>NMSettingConnection</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the connection ID
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="nm-setting-connection-get-uuid" role="function"/>nm_setting_connection_get_uuid ()</title>
<indexterm><primary>nm_setting_connection_get_uuid</primary></indexterm><programlisting>const <link linkend="char">char</link>*         nm_setting_connection_get_uuid      (<link linkend="NMSettingConnection">NMSettingConnection</link> *setting);</programlisting>
<para>
Returns the <link linkend="NMSettingConnection--uuid"><type>"uuid"</type></link> property of the connection.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>setting</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="NMSettingConnection"><type>NMSettingConnection</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the connection UUID
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="nm-setting-connection-get-connection-type" role="function"/>nm_setting_connection_get_connection_type ()</title>
<indexterm><primary>nm_setting_connection_get_connection_type</primary></indexterm><programlisting>const <link linkend="char">char</link>*         nm_setting_connection_get_connection_type
                                                        (<link linkend="NMSettingConnection">NMSettingConnection</link> *setting);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>setting</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="nm-setting-connection-get-autoconnect" role="function"/>nm_setting_connection_get_autoconnect ()</title>
<indexterm><primary>nm_setting_connection_get_autoconnect</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            nm_setting_connection_get_autoconnect
                                                        (<link linkend="NMSettingConnection">NMSettingConnection</link> *setting);</programlisting>
<para>
Returns the <link linkend="NMSettingConnection--autoconnect"><type>"autoconnect"</type></link> property of the connection.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>setting</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="NMSettingConnection"><type>NMSettingConnection</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the connection's autoconnect behavior
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="nm-setting-connection-get-timestamp" role="function"/>nm_setting_connection_get_timestamp ()</title>
<indexterm><primary>nm_setting_connection_get_timestamp</primary></indexterm><programlisting><link linkend="guint64">guint64</link>             nm_setting_connection_get_timestamp (<link linkend="NMSettingConnection">NMSettingConnection</link> *setting);</programlisting>
<para>
Returns the <link linkend="NMSettingConnection--timestamp"><type>"timestamp"</type></link> property of the connection.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>setting</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="NMSettingConnection"><type>NMSettingConnection</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the connection's timestamp
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="nm-setting-connection-get-read-only" role="function"/>nm_setting_connection_get_read_only ()</title>
<indexterm><primary>nm_setting_connection_get_read_only</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            nm_setting_connection_get_read_only (<link linkend="NMSettingConnection">NMSettingConnection</link> *setting);</programlisting>
<para>
Returns the <link linkend="NMSettingConnection--read-only"><type>"read-only"</type></link> property of the connection.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>setting</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="NMSettingConnection"><type>NMSettingConnection</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the connection is read-only, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if it is not
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>
<refsect1 role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2><title><anchor id="NMSettingConnection--autoconnect"/>The <literal>&quot;autoconnect&quot;</literal> property</title>
<indexterm><primary>NMSettingConnection:autoconnect</primary></indexterm><programlisting>  &quot;autoconnect&quot;              <link linkend="gboolean">gboolean</link>              : Read / Write / Construct</programlisting>
<para>
Whether or not the connection should be automatically connected by
NetworkManager when the resources for the connection are available.
<link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to automatically activate the connection, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> to require manual
intervention to activate the connection.  Defaults to <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>.</para>
<para>

</para><para>Default value: TRUE</para>
</refsect2>
<refsect2><title><anchor id="NMSettingConnection--id"/>The <literal>&quot;id&quot;</literal> property</title>
<indexterm><primary>NMSettingConnection:id</primary></indexterm><programlisting>  &quot;id&quot;                       <link linkend="gchararray">gchararray</link>            : Read / Write</programlisting>
<para>
A human readable unique idenfier for the connection, like "Work WiFi" or
"T-Mobile 3G".</para>
<para>

</para><para>Default value: NULL</para>
</refsect2>
<refsect2><title><anchor id="NMSettingConnection--read-only"/>The <literal>&quot;read-only&quot;</literal> property</title>
<indexterm><primary>NMSettingConnection:read-only</primary></indexterm><programlisting>  &quot;read-only&quot;                <link linkend="gboolean">gboolean</link>              : Read / Write / Construct</programlisting>
<para>
<link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the connection can be modified using the providing settings
service's D-Bus interface with the right privileges, or <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>
if the connection is read-only and cannot be modified.</para>
<para>

</para><para>Default value: FALSE</para>
</refsect2>
<refsect2><title><anchor id="NMSettingConnection--timestamp"/>The <literal>&quot;timestamp&quot;</literal> property</title>
<indexterm><primary>NMSettingConnection:timestamp</primary></indexterm><programlisting>  &quot;timestamp&quot;                <link linkend="guint64">guint64</link>               : Read / Write / Construct</programlisting>
<para>
The time, in seconds since the Unix Epoch, that the connection was last
_successfully_ fully activated.</para>
<para>

</para><para>Default value: 0</para>
</refsect2>
<refsect2><title><anchor id="NMSettingConnection--type"/>The <literal>&quot;type&quot;</literal> property</title>
<indexterm><primary>NMSettingConnection:type</primary></indexterm><programlisting>  &quot;type&quot;                     <link linkend="gchararray">gchararray</link>            : Read / Write</programlisting>
<para>
The general hardware type of the device used for the network connection,
contains the name of the <link linkend="NMSetting"><type>NMSetting</type></link> object that describes that hardware
type's parameters.  For example, for WiFi devices, the name of the
<link linkend="NMSettingWireless"><type>NMSettingWireless</type></link> setting.</para>
<para>

</para><para>Default value: NULL</para>
</refsect2>
<refsect2><title><anchor id="NMSettingConnection--uuid"/>The <literal>&quot;uuid&quot;</literal> property</title>
<indexterm><primary>NMSettingConnection:uuid</primary></indexterm><programlisting>  &quot;uuid&quot;                     <link linkend="gchararray">gchararray</link>            : Read / Write</programlisting>
<para>
A universally unique idenfier for the connection, for example generated
with libuuid.  Should be assigned when the connection is created, and
never changed as long as the connection still applies to the same
network.  For example, should not be changed when the
<link linkend="NMSettingConnection--id"><type>"id"</type></link> or <link linkend="NMSettingIP4Config"><type>NMSettingIP4Config</type></link> changes, but might need
to be re-created when the WiFi SSID, mobile broadband network provider,
or <link linkend="NMSettingConnection--type"><type>"type"</type></link> changes.</para>
<para>

</para><para>Default value: NULL</para>
</refsect2>

</refsect1>





<refsect1><refsect2 /><refsect2 /></refsect1>
</refentry>
