Preferences XML File
The shaim.xml preferences file is where the shaim core saves its settings, and where plugins can load and save settings via the ICore.LoadSetting and ICore.SaveSetting methods.
Preference Categories
The shaim preference file is divided into categories. Each plugin can define its own (or multiple) categories, and the core has its own category. Each plugin category consists of one level of key and value pairs, whereas the core category has specialized sub-categories for accounts, protocols, and others.
Core Settings
Each individual plugin should document the preferences it stores in shaim.xml. This article is focused on documenting the preferences that are stored by the shaim core itself.
LoadAtStartup
LoadAtStartup is a string of functionality plugin names, separated by colons, that the shaim core will automatically load and activate at startup. These plugins are loaded and activated before the UI plugin, which is always loaded and activated at startup.
<LoadAtStartup>BasicLogger.dll:Reconnect.dll</LoadAtStartup>
If a plugin listed in the LoadAtStartup list can't be located, can't be loaded, or can't be activated without error, its name is removed from the list. The list is then automatically saved back to the preference file so it won't be attempted at next startup.
Accounts
Accounts is a sub-category of the Core preference category. It contains one or more Account node, which in turn each contain one or more Protocol nodes as well as status messages and user information associated with the account. Each Account node represents one shaim account?.
Account
The Account node has two required attributes, Name and Password, and one optional attribute, IsAutoStart. The Name attribute is the user-defined name of the account. The value of the Password attribute depends on the value of the IsAutoStart attribute. If the IsAutoStart attribute is missing, or its value is "No," the Password attribute is the MD5 hash of the plaintext password. If IsAutoStart is defined and its value is "Yes," the Password attribute is the unhashed plaintext password to the account. Note that setting IsAutoStart to "Yes" can reduce security by revealing the account password, which is used to decrypt protocol passwords.
Protocol
Each Account has one or more Protocol nodes, which represent a single screenname on a supported network (technically speaking, each node maps to an instance of a protocol plugin?). The Protocol node has three required attributes: Username, Password, and Plugin. The Username attribute is the "screenname" or "sign-in name" of the protocol in question, and the Plugin attribute is the name of the protocol plugin that will be used to connect this screenname to its network. The Password attribute is the password to connect to the network, encrypted using the Rijndael (AES) cipher algorithm with the account password as the key.
Each protocol plugin may or may not expose a set of preference settings that pertain to its network, which are stored in the preference file as child nodes of each Protocol node. See the documentation of the specific protocol plugin? for the supported values.
UserInfo
Each Account may (or may not) contain a UserInfo node, whose value is an HTML-formatted string consisting of the user information to set for each protocol on the account. Protocol plugins may interpret this setting in different ways. OscarLib, for instance, uses this string to set the AIM Profile; whereas MsnLib uses this string as the Personal Message. An IRC plugin would ignore this setting, as IRC does not support the concept of user information.
Global proxy settings
In addition to the Core settings category, the shaim core also maintains the GlobalProxy node (todo)
Example
The following is an excerpt from the preferences file, showing the Core category, an account with one protocol and user information, and settings for the Reconnect? plugin.
<?xml version="1.0" encoding="utf-8"?>
<shaim>
<Core>
<LoadAtStartup>BasicLogger.dll:Reconnect.dll</LoadAtStartup>
<Accounts>
<Account Name="Test" Password="---">
<Protocol Username="TestAcct" Plugin="OscarLib.dll" Password="---">
<Port>5190</Port>
<Server>login.oscar.aol.com</Server>
<UseFTProxy>No</UseFTProxy>
</Protocol>
<UserInfo>Oh boy, you looked at my profile</UserInfo>
</Account>
</Accounts>
</Core>
<Reconnect>
<Retries>10</Retries>
<TimeBetRetries>120</TimeBetRetries>
</Reconnect>
</shaim>
