~ubuntu-branches/ubuntu/quantal/telepathy-mission-control-5/quantal-201208211047

« back to all changes in this revision

Viewing changes to doc/reference/mission-control-plugins/html/mission-control-plugins-McpRequestPolicy.html

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-07-23 16:12:13 UTC
  • mfrom: (0.13.2)
  • Revision ID: package-import@ubuntu.com-20120723161213-b3jkul566jvm2a6d
Tags: 1:5.12.1-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>McpRequestPolicy</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
7
<link rel="home" href="index.html" title="Mission Control Plugins Reference Manual">
8
8
<link rel="up" href="ch03.html" title="Channel requests">
9
9
<link rel="prev" href="ch03.html" title="Channel requests">
70
70
<p>
71
71
</p>
72
72
<div class="example">
73
 
<a name="idp10246528"></a><p class="title"><b>Example 2. </b></p>
74
 
<div class="example-contents">
75
 
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
76
 
    <tbody>
77
 
      <tr>
78
 
        <td class="listing_lines" align="right"><pre>1
79
 
2
80
 
3
81
 
4
82
 
5
83
 
6
84
 
7
85
 
8
86
 
9
87
 
10
88
 
11
89
 
12
90
 
13</pre></td>
91
 
        <td class="listing_code"><pre class="programlisting"><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE:CAPS">G_DEFINE_TYPE_WITH_CODE</a></span> <span class="gtkdoc opt">(</span>MyPlugin<span class="gtkdoc opt">,</span> my_plugin<span class="gtkdoc opt">,</span>
92
 
   G_TYPE_OBJECT<span class="gtkdoc opt">,</span>
93
 
   <span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS">G_IMPLEMENT_INTERFACE</a></span> <span class="gtkdoc opt">(...);</span>
94
 
   <span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS">G_IMPLEMENT_INTERFACE</a></span> <span class="gtkdoc opt">(</span>MCP_TYPE_REQUEST_POLICY<span class="gtkdoc opt">,</span>
95
 
     request_policy_iface_init<span class="gtkdoc opt">);</span>
96
 
   <span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS">G_IMPLEMENT_INTERFACE</a></span> <span class="gtkdoc opt">(...))</span>
97
 
<span class="comment">/* ... */</span>
98
 
<span class="gtkdoc kwb">static void</span>
99
 
<span class="function">request_policy_iface_init</span> <span class="gtkdoc opt">(</span>McpRequestPolicyIface <span class="gtkdoc opt">*</span>iface<span class="gtkdoc opt">,</span>
100
 
    gpointer unused G_GNUC_UNUSED<span class="gtkdoc opt">)</span>
101
 
<span class="gtkdoc opt">{</span>
102
 
  iface<span class="gtkdoc opt">-&gt;</span>check <span class="gtkdoc opt">=</span> my_plugin_check_request<span class="gtkdoc opt">;</span>
103
 
<span class="gtkdoc opt">}</span></pre></td>
104
 
      </tr>
105
 
    </tbody>
106
 
  </table>
107
 
</div>
108
 
 
 
73
<a name="idp7231808"></a><p class="title"><b>Example 2. </b></p>
 
74
<div class="example-contents"><pre class="programlisting">
 
75
G_DEFINE_TYPE_WITH_CODE (MyPlugin, my_plugin,
 
76
   G_TYPE_OBJECT,
 
77
   G_IMPLEMENT_INTERFACE (...);
 
78
   G_IMPLEMENT_INTERFACE (MCP_TYPE_REQUEST_POLICY,
 
79
     request_policy_iface_init);
 
80
   G_IMPLEMENT_INTERFACE (...))
 
81
/* ... */
 
82
static void
 
83
request_policy_iface_init (McpRequestPolicyIface *iface,
 
84
    gpointer unused G_GNUC_UNUSED)
 
85
{
 
86
  iface-&gt;check = my_plugin_check_request;
 
87
}
 
88
</pre></div>
109
89
</div>
110
90
<p><br class="example-break">
111
91
</p>