<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+<!ENTITY % defs SYSTEM "defs.ent"> %defs;
+]>
<!-- lifted from troff+ms+XMan by doclifter -->
-<book id="smlibms">
+<book id="SMlib">
<bookinfo>
<title>X Session Management Library</title>
<subtitle>X Consortium Standard</subtitle>
- <releaseinfo>X Version 11, Release 6.4</releaseinfo>
+ <releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
<authorgroup>
<author>
<firstname>Ralph</firstname><surname>Mor</surname>
+ <affiliation><orgname>X Consortium</orgname></affiliation>
</author>
</authorgroup>
- <corpname>X Consortium Standard</corpname>
<copyright>
<year>1993</year><year>1994</year>
<holder>X Consortium</holder>
</copyright>
<releaseinfo>Version 1.0</releaseinfo>
- <affiliation><orgname>X Consortium</orgname></affiliation>
- <productnumber>X Version 11, Release 7</productnumber>
<legalnotice>
<para>
</bookinfo>
-<chapter id="overview_of_session_management">
+<chapter id='Overview_of_Session_Management'>
<title>Overview of Session Management</title>
<abstract>
</abstract>
</chapter>
-<chapter id='the_session_management_library'>
+<chapter id='The_Session_Management_Library'>
<title>The Session Management Library</title>
<abstract>
<para>
</para>
</chapter>
-<chapter id='understanding_smlibs_dependence_on_ice'>
+<chapter id='Understanding_SMlibs_Dependence_on_ICE'>
<title>Understanding SMlib's Dependence on ICE</title>
<para>
<para>
The ICE library utilizes callbacks to process messages. When a client
detects that there is data to read on an ICE connection, it should
-call the <function>IceProcessMessages</function> function.
-<function>IceProcessMessages</function> will read the message header
+call the <olink targetdoc='ICElib' targetptr='IceProcessMessages'><function>IceProcessMessages</function></olink> function.
+<olink targetdoc='ICElib' targetptr='IceProcessMessages'><function>IceProcessMessages</function></olink> will read the message header
and look at the major opcode in order to determine which protocol the
message was intended for. The appropriate protocol library will then
be triggered to unpack the message and hand it off to the client via a
connection. This can be done via a <function>select</function> call
on the file descriptor for the ICE connection, but more
typically, <function>XtAppAddInput</function> will be used to register
-a callback that will invoke <function>IceProcessMessages</function>
+a callback that will invoke <olink targetdoc='ICElib' targetptr='IceProcessMessages'><function>IceProcessMessages</function></olink>
each time there is data to read on the ICE connection.
</para>
To further complicate things, knowing which file descriptors to
call <function>select</function> on requires an understanding of how
ICE connections are created. On the client side, a call must be made
-to <function>SmcOpenConnection</function> in order to open a connection
-with a session manager. <function>SmcOpenConnection</function> will
-internally makea call into <function>IceOpenConnection</function>
+to <xref linkend='SmcOpenConnection' xrefstyle='select: title'/> in order to open a connection
+with a session manager. <xref linkend='SmcOpenConnection' xrefstyle='select: title'/> will
+internally makea call into <olink targetdoc='ICElib' targetptr='IceOpenConnection'><function>IceOpenConnection</function></olink>
which will, in turn, determine if an ICE connection already exists
between the client and session manager. Most likely, a connection
will not already exist and a new ICE connection will be created. The
On the session manager side, things work a bit differently. The
session manager has complete control over the creation of ICE
connections. The session manager has to first
-call <function>IceListenForConnections</function> in order to start
+call <olink targetdoc='ICElib' targetptr='IceListenForConnections'><function>IceListenForConnections</function></olink> in order to start
listening for connections from clients. Once a connection attempt is
-detected, <function>IceAcceptConnection</function> must be called, and
+detected, <olink targetdoc='ICElib' targetptr='IceAcceptConnection'><function>IceAcceptConnection</function></olink> must be called, and
the session manager can simply add the new ICE file descriptor to the
list of descriptors to call <function>select</function> on.
</para>
</chapter>
-<chapter id='header_files_and_library_name'>
+<chapter id='Header_Files_and_Library_Name'>
<title>Header Files and Library Name</title>
<para>
</para>
</chapter>
-<chapter id='session_management_client'>
+<chapter id='Session_Management_Client_Smc_Functions'>
<title>Session Management Client (<acronym>Smc</acronym>) Functions</title>
<para>
</itemizedlist>
</para>
- <sect1 id='connecting_to_the_session_manager'>
- <title>Connecting to the Session Manager</title>
+ <sect1 id='Connecting_to_the_Session_Manager'>
+<title>Connecting to the Session Manager</title>
<para>
To open a connection with a session manager,
-use <function>SmcOpenConnection</function>
+use <xref linkend='SmcOpenConnection' xrefstyle='select: title'/>
</para>
- <funcsynopsis>
+ <funcsynopsis id='SmcOpenConnection'>
<funcprototype>
<funcdef>SmcConn <function>SmcOpenConnection</function></funcdef>
<paramdef>char *<parameter>network_ids_list</parameter></paramdef>
the <envar>SESSION_MANAGER</envar> environment variable will be used.
Each network ID has the following format:
-<informaltable pgwide='0' frame='none'>
- <tgroup cols='3' align='center'>
- <colspec colname='c1'/>
- <colspec colname='c2'/>
- <colspec colname='c3'/>
+<informaltable frame='none'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.5*'/>
<tbody>
<row>
- <entry align='left'></entry>
- <entry align='left'><literal>tcp/</literal><parameter><hostname></parameter><literal>:</literal><parameter><portnumber></parameter></entry>
- <entry align='left'>or</entry>
+ <entry><literal>tcp/</literal><parameter><hostname></parameter><literal>:</literal><parameter><portnumber></parameter></entry>
+ <entry>or</entry>
</row>
<row>
- <entry align='left'></entry>
- <entry align='left'><literal>decnet/</literal><parameter><hostname></parameter><literal>::</literal><parameter><objname></parameter></entry>
- <entry align='left'>or</entry>
+ <entry><literal>decnet/</literal><parameter><hostname></parameter><literal>::</literal><parameter><objname></parameter></entry>
+ <entry>or</entry>
</row>
<row>
- <entry align='left'></entry>
- <entry align='left'><literal>local/</literal><parameter><hostname></parameter><literal>:</literal><parameter><path></parameter></entry>
- <entry align='left'></entry>
+ <entry><literal>local/</literal><parameter><hostname></parameter><literal>:</literal><parameter><path></parameter></entry>
+ <entry></entry>
</row>
</tbody>
</tgroup>
</para>
<para>
-After the connection is established, <function>SmcOpenConnection</function>
+After the connection is established, <xref linkend='SmcOpenConnection' xrefstyle='select: title'/>
registers the client with the session manager. If the client is being
restarted from a previous session, <parameter>previous_id</parameter>
should contain a null terminated string representing the client ID from the
</para>
<para>
-If <function>SmcOpenConnection</function> succeeds, it returns an
+If <xref linkend='SmcOpenConnection' xrefstyle='select: title'/> succeeds, it returns an
opaque connection pointer of type <function>SmcConn</function> and the
<parameter>client_id_ret</parameter> argument contains the client ID to be
used for this session. The <parameter>client_id_ret</parameter> should be
freed with a call to <function>free</function> when no longer needed. On
-failure, <function>SmcOpenConnection</function> returns
+failure, <xref linkend='SmcOpenConnection' xrefstyle='select: title'/> returns
<constant>NULL</constant>, and the reason for failure is returned in
<parameter>error_string_ret</parameter>.
</para>
<para>
As previously discussed
-(<link linkend='understanding_smlibs_dependence_on_ice'>section 3,
+(<link linkend='Understanding_SMlibs_Dependence_on_ICE'>section 3,
“Understanding SMlib's Dependence on ICE”</link>), the
client will have to keep track of when ICE connections are created or
-destroyed (using <function>IceAddConnectionWatch</function>
-and <function>IceRemoveConnectionWatch</function> and will have to
-call <function>IceProcessMessages</function> each time
+destroyed (using <olink targetdoc='ICElib' targetptr='IceAddConnectionWatch'><function>IceAddConnectionWatch</function></olink>
+and <olink targetdoc='ICElib' targetptr='IceRemoveConnectionWatch'><function>IceRemoveConnectionWatch</function></olink> and will have to
+call <olink targetdoc='ICElib' targetptr='IceProcessMessages'><function>IceProcessMessages</function></olink> each time
a <function>select</function> shows that there is data to read on an
ICE connection. For further information, see the
<citetitle pubwork='article'>Inter-Client Exchange Library</citetitle>
} SmcCallbacks;
</synopsis>
- <sect2 id='the_save_yourself_callback'>
- <title>The Save Yourself Callback</title>
+ <sect2 id='The_Save_Yourself_Callback'>
+<title>The Save Yourself Callback</title>
<para>
The Save Yourself callback is of type <function>SmcSaveYourselfProc</function>
</para>
-<funcsynopsis>
+<funcsynopsis id='SaveYourselfProc'>
<funcprototype>
<funcdef>typedef void (*<function>SaveYourselfProc</function>)</funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
The session manager sends a “Save Yourself” message to a
client either to checkpoint it or just before termination so that it
can save its state. The client responds with zero or more calls
-to <function>SmcSetProperties</function> to update the properties
+to <xref linkend='SmcSetProperties' xrefstyle='select: title'/> to update the properties
indicating how to restart the client. When all the properties have
-been set, the client calls <function>SmcSaveYourselfDone</function>
+been set, the client calls <xref linkend='SmcSaveYourselfDone' xrefstyle='select: title'/>
</para>
<para>
<constant>SmInteractStyleAny</constant> then the
client may interact with the user for any purpose. Because only one
client can interact with the user at a time, the client must
-call <function>SmcInteractRequest</function> and wait for an
+call <xref linkend='SmcInteractRequest' xrefstyle='select: title'/> and wait for an
“Interact” message from the session manager. When the
client is done interacting with the user, it
-calls <function>SmcInteractDone</function> The client may only
-call <function>SmcInteractRequest</function> after it receives a
+calls <xref linkend='SmcInteractDone' xrefstyle='select: title'/> The client may only
+call <xref linkend='SmcInteractRequest' xrefstyle='select: title'/> after it receives a
“Save Yourself” message and before it
-calls <function>SmcSaveYourselfDone</function>
+calls <xref linkend='SmcSaveYourselfDone' xrefstyle='select: title'/>
</para>
<para>
</para>
</sect2>
- <sect2 id='the_die_callback'>
- <title>The Die Callback</title>
+ <sect2 id='The_Die_Callback'>
+<title>The Die Callback</title>
<para>
-The Die callback is of type <function>SmcDieProc</function>
+The Die callback is of type <xref linkend='SmcDieProc' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcDieProc'>
<funcprototype>
<funcdef>typedef void (*<function>SmcDieProc</function>)</funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
<para>
The session manager sends a “Die” message to a client when
it wants it to die. The client should respond by calling
-<function>SmcCloseConnection</function>. A session manager that
+<xref linkend='SmcCloseConnection' xrefstyle='select: title'/>. A session manager that
behaves properly will send a “Save Yourself” message
before the “Die” message.
</para>
</sect2>
- <sect2 id='the_save_complete_callback'>
- <title>The Save Complete Callback</title>
+ <sect2 id='The_Save_Complete_Callback'>
+<title>The Save Complete Callback</title>
<para>
-The Save Complete callback is of type <function>SmcSaveCompleteProc</function>
+The Save Complete callback is of type <xref linkend='SmcSaveCompleteProc' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcSaveCompleteProc'>
<funcprototype>
<funcdef>typedef void (*<function>SmcSaveCompleteProc</function>)</funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
</sect2>
- <sect2 id='the_shutdown_cancelled_callback'>
- <title>The Shutdown Cancelled Callback</title>
+ <sect2 id='The_Shutdown_Cancelled_Callback'>
+<title>The Shutdown Cancelled Callback</title>
<para>
The Shutdown Cancelled callback is of type
-<function>SmcShutdownCancelledProc</function>
+<xref linkend='SmcShutdownCancelledProc' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcShutdownCancelledProc'>
<funcprototype>
<funcdef>typedef void (*<function>SmcShutdownCancelledProc</function>)</funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
<para>
The session manager sends a “Shutdown Cancelled” message
when the user cancelled the shutdown during an interaction
-(see <link linkend='interacting_with_the_user'>section 5.5,
+(see <link linkend='Interacting_With_the_User'>section 5.5,
“Interacting With the User”</link>). The client can now
continue as if the shutdown had never happened. If the client has not
-called <function>SmcSaveYourselfDone</function> yet, it can either
-abort the save and then call <function>SmcSaveYourselfDone</function>
+called <xref linkend='SmcSaveYourselfDone' xrefstyle='select: title'/> yet, it can either
+abort the save and then call <xref linkend='SmcSaveYourselfDone' xrefstyle='select: title'/>
with the success argument set to <constant>False</constant> or it can
-continue with the save and then call <function>SmcSaveYourselfDone</function>
+continue with the save and then call <xref linkend='SmcSaveYourselfDone' xrefstyle='select: title'/>
with the <parameter>success</parameter> argument set to reflect the outcome
of the save.
</para>
</sect2>
</sect1>
- <sect1 id='closing_the_connection'><title>Closing the Connection</title>
+ <sect1 id='Closing_the_Connection'>
+<title>Closing the Connection</title>
<para>
To close a connection with a session manager,
-use <function>SmcCloseConnection</function>
+use <xref linkend='SmcCloseConnection' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcCloseConnection'>
<funcprototype>
<funcdef>SmcCloseStatus <function>SmcCloseConnection</function></funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
Note that SMlib used the ICE protocol to establish a connection with
the session manager, and various protocols other than session
management may be active on the ICE connection.
-When <function>SmcCloseConnection</function> is called, the ICE
+When <xref linkend='SmcCloseConnection' xrefstyle='select: title'/> is called, the ICE
connection will be closed only if all protocols have been shutdown on
the connection. Check the ICElib standard
-for <function>IceAddConnectionWatch</function>
-and <function>IceRemoveConnectionWatch</function> to learn how to set
+for <olink targetdoc='ICElib' targetptr='IceAddConnectionWatch'><function>IceAddConnectionWatch</function></olink>
+and <olink targetdoc='ICElib' targetptr='IceRemoveConnectionWatch'><function>IceRemoveConnectionWatch</function></olink> to learn how to set
up a callback to be invoked each time an ICE connection is opened or
closed. Typically this callback adds/removes the ICE file descriptor
from the list of active descriptors to call <function>select</function> on
<para>
-<function>SmcCloseConnection</function> returns one of the following values:
+<xref linkend='SmcCloseConnection' xrefstyle='select: title'/> returns one of the following values:
<itemizedlist mark='bullet'>
<listitem><para>
</para></listitem>
<listitem><para>
<constant>SmcClosedASAP</constant> - an IO error had occurred on the
-connection, but <function>SmcCloseConnection</function> is being
-called within a nested <function>IceProcessMessages</function> The
+connection, but <xref linkend='SmcCloseConnection' xrefstyle='select: title'/> is being
+called within a nested <olink targetdoc='ICElib' targetptr='IceProcessMessages'><function>IceProcessMessages</function></olink> The
watch procedures have been invoked at this time, but the connection
will be freed as soon as possible (when the nesting level reaches zero
-and <function>IceProcessMessages</function> returns a status
+and <olink targetdoc='ICElib' targetptr='IceProcessMessages'><function>IceProcessMessages</function></olink> returns a status
of <function>IceProcessMessagesConnectionClosed</function>
</para> </listitem>
<listitem><para>
</sect1>
- <sect1 id='modifying_callbacks'>
- <title>Modifying Callbacks</title>
+ <sect1 id='Modifying_Callbacks'>
+<title>Modifying Callbacks</title>
<para>
-To modify callbacks set up in <function>SmcOpenConnection</function>
-use <function>SmcModifyCallbacks</function>
+To modify callbacks set up in <xref linkend='SmcOpenConnection' xrefstyle='select: title'/>
+use <xref linkend='SmcModifyCallbacks' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcModifyCallbacks'>
<funcprototype>
<funcdef>void <function>SmcModifyCallbacks</function></funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
</para>
</sect1>
- <sect1 id='setting_deleting_and_retrieving_session_management_properties'>
- <title>Setting, Deleting, and Retrieving Session Management Properties</title>
+ <sect1 id='Setting_Deleting_and_Retrieving_Session_Management_Properties'>
+<title>Setting, Deleting, and Retrieving Session Management Properties</title>
<para>
To set session management properties for this client,
-use <function>SmcSetProperties</function>
+use <xref linkend='SmcSetProperties' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcSetProperties'>
<funcprototype>
<funcdef>void <function>SmcSetProperties</function></funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
<para>
The properties are specified as an array of property pointers.
Previously set property values may be over-written using
-the <function>SmcSetProperties</function> function. Note that the
+the <xref linkend='SmcSetProperties' xrefstyle='select: title'/> function. Note that the
session manager is not expected to restore property values when the
session is restarted. Because of this, clients should not try to use
the session manager as a database for storing application specific state.
<para>
For a description of session management properties and
the <structname>SmProp</structname> structure,
-see <link linkend='session_management_properties'>section 7,
+see <link linkend='Session_Management_Properties'>section 7,
“Session Management Properties.”</link>
</para>
<para>
To delete properties previously set by the client,
-use <function>SmcDeleteProperties</function>
+use <xref linkend='SmcDeleteProperties' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcDeleteProperties'>
<funcprototype>
<funcdef>void <function>SmcDeleteProperties</function></funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
<para>
To get properties previously stored by the client,
-use <function>SmcGetProperties</function>
+use <xref linkend='SmcGetProperties' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcGetProperties'>
<funcprototype>
<funcdef>Status <function>SmcGetProperties</function></funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
</varlistentry>
<varlistentry>
<term><parameter>client_data</parameter></term>
- <listitem><para>This pointer to client data will be passed to the <function>SmcPropReplyProc</function> callback.</para></listitem>
+ <listitem><para>This pointer to client data will be passed to the <xref linkend='SmcPropReplyProc' xrefstyle='select: title'/> callback.</para></listitem>
</varlistentry>
</variablelist>
<para>
-The return value of <function>SmcGetProperties</function> is zero for
+The return value of <xref linkend='SmcGetProperties' xrefstyle='select: title'/> is zero for
failure and a positive value for success.
</para>
<para>
Note that the library does not block until the properties reply comes
-back. Rather, a callback of type <function>SmcPropReplyProc</function>
+back. Rather, a callback of type <xref linkend='SmcPropReplyProc' xrefstyle='select: title'/>
is invoked when the data is ready.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcPropReplyProc'>
<funcprototype>
<funcdef>typedef void (*<function>SmcPropReplyProc</function>)</funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
</varlistentry>
<varlistentry>
<term><parameter>client_data</parameter></term>
- <listitem><para>This pointer to client data will be passed to the <function>SmcPropReplyProc</function> callback.</para></listitem>
+ <listitem><para>This pointer to client data will be passed to the <xref linkend='SmcPropReplyProc' xrefstyle='select: title'/> callback.</para></listitem>
</varlistentry>
<varlistentry>
<term><parameter>num_props</parameter></term>
</variablelist>
<para>
-To free each property, use <function>SmFreeProperty</function>
-(see <link linkend='freeing_data'>section 8, “Freeing
+To free each property, use <xref linkend='SmFreeProperty' xrefstyle='select: title'/>
+(see <link linkend='Freeing_Data'>section 8, “Freeing
Data”</link>). To free the actual array of pointers,
use <function>free</function>
</para>
</sect1>
- <sect1 id='interacting_with_the_user'>
- <title>Interacting With the User</title>
+ <sect1 id='Interacting_With_the_User'>
+<title>Interacting With the User</title>
<para>
After receiving a “Save Yourself” message with an
<constant>SmInteractStyleErrors</constant>
or <constant>SmInteractStyleAny</constant> the client may choose to
interact with the user. Because only one client can interact with the
-user at a time, the client must call <function>SmcInteractRequest</function>
+user at a time, the client must call <xref linkend='SmcInteractRequest' xrefstyle='select: title'/>
and wait for an “Interact” message from the session manager.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcInteractRequest'>
<funcprototype>
<funcdef>Status <function>SmcInteractRequest</function></funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
<term><parameter>client_data</parameter></term>
<listitem><para>
This pointer to client data will be passed to
-the <function>SmcInteractProc</function> callback when the
+the <xref linkend='SmcInteractProc' xrefstyle='select: title'/> callback when the
“Interact” message arrives.
</para></listitem>
</varlistentry>
</variablelist>
<para>
-The return value of <function>SmcInteractRequest</function> is zero
+The return value of <xref linkend='SmcInteractRequest' xrefstyle='select: title'/> is zero
for failure and a positive value for success.
</para>
</para>
<para>
-The <function>SmcInteractProc</function> callback will be invoked when
+The <xref linkend='SmcInteractProc' xrefstyle='select: title'/> callback will be invoked when
the “Interact” message arrives from the session manager.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcInteractProc'>
<funcprototype>
<funcdef>typedef void (*<function>SmcInteractProc</function>)</funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
<para>
After interacting with the user (in response to an “Interact”
-message), you should call <function>SmcInteractDone</function>
+message), you should call <xref linkend='SmcInteractDone' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcInteractDone'>
<funcprototype>
<funcdef>void <function>SmcInteractDone</function></funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
</para>
</sect1>
- <sect1 id='requesting_a_save_yourself'>
- <title>Requesting a Save Yourself</title>
+ <sect1 id='Requesting_a_Save_Yourself'>
+<title>Requesting a Save Yourself</title>
<para>
To request a checkpoint from the session manager,
-use <function>SmcRequestSaveYourself</function>
+use <xref linkend='SmcRequestSaveYourself' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcRequestSaveYourself'>
<funcprototype>
<funcdef>void <function>SmcRequestSaveYourself</function></funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
The <parameter>save_type</parameter>, <parameter>shutdown</parameter>,
<parameter>interact_style</parameter>, and <parameter>fast</parameter>
arguments are discussed in more detail in
-<link linkend='the_save_yourself_callback'>section 5.1.1,
+<link linkend='The_Save_Yourself_Callback'>section 5.1.1,
“The Save Yourself Callback.”</link>
</para>
</para>
</sect1>
- <sect1 id='requesting_a_save_yourself_phase_2'>
- <title>Requesting a Save Yourself Phase 2</title>
+ <sect1 id='Requesting_a_Save_Yourself_Phase_2_2'>
+<title>Requesting a Save Yourself Phase 2</title>
<para>
In response to a “Save Yourself”, the client may request to be
informed when all the other clients are quiescent so that it can save their
-state. To do so, use <function>SmcRequestSaveYourselfPhase2</function>
+state. To do so, use <xref linkend='SmcRequestSaveYourselfPhase2' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcRequestSaveYourselfPhase2'>
<funcprototype>
<funcdef>Status <function>SmcRequestSaveYourselfPhase2</function></funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
</variablelist>
<para>
-The return value of <function>SmcRequestSaveYourselfPhase2</function>
+The return value of <xref linkend='SmcRequestSaveYourselfPhase2' xrefstyle='select: title'/>
is zero for failure and a positive value for success.
</para>
</para>
</sect1>
- <sect1 id='completing_a_save_yourself'>
- <title>Completing a Save Yourself</title>
+ <sect1 id='Completing_a_Save_Yourself'>
+<title>Completing a Save Yourself</title>
<para>
After saving state in response to a “Save Yourself”
-message, you should call <function>SmcSaveYourselfDone</function>
+message, you should call <xref linkend='SmcSaveYourselfDone' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcSaveYourselfDone'>
<funcprototype>
<funcdef>void <function>SmcSaveYourselfDone</function></funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
</variablelist>
<para>
-Before calling <function>SmcSaveYourselfDone</function> the client
+Before calling <xref linkend='SmcSaveYourselfDone' xrefstyle='select: title'/> the client
must have set each required property at least once since the client
registered with the session manager.
</para>
</sect1>
- <sect1 id='using_smc_informational_functions'>
- <title>Using Smc Informational Functions</title>
+ <sect1 id='Using_Smc_Informational_Functions'>
+<title>Using Smc Informational Functions</title>
-<funcsynopsis>
+<funcsynopsis id='SmcProtocolVersion'>
<funcprototype>
<funcdef>int <function>SmcProtocolVersion</function></funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
</funcsynopsis>
<para>
-<function>SmcProtocolVersion</function> returns the major version of
+<xref linkend='SmcProtocolVersion' xrefstyle='select: title'/> returns the major version of
the session management protocol associated with this session.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcProtocolRevision'>
<funcprototype>
<funcdef>int <function>SmcProtocolRevision</function></funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
</funcsynopsis>
<para>
-<function>SmcProtocolRevision</function> returns the minor version of
+<xref linkend='SmcProtocolRevision' xrefstyle='select: title'/> returns the minor version of
the session management protocol associated with this session.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcVendor'>
<funcprototype>
<funcdef>char *<function>SmcVendor</function></funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
</funcsynopsis>
<para>
-<function>SmcVendor</function> returns a string that provides some
+<xref linkend='SmcVendor' xrefstyle='select: title'/> returns a string that provides some
identification of the owner of the session manager. The string should
be freed with a call to <function>free</function>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcRelease'>
<funcprototype>
<funcdef>char *<function>SmcRelease</function></funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
</funcsynopsis>
<para>
-<function>SmcRelease</function> returns a string that provides the
+<xref linkend='SmcRelease' xrefstyle='select: title'/> returns a string that provides the
release number of the session manager. The string should be freed
with a call to <function>free</function>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcClientID'>
<funcprototype>
<funcdef>char *<function>SmcClientID</function></funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
</funcsynopsis>
<para>
-<function>SmcClientID</function> returns a null-terminated string for
+<xref linkend='SmcClientID' xrefstyle='select: title'/> returns a null-terminated string for
the client ID associated with this connection. This information was
-also returned in <function>SmcOpenConnection</function> (it is
+also returned in <xref linkend='SmcOpenConnection' xrefstyle='select: title'/> (it is
provided here for convenience). Call <function>free</function> on
this pointer when the client ID is no longer needed.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcGetIceConnection'>
<funcprototype>
<funcdef>IceConn <function>SmcGetIceConnection</function></funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
</funcsynopsis>
<para>
-<function>SmcGetIceConnection</function> returns the ICE connection
+<xref linkend='SmcGetIceConnection' xrefstyle='select: title'/> returns the ICE connection
object associated with this session management connection object. The
ICE connection object can be used to get some additional information
about the connection. Some of the more useful functions which can be
used on the IceConn are <function>IceConnectionNumber</function>,
<function>IceConnectionString</function>,
-<function>IceLastSentSequenceNumber</function>,
+<olink targetdoc='ICElib' targetptr='IceLastSentSequenceNumber'><function>IceLastSentSequenceNumber</function></olink>,
<function>IceLastReceivedSequenceNumber</function>,
-and <function>IcePing</function>. For further information, see
+and <olink targetdoc='ICElib' targetptr='IcePing'><function>IcePing</function></olink>. For further information, see
the <citetitle pubwork='article'>Inter-Client Exchange Library</citetitle>
standard.
</para>
</sect1>
- <sect1 id='error_handling'>
- <title>Error Handling</title>
+ <sect1 id='Error_Handling'>
+<title>Error Handling</title>
<para>
If the client receives an unexpected protocol error from the session
handler exists that simply prints the error message
to <varname>stderr</varname> and exits if the severity of the error
is fatal. The client can change this error handler by calling
-the <function>SmcSetErrorHandler</function> function.
+the <xref linkend='SmcSetErrorHandler' xrefstyle='select: title'/> function.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcSetErrorHandler'>
<funcprototype>
<funcdef>SmcErrorHandler <function>SmcSetErrorHandler</function></funcdef>
<paramdef>SmcErrorHandler <parameter>handler</parameter></paramdef>
<para>
-<function>SmcSetErrorHandler</function> returns the previous error handler.
+<xref linkend='SmcSetErrorHandler' xrefstyle='select: title'/> returns the previous error handler.
</para>
<para>
-The <function>SmcErrorHandler</function> has the following type:
+The <xref linkend='SmcErrorHandler' xrefstyle='select: title'/> has the following type:
</para>
-<funcsynopsis>
+<funcsynopsis id='SmcErrorHandler'>
<funcprototype>
<funcdef>typedef void (*<function>SmcErrorHandler</function>)</funcdef>
<paramdef>SmcConn <parameter>smc_conn</parameter></paramdef>
<para>
Note that this error handler is invoked for protocol related errors.
To install an error handler to be invoked when an IO error occurs, use
-<function>IceSetIOErrorHandler</function> For further information, see
+<olink targetdoc='ICElib' targetptr='IceSetIOErrorHandler'><function>IceSetIOErrorHandler</function></olink> For further information, see
the <citetitle pubwork='article'>Inter-Client Exchange Library</citetitle>
standard.
</para>
</sect1>
</chapter>
-<chapter id='session_management_server'>
+<chapter id='Session_Management_Server_Sms_Functions'>
<title>Session Management Server (<acronym>Sms</acronym>) Functions</title>
<para>
</itemizedlist>
</para>
- <sect1 id='initializing_the_library'>
- <title>Initializing the Library</title>
+ <sect1 id='Initializing_the_Library'>
+<title>Initializing the Library</title>
<para>
-<function>SmsInitialize</function> is the first SMlib function that
+<xref linkend='SmsInitialize' xrefstyle='select: title'/> is the first SMlib function that
should be called by a session manager. It provides information about
the session manager and registers a callback that will be invoked each
time a new client connects to the session manager.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsInitialize'>
<funcprototype>
<funcdef>Status <function>SmsInitialize</function></funcdef>
- <paramdef>char *<parameter>vendor</parameter></paramdef>
- <paramdef>char *<parameter>release</parameter></paramdef>
+ <paramdef>const char *<parameter>vendor</parameter></paramdef>
+ <paramdef>const char *<parameter>release</parameter></paramdef>
<paramdef>SmsNewClientProc <parameter>new_client_proc</parameter></paramdef>
<paramdef>SmPointer <parameter>manager_data</parameter></paramdef>
<paramdef>IceHostBasedAuthProc <parameter>host_based_auth_proc</parameter></paramdef>
</varlistentry>
<varlistentry>
<term><parameter>manager_data</parameter></term>
- <listitem><para>When the <function>SmsNewClientProc</function> callback is invoked, this pointer to manager data will be passed.</para></listitem>
+ <listitem><para>When the <xref linkend='SmsNewClientProc' xrefstyle='select: title'/> callback is invoked, this pointer to manager data will be passed.</para></listitem>
</varlistentry>
<varlistentry>
<term><parameter>host_based_auth_proc</parameter></term>
</variablelist>
<para>
-After the <function>SmsInitialize</function> function is called, the
-session manager should call the <function>IceListenForConnections</function>
+After the <xref linkend='SmsInitialize' xrefstyle='select: title'/> function is called, the
+session manager should call the <olink targetdoc='ICElib' targetptr='IceListenForConnections'><function>IceListenForConnections</function></olink>
function to listen for new connections. Afterwards, each time a
client connects, the session manager should
-call <function>IceAcceptConnection</function>
+call <olink targetdoc='ICElib' targetptr='IceAcceptConnection'><function>IceAcceptConnection</function></olink>
</para>
<para>
-See <link linkend='authentication_of_clients'>section 9,
+See <link linkend='Authentication_of_Clients'>section 9,
“Authentication of Clients,”</link> for more details on
authentication (including host based authentication). Also see
the <citetitle pubwork='article'>Inter-Client Exchange
<para>
Each time a new client connects to the session manager,
-the <function>SmsNewClientProc</function> callback is invoked. The
+the <xref linkend='SmsNewClientProc' xrefstyle='select: title'/> callback is invoked. The
session manager obtains a new opaque connection object that it should
use for all future interaction with the client. At this time, the
session manager must also register a set of callbacks to respond to
the different messages that the client might send.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsNewClientProc'>
<funcprototype>
<funcdef>typedef Status (*<function>SmsNewClientProc</function>)</funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</variablelist>
<para>
-If a failure occurs, the <function>SmsNewClientProc</function> should
+If a failure occurs, the <xref linkend='SmsNewClientProc' xrefstyle='select: title'/> should
return a zero status as well as allocate and return a failure reason
string in <parameter>failure_reason_ret</parameter>.
SMlib will be responsible for freeing this memory.
} SmsCallbacks;
</synopsis>
- <sect2 id='the_register_client_callback'>
- <title>The Register Client Callback</title>
+ <sect2 id='The_Register_Client_Callback'>
+<title>The Register Client Callback</title>
<para>
The Register Client callback is the first callback that will be
invoked after the client connects to the session manager. Its type
-is <function>SmsRegisterClientProc</function>
+is <xref linkend='SmsRegisterClientProc' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsRegisterClientProc'>
<funcprototype>
<funcdef>typedef Status (*<function>SmsRegisterClientProc</function>)</funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
<para>
Otherwise, the session manager should register the client with a unique
-client ID by calling the <function>SmsRegisterClientReply</function>
+client ID by calling the <xref linkend='SmsRegisterClientReply' xrefstyle='select: title'/>
function (to be discussed shortly), and the
-<function>SmsRegisterClientProc</function> callback should return a
+<xref linkend='SmsRegisterClientProc' xrefstyle='select: title'/> callback should return a
status of one.
</para>
</sect2>
- <sect2 id='the_interact_request_callback'>
- <title>The Interact Request Callback</title>
+ <sect2 id='The_Interact_Request_Callback'>
+<title>The Interact Request Callback</title>
<para>
The Interact Request callback is of
-type <function>SmsInteractRequestProc</function>
+type <xref linkend='SmsInteractRequestProc' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsInteractRequestProc'>
<funcprototype>
<funcdef>typedef void (*<function>SmsInteractRequestProc</function>)</funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</para>
</sect2>
- <sect2 id='the_interact_done_callback'>
- <title>The Interact Done Callback</title>
+ <sect2 id='The_Interact_Done_Callback'>
+<title>The Interact Done Callback</title>
<para>
When the client is done interacting with the user,
-the <function>SmsInteractDoneProc</function> callback will be invoked.
+the <xref linkend='SmsInteractDoneProc' xrefstyle='select: title'/> callback will be invoked.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsInteractDoneProc'>
<funcprototype>
<funcdef>typedef void (*<function>SmsInteractDoneProc</function>)</funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</sect2>
- <sect2 id='the_save_yourself_request_callback'>
- <title>The Save Yourself Request Callback</title>
+ <sect2 id='The_Save_Yourself_Request_Callback'>
+<title>The Save Yourself Request Callback</title>
<para>
The Save Yourself Request callback is of
type <function>SmsSaveYourselfRequestProc</function>
</para>
-<funcsynopsis>
+<funcsynopsis id='SaveYourselfRequestProc'>
<funcprototype>
<funcdef>typedef void (*<function>SaveYourselfRequestProc</function>)</funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
checkpoint or shutdown. For information on the
<parameter>save_type</parameter>, <parameter>shutdown</parameter>,
<parameter>interact_style</parameter>, and <parameter>fast</parameter>
-arguments, see <link linkend='sending_a_save_yourself_message'>section 6.3,
+arguments, see <link linkend='Sending_a_Save_Yourself_Message'>section 6.3,
“Sending a Save Yourself Message.”</link>
</para>
</para>
</sect2>
- <sect2 id='the_save_yourself_phase_2_request_callback'>
- <title>The Save Yourself Phase 2 Request Callback</title>
+ <sect2 id='The_Save_Yourself_Phase_2_Request_Callback'>
+<title>The Save Yourself Phase 2 Request Callback</title>
<para>
The Save Yourself Phase 2 Request callback is of
-type <function>SmsSaveYourselfPhase2RequestProc</function>
+type <xref linkend='SmsSaveYourselfPhase2RequestProc' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsSaveYourselfPhase2RequestProc'>
<funcprototype>
<funcdef>typedef void (*<function>SmsSaveYourselfPhase2RequestProc</function>)</funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</para>
</sect2>
- <sect2 id='the_save_yourself_done_callback'>
- <title>The Save Yourself Done Callback</title>
+ <sect2 id='The_Save_Yourself_Done_Callback'>
+<title>The Save Yourself Done Callback</title>
<para>
When the client is done saving its state in response to a
the <function>SmsSaveYourselfDoneProc</function> will be invoked.
</para>
-<funcsynopsis>
+<funcsynopsis id='SaveYourselfDoneProc'>
<funcprototype>
<funcdef>typedef void (*<function>SaveYourselfDoneProc</function>)</funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</para>
</sect2>
- <sect2 id='the_connection_closed_callback'>
- <title>The Connection Closed Callback</title>
+ <sect2 id='The_Connection_Closed_Callback'>
+<title>The Connection Closed Callback</title>
<para>
If the client properly terminates (that is, it
-calls <function>SmcCloseConnection</function>,
-the <function>SmsCloseConnectionProc</function> callback is invoked.
+calls <xref linkend='SmcCloseConnection' xrefstyle='select: title'/>,
+the <xref linkend='SmsCloseConnectionProc' xrefstyle='select: title'/> callback is invoked.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsCloseConnectionProc'>
<funcprototype>
<funcdef>typedef void (*<function>SmsCloseConnectionProc</function>)</funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</para>
<para>
-Call <function>SmFreeReasons</function> to free the reason messages.
+Call <xref linkend='SmFreeReasons' xrefstyle='select: title'/> to free the reason messages.
For further information, see
-<link linkend='freeing_data'>section 8, “Freeing Data”</link>
+<link linkend='Freeing_Data'>section 8, “Freeing Data”</link>
</para>
</sect2>
- <sect2 id='the_set_properties_callback'>
- <title>The Set Properties Callback</title>
+ <sect2 id='The_Set_Properties_Callback'>
+<title>The Set Properties Callback</title>
<para>
When the client sets session management properties,
-the <function>SmsSetPropertiesProc</function> callback will be invoked.
+the <xref linkend='SmsSetPropertiesProc' xrefstyle='select: title'/> callback will be invoked.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsSetPropertiesProc'>
<funcprototype>
<funcdef>typedef void (*<function>SmsSetPropertiesProc</function>)</funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
The properties are specified as an array of property pointers. For a
description of session management properties and
the <structname>SmProp</structname> structure,
-see <link linkend='session_management_properties'>section 7,
+see <link linkend='Session_Management_Properties'>section 7,
“Session Management Properties.”</link>
</para>
</para>
<para>
-To free each property, use <function>SmFreeProperty</function>.
-For further information, see <link linkend='freeing_data'>section 8,
+To free each property, use <xref linkend='SmFreeProperty' xrefstyle='select: title'/>.
+For further information, see <link linkend='Freeing_Data'>section 8,
“Freeing Data”</link> You should free the actual array of
pointers with a call to <function>free</function>
</para>
</sect2>
- <sect2 id='the_delete_properties_callback'>
- <title>The Delete Properties Callback</title>
+ <sect2 id='The_Delete_Properties_Callback'>
+<title>The Delete Properties Callback</title>
<para>
When the client deletes session management properties,
-the <function>SmsDeletePropertiesProc</function> callback will be invoked.
+the <xref linkend='SmsDeletePropertiesProc' xrefstyle='select: title'/> callback will be invoked.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsDeletePropertiesProc'>
<funcprototype>
<funcdef>typedef void (*<function>SmsDeletePropertiesProc</function>)</funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
The properties are specified as an array of strings. For a
description of session management properties and
the <structname>SmProp</structname> structure,
-see <link linkend='session_management_properties'>section 7,
+see <link linkend='Session_Management_Properties'>section 7,
“Session Management Properties.”</link>
</para>
</sect2>
- <sect2 id='the_get_properties_callback'>
- <title>The Get Properties Callback</title>
+ <sect2 id='The_Get_Properties_Callback'>
+<title>The Get Properties Callback</title>
<para>
-The <function>SmsGetPropertiesProc</function> callback is invoked when
+The <xref linkend='SmsGetPropertiesProc' xrefstyle='select: title'/> callback is invoked when
the client wants to retrieve properties it set.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsGetPropertiesProc'>
<funcprototype>
<funcdef>typedef void (*<function>SmsGetPropertiesProc</function>)</funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
<para>
The session manager should respond by
-calling <function>SmsReturnProperties</function>.
+calling <xref linkend='SmsReturnProperties' xrefstyle='select: title'/>.
All of the properties set for this client should be returned.
</para>
</sect2>
</sect1>
- <sect1 id='registering_the_client'>
- <title>Registering the Client</title>
+ <sect1 id='Registering_the_Client'>
+<title>Registering the Client</title>
<para>
To register a client (in response to
-a <function>SmsRegisterClientProc</function> callback),
-use <function>SmsRegisterClientReply</function>.
+a <xref linkend='SmsRegisterClientProc' xrefstyle='select: title'/> callback),
+use <xref linkend='SmsRegisterClientReply' xrefstyle='select: title'/>.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsRegisterClientReply'>
<funcprototype>
<funcdef>Status <function>SmsRegisterClientReply</function></funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</variablelist>
<para>
-The return value of <function>SmsRegisterClientReply</function> is
+The return value of <xref linkend='SmsRegisterClientReply' xrefstyle='select: title'/> is
zero for failure and a positive value for success. Failure will occur
if SMlib can not allocate memory to hold a copy of the client ID for
it's own internal needs.
</para>
<para>
-You should call the <function>SmsGenerateClientID</function> function
+You should call the <xref linkend='SmsGenerateClientID' xrefstyle='select: title'/> function
to generate a globally unique client ID.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsGenerateClientID'>
<funcprototype>
<funcdef>char *<function>SmsGenerateClientID</function></funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</para>
</sect1>
- <sect1 id='sending_a_save_yourself_message'>
- <title>Sending a Save Yourself Message</title>
+ <sect1 id='Sending_a_Save_Yourself_Message'>
+<title>Sending a Save Yourself Message</title>
<para>
To send a “Save Yourself” to a client,
-use <function>SmsSaveYourself</function>.
+use <xref linkend='SmsSaveYourself' xrefstyle='select: title'/>.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsSaveYourself'>
<funcprototype>
<funcdef>void <function>SmsSaveYourself</function></funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</para>
</sect1>
- <sect1 id='sending_a_save_yourself_phase_2_message'>
- <title>Sending a Save Yourself Phase 2 Message</title>
+ <sect1 id='Sending_a_Save_Yourself_Phase_2_Message'>
+<title>Sending a Save Yourself Phase 2 Message</title>
<para>
In order to send a “Save Yourself Phase 2” message to a
-client, use <function>SmsSaveYourselfPhase2</function>
+client, use <xref linkend='SmsSaveYourselfPhase2' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsSaveYourselfPhase2'>
<funcprototype>
<funcdef>void <function>SmsSaveYourselfPhase2</function></funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</para>
</sect1>
- <sect1 id='sending_an_interact_message'>
- <title>Sending an Interact Message</title>
+ <sect1 id='Sending_an_Interact_Message'>
+<title>Sending an Interact Message</title>
<para>
To send an “Interact” message to a client,
-use <function>SmsInteract</function>.
+use <xref linkend='SmsInteract' xrefstyle='select: title'/>.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsInteract'>
<funcprototype>
<funcdef>void <function>SmsInteract</function></funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</para>
</sect1>
- <sect1 id='sending_a_save_complete_message'>
- <title>Sending a Save Complete Message</title>
+ <sect1 id='Sending_a_Save_Complete_Message'>
+<title>Sending a Save Complete Message</title>
<para>
To send a “Save Complete” message to a client,
-use <function>SmsSaveComplete</function>.
+use <xref linkend='SmsSaveComplete' xrefstyle='select: title'/>.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsSaveComplete'>
<funcprototype>
<funcdef>void <function>SmsSaveComplete</function></funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</para>
</sect1>
- <sect1 id='sending_a_die_message'>
- <title>Sending a Die Message</title>
+ <sect1 id='Sending_a_Die_Message'>
+<title>Sending a Die Message</title>
<para>
To send a “Die” message to a client,
-use <function>SmsDie</function>.
+use <xref linkend='SmsDie' xrefstyle='select: title'/>.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsDie'>
<funcprototype>
<funcdef>void <function>SmsDie</function></funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</para>
</sect1>
- <sect1 id='cancelling_a_shutdown'>
- <title>Cancelling a Shutdown</title>
+ <sect1 id='Cancelling_a_Shutdown'>
+<title>Cancelling a Shutdown</title>
<para>
-To cancel a shutdown, use <function>SmsShutdownCancelled</function>.
+To cancel a shutdown, use <xref linkend='SmsShutdownCancelled' xrefstyle='select: title'/>.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsShutdownCancelled'>
<funcprototype>
<funcdef>void <function>SmsShutdownCancelled</function></funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</sect1>
<!-- aaaaaaaaaaaaaaaaa -->
- <sect1 id='returning_properties'>
- <title>Returning Properties</title>
+ <sect1 id='Returning_Properties'>
+<title>Returning Properties</title>
<para>
In response to a “Get Properties” message, the session
-manager should call <function>SmsReturnProperties</function>.
+manager should call <xref linkend='SmsReturnProperties' xrefstyle='select: title'/>.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsReturnProperties'>
<funcprototype>
<funcdef>void <function>SmsReturnProperties</function></funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
The properties are returned as an array of property pointers. For a
description of session management properties and
the <structname>SmProp</structname> structure,
-see <link linkend='session_management_properties'>section 7,
+see <link linkend='Session_Management_Properties'>section 7,
“Session Management Properties.”</link>
</para>
</sect1>
- <sect1 id='pinging_a_client'>
- <title>Pinging a Client</title>
+ <sect1 id='Pinging_a_Client'>
+<title>Pinging a Client</title>
<para>
To check that a client is still alive, you should use
-the <function>IcePing</function> function provided by the ICE library.
+the <olink targetdoc='ICElib' targetptr='IcePing'><function>IcePing</function></olink> function provided by the ICE library.
To do so, the ICE connection must be obtained using
-the <function>SmsGetIceConnection</function>
-(see <link linkend='using_sms_informational_functions'>section 6.12,
+the <xref linkend='SmsGetIceConnection' xrefstyle='select: title'/>
+(see <link linkend='Using_Sms_Informational_Functions'>section 6.12,
“Using Sms Informational Functions”</link>).
</para>
-<funcsynopsis>
+<funcsynopsis id='IcePing'>
<funcprototype>
<funcdef>void <function>IcePing</function></funcdef>
<paramdef>IceConn <parameter>ice_conn</parameter></paramdef>
</varlistentry>
<varlistentry>
<term><parameter>client_data</parameter></term>
- <listitem><para>This pointer will be passed to the <function>IcePingReplyProc</function> callback.</para></listitem>
+ <listitem><para>This pointer will be passed to the <xref linkend='IcePingReplyProc' xrefstyle='select: title'/> callback.</para></listitem>
</varlistentry>
</variablelist>
<para>
When the Ping reply is ready (if ever),
-the <function>IcePingReplyProc</function> callback will be invoked. A
+the <xref linkend='IcePingReplyProc' xrefstyle='select: title'/> callback will be invoked. A
session manager should have some sort of timeout period, after which
it assumes the client has unexpectedly died.
</para>
-<funcsynopsis>
+<funcsynopsis id='IcePingReplyProc'>
<funcprototype>
<funcdef>typedef void (*<function>IcePingReplyProc</function>)</funcdef>
<paramdef>IceConn <parameter>ice_conn</parameter></paramdef>
</varlistentry>
<varlistentry>
<term><parameter>client_data</parameter></term>
- <listitem><para>The client data specified in the call to <function>IcePing</function></para></listitem>
+ <listitem><para>The client data specified in the call to <olink targetdoc='ICElib' targetptr='IcePing'><function>IcePing</function></olink></para></listitem>
</varlistentry>
</variablelist>
</sect1>
- <sect1 id='cleaning_up_after_a_client_disconnects'>
- <title>Cleaning Up After a Client Disconnects</title>
+ <sect1 id='Cleaning_Up_After_a_Client_Disconnects'>
+<title>Cleaning Up After a Client Disconnects</title>
<para>
When the session manager receives a “Connection Closed”
message or otherwise detects that the client aborted the connection,
-it should call the <function>SmsCleanUp</function> function in order
+it should call the <xref linkend='SmsCleanUp' xrefstyle='select: title'/> function in order
to free up the connection object.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsCleanUp'>
<funcprototype>
<funcdef>void <function>SmsCleanUp</function></funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</sect1>
- <sect1 id='using_sms_informational_functions'>
- <title>Using Sms Informational Functions</title>
+ <sect1 id='Using_Sms_Informational_Functions'>
+<title>Using Sms Informational Functions</title>
-<funcsynopsis>
+<funcsynopsis id='SmsProtocolVersion'>
<funcprototype>
<funcdef>int <function>SmsProtocolVersion</function></funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</funcsynopsis>
<para>
-<function>SmsProtocolVersion</function> returns the major version of
+<xref linkend='SmsProtocolVersion' xrefstyle='select: title'/> returns the major version of
the session management protocol associated with this session.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsProtocolRevision'>
<funcprototype>
<funcdef>int <function>SmsProtocolRevision</function></funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</funcsynopsis>
<para>
-<function>SmsProtocolRevision</function> returns the minor version of
+<xref linkend='SmsProtocolRevision' xrefstyle='select: title'/> returns the minor version of
the session management protocol associated with this session.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsClientID'>
<funcprototype>
<funcdef>char *<function>SmsClientID</function></funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</funcsynopsis>
<para>
-<function>SmsClientID</function> returns a null-terminated string for
+<xref linkend='SmsClientID' xrefstyle='select: title'/> returns a null-terminated string for
the client ID associated with this connection. You should
call <function>free</function> on this pointer when the client ID is
no longer needed.
<para>
To obtain the host name of a client,
-use <function>SmsClientHostName</function>.
+use <xref linkend='SmsClientHostName' xrefstyle='select: title'/>.
This host name will be needed to restart the client.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsClientHostName'>
<funcprototype>
<funcdef>char *<function>SmsClientHostName</function></funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
it is no longer needed.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsGetIceConnection'>
<funcprototype>
<funcdef>IceConn <function>SmsGetIceConnection</function></funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
</funcsynopsis>
<para>
-<function>SmsGetIceConnection</function> returns the ICE connection
+<xref linkend='SmsGetIceConnection' xrefstyle='select: title'/> returns the ICE connection
object associated with this session management connection object. The
ICE connection object can be used to get some additional information
about the connection. Some of the more useful functions which can be
</para>
</sect1>
- <sect1 id='error_handling2'>
- <title>Error Handling</title>
+ <sect1 id='Error_Handling_2'>
+<title>Error Handling</title>
<para>
If the session manager receives an unexpected protocol error from a
client, an error handler is invoked by SMlib. A default error handler
exists which simply prints the error message (it does not exit). The
session manager can change this error handler by
-calling <function>SmsSetErrorHandler</function>.
+calling <xref linkend='SmsSetErrorHandler' xrefstyle='select: title'/>.
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsSetErrorHandler'>
<funcprototype>
<funcdef>SmsErrorHandler <function>SmsSetErrorHandler</function></funcdef>
<paramdef>SmsErrorHandler <parameter>handler</parameter></paramdef>
</para>
<para>
-<function>SmsSetErrorHandler</function> returns the previous error handler.
-The <function>SmsErrorHandler</function> has the following type:
+<xref linkend='SmsSetErrorHandler' xrefstyle='select: title'/> returns the previous error handler.
+The <xref linkend='SmsErrorHandler' xrefstyle='select: title'/> has the following type:
</para>
-<funcsynopsis>
+<funcsynopsis id='SmsErrorHandler'>
<funcprototype>
<funcdef>typedef void (*<function>SmsErrorHandler</function>)</funcdef>
<paramdef>SmsConn <parameter>sms_conn</parameter></paramdef>
<para>
Note that this error handler is invoked for protocol related errors.
To install an error handler to be invoked when an IO error occurs,
-use <function>IceSetIOErrorHandler</function>.
+use <olink targetdoc='ICElib' targetptr='IceSetIOErrorHandler'><function>IceSetIOErrorHandler</function></olink>.
For further information, see the
<citetitle pubwork='article'>Inter-Client Exchange Library</citetitle>
standard.
</sect1>
</chapter>
-<chapter id='session_management_properties'>
+<chapter id='Session_Management_Properties'>
<title>Session Management Properties</title>
<para>
bytes.
</para>
-<informaltable pgwide='0' frame='none'>
- <tgroup cols='4' align='center'>
- <colspec colname='c1'/>
- <colspec colname='c2'/>
- <colspec colname='c3'/>
- <colspec colname='c4'/>
+<informaltable pgwide='0' frame='topbot'>
+ <tgroup cols='4' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='2.0*'/>
+ <colspec colname='c2' colwidth='2.0*'/>
+ <colspec colname='c3' colwidth='2.0*'/>
+ <colspec colname='c4' colwidth='1.0*'/>
<thead>
- <row>
- <entry align='left'>Name</entry>
- <entry align='left'>Type</entry>
- <entry align='left'><acronym>POSIX</acronym> Type</entry>
- <entry align='center'>Required</entry>
+ <row rowsep='1'>
+ <entry>Name</entry>
+ <entry>Type</entry>
+ <entry><acronym>POSIX</acronym> Type</entry>
+ <entry>Required</entry>
</row>
</thead>
<tbody>
<row>
- <entry align='left'><property>SmCloneCommand</property></entry>
- <entry align='left'>OS-specific</entry>
- <entry align='left'><type>SmLISTofARRAY8</type></entry>
- <entry align='center'>Yes</entry>
+ <entry><property>SmCloneCommand</property></entry>
+ <entry>OS-specific</entry>
+ <entry><type>SmLISTofARRAY8</type></entry>
+ <entry>Yes</entry>
</row>
<row>
- <entry align='left'><property>SmCurrentDirectory</property></entry>
- <entry align='left'>OS-specific</entry>
- <entry align='left'><type>SmARRAY8</type></entry>
- <entry align='center'>No</entry>
+ <entry><property>SmCurrentDirectory</property></entry>
+ <entry>OS-specific</entry>
+ <entry><type>SmARRAY8</type></entry>
+ <entry>No</entry>
</row>
<row>
- <entry align='left'><property>SmDiscardCommand</property></entry>
- <entry align='left'>OS-specific</entry>
- <entry align='left'><type>SmLISTofARRAY8</type></entry>
- <entry align='center'>No*</entry>
+ <entry><property>SmDiscardCommand</property></entry>
+ <entry>OS-specific</entry>
+ <entry><type>SmLISTofARRAY8</type></entry>
+ <entry>No*</entry>
</row>
<row>
- <entry align='left'><property>SmEnvironment</property></entry>
- <entry align='left'>OS-specific</entry>
- <entry align='left'><type>SmLISTofARRAY8</type></entry>
- <entry align='center'>No</entry>
+ <entry><property>SmEnvironment</property></entry>
+ <entry>OS-specific</entry>
+ <entry><type>SmLISTofARRAY8</type></entry>
+ <entry>No</entry>
</row>
<row>
- <entry align='left'><property>SmProcessID</property></entry>
- <entry align='left'>OS-specific</entry>
- <entry align='left'><type>SmARRAY8</type></entry>
- <entry align='center'>No</entry>
+ <entry><property>SmProcessID</property></entry>
+ <entry>OS-specific</entry>
+ <entry><type>SmARRAY8</type></entry>
+ <entry>No</entry>
</row>
<row>
- <entry align='left'><property>SmProgram</property></entry>
- <entry align='left'>OS-specific</entry>
- <entry align='left'><type>SmARRAY8</type></entry>
- <entry align='center'>Yes</entry>
+ <entry><property>SmProgram</property></entry>
+ <entry>OS-specific</entry>
+ <entry><type>SmARRAY8</type></entry>
+ <entry>Yes</entry>
</row>
<row>
- <entry align='left'><property>SmRestartCommand</property></entry>
- <entry align='left'>OS-specific</entry>
- <entry align='left'><type>SmLISTofARRAY8</type></entry>
- <entry align='center'>Yes</entry>
+ <entry><property>SmRestartCommand</property></entry>
+ <entry>OS-specific</entry>
+ <entry><type>SmLISTofARRAY8</type></entry>
+ <entry>Yes</entry>
</row>
<row>
- <entry align='left'><property>SmResignCommand</property></entry>
- <entry align='left'>OS-specific</entry>
- <entry align='left'><type>SmLISTofARRAY8</type></entry>
- <entry align='center'>No</entry>
+ <entry><property>SmResignCommand</property></entry>
+ <entry>OS-specific</entry>
+ <entry><type>SmLISTofARRAY8</type></entry>
+ <entry>No</entry>
</row>
<row>
- <entry align='left'><property>SmRestartStyleHint</property></entry>
- <entry align='left'><type>SmCARD8</type></entry>
- <entry align='left'><type>SmCARD8</type></entry>
- <entry align='center'>No</entry>
+ <entry><property>SmRestartStyleHint</property></entry>
+ <entry><type>SmCARD8</type></entry>
+ <entry><type>SmCARD8</type></entry>
+ <entry>No</entry>
</row>
<row>
- <entry align='left'><property>SmShutdownCommand</property></entry>
- <entry align='left'>OS-specific</entry>
- <entry align='left'><type>SmLISTofARRAY8</type></entry>
- <entry align='center'>No</entry>
+ <entry><property>SmShutdownCommand</property></entry>
+ <entry>OS-specific</entry>
+ <entry><type>SmLISTofARRAY8</type></entry>
+ <entry>No</entry>
</row>
<row>
- <entry align='left'><property>SmUserID</property></entry>
- <entry align='left'><type>SmARRAY8</type></entry>
- <entry align='left'><type>SmARRAY8</type></entry>
- <entry align='center'>Yes</entry>
+ <entry><property>SmUserID</property></entry>
+ <entry><type>SmARRAY8</type></entry>
+ <entry><type>SmARRAY8</type></entry>
+ <entry>Yes</entry>
</row>
</tbody>
</tgroup>
<constant>SmRestartIfRunning</constant> is assumed.
The possible values are as follows:
-<informaltable pgwide='0' frame='none'>
- <tgroup cols='2' align='center'>
- <colspec colname='c1'/>
- <colspec colname='c2'/>
+<informaltable frame='topbot'>
+ <?dbfo keep-together="always" ?>
+ <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+ <colspec colname='c1' colwidth='1.0*'/>
+ <colspec colname='c2' colwidth='1.5*'/>
<thead>
- <row>
- <entry align='left'>Name</entry>
- <entry align='right'>Value</entry>
+ <row rowsep='1'>
+ <entry>Name</entry>
+ <entry>Value</entry>
</row>
</thead>
<tbody>
<row>
- <entry align='left'><constant>SmRestartIfRunning</constant></entry>
- <entry align='right'>0</entry>
+ <entry><constant>SmRestartIfRunning</constant></entry>
+ <entry>0</entry>
</row>
<row>
- <entry align='left'><constant>SmRestartAnyway</constant></entry>
- <entry align='right'>1</entry>
+ <entry><constant>SmRestartAnyway</constant></entry>
+ <entry>1</entry>
</row>
<row>
- <entry align='left'><constant>SmRestartImmediately</constant></entry>
- <entry align='right'>2</entry>
+ <entry><constant>SmRestartImmediately</constant></entry>
+ <entry>2</entry>
</row>
<row>
- <entry align='left'><constant>SmRestartNever</constant></entry>
- <entry align='right'>3</entry>
+ <entry><constant>SmRestartNever</constant></entry>
+ <entry>3</entry>
</row>
</tbody>
</tgroup>
</itemizedlist>
</chapter>
-<chapter id='freeing_data'>
+<chapter id='Freeing_Data'>
<title>Freeing Data</title>
<para>
-To free an individual property, use <function>SmFreeProperty</function>
+To free an individual property, use <xref linkend='SmFreeProperty' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmFreeProperty'>
<funcprototype>
<funcdef>void <function>SmFreeProperty</function></funcdef>
<paramdef>SmProp *<parameter>prop</parameter></paramdef>
<para>
To free the reason strings from
-the <function>SmsCloseConnectionProc</function> callback,
-use <function>SmFreeReasons</function>
+the <xref linkend='SmsCloseConnectionProc' xrefstyle='select: title'/> callback,
+use <xref linkend='SmFreeReasons' xrefstyle='select: title'/>
</para>
-<funcsynopsis>
+<funcsynopsis id='SmFreeReasons'>
<funcprototype>
<funcdef>void <function>SmFreeReasons</function></funcdef>
<paramdef>int <parameter>count</parameter></paramdef>
</variablelist>
</chapter>
-<chapter id='authentication_of_clients'>
+<chapter id='Authentication_of_Clients'>
<title>Authentication of Clients</title>
<para>
</para>
</chapter>
-<chapter id='working_in_a_multithreaded_environment'>
+<chapter id='Working_in_a_Multi_Threaded_Environment'>
<title>Working in a Multi-Threaded Environment</title>
<para>
</para>
</chapter>
-<chapter id='acknowledgements'>
+<chapter id='Acknowledgements'>
<title>Acknowledgements</title>
<para>