Instant Messaging Plugin Template

From LinuxMCE
Revision as of 01:01, 22 September 2008 by Tschak909 (Talk | contribs) (Added command group mojo.)

Jump to: navigation, search

Opening the web admin, and going to Advanced > Configuration > Device Templates, We pick my manufacturer, LOCALE|Concept, and pick the Pluto General Plugins category, and click Add Device Template.

After this is done, I specify that this is a device that will be implemented by C++ code.

That fills in the blanks, and brings up the following display, of which, the following screen snippet is most relevant:

The Instant Messaging Template

Note that I have checked the "Is a Plugin" and once I did this, it automatically added a Controlled by Category:DCERouter entry. This happens the moment that you check this box, and goes away when you uncheck it. There is no need to manually add it.

Also note that the Implements DCE box is checked, and there is nothing in the command line box. If this is checked, and there is nothing in the command line box, the system assumes that the DCE Device command name is the same as the name of the plugin, with any spaces substituted by underscores. (_)

I hit save at this point, to get the device template into the system, but I now need to define the commands that this plugin will need.

Scrolling down, notice there is a link for Create Command Group, this needs to be clicked, as the above three command groups do not contain relevant commands that we want to implement in our template.

A New command group for the IM Template

Notice here the Category drop down. All this signifies is where this command group will be automatically presented as a possible group of commands to add to a particular device. I have selected the Pluto General Plugins device so that any device that is in this category AND its descendents will see this command group added. This is used by various system parts too to do intelligent database queries to see which plugins to iterate over, etc. I could have just as easily made a new category here.. and I may in the future, but I didn't this time around.. so.. I select, enter a meaningful name for this group of commands, and go back.

A command group, to reiterate, is nothing more than a group of commands together. It allows you to quickly define groups of common commands that a device may implement.

Once this is done. Take a look at the resulting difference in the command group checkboxes. Our command group is now here, but for now, it's empty.

The Command Group is now added