17:39
[skypekit:skypekit.git] / skypekit_2.0.0.190_29281_CB30 / interfaces / skype / cpp_embedded / documentation / html / skype-tcp-transport_8h_source.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <title>SkypeKit C++ Wrapper: Main Page</title>
6 <link href="tabs.css" rel="stylesheet" type="text/css"/>
7 <link href="islander.css" rel="stylesheet" type="text/css"/>
8 </head>
9 <body>
10 <img src="..\skypekit.png" align="right">
11 <!-- Generated by Doxygen 1.6.2 -->
12 <script type="text/javascript">
13 <!--
14 function changeDisplayState (e){
15   var num=this.id.replace(/[^[0-9]/g,'');
16   var button=this.firstChild;
17   var sectionDiv=document.getElementById('dynsection'+num);
18   if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
19     sectionDiv.style.display='block';
20     button.src='open.gif';
21   }else{
22     sectionDiv.style.display='none';
23     button.src='closed.gif';
24   }
25 }
26 function initDynSections(){
27   var divs=document.getElementsByTagName('div');
28   var sectionCounter=1;
29   for(var i=0;i<divs.length-1;i++){
30     if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
31       var header=divs[i];
32       var section=divs[i+1];
33       var button=header.firstChild;
34       if (button!='IMG'){
35         divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
36         button=document.createElement('img');
37         divs[i].insertBefore(button,divs[i].firstChild);
38       }
39       header.style.cursor='pointer';
40       header.onclick=changeDisplayState;
41       header.id='dynheader'+sectionCounter;
42       button.src='closed.gif';
43       section.id='dynsection'+sectionCounter;
44       section.style.display='none';
45       section.style.marginLeft='14px';
46       sectionCounter++;
47     }
48   }
49 }
50 window.onload = initDynSections;
51 -->
52 </script>
53 <div class="navigation" id="top">
54   <div class="tabs">
55     <ul>
56       <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
57       <li><a href="annotated.html"><span>Classes</span></a></li>
58       <li class="current"><a href="files.html"><span>Files</span></a></li>
59       <li><a href="examples.html"><span>Examples</span></a></li>
60     </ul>
61   </div>
62   <div class="tabs">
63     <ul>
64       <li><a href="files.html"><span>File&nbsp;List</span></a></li>
65       <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
66     </ul>
67   </div>
68 <h1>skype-tcp-transport.h</h1><a href="skype-tcp-transport_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
69 <a name="l00002"></a>00002 <span class="preprocessor">#ifndef __SKYPE_TCP_TRANSPORT_H</span>
70 <a name="l00003"></a>00003 <span class="preprocessor"></span><span class="preprocessor">#define __SKYPE_TCP_TRANSPORT_H</span>
71 <a name="l00004"></a>00004 <span class="preprocessor"></span>
72 <a name="l00005"></a>00005 <span class="preprocessor">#ifndef SE_NO_TCP_TRANSPORT</span>
73 <a name="l00006"></a>00006 <span class="preprocessor"></span>
74 <a name="l00007"></a>00007 <span class="preprocessor">#include &quot;<a class="code" href="skype-transport_8h.html">skype-transport.h</a>&quot;</span>
75 <a name="l00008"></a>00008 <span class="comment"></span>
76 <a name="l00009"></a>00009 <span class="comment">/**</span>
77 <a name="l00010"></a>00010 <span class="comment"> * \class SETCPTransport</span>
78 <a name="l00011"></a>00011 <span class="comment"> * \brief TCP transport to skypekit</span>
79 <a name="l00012"></a>00012 <span class="comment"> *</span>
80 <a name="l00013"></a>00013 <span class="comment"> * Use this only if Unix sockets are not supported on your platform.</span>
81 <a name="l00014"></a>00014 <span class="comment"> */</span>
82 <a name="l00015"></a><a class="code" href="class_s_e_t_c_p_transport.html">00015</a> <span class="keyword">class </span><a class="code" href="class_s_e_t_c_p_transport.html" title="TCP transport to skypekit.">SETCPTransport</a> : <span class="keyword">public</span> <a class="code" href="class_s_e_transport.html" title="Abstract interface for transport layer.">SETransport</a>
83 <a name="l00016"></a>00016 {
84 <a name="l00017"></a>00017 <span class="keyword">public</span>:<span class="comment"></span>
85 <a name="l00018"></a>00018 <span class="comment">        /**</span>
86 <a name="l00019"></a>00019 <span class="comment">         * \param addr Address where skypekit is running (&quot;127.0.0.1&quot; in general)</span>
87 <a name="l00020"></a>00020 <span class="comment">         * \param port Port where skypekit is running</span>
88 <a name="l00021"></a>00021 <span class="comment">         */</span>
89 <a name="l00022"></a>00022         <a class="code" href="class_s_e_t_c_p_transport.html#a4f78eb9531ae32806bc7efd456e2bf85">SETCPTransport</a>(<span class="keyword">const</span> <a class="code" href="class_s_e_string.html" title="SEString is basic char* based string class.">SEString</a>&amp; addr, <span class="keywordtype">int</span> port);
90 <a name="l00023"></a>00023         <span class="keyword">virtual</span> <a class="code" href="class_s_e_t_c_p_transport.html#a4538c95504ad07f6b1047fd819ddc523">~SETCPTransport</a>();
91 <a name="l00024"></a>00024 <span class="comment"></span>
92 <a name="l00025"></a>00025 <span class="comment">        /** \cond INTERNAL */</span>
93 <a name="l00026"></a>00026 <span class="keyword">protected</span>:
94 <a name="l00027"></a>00027         <a class="code" href="class_s_e_string.html" title="SEString is basic char* based string class.">SEString</a> server_addr;
95 <a name="l00028"></a>00028         <span class="keywordtype">int</span> server_port;
96 <a name="l00029"></a>00029         <span class="keywordtype">int</span> socket_fd;
97 <a name="l00030"></a>00030         <span class="keywordtype">bool</span> connected;
98 <a name="l00031"></a>00031         <span class="keywordtype">void</span> bytesLog(<span class="keyword">const</span> <span class="keywordtype">char</span>* where, <span class="keyword">const</span> <span class="keywordtype">char</span>* what, <span class="keywordtype">int</span> len);<span class="comment"></span>
99 <a name="l00032"></a>00032 <span class="comment">        /** \endcond */</span>
100 <a name="l00033"></a>00033 
101 <a name="l00034"></a>00034 <span class="keyword">public</span>:
102 <a name="l00035"></a>00035         <span class="keywordtype">bool</span> <a class="code" href="class_s_e_t_c_p_transport.html#a242d1aef375280b856f6601d3ab1ae38">connect</a>();
103 <a name="l00036"></a>00036         <span class="keywordtype">void</span> <a class="code" href="class_s_e_t_c_p_transport.html#a2ee5d03c91ffc7e898f9113642bc3fbc" title="Disconnects from skypekit.">disconnect</a>();
104 <a name="l00037"></a>00037 
105 <a name="l00038"></a>00038         <span class="keywordtype">bool</span> <a class="code" href="class_s_e_t_c_p_transport.html#a3580adc084a567b049d5e0b721e5937d" title="Check if the connection to skypekit is still there.">isConnected</a>() <span class="keyword">const</span>;
106 <a name="l00039"></a>00039         <span class="keywordtype">int</span> <a class="code" href="class_s_e_t_c_p_transport.html#a2c14f6240ac1de67fd0bc1e9ba6f1e00" title="Returns the socket descriptor which can be used to manually call select on. If the...">getSocket</a>() <span class="keyword">const</span>;
107 <a name="l00040"></a>00040         <span class="keywordtype">bool</span> <a class="code" href="class_s_e_t_c_p_transport.html#aee29c4ff6ccfb6291a8da93dc008a7f3">read</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num_bytes, <span class="keywordtype">char</span>* dest);
108 <a name="l00041"></a>00041         <span class="keywordtype">bool</span> <a class="code" href="class_s_e_t_c_p_transport.html#a2dff69ef79cb49c986bd41ee6ab1e1ec">write</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num_bytes, <span class="keyword">const</span> <span class="keywordtype">char</span>* dest);
109 <a name="l00042"></a>00042 };
110 <a name="l00043"></a>00043 <span class="preprocessor">#endif // SE_NO_TCP_TRANSPORT</span>
111 <a name="l00044"></a>00044 <span class="preprocessor"></span>
112 <a name="l00045"></a>00045 <span class="preprocessor">#endif // __SKYPE_TCP_TRANSPORT_H</span>
113 <a name="l00046"></a>00046 <span class="preprocessor"></span>
114 </pre></div></div>
115
116 <hr/>   
117                 <p><b>(c) Skype Technologies S.A. Confidential/Proprietary</b></p>              
118                 <p>Last updated: 18 Jun 2010</p>                
119                 </BODY>
120 </HTML>