File: classTp_1_1OptionalInterfaceFactory.html

package info (click to toggle)
telepathy-qt4 0.3.6-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 14,260 kB
  • ctags: 12,185
  • sloc: cpp: 29,241; xml: 23,692; ansic: 16,079; sh: 10,327; python: 3,080; makefile: 1,553
file content (257 lines) | stat: -rw-r--r-- 14,285 bytes parent folder | download
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>TelepathyQt4: Tp::OptionalInterfaceFactory&lt; DBusProxySubclass &gt; Class Template Reference</title>
  <link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="1">&nbsp;&nbsp;</td>
<td class="postheader" valign="center">
<a href="index.html">
<font color="#004faf">Home</font></a>&nbsp;&middot;
<a href="classes.html">
<font color="#004faf">All Classes</font></a>&nbsp;&middot;
<a href="namespaces.html">
<font color="#004faf">All Namespaces</font></a>&nbsp;&middot;
<a href="modules.html">
<font color="#004faf">Modules</font></a>&nbsp;&middot;
<a href="functions.html">
<font color="#004faf">Functions</font></a>&nbsp;&middot;
<a href="files.html">
<font color="#004faf">Files</font></a>
</td>
</tr>
</table>
</body>
</html>
<!-- Generated by Doxygen 1.6.3 -->
  <div class="navpath"><a class="el" href="namespaceTp.html">Tp</a>::<a class="el" href="classTp_1_1OptionalInterfaceFactory.html">OptionalInterfaceFactory</a>
  </div>
<div class="contents">
<h1>Tp::OptionalInterfaceFactory&lt; DBusProxySubclass &gt; Class Template Reference<br/>
<small>
[<a class="el" href="group__clientsideproxies.html">Client-side proxies</a>]</small>
</h1><!-- doxytag: class="Tp::OptionalInterfaceFactory" --><!-- doxytag: inherits="Tp::OptionalInterfaceCache" -->
<p>Implementation helper class for high-level proxy classes willing to offer access to shared instances of interface proxies for optional interfaces.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="optional-interface-factory_8h_source.html">TelepathyQt4/OptionalInterfaceFactory</a>&gt;</code></p>

<p>Inherits <a class="el" href="classTp_1_1OptionalInterfaceCache.html">Tp::OptionalInterfaceCache</a>.</p>

<p><a href="classTp_1_1OptionalInterfaceFactory-members.html">List of all members.</a></p>
<h2>Public Types</h2>
<ul>
<li>enum <a class="el" href="classTp_1_1OptionalInterfaceFactory.html#a7d7b4eec46ac3258e70177f6e3e4937f">InterfaceSupportedChecking</a> { <a class="el" href="classTp_1_1OptionalInterfaceFactory.html#a7d7b4eec46ac3258e70177f6e3e4937fa3656e4c2bd93aa3aac424933c316d655">CheckInterfaceSupported</a>, 
<a class="el" href="classTp_1_1OptionalInterfaceFactory.html#a7d7b4eec46ac3258e70177f6e3e4937fa24a4d338ee86ab43371d960a1faedcd9">BypassInterfaceCheck</a>
 }
</ul>
<h2>Public Member Functions</h2>
<ul>
<li><a class="el" href="classTp_1_1OptionalInterfaceFactory.html#a246a25e9db61df8f276dc16d2802e945">OptionalInterfaceFactory</a> (DBusProxySubclass *this_)
<li><a class="el" href="classTp_1_1OptionalInterfaceFactory.html#a33a51382c8d11e0b2d2e5e38de96e490">~OptionalInterfaceFactory</a> ()
<li>QStringList <a class="el" href="classTp_1_1OptionalInterfaceFactory.html#afa2877d62298299d006b46d77fecc09e">interfaces</a> () const 
<li>template&lt;class Interface &gt; Interface * <a class="el" href="classTp_1_1OptionalInterfaceFactory.html#a50d2019f8aa967d6482d9fa9d34c66f4">optionalInterface</a> (<a class="el" href="classTp_1_1OptionalInterfaceFactory.html#a7d7b4eec46ac3258e70177f6e3e4937f">InterfaceSupportedChecking</a> check=CheckInterfaceSupported) const 
<li>template&lt;typename Interface &gt; Interface * <a class="el" href="classTp_1_1OptionalInterfaceFactory.html#aab61b88e18a952800de75d40053e9340">interface</a> () const 
</ul>
<h2>Protected Member Functions</h2>
<ul>
<li>void <a class="el" href="classTp_1_1OptionalInterfaceFactory.html#ae57eceda64422bb29f0aa121609c1f19">setInterfaces</a> (const QStringList &amp;interfaces)
</ul>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;typename DBusProxySubclass&gt;<br/>
 class Tp::OptionalInterfaceFactory&lt; DBusProxySubclass &gt;</h3>

<p>Implementation helper class for high-level proxy classes willing to offer access to shared instances of interface proxies for optional interfaces. </p>
<p>This class is included in the public API for the benefit of high-level proxies in extensions.</p>
<p>To use this helper in a subclass of <a class="el" href="classTp_1_1DBusProxy.html">DBusProxy</a> (say, ExampleObject), ExampleObject should inherit privately from OptionalInterfaceFactory&lt;ExampleObject&gt;, and call OptionalInterfaceFactory(this) in its constructor's initialization list.</p>
<dl><dt><b>Template Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>DBusProxySubclass</em>&nbsp;</td><td>A subclass of <a class="el" href="classTp_1_1DBusProxy.html">DBusProxy</a> </td></tr>
  </table>
  </dd>
</dl>
<hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="a7d7b4eec46ac3258e70177f6e3e4937f"></a><!-- doxytag: member="Tp::OptionalInterfaceFactory::InterfaceSupportedChecking" ref="a7d7b4eec46ac3258e70177f6e3e4937f" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename DBusProxySubclass&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classTp_1_1OptionalInterfaceFactory.html#a7d7b4eec46ac3258e70177f6e3e4937f">Tp::OptionalInterfaceFactory::InterfaceSupportedChecking</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Specifies if the interface being supported by the remote object should be checked by <a class="el" href="classTp_1_1OptionalInterfaceFactory.html#a50d2019f8aa967d6482d9fa9d34c66f4">optionalInterface()</a> and the convenience functions for it.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classTp_1_1OptionalInterfaceFactory.html#a50d2019f8aa967d6482d9fa9d34c66f4">optionalInterface()</a> </dd></dl>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a7d7b4eec46ac3258e70177f6e3e4937fa3656e4c2bd93aa3aac424933c316d655"></a><!-- doxytag: member="CheckInterfaceSupported" ref="a7d7b4eec46ac3258e70177f6e3e4937fa3656e4c2bd93aa3aac424933c316d655" args="" -->CheckInterfaceSupported</em>&nbsp;</td><td>
<p>Don't return an interface instance unless it can be guaranteed that the remote object actually implements the interface. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a7d7b4eec46ac3258e70177f6e3e4937fa24a4d338ee86ab43371d960a1faedcd9"></a><!-- doxytag: member="BypassInterfaceCheck" ref="a7d7b4eec46ac3258e70177f6e3e4937fa24a4d338ee86ab43371d960a1faedcd9" args="" -->BypassInterfaceCheck</em>&nbsp;</td><td>
<p>Return an interface instance even if it can't be verified that the remote object supports the interface. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a246a25e9db61df8f276dc16d2802e945"></a><!-- doxytag: member="Tp::OptionalInterfaceFactory::OptionalInterfaceFactory" ref="a246a25e9db61df8f276dc16d2802e945" args="(DBusProxySubclass *this_)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename DBusProxySubclass&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classTp_1_1OptionalInterfaceFactory.html">Tp::OptionalInterfaceFactory</a>&lt; DBusProxySubclass &gt;::<a class="el" href="classTp_1_1OptionalInterfaceFactory.html">OptionalInterfaceFactory</a> </td>
          <td>(</td>
          <td class="paramtype">DBusProxySubclass *&nbsp;</td>
          <td class="paramname"> <em>this_</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Class constructor.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>this_</em>&nbsp;</td><td>The class to which this <a class="el" href="classTp_1_1OptionalInterfaceFactory.html" title="Implementation helper class for high-level proxy classes willing to offer access...">OptionalInterfaceFactory</a> is attached </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a33a51382c8d11e0b2d2e5e38de96e490"></a><!-- doxytag: member="Tp::OptionalInterfaceFactory::~OptionalInterfaceFactory" ref="a33a51382c8d11e0b2d2e5e38de96e490" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename DBusProxySubclass&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classTp_1_1OptionalInterfaceFactory.html">Tp::OptionalInterfaceFactory</a>&lt; DBusProxySubclass &gt;::~<a class="el" href="classTp_1_1OptionalInterfaceFactory.html">OptionalInterfaceFactory</a> </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Class destructor.</p>
<p>Frees all interface instances constructed by this factory. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="afa2877d62298299d006b46d77fecc09e"></a><!-- doxytag: member="Tp::OptionalInterfaceFactory::interfaces" ref="afa2877d62298299d006b46d77fecc09e" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename DBusProxySubclass&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classTp_1_1OptionalInterfaceFactory.html">Tp::OptionalInterfaceFactory</a>&lt; DBusProxySubclass &gt;::interfaces </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return a list of interfaces supported by this object.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>List of supported interfaces. </dd></dl>

</div>
</div>
<a class="anchor" id="a50d2019f8aa967d6482d9fa9d34c66f4"></a><!-- doxytag: member="Tp::OptionalInterfaceFactory::optionalInterface" ref="a50d2019f8aa967d6482d9fa9d34c66f4" args="(InterfaceSupportedChecking check=CheckInterfaceSupported) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename DBusProxySubclass&gt; </div>
<div class="memtemplate">
template&lt;class Interface &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">Interface* <a class="el" href="classTp_1_1OptionalInterfaceFactory.html">Tp::OptionalInterfaceFactory</a>&lt; DBusProxySubclass &gt;::optionalInterface </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classTp_1_1OptionalInterfaceFactory.html#a7d7b4eec46ac3258e70177f6e3e4937f">InterfaceSupportedChecking</a>&nbsp;</td>
          <td class="paramname"> <em>check</em> = <code>CheckInterfaceSupported</code></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aab61b88e18a952800de75d40053e9340"></a><!-- doxytag: member="Tp::OptionalInterfaceFactory::interface" ref="aab61b88e18a952800de75d40053e9340" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename DBusProxySubclass&gt; </div>
<div class="memtemplate">
template&lt;typename Interface &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">template&lt; typename Interface &gt; inline Interface * <a class="el" href="classTp_1_1OptionalInterfaceFactory.html">Tp::OptionalInterfaceFactory</a>&lt; DBusProxySubclass &gt;::interface </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return a pointer to a valid instance of a interface class, associated with the same remote object as the given main interface instance. The given main interface must be of the class the optional interface is generated for (for eg. ChannelInterfaceGroupInterface this means ChannelInterface) or a subclass.</p>
<p>First invocation of this method for a particular optional interface class will construct the instance; subsequent calls will return a pointer to the same instance.</p>
<p>The returned instance is freed when the factory is destroyed; using it after destroying the factory will likely produce a crash. As the instance is shared, it should not be freed directly.</p>
<dl><dt><b>Template Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>Interface</em>&nbsp;</td><td>Class of the interface instance to get. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A pointer to an optional interface instance. </dd></dl>

</div>
</div>
<a class="anchor" id="ae57eceda64422bb29f0aa121609c1f19"></a><!-- doxytag: member="Tp::OptionalInterfaceFactory::setInterfaces" ref="ae57eceda64422bb29f0aa121609c1f19" args="(const QStringList &amp;interfaces)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename DBusProxySubclass&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classTp_1_1OptionalInterfaceFactory.html">Tp::OptionalInterfaceFactory</a>&lt; DBusProxySubclass &gt;::setInterfaces </td>
          <td>(</td>
          <td class="paramtype">const QStringList &amp;&nbsp;</td>
          <td class="paramname"> <em>interfaces</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
</div>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008-2010 Collabora Ltd. and Nokia Corporation</td>
<td width="30%" align="right"><div align="right">Telepathy-Qt4 0.3.6</div></td>
</tr></table></div></address>
</body>
</html>