McpRequestPolicy

McpRequestPolicy — Request-policy object, implemented by plugins

Synopsis

#include <mission-control-plugins/mission-control-plugins.h>

void                (*McpRequestPolicyCb)               (McpRequestPolicy *policy,
                                                         McpRequest *request);
void                mcp_request_policy_check            (McpRequestPolicy *policy,
                                                         McpRequest *request);
void                mcp_request_policy_iface_implement_check
                                                        (McpRequestPolicyIface *iface,
                                                         void (*impl) (McpRequestPolicy *, McpRequest *));
struct              McpRequestPolicyIface;

Description

Plugins may implement McpRequestPolicy in order to apply policy to Telepathy channel requests passing through the Channel Dispatcher part of Mission Control. The plugins are run just after the requesting client calls the ChannelRequest.Proceed method, and can inspect the request, delay its processing, and/or make it fail.

To do so, the plugin must implement a GObject subclass that implements McpRequestPolicy, then return an instance of that subclass from mcp_plugin_ref_nth_object().

An implementation of this plugin might look like this:

Example 2. 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16