1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
|
<?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" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="OobsObject">
<refmeta>
<refentrytitle role="top_of_page" id="OobsObject.top_of_page">OobsObject</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBOOBS Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>OobsObject</refname>
<refpurpose>Base object for all configuration objects.</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>
<refsynopsisdiv id="OobsObject.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>
<synopsis>
<link linkend="OobsObject-struct">OobsObject</link>;
<link linkend="void">void</link> (<link linkend="OobsObjectAsyncFunc">*OobsObjectAsyncFunc</link>) (<link linkend="OobsObject">OobsObject</link> *object,
<link linkend="OobsResult">OobsResult</link> result,
<link linkend="gpointer">gpointer</link> data);
<link linkend="OobsResult">OobsResult</link> <link linkend="oobs-object-commit">oobs_object_commit</link> (<link linkend="OobsObject">OobsObject</link> *object);
<link linkend="OobsResult">OobsResult</link> <link linkend="oobs-object-commit-async">oobs_object_commit_async</link> (<link linkend="OobsObject">OobsObject</link> *object,
<link linkend="OobsObjectAsyncFunc">OobsObjectAsyncFunc</link> func,
<link linkend="gpointer">gpointer</link> data);
<link linkend="OobsResult">OobsResult</link> <link linkend="oobs-object-update">oobs_object_update</link> (<link linkend="OobsObject">OobsObject</link> *object);
<link linkend="OobsResult">OobsResult</link> <link linkend="oobs-object-update-async">oobs_object_update_async</link> (<link linkend="OobsObject">OobsObject</link> *object,
<link linkend="OobsObjectAsyncFunc">OobsObjectAsyncFunc</link> func,
<link linkend="gpointer">gpointer</link> data);
<link linkend="void">void</link> <link linkend="oobs-object-process-requests">oobs_object_process_requests</link> (<link linkend="OobsObject">OobsObject</link> *object);
</synopsis>
</refsynopsisdiv>
<refsect1 id="OobsObject.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
<link linkend="GObject">GObject</link>
+----OobsObject
+----<link linkend="OobsGroupsConfig">OobsGroupsConfig</link>
+----<link linkend="OobsIfacesConfig">OobsIfacesConfig</link>
+----<link linkend="OobsNFSConfig">OobsNFSConfig</link>
+----<link linkend="OobsNTPConfig">OobsNTPConfig</link>
+----<link linkend="OobsServicesConfig">OobsServicesConfig</link>
+----<link linkend="OobsSMBConfig">OobsSMBConfig</link>
+----<link linkend="OobsTimeConfig">OobsTimeConfig</link>
+----<link linkend="OobsUsersConfig">OobsUsersConfig</link>
</synopsis>
</refsect1>
<refsect1 id="OobsObject.properties" role="properties">
<title role="properties.title">Properties</title>
<synopsis>
"<link linkend="OobsObject--remote-object">remote-object</link>" <link linkend="gchar">gchar</link>* : Write / Construct Only
</synopsis>
</refsect1>
<refsect1 id="OobsObject.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<synopsis>
"<link linkend="OobsObject-changed">changed</link>" : Run Last
"<link linkend="OobsObject-committed">committed</link>" : Run Last
"<link linkend="OobsObject-updated">updated</link>" : Run Last
</synopsis>
</refsect1>
<refsect1 id="OobsObject.description" role="desc">
<title role="desc.title">Description</title>
<para>
OobsObject is the base object for all Oobs*Config objects, contains all the necessary methods for updating/committing the configuration. Initially the returned object is empty, you will have to call <link linkend="oobs-object-update"><function>oobs_object_update()</function></link> or <link linkend="oobs-object-update-async"><function>oobs_object_update_async()</function></link> yourself.
</para>
</refsect1>
<refsect1 id="OobsObject.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="OobsObject-struct" role="struct">
<title>OobsObject</title>
<indexterm zone="OobsObject-struct"><primary>OobsObject</primary></indexterm><programlisting>typedef struct _OobsObject OobsObject;</programlisting>
<para>
</para></refsect2>
<refsect2 id="OobsObjectAsyncFunc" role="function">
<title>OobsObjectAsyncFunc ()</title>
<indexterm zone="OobsObjectAsyncFunc"><primary>OobsObjectAsyncFunc</primary></indexterm><programlisting><link linkend="void">void</link> (*OobsObjectAsyncFunc) (<link linkend="OobsObject">OobsObject</link> *object,
<link linkend="OobsResult">OobsResult</link> result,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Specifies the type of function passed to <link linkend="oobs-object-update-async"><function>oobs_object_update_async()</function></link> and <link linkend="oobs-object-commit-async"><function>oobs_object_commit_async()</function></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>object</parameter> :</term>
<listitem><simpara><link linkend="OobsObject"><type>OobsObject</type></link> which was modified/updated.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>result</parameter> :</term>
<listitem><simpara><link linkend="OobsResult"><type>OobsResult</type></link> defining the result of the operation.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter> :</term>
<listitem><simpara>data passed to the function.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="oobs-object-commit" role="function">
<title>oobs_object_commit ()</title>
<indexterm zone="oobs-object-commit"><primary>oobs_object_commit</primary></indexterm><programlisting><link linkend="OobsResult">OobsResult</link> oobs_object_commit (<link linkend="OobsObject">OobsObject</link> *object);</programlisting>
<para>
Commits to the system all the changes done
to the configuration held by an <link linkend="OobsObject"><type>OobsObject</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>object</parameter> :</term>
<listitem><simpara> an <link linkend="OobsObject"><type>OobsObject</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> an <link linkend="OobsResult"><type>OobsResult</type></link> enum with the error code.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="oobs-object-commit-async" role="function">
<title>oobs_object_commit_async ()</title>
<indexterm zone="oobs-object-commit-async"><primary>oobs_object_commit_async</primary></indexterm><programlisting><link linkend="OobsResult">OobsResult</link> oobs_object_commit_async (<link linkend="OobsObject">OobsObject</link> *object,
<link linkend="OobsObjectAsyncFunc">OobsObjectAsyncFunc</link> func,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Commits to the system all the changes done to the configuration held by an <link linkend="OobsObject"><type>OobsObject</type></link>.
This change will be asynchronous, being run the function <parameter>func</parameter> when the change has been done.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>object</parameter> :</term>
<listitem><simpara> An <link linkend="OobsObject"><type>OobsObject</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter> :</term>
<listitem><simpara> An <link linkend="OobsObjectAsyncFunc"><type>OobsObjectAsyncFunc</type></link> that will be called when the asynchronous operation has ended.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter> :</term>
<listitem><simpara> Aditional data to pass to <parameter>func</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> an <link linkend="OobsResult"><type>OobsResult</type></link> enum with the error code. Due to the asynchronous nature
of the function, only OOBS_RESULT_MALFORMED and OOBS_RESULT_OK can be returned.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="oobs-object-update" role="function">
<title>oobs_object_update ()</title>
<indexterm zone="oobs-object-update"><primary>oobs_object_update</primary></indexterm><programlisting><link linkend="OobsResult">OobsResult</link> oobs_object_update (<link linkend="OobsObject">OobsObject</link> *object);</programlisting>
<para>
Synchronizes the configuration held by the <link linkend="OobsObject"><type>OobsObject</type></link>
with the actual system configuration. All the changes done
to the configuration held by the <link linkend="OobsObject"><type>OobsObject</type></link> will be forgotten.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>object</parameter> :</term>
<listitem><simpara> an <link linkend="OobsObject"><type>OobsObject</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> an <link linkend="OobsResult"><type>OobsResult</type></link> enum with the error code.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="oobs-object-update-async" role="function">
<title>oobs_object_update_async ()</title>
<indexterm zone="oobs-object-update-async"><primary>oobs_object_update_async</primary></indexterm><programlisting><link linkend="OobsResult">OobsResult</link> oobs_object_update_async (<link linkend="OobsObject">OobsObject</link> *object,
<link linkend="OobsObjectAsyncFunc">OobsObjectAsyncFunc</link> func,
<link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Synchronizes the configuration held by the <link linkend="OobsObject"><type>OobsObject</type></link>
with the actual system configuration. All the changes done
to the configuration held by the <link linkend="OobsObject"><type>OobsObject</type></link> will be forgotten.
The update operation will be asynchronous, being run the
function <parameter>func</parameter> when the update has been done.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>object</parameter> :</term>
<listitem><simpara> An <link linkend="OobsObject"><type>OobsObject</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter> :</term>
<listitem><simpara> An <link linkend="OobsObjectAsyncFunc"><type>OobsObjectAsyncFunc</type></link> that will be called when the asynchronous operation has ended.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter> :</term>
<listitem><simpara> Aditional data to pass to <parameter>func</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> an <link linkend="OobsResult"><type>OobsResult</type></link> enum with the error code. Due to the asynchronous nature
of the function, only OOBS_RESULT_MALFORMED and OOBS_RESULT_OK can be returned.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="oobs-object-process-requests" role="function">
<title>oobs_object_process_requests ()</title>
<indexterm zone="oobs-object-process-requests"><primary>oobs_object_process_requests</primary></indexterm><programlisting><link linkend="void">void</link> oobs_object_process_requests (<link linkend="OobsObject">OobsObject</link> *object);</programlisting>
<para>
Blocks until all pending asynchronous requests to this object have been processed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>object</parameter> :</term>
<listitem><simpara> An <link linkend="OobsObject"><type>OobsObject</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
<refsect1 id="OobsObject.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="OobsObject--remote-object"><title>The <literal>"remote-object"</literal> property</title>
<indexterm zone="OobsObject--remote-object"><primary>OobsObject:remote-object</primary></indexterm><programlisting> "remote-object" <link linkend="gchar">gchar</link>* : Write / Construct Only</programlisting>
<para>Name of the remote object at the other side of the connection.</para><para>Default value: NULL</para>
</refsect2>
</refsect1>
<refsect1 id="OobsObject.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="OobsObject-changed"><title>The <literal>"changed"</literal> signal</title>
<indexterm zone="OobsObject-changed"><primary>OobsObject::changed</primary></indexterm><programlisting><link linkend="void">void</link> user_function (<link linkend="OobsObject">OobsObject</link> *oobsobject,
<link linkend="gpointer">gpointer</link> user_data) : Run Last</programlisting>
<para>
The changed signal is emitted when the underlying configuration changes. This is just a notification, if you want to update it you will have to call <link linkend="oobs-object-update"><function>oobs_object_update()</function></link> or <link linkend="oobs-object-update-async"><function>oobs_object_update_async()</function></link> yourself.
</para><variablelist role="params">
<varlistentry><term><parameter>oobsobject</parameter> :</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="OobsObject-committed"><title>The <literal>"committed"</literal> signal</title>
<indexterm zone="OobsObject-committed"><primary>OobsObject::committed</primary></indexterm><programlisting><link linkend="void">void</link> user_function (<link linkend="OobsObject">OobsObject</link> *oobsobject,
<link linkend="gpointer">gpointer</link> user_data) : Run Last</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>oobsobject</parameter> :</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="OobsObject-updated"><title>The <literal>"updated"</literal> signal</title>
<indexterm zone="OobsObject-updated"><primary>OobsObject::updated</primary></indexterm><programlisting><link linkend="void">void</link> user_function (<link linkend="OobsObject">OobsObject</link> *oobsobject,
<link linkend="gpointer">gpointer</link> user_data) : Run Last</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>oobsobject</parameter> :</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter> :</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
<refsect1 id="OobsObject.see-also">
<title>See Also</title>
<para>
<link linkend="OobsSession"><type>OobsSession</type></link>, <link linkend="OobsList"><type>OobsList</type></link>
</para>
</refsect1>
</refentry>
|