17:39
[skypekit:skypekit.git] / skypekit_2.0.0.190_29281_CB30 / interfaces / skype / cpp_embedded / documentation / html / skype-pipe-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-pipe-transport.h</h1><a href="skype-pipe-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_WIN_PIPE_TRANSPORT_H</span>
70 <a name="l00003"></a>00003 <span class="preprocessor"></span><span class="preprocessor">#define __SKYPE_WIN_PIPE_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_WINDOWS_PIPE_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 
76 <a name="l00009"></a>00009 <span class="preprocessor">#ifndef SE_NO_TRANSPORT_CRYPTO</span>
77 <a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#include &lt;arc4.hpp&gt;</span>
78 <a name="l00011"></a>00011 <span class="preprocessor">#endif</span>
79 <a name="l00012"></a>00012 <span class="preprocessor"></span>
80 <a name="l00013"></a>00013 <span class="preprocessor">#if defined(WIN32) || defined(_WIN32)</span>
81 <a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#include &lt;windows.h&gt;</span>
82 <a name="l00015"></a>00015 
83 <a name="l00016"></a>00016 <span class="preprocessor">#if defined(GetProp)</span>
84 <a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#undef GetProp</span>
85 <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
86 <a name="l00019"></a>00019 <span class="preprocessor"></span>
87 <a name="l00020"></a>00020 <span class="preprocessor">#if defined(SetProp)</span>
88 <a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#undef SetProp</span>
89 <a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
90 <a name="l00023"></a>00023 <span class="preprocessor"></span>
91 <a name="l00024"></a>00024 <span class="preprocessor">#endif</span>
92 <a name="l00025"></a>00025 <span class="preprocessor"></span><span class="comment"></span>
93 <a name="l00026"></a>00026 <span class="comment">/**</span>
94 <a name="l00027"></a>00027 <span class="comment"> * \class SEPipeTransport</span>
95 <a name="l00028"></a>00028 <span class="comment"> * \brief Windows pipes transport to skypekit</span>
96 <a name="l00029"></a>00029 <span class="comment"> *</span>
97 <a name="l00030"></a>00030 <span class="comment"> * Windows specific.</span>
98 <a name="l00031"></a>00031 <span class="comment"> */</span>
99 <a name="l00032"></a><a class="code" href="class_s_e_pipe_transport.html">00032</a> <span class="keyword">class </span><a class="code" href="class_s_e_pipe_transport.html" title="Windows pipes transport to skypekit.">SEPipeTransport</a> : <span class="keyword">public</span> <a class="code" href="class_s_e_transport.html" title="Abstract interface for transport layer.">SETransport</a>
100 <a name="l00033"></a>00033 {
101 <a name="l00034"></a>00034 <span class="keyword">public</span>:<span class="comment"></span>
102 <a name="l00035"></a>00035 <span class="comment">        /**</span>
103 <a name="l00036"></a>00036 <span class="comment">         */</span>
104 <a name="l00037"></a>00037         <a class="code" href="class_s_e_pipe_transport.html#a998fed5b118ce675442da2d099893065">SEPipeTransport</a>(HANDLE hReadPipeParent, HANDLE hWritePipeParent);
105 <a name="l00038"></a>00038         <span class="keyword">virtual</span> <a class="code" href="class_s_e_pipe_transport.html#afa8e8c7d6e23112babe3fff2dc7f05d5">~SEPipeTransport</a>();
106 <a name="l00039"></a>00039 <span class="comment"></span>
107 <a name="l00040"></a>00040 <span class="comment">        /** \cond INTERNAL */</span>
108 <a name="l00041"></a>00041 <span class="keyword">protected</span>:
109 <a name="l00042"></a>00042 
110 <a name="l00043"></a>00043         HANDLE hReadPipeParent;
111 <a name="l00044"></a>00044         HANDLE hWritePipeParent;
112 <a name="l00045"></a>00045 
113 <a name="l00046"></a>00046         <span class="keywordtype">bool</span> connected;<span class="comment"></span>
114 <a name="l00047"></a>00047 <span class="comment">        /** \endcond */</span>
115 <a name="l00048"></a>00048 
116 <a name="l00049"></a>00049 <span class="keyword">public</span>:
117 <a name="l00050"></a>00050         <span class="keywordtype">bool</span> <a class="code" href="class_s_e_pipe_transport.html#a3fa08c05b6749187828c2148745211cb">connect</a>();
118 <a name="l00051"></a>00051         <span class="keywordtype">void</span> <a class="code" href="class_s_e_pipe_transport.html#ad1db9fcdda1ff05351a5340838f303fb" title="Disconnects from skypekit.">disconnect</a>();
119 <a name="l00052"></a>00052         <span class="keywordtype">void</span> <a class="code" href="class_s_e_pipe_transport.html#a74303df2ee89f373edf9a14320a258d3">push</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; message);
120 <a name="l00053"></a>00053         <a class="code" href="class_s_e_string.html" title="SEString is basic char* based string class.">SEString</a> <a class="code" href="class_s_e_pipe_transport.html#a3b04fa797b00d3289ec6621c8ca5266d">pull</a>(<span class="keywordtype">bool</span> block);
121 <a name="l00054"></a>00054         <span class="keywordtype">bool</span> <a class="code" href="class_s_e_pipe_transport.html#a57d2be9c46dec2ecb739d428cad75a60">hasMore</a>(<span class="keywordtype">int</span> wait = 0);
122 <a name="l00055"></a>00055         <span class="keywordtype">bool</span> <a class="code" href="class_s_e_pipe_transport.html#ab01628d5f35b72408a60b86de933fbcb" title="Check if the connection to skypekit is still there.">isConnected</a>() <span class="keyword">const</span>;
123 <a name="l00056"></a>00056         <span class="keywordtype">int</span> <a class="code" href="class_s_e_pipe_transport.html#a9c9cc5adc1d250460cdc44009494eb01" title="Returns the socket descriptor which can be used to manually call select on. If the...">getSocket</a>() <span class="keyword">const</span>;
124 <a name="l00057"></a>00057 <span class="keyword">private</span>:
125 <a name="l00058"></a>00058         <span class="keywordtype">void</span> cleanup();
126 <a name="l00059"></a>00059 <span class="preprocessor">#ifndef SE_NO_TRANSPORT_CRYPTO</span>
127 <a name="l00060"></a>00060 <span class="preprocessor"></span><span class="keyword">public</span>:
128 <a name="l00061"></a>00061         <span class="keywordtype">void</span> <a class="code" href="class_s_e_pipe_transport.html#a5a862916799117ece7f3116a30248f20">set_keys</a>(DWORD handle00, DWORD handle01, DWORD handle02);
129 <a name="l00062"></a>00062 <span class="keyword">private</span>:
130 <a name="l00063"></a>00063         ARC4 rc4_recv;
131 <a name="l00064"></a>00064         ARC4 rc4_send;
132 <a name="l00065"></a>00065 <span class="preprocessor">#endif</span>
133 <a name="l00066"></a>00066 <span class="preprocessor"></span>};
134 <a name="l00067"></a>00067 
135 <a name="l00068"></a>00068 <span class="keyword">extern</span> HANDLE <a class="code" href="skype-pipe-transport_8cpp.html#a8baf4340e923dfdb884dca2982923536">g_hReadPipeParent</a>;
136 <a name="l00069"></a>00069 <span class="keyword">extern</span> HANDLE <a class="code" href="skype-pipe-transport_8cpp.html#adf79ec0ed1094d4fb1db33ec3d8d4a1c">g_hWritePipeParent</a>;
137 <a name="l00070"></a>00070 
138 <a name="l00071"></a>00071 <span class="preprocessor">#endif // SE_NO_WINDOWS_PIPE_TRANSPORT</span>
139 <a name="l00072"></a>00072 <span class="preprocessor"></span>
140 <a name="l00073"></a>00073 <span class="preprocessor">#endif // __SKYPE_WIN_PIPE_TRANSPORT_H</span>
141 </pre></div></div>
142
143 <hr/>   
144                 <p><b>(c) Skype Technologies S.A. Confidential/Proprietary</b></p>              
145                 <p>Last updated: 18 Jun 2010</p>                
146                 </BODY>
147 </HTML>