<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.linuxmce.org/index.php?action=history&amp;feed=atom&amp;title=Message_Interceptors</id>
	<title>Message Interceptors - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.linuxmce.org/index.php?action=history&amp;feed=atom&amp;title=Message_Interceptors"/>
	<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Message_Interceptors&amp;action=history"/>
	<updated>2026-10-27T20:35:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Message_Interceptors&amp;diff=6864&amp;oldid=prev</id>
		<title>Rwilson131 at 19:08, 30 October 2007</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Message_Interceptors&amp;diff=6864&amp;oldid=prev"/>
		<updated>2007-10-30T19:08:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:08, 30 October 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; {| align=&quot;right&quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  | __TOC__&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  |}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: Programmer&amp;#039;s Guide]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: Programmer&amp;#039;s Guide]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Basics==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Basics==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rwilson131</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Message_Interceptors&amp;diff=5550&amp;oldid=prev</id>
		<title>Rwilson131: Reformatting for easier and quicker use</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Message_Interceptors&amp;diff=5550&amp;oldid=prev"/>
		<updated>2007-09-21T03:33:46Z</updated>

		<summary type="html">&lt;p&gt;Reformatting for easier and quicker use&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:33, 21 September 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: Programmer&amp;#039;s Guide]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: Programmer&amp;#039;s Guide]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Basics==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;This allows your device to tell [[DCERouter]] that it wants to get copies of all messages that meet a certain criteria.  For example, a device may want to work with the lights and get copies of all messages going to a light, or another may want a copy of all events from the disk drive.  When you register a message interceptor with [[DCERouter]] you specify 6 numeric parameters which limit the messages you will receive.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;p&amp;gt;This allows your device to tell DCERouter that it wants to get copies of all messages that meet a certain criteria.  For example, a device may want to work with the lights and get copies of all messages going to a light, or another may want a copy of all events from the disk drive.  When you register a message interceptor with DCERouter you specify 6 numeric parameters which limit the messages you will receive.  &lt;/del&gt;For each you can specify 0, which means match all, or a non-zero integer which means only match messages which match that criteria.  If you register a message interceptor with all 0&#039;s, you will get all messages.  Be sure to provide restrictions so you only get the messages you really need.  &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;DCERouter processes lots of messages, so if you register a message interceptor that is too vague, you could get flooded.  For example, the media players typically broadcast a message every second with an updated time code.  If you register a message interceptor to grab all messages from a media device, you would get time-code messages every second.  Note that parameters act as &#039;AND&#039; not &#039;OR&#039;.  If you register for DeviceCategory=&quot;Media Player&quot; and MessageID=&quot;Play Media&quot; you will get messages that are both going to Media Players AND have an ID of Play Media.  If you wanted to get messages that go either to Media Players OR have an ID of Play Media, then register 2 separate interceptors.&amp;lt;/p&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For each you can specify 0, which means match all, or a non-zero integer which means only match messages which match that criteria.  If you register a message interceptor with all 0&#039;s, you will get all messages.  Be sure to provide restrictions so you only get the messages you really need.   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;p&amp;gt;From (PK_Device): If specified you will only get &lt;/del&gt;messages &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;from this particular device ID.&amp;lt;/p&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[DCERouter]] processes lots of &lt;/ins&gt;messages&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, so if &lt;/ins&gt;you &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;register a &lt;/ins&gt;message &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;interceptor &lt;/ins&gt;that is &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;too vague&lt;/ins&gt;, you &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;could &lt;/ins&gt;get &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;flooded&lt;/ins&gt;.  &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;For example, &lt;/ins&gt;the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;media players typically broadcast a &lt;/ins&gt;message &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;every second with &lt;/ins&gt;an &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;updated time code&lt;/ins&gt;.  &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If &lt;/ins&gt;you &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;register a &lt;/ins&gt;message &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;interceptor &lt;/ins&gt;to &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;grab all messages from a media device&lt;/ins&gt;, you &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;would get time-code messages every second&lt;/ins&gt;.   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;p&amp;gt;To (PK_Device): If specified &lt;/del&gt;you &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;will only get messages to this particular device ID.&amp;lt;/p&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;p&amp;gt;Template (PK_DeviceTemplate): If specified you will only get messages to devices of this particular DeviceTemplate.  Note that if the &lt;/del&gt;message &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;type is an Event, &lt;/del&gt;that is &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;coming from a device rather than going to it&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the Router will look at the template of the From device.&amp;lt;/p&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;p&amp;gt;Category (PK_DeviceCategory): If specified &lt;/del&gt;you &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;will only &lt;/del&gt;get &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;messages to devices of this particular DeviceCategory&lt;/del&gt;.  &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Note that if &lt;/del&gt;the message &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;type is &lt;/del&gt;an &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Event, that is coming from a device rather than going to it, the Router will look at the category of the From device.&amp;lt;/p&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;p&amp;gt;MessageType: The type of message, as defined in the source file DCE/Message.h&lt;/del&gt;.  &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The 2 most common message types are 1 and 2 (MESSAGETYPE_COMMAND=1, MESSAGETYPE_EVENT=2). But &lt;/del&gt;you &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;can also receive &lt;/del&gt;message &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;of type 7 (MESSAGETYPE_SYSCOMMAND=7) if DCERouter is reloaded. In this case MessageID is 1 and it means &#039;Reload&#039;&amp;lt;/p&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;p&amp;gt;MessageID: The ID of the message, as defined in the source file DCE/Message.h.  The ID depends on the message type.  Event ID&#039;s are defined in the table &#039;Event&#039; in pluto_main.  Command ID&#039;s are defined in the table &#039;Command&#039;.  In LinuxMCE Admin you can choose &#039;Advanced&#039;, &#039;DCE&#039; &lt;/del&gt;to &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;see the command and event ID&#039;s.  If you specify an ID&lt;/del&gt;, you &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;should also specify a type.  A command ID of 19 is &quot;Set House Mode&quot; whereas an event ID of 19 is &quot;Watching Media&quot;&lt;/del&gt;.  &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;So if you only specify the ID of 19, and leave MessageType as 0, your interceptor will get both &quot;Set House Mode&quot; commands and &quot;Watching Media&quot; events.&amp;lt;/p&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;p&amp;gt;&lt;/del&gt;To register a message interceptor, call the RegisterMsgInterceptor member function, with the Command_Impl class that all plugins and devices are derived from:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/p&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Note that parameters act as &#039;AND&#039; not &#039;OR&#039;.  If you register for DeviceCategory=&quot;Media Player&quot; and MessageID=&quot;Play Media&quot; you will get messages that are both going to Media Players AND have an ID of Play Media.  If you wanted to get messages that go either to Media Players OR have an ID of Play Media, then register 2 separate interceptors.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;p&lt;/del&gt;&amp;gt;RegisterMsgInterceptor( ( MessageInterceptorFn )( &amp;amp;Media_Plugin::MediaInserted ), 0, 0, 0, 0, MESSAGETYPE_EVENT, EVENT_Media_Inserted_CONST );&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;p&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Parameters==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;p&amp;gt;&lt;/del&gt;This means the member function Media_Plugin::MediaInserted, which must match the definition of MessageInterceptorFn, will be called whenever a device fires a &quot;Media Inserted&quot; Event.&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;p&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;===From (PK_Device):===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If specified you will only get messages from this particular device ID.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;===To (PK_Device):=== &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If specified you will only get messages to this particular device ID.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;===Template (PK_DeviceTemplate):=== &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If specified you will only get messages to devices of this particular DeviceTemplate.  Note that if the message type is an Event, that is coming from a device rather than going to it, the Router will look at the template of the From device.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;===Category (PK_DeviceCategory):=== &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If specified you will only get messages to devices of this particular DeviceCategory.  Note that if the message type is an Event, that is coming from a device rather than going to it, the Router will look at the category of the From device.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;===MessageType:===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The type of message, as defined in the source file DCE/Message.h. The 2 most common message types are 1 and 2 (MESSAGETYPE_COMMAND=1, MESSAGETYPE_EVENT=2). But you can also receive message of type 7 (MESSAGETYPE_SYSCOMMAND=7) if DCERouter is reloaded. In this case MessageID is 1 and it means &#039;Reload&#039;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;===MessageID:===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The ID of the message, as defined in the source file DCE/Message.h.  The ID depends on the message type.  Event ID&#039;s are defined in the table &#039;Event&#039; in pluto_main.  Command ID&#039;s are defined in the table &#039;Command&#039;.  In [[LinuxMCE Admin Website]] you can choose &#039;Advanced&#039;, &#039;DCE&#039; to see the command and event ID&#039;s.  If you specify an ID, you should also specify a type.  A command ID of 19 is &quot;Set House Mode&quot; whereas an event ID of 19 is &quot;Watching Media&quot;.  So if you only specify the ID of 19, and leave MessageType as 0, your interceptor will get both &quot;Set House Mode&quot; commands and &quot;Watching Media&quot; events.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Register a Message Interceptor==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To register a message interceptor, call the RegisterMsgInterceptor member function, with the Command_Impl class that all plugins and devices are derived from:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;RegisterMsgInterceptor( ( MessageInterceptorFn )( &amp;amp;Media_Plugin::MediaInserted ), 0, 0, 0, 0, MESSAGETYPE_EVENT, EVENT_Media_Inserted_CONST );&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This means the member function Media_Plugin::MediaInserted, which must match the definition of MessageInterceptorFn, will be called whenever a device fires a &quot;Media Inserted&quot; Event.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Sending Message Manually==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If you are not using the DCE C++ library, you can send a message to [[DCERouter]] manually to register the message interceptor, and then you will get intercepted messages encapsulated within another message.  To register a message interceptor this way, send a message to [[DCERouter]], which is always device ID -1000 (#define DEVICEID_DCEROUTER -1000) with a MessageType of 8 (MESSAGETYPE_REGISTER_INTERCEPTOR=8).  The parameters for the message are the 6 interceptor parameters:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt; enum { PARM_FROM=1, PARM_TO, PARM_TEMPLATE, PARM_CATEGORY, PARM_MESSAGE_TYPE, PARM_MESSAGE_ID };&lt;/ins&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;p&amp;gt;If you are not using the DCE C++ library, you can send a message to DCERouter manually to register the message interceptor, and then you will get intercepted messages encapsulated within another message.  To register a message interceptor this way, send a message to DCERouter, which is always device ID -1000 (#define DEVICEID_DCEROUTER -1000) with a MessageType of 8 (MESSAGETYPE_REGISTER_INTERCEPTOR=8).  The parameters for the message are the 6 interceptor parameters: enum { PARM_FROM=1, PARM_TO, PARM_TEMPLATE, PARM_CATEGORY, PARM_MESSAGE_TYPE, PARM_MESSAGE_ID };&amp;lt;p&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Here is the same interceptor sent by hand, not using the framework:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    &lt;/ins&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  &lt;/ins&gt;Message *pMessage = new Message(m_dwPK_Device,DEVICEID_DCEROUTER,PRIORITY_NORMAL,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;p&amp;gt;&lt;/del&gt;Here is the same interceptor sent by hand, not using the framework:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;p&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	     &lt;/ins&gt;MESSAGETYPE_REGISTER_INTERCEPTOR,2,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;p&lt;/del&gt;&amp;gt;Message *pMessage = new Message(m_dwPK_Device,DEVICEID_DCEROUTER,PRIORITY_NORMAL,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	     &lt;/ins&gt;PARM_MESSAGE_TYPE,MESSAGETYPE_EVENT,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	&lt;/del&gt;MESSAGETYPE_REGISTER_INTERCEPTOR,2,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	     &lt;/ins&gt;PARM_MESSAGE_ID,EVENT_Media_Inserted_CONST);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	&lt;/del&gt;PARM_MESSAGE_TYPE,MESSAGETYPE_EVENT,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;       &lt;/ins&gt;QueueMessageToRouter(pMessage);&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	&lt;/del&gt;PARM_MESSAGE_ID,EVENT_Media_Inserted_CONST);&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In this case you will receive all intercepted messages embedded within a message of type: MESSAGETYPE_MESSAGE_INTERCEPTED.  The actual intercepted message will be the single embedded message in m_vectExtraMessages.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;QueueMessageToRouter(pMessage);&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;p&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;p&amp;gt;&lt;/del&gt;In this case you will receive all intercepted messages embedded within a message of type: MESSAGETYPE_MESSAGE_INTERCEPTED.  The actual intercepted message will be the single embedded message in m_vectExtraMessages.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/p&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rwilson131</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Message_Interceptors&amp;diff=4642&amp;oldid=prev</id>
		<title>Mstovenour: Added to Category: Programmer&#039;s Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Message_Interceptors&amp;diff=4642&amp;oldid=prev"/>
		<updated>2007-08-11T14:49:51Z</updated>

		<summary type="html">&lt;p&gt;Added to Category: Programmer&amp;#039;s Guide&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:49, 11 August 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category: Programmer&#039;s Guide]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;This allows your device to tell DCERouter that it wants to get copies of all messages that meet a certain criteria.  For example, a device may want to work with the lights and get copies of all messages going to a light, or another may want a copy of all events from the disk drive.  When you register a message interceptor with DCERouter you specify 6 numeric parameters which limit the messages you will receive.  For each you can specify 0, which means match all, or a non-zero integer which means only match messages which match that criteria.  If you register a message interceptor with all 0&amp;#039;s, you will get all messages.  Be sure to provide restrictions so you only get the messages you really need.  DCERouter processes lots of messages, so if you register a message interceptor that is too vague, you could get flooded.  For example, the media players typically broadcast a message every second with an updated time code.  If you register a message interceptor to grab all messages from a media device, you would get time-code messages every second.  Note that parameters act as &amp;#039;AND&amp;#039; not &amp;#039;OR&amp;#039;.  If you register for DeviceCategory=&amp;quot;Media Player&amp;quot; and MessageID=&amp;quot;Play Media&amp;quot; you will get messages that are both going to Media Players AND have an ID of Play Media.  If you wanted to get messages that go either to Media Players OR have an ID of Play Media, then register 2 separate interceptors.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;This allows your device to tell DCERouter that it wants to get copies of all messages that meet a certain criteria.  For example, a device may want to work with the lights and get copies of all messages going to a light, or another may want a copy of all events from the disk drive.  When you register a message interceptor with DCERouter you specify 6 numeric parameters which limit the messages you will receive.  For each you can specify 0, which means match all, or a non-zero integer which means only match messages which match that criteria.  If you register a message interceptor with all 0&amp;#039;s, you will get all messages.  Be sure to provide restrictions so you only get the messages you really need.  DCERouter processes lots of messages, so if you register a message interceptor that is too vague, you could get flooded.  For example, the media players typically broadcast a message every second with an updated time code.  If you register a message interceptor to grab all messages from a media device, you would get time-code messages every second.  Note that parameters act as &amp;#039;AND&amp;#039; not &amp;#039;OR&amp;#039;.  If you register for DeviceCategory=&amp;quot;Media Player&amp;quot; and MessageID=&amp;quot;Play Media&amp;quot; you will get messages that are both going to Media Players AND have an ID of Play Media.  If you wanted to get messages that go either to Media Players OR have an ID of Play Media, then register 2 separate interceptors.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mstovenour</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Message_Interceptors&amp;diff=3397&amp;oldid=prev</id>
		<title>Juliet at 14:19, 16 March 2007</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Message_Interceptors&amp;diff=3397&amp;oldid=prev"/>
		<updated>2007-03-16T14:19:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:19, 16 March 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;table width=&quot;100%&quot;&amp;gt; &amp;lt;tr&amp;gt;&amp;lt;td bgcolor=&quot;#FFCFCF&quot;&amp;gt;This page was written by Pluto and imported with their permission when LinuxMCE branched off in February, 2007.  In general any information should apply to LinuxMCE.  However, this page should be edited to reflect changes to LinuxMCE and remove old references to Pluto.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &amp;lt;/table&amp;gt;&lt;/del&gt;&amp;lt;p&amp;gt;This allows your device to tell DCERouter that it wants to get copies of all messages that meet a certain criteria.  For example, a device may want to work with the lights and get copies of all messages going to a light, or another may &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;want &lt;/del&gt;want a copy of all events from the disk drive.  When you register a message interceptor with DCERouter you specify 6 numeric parameters which limit the messages you will receive.  For each you can specify 0, which means match all, or a non-zero integer which means only match messages which match that criteria.  If you register a message interceptor with all 0&#039;s, you will get all messages.  Be sure to provide restrictions so you only get the messages you really need.  DCERouter processes lots of messages, so if you register a message interceptor that is too vague, you could get flooded.  For example, the media players typically broadcast a message every second with an updated time code.  If you register a message interceptor to grab all messages from a media device, you would get &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;timecode &lt;/del&gt;messages every second.  Note that parameters act as &#039;AND&#039; not &#039;OR&#039;.  If you register for DeviceCategory=&quot;Media Player&quot; and MessageID=&quot;Play Media&quot; you will get messages that are both going to Media Players AND have an ID of Play Media.  If you wanted to get messages that go either to Media Players OR have an ID of &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;PlayMedia&lt;/del&gt;, then register 2 separate interceptors.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;This allows your device to tell DCERouter that it wants to get copies of all messages that meet a certain criteria.  For example, a device may want to work with the lights and get copies of all messages going to a light, or another may want a copy of all events from the disk drive.  When you register a message interceptor with DCERouter you specify 6 numeric parameters which limit the messages you will receive.  For each you can specify 0, which means match all, or a non-zero integer which means only match messages which match that criteria.  If you register a message interceptor with all 0&#039;s, you will get all messages.  Be sure to provide restrictions so you only get the messages you really need.  DCERouter processes lots of messages, so if you register a message interceptor that is too vague, you could get flooded.  For example, the media players typically broadcast a message every second with an updated time code.  If you register a message interceptor to grab all messages from a media device, you would get &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;time-code &lt;/ins&gt;messages every second.  Note that parameters act as &#039;AND&#039; not &#039;OR&#039;.  If you register for DeviceCategory=&quot;Media Player&quot; and MessageID=&quot;Play Media&quot; you will get messages that are both going to Media Players AND have an ID of Play Media.  If you wanted to get messages that go either to Media Players OR have an ID of &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Play Media&lt;/ins&gt;, then register 2 separate interceptors.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;From (PK_Device): If specified you will only get messages from this particular device ID.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;From (PK_Device): If specified you will only get messages from this particular device ID.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot;&gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;Category (PK_DeviceCategory): If specified you will only get messages to devices of this particular DeviceCategory.  Note that if the message type is an Event, that is coming from a device rather than going to it, the Router will look at the category of the From device.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;Category (PK_DeviceCategory): If specified you will only get messages to devices of this particular DeviceCategory.  Note that if the message type is an Event, that is coming from a device rather than going to it, the Router will look at the category of the From device.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;MessageType: The type of message, as defined in the source file DCE/Message.h.  The 2 most common message types are 1 and 2 (MESSAGETYPE_COMMAND=1, MESSAGETYPE_EVENT=2). But you can also receive message of type 7 (MESSAGETYPE_SYSCOMMAND=7) if DCERouter is reloaded. In this case MessageID is 1 and it means &amp;#039;Reload&amp;#039;&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;MessageType: The type of message, as defined in the source file DCE/Message.h.  The 2 most common message types are 1 and 2 (MESSAGETYPE_COMMAND=1, MESSAGETYPE_EVENT=2). But you can also receive message of type 7 (MESSAGETYPE_SYSCOMMAND=7) if DCERouter is reloaded. In this case MessageID is 1 and it means &amp;#039;Reload&amp;#039;&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;MessageID: The ID of the message, as defined in the source file DCE/Message.h.  The ID depends on the message type.  Event ID&#039;s are defined in the table &#039;Event&#039; in pluto_main.  Command ID&#039;s are defined in the table &#039;Command&#039;.  In &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pluto &lt;/del&gt;Admin you can choose &#039;Advanced&#039;, &#039;DCE&#039; to see the command and event ID&#039;s.  If you specify an ID, you should also specify a type.  A command ID of 19 is &quot;Set House Mode&quot; whereas an event ID of 19 is &quot;Watching Media&quot;.  So if you only specify the ID of 19, and leave MessageType as 0, your interceptor will get both &quot;Set House Mode&quot; commands and &quot;Watching Media&quot; events.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;MessageID: The ID of the message, as defined in the source file DCE/Message.h.  The ID depends on the message type.  Event ID&#039;s are defined in the table &#039;Event&#039; in pluto_main.  Command ID&#039;s are defined in the table &#039;Command&#039;.  In &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;LinuxMCE &lt;/ins&gt;Admin you can choose &#039;Advanced&#039;, &#039;DCE&#039; to see the command and event ID&#039;s.  If you specify an ID, you should also specify a type.  A command ID of 19 is &quot;Set House Mode&quot; whereas an event ID of 19 is &quot;Watching Media&quot;.  So if you only specify the ID of 19, and leave MessageType as 0, your interceptor will get both &quot;Set House Mode&quot; commands and &quot;Watching Media&quot; events.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;To register a message interceptor, call the RegisterMsgInterceptor member function, with the Command_Impl class that all plugins and devices are derived from:&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;To register a message interceptor, call the RegisterMsgInterceptor member function, with the Command_Impl class that all plugins and devices are derived from:&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Juliet</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Message_Interceptors&amp;diff=2657&amp;oldid=prev</id>
		<title>Wikiadmin at 07:28, 18 October 2006</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Message_Interceptors&amp;diff=2657&amp;oldid=prev"/>
		<updated>2006-10-18T07:28:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:28, 18 October 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l5&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;Template (PK_DeviceTemplate): If specified you will only get messages to devices of this particular DeviceTemplate.  Note that if the message type is an Event, that is coming from a device rather than going to it, the Router will look at the template of the From device.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;Template (PK_DeviceTemplate): If specified you will only get messages to devices of this particular DeviceTemplate.  Note that if the message type is an Event, that is coming from a device rather than going to it, the Router will look at the template of the From device.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;Category (PK_DeviceCategory): If specified you will only get messages to devices of this particular DeviceCategory.  Note that if the message type is an Event, that is coming from a device rather than going to it, the Router will look at the category of the From device.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;Category (PK_DeviceCategory): If specified you will only get messages to devices of this particular DeviceCategory.  Note that if the message type is an Event, that is coming from a device rather than going to it, the Router will look at the category of the From device.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;MessageType: The type of message, as defined in the source file DCE/Message.h.  The 2 most common message types are 1 and 2 (MESSAGETYPE_COMMAND=1, MESSAGETYPE_EVENT=2).&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;MessageType: The type of message, as defined in the source file DCE/Message.h.  The 2 most common message types are 1 and 2 (MESSAGETYPE_COMMAND=1, MESSAGETYPE_EVENT=2). &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;But you can also receive message of type 7 (MESSAGETYPE_SYSCOMMAND=7) if DCERouter is reloaded. In this case MessageID is 1 and it means &#039;Reload&#039;&lt;/ins&gt;&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;MessageID: The ID of the message, as defined in the source file DCE/Message.h.  The ID depends on the message type.  Event ID&amp;#039;s are defined in the table &amp;#039;Event&amp;#039; in pluto_main.  Command ID&amp;#039;s are defined in the table &amp;#039;Command&amp;#039;.  In Pluto Admin you can choose &amp;#039;Advanced&amp;#039;, &amp;#039;DCE&amp;#039; to see the command and event ID&amp;#039;s.  If you specify an ID, you should also specify a type.  A command ID of 19 is &amp;quot;Set House Mode&amp;quot; whereas an event ID of 19 is &amp;quot;Watching Media&amp;quot;.  So if you only specify the ID of 19, and leave MessageType as 0, your interceptor will get both &amp;quot;Set House Mode&amp;quot; commands and &amp;quot;Watching Media&amp;quot; events.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;MessageID: The ID of the message, as defined in the source file DCE/Message.h.  The ID depends on the message type.  Event ID&amp;#039;s are defined in the table &amp;#039;Event&amp;#039; in pluto_main.  Command ID&amp;#039;s are defined in the table &amp;#039;Command&amp;#039;.  In Pluto Admin you can choose &amp;#039;Advanced&amp;#039;, &amp;#039;DCE&amp;#039; to see the command and event ID&amp;#039;s.  If you specify an ID, you should also specify a type.  A command ID of 19 is &amp;quot;Set House Mode&amp;quot; whereas an event ID of 19 is &amp;quot;Watching Media&amp;quot;.  So if you only specify the ID of 19, and leave MessageType as 0, your interceptor will get both &amp;quot;Set House Mode&amp;quot; commands and &amp;quot;Watching Media&amp;quot; events.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l23&quot;&gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;In this case you will receive all intercepted messages embedded within a message of type: MESSAGETYPE_MESSAGE_INTERCEPTED.  The actual intercepted message will be the single embedded message in m_vectExtraMessages.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;In this case you will receive all intercepted messages embedded within a message of type: MESSAGETYPE_MESSAGE_INTERCEPTED.  The actual intercepted message will be the single embedded message in m_vectExtraMessages.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Wikiadmin</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Message_Interceptors&amp;diff=2081&amp;oldid=prev</id>
		<title>Wikiadmin: Imported document</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Message_Interceptors&amp;diff=2081&amp;oldid=prev"/>
		<updated>2006-06-05T16:48:51Z</updated>

		<summary type="html">&lt;p&gt;Imported document&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;table width=&amp;quot;100%&amp;quot;&amp;gt; &amp;lt;tr&amp;gt;&amp;lt;td bgcolor=&amp;quot;#FFCFCF&amp;quot;&amp;gt;This page was written by Pluto and imported with their permission when LinuxMCE branched off in February, 2007.  In general any information should apply to LinuxMCE.  However, this page should be edited to reflect changes to LinuxMCE and remove old references to Pluto.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &amp;lt;/table&amp;gt;&amp;lt;p&amp;gt;This allows your device to tell DCERouter that it wants to get copies of all messages that meet a certain criteria.  For example, a device may want to work with the lights and get copies of all messages going to a light, or another may want want a copy of all events from the disk drive.  When you register a message interceptor with DCERouter you specify 6 numeric parameters which limit the messages you will receive.  For each you can specify 0, which means match all, or a non-zero integer which means only match messages which match that criteria.  If you register a message interceptor with all 0&amp;#039;s, you will get all messages.  Be sure to provide restrictions so you only get the messages you really need.  DCERouter processes lots of messages, so if you register a message interceptor that is too vague, you could get flooded.  For example, the media players typically broadcast a message every second with an updated time code.  If you register a message interceptor to grab all messages from a media device, you would get timecode messages every second.  Note that parameters act as &amp;#039;AND&amp;#039; not &amp;#039;OR&amp;#039;.  If you register for DeviceCategory=&amp;quot;Media Player&amp;quot; and MessageID=&amp;quot;Play Media&amp;quot; you will get messages that are both going to Media Players AND have an ID of Play Media.  If you wanted to get messages that go either to Media Players OR have an ID of PlayMedia, then register 2 separate interceptors.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;From (PK_Device): If specified you will only get messages from this particular device ID.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To (PK_Device): If specified you will only get messages to this particular device ID.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Template (PK_DeviceTemplate): If specified you will only get messages to devices of this particular DeviceTemplate.  Note that if the message type is an Event, that is coming from a device rather than going to it, the Router will look at the template of the From device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Category (PK_DeviceCategory): If specified you will only get messages to devices of this particular DeviceCategory.  Note that if the message type is an Event, that is coming from a device rather than going to it, the Router will look at the category of the From device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;MessageType: The type of message, as defined in the source file DCE/Message.h.  The 2 most common message types are 1 and 2 (MESSAGETYPE_COMMAND=1, MESSAGETYPE_EVENT=2).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;MessageID: The ID of the message, as defined in the source file DCE/Message.h.  The ID depends on the message type.  Event ID&amp;#039;s are defined in the table &amp;#039;Event&amp;#039; in pluto_main.  Command ID&amp;#039;s are defined in the table &amp;#039;Command&amp;#039;.  In Pluto Admin you can choose &amp;#039;Advanced&amp;#039;, &amp;#039;DCE&amp;#039; to see the command and event ID&amp;#039;s.  If you specify an ID, you should also specify a type.  A command ID of 19 is &amp;quot;Set House Mode&amp;quot; whereas an event ID of 19 is &amp;quot;Watching Media&amp;quot;.  So if you only specify the ID of 19, and leave MessageType as 0, your interceptor will get both &amp;quot;Set House Mode&amp;quot; commands and &amp;quot;Watching Media&amp;quot; events.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;To register a message interceptor, call the RegisterMsgInterceptor member function, with the Command_Impl class that all plugins and devices are derived from:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;RegisterMsgInterceptor( ( MessageInterceptorFn )( &amp;amp;Media_Plugin::MediaInserted ), 0, 0, 0, 0, MESSAGETYPE_EVENT, EVENT_Media_Inserted_CONST );&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This means the member function Media_Plugin::MediaInserted, which must match the definition of MessageInterceptorFn, will be called whenever a device fires a &amp;quot;Media Inserted&amp;quot; Event.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If you are not using the DCE C++ library, you can send a message to DCERouter manually to register the message interceptor, and then you will get intercepted messages encapsulated within another message.  To register a message interceptor this way, send a message to DCERouter, which is always device ID -1000 (#define DEVICEID_DCEROUTER -1000) with a MessageType of 8 (MESSAGETYPE_REGISTER_INTERCEPTOR=8).  The parameters for the message are the 6 interceptor parameters: enum { PARM_FROM=1, PARM_TO, PARM_TEMPLATE, PARM_CATEGORY, PARM_MESSAGE_TYPE, PARM_MESSAGE_ID };&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Here is the same interceptor sent by hand, not using the framework:&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Message *pMessage = new Message(m_dwPK_Device,DEVICEID_DCEROUTER,PRIORITY_NORMAL,&amp;lt;br&amp;gt;&lt;br /&gt;
	MESSAGETYPE_REGISTER_INTERCEPTOR,2,&amp;lt;br&amp;gt;&lt;br /&gt;
	PARM_MESSAGE_TYPE,MESSAGETYPE_EVENT,&amp;lt;br&amp;gt;&lt;br /&gt;
	PARM_MESSAGE_ID,EVENT_Media_Inserted_CONST);&amp;lt;br&amp;gt;&lt;br /&gt;
QueueMessageToRouter(pMessage);&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In this case you will receive all intercepted messages embedded within a message of type: MESSAGETYPE_MESSAGE_INTERCEPTED.  The actual intercepted message will be the single embedded message in m_vectExtraMessages.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>Wikiadmin</name></author>
	</entry>
</feed>