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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>libircclient: Initiating and destroying IRC session.</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>Initiating and destroying IRC session.</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5">irc_session_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__initclose.html#gc5dada35ee77795d8bb77b6701853b98">irc_create_session</a> (<a class="el" href="structirc__callbacks__t.html">irc_callbacks_t</a> *callbacks)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates and initiates a new IRC session. <a href="#gc5dada35ee77795d8bb77b6701853b98"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__initclose.html#g30c6cea4f149632d1905b097a3a573f7">irc_destroy_session</a> (<a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5">irc_session_t</a> *session)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys previously created IRC session. <a href="#g30c6cea4f149632d1905b097a3a573f7"></a><br></td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="gc5dada35ee77795d8bb77b6701853b98"></a><!-- doxytag: member="libircclient.h::irc_create_session" ref="gc5dada35ee77795d8bb77b6701853b98" args="(irc_callbacks_t *callbacks)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5">irc_session_t</a> * irc_create_session </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structirc__callbacks__t.html">irc_callbacks_t</a> * </td>
<td class="paramname"> <em>callbacks</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates and initiates a new IRC session.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>callbacks</em> </td><td>A structure, which defines several callbacks, which will be called on appropriate events. Must not be NULL.</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>An <a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5" title="A libircclient IRC session.">irc_session_t</a> object, or 0 if creation failed. Usually, failure is caused by out of memory error.</dd></dl>
Every <a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5" title="A libircclient IRC session.">irc_session_t</a> object describes a single IRC session - a connection to an IRC server, and possibly to some DCC clients. Almost every irc_* function requires this object to be passed to, and therefore this function should be called first.<p>
Every session created must be destroyed when it is not needed anymore by calling <a class="el" href="group__initclose.html#g30c6cea4f149632d1905b097a3a573f7" title="Destroys previously created IRC session.">irc_destroy_session()</a>.<p>
The most common function sequence is: <div class="fragment"><pre class="fragment"> ... prepare <a class="code" href="structirc__callbacks__t.html" title="Event callbacks structure.">irc_callbacks_t</a> structure ...
<a class="code" href="group__initclose.html#gc5dada35ee77795d8bb77b6701853b98" title="Creates and initiates a new IRC session.">irc_create_session</a>();
<a class="code" href="group__conndisc.html#g121b23c9e131da651175ae779e1b6851" title="Initiates a connection to IRC server.">irc_connect</a>();
<a class="code" href="group__running.html#g112631b75eb9997868d73fede17440d0" title="Goes into forever-loop, processing IRC events and generating callbacks.">irc_run</a>();
<a class="code" href="group__initclose.html#g30c6cea4f149632d1905b097a3a573f7" title="Destroys previously created IRC session.">irc_destroy_session</a>();
</pre></div><p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__initclose.html#g30c6cea4f149632d1905b097a3a573f7" title="Destroys previously created IRC session.">irc_destroy_session</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="g30c6cea4f149632d1905b097a3a573f7"></a><!-- doxytag: member="libircclient.h::irc_destroy_session" ref="g30c6cea4f149632d1905b097a3a573f7" args="(irc_session_t *session)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void irc_destroy_session </td>
<td>(</td>
<td class="paramtype"><a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5">irc_session_t</a> * </td>
<td class="paramname"> <em>session</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Destroys previously created IRC session.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>session</em> </td><td>A session to destroy. Must not be NULL.</td></tr>
</table>
</dl>
This function should be used to destroy an IRC session, close the connection to the IRC server, and free all the used resources. After calling this function, you should not use this session object anymore.
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 3 15:01:06 2009 for libircclient by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>
|