1
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3
3
<title>libircclient: Initiating and destroying IRC session.</title>
4
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
5
<link href="tabs.css" rel="stylesheet" type="text/css">
7
<!-- Generated by Doxygen 1.4.6 -->
10
<li><a href="index.html"><span>Main Page</span></a></li>
11
<li><a href="modules.html"><span>Modules</span></a></li>
12
<li><a href="annotated.html"><span>Data Structures</span></a></li>
13
<li><a href="files.html"><span>Files</span></a></li>
14
<li><a href="pages.html"><span>Related Pages</span></a></li>
7
<!-- Generated by Doxygen 1.5.6 -->
8
<div class="navigation" id="top">
11
<li><a href="index.html"><span>Main Page</span></a></li>
12
<li><a href="pages.html"><span>Related Pages</span></a></li>
13
<li><a href="modules.html"><span>Modules</span></a></li>
14
<li><a href="annotated.html"><span>Data Structures</span></a></li>
15
<li><a href="files.html"><span>Files</span></a></li>
19
<div class="contents">
16
20
<h1>Initiating and destroying IRC session.</h1><table border="0" cellpadding="0" cellspacing="0">
18
22
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
24
28
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroys previously created IRC session. <a href="#g30c6cea4f149632d1905b097a3a573f7"></a><br></td></tr>
26
30
<hr><h2>Function Documentation</h2>
27
<a class="anchor" name="gc5dada35ee77795d8bb77b6701853b98"></a><!-- doxytag: member="libircclient.h::irc_create_session" ref="gc5dada35ee77795d8bb77b6701853b98" args="(irc_callbacks_t *callbacks)" --><p>
28
<table class="mdTable" cellpadding="2" cellspacing="0">
31
<table cellpadding="0" cellspacing="0" border="0">
31
<a class="anchor" name="gc5dada35ee77795d8bb77b6701853b98"></a><!-- doxytag: member="libircclient.h::irc_create_session" ref="gc5dada35ee77795d8bb77b6701853b98" args="(irc_callbacks_t *callbacks)" -->
33
<div class="memproto">
34
<table class="memname">
33
<td class="md" nowrap valign="top"><a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5">irc_session_t</a> * irc_create_session </td>
34
<td class="md" valign="top">( </td>
35
<td class="md" nowrap valign="top"><a class="el" href="structirc__callbacks__t.html">irc_callbacks_t</a> * </td>
36
<td class="mdname1" valign="top" nowrap> <em>callbacks</em> </td>
37
<td class="md" valign="top"> ) </td>
38
<td class="md" nowrap></td>
36
<td class="memname"><a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5">irc_session_t</a> * irc_create_session </td>
38
<td class="paramtype"><a class="el" href="structirc__callbacks__t.html">irc_callbacks_t</a> * </td>
39
<td class="paramname"> <em>callbacks</em> </td>
40
<td> ) </td>
44
<table cellspacing="5" cellpadding="0" border="0">
52
48
Creates and initiates a new IRC session.
56
52
<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>
59
<dl compact><dt><b>Returns:</b></dt><dd>An <a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5">irc_session_t</a> object, or 0 if creation failed. Usually, failure is caused by out of memory error.</dd></dl>
60
Every <a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5">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>
61
Every session created must be destroyed when it is not needed anymore by calling <a class="el" href="group__initclose.html#g30c6cea4f149632d1905b097a3a573f7">irc_destroy_session()</a>.<p>
62
The most common function sequence is: <div class="fragment"><pre class="fragment"> ... prepare <a class="code" href="structirc__callbacks__t.html">irc_callbacks_t</a> structure ...
63
<a class="code" href="group__initclose.html#gc5dada35ee77795d8bb77b6701853b98">irc_create_session</a>();
64
<a class="code" href="group__conndisc.html#g121b23c9e131da651175ae779e1b6851">irc_connect</a>();
65
<a class="code" href="group__running.html#g112631b75eb9997868d73fede17440d0">irc_run</a>();
66
<a class="code" href="group__initclose.html#g30c6cea4f149632d1905b097a3a573f7">irc_destroy_session</a>();
55
<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>
56
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>
57
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>
58
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 ...
59
<a class="code" href="group__initclose.html#gc5dada35ee77795d8bb77b6701853b98" title="Creates and initiates a new IRC session.">irc_create_session</a>();
60
<a class="code" href="group__conndisc.html#g121b23c9e131da651175ae779e1b6851" title="Initiates a connection to IRC server.">irc_connect</a>();
61
<a class="code" href="group__running.html#g112631b75eb9997868d73fede17440d0" title="Goes into forever-loop, processing IRC events and generating callbacks.">irc_run</a>();
62
<a class="code" href="group__initclose.html#g30c6cea4f149632d1905b097a3a573f7" title="Destroys previously created IRC session.">irc_destroy_session</a>();
68
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__initclose.html#g30c6cea4f149632d1905b097a3a573f7">irc_destroy_session</a> </dd></dl>
72
<a class="anchor" name="g30c6cea4f149632d1905b097a3a573f7"></a><!-- doxytag: member="libircclient.h::irc_destroy_session" ref="g30c6cea4f149632d1905b097a3a573f7" args="(irc_session_t *session)" --><p>
73
<table class="mdTable" cellpadding="2" cellspacing="0">
76
<table cellpadding="0" cellspacing="0" border="0">
64
<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>
68
<a class="anchor" name="g30c6cea4f149632d1905b097a3a573f7"></a><!-- doxytag: member="libircclient.h::irc_destroy_session" ref="g30c6cea4f149632d1905b097a3a573f7" args="(irc_session_t *session)" -->
70
<div class="memproto">
71
<table class="memname">
78
<td class="md" nowrap valign="top">void irc_destroy_session </td>
79
<td class="md" valign="top">( </td>
80
<td class="md" nowrap valign="top"><a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5">irc_session_t</a> * </td>
81
<td class="mdname1" valign="top" nowrap> <em>session</em> </td>
82
<td class="md" valign="top"> ) </td>
83
<td class="md" nowrap></td>
73
<td class="memname">void irc_destroy_session </td>
75
<td class="paramtype"><a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5">irc_session_t</a> * </td>
76
<td class="paramname"> <em>session</em> </td>
77
<td> ) </td>
89
<table cellspacing="5" cellpadding="0" border="0">
97
85
Destroys previously created IRC session.
101
89
<tr><td valign="top"></td><td valign="top"><em>session</em> </td><td>A session to destroy. Must not be NULL.</td></tr>
104
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. </td>
107
<hr size="1"><address style="align: right;"><small>Generated on Tue Aug 29 21:52:31 2006 for libircclient by
92
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.
96
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 3 15:01:06 2009 for libircclient by
108
97
<a href="http://www.doxygen.org/index.html">
109
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
98
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>