dustinrue/ControlPlane — pull request #226 by VladimirTechMan (2013-03-25 18:07:42+00:00)
Title: Add evidence source and rules for DNS parameters

**Important: Dustin**, as I added new files and thus changed project.pbxproj, I am submitting it too -- but I also had to disable signing the code, to build in my environment. As you enable signing the code with your certificate, you will need to correct those parameters after merging in my changes -- I hope it won't be a big issue to you (apologies for the inconvenience related)...

These changes add the evidence source and two related rules to allow setting/changing the context based on **DNS Parameters**, specifically:
- **DNS search name** (the rule allows to require an exact match or to match existing DNS search names using their suffix)
- **DNS server address**

The parameters checked are those specified in the Network Preferences of existing network locations in the system. While the rules will work just fine (and can be useful) for the manually configured DNS parameters, they really come in handy when DNS parameters are auto-provisioned -- usually by DCHP/BOOTP servers. The latter case is very common for corporate networks (for home networks it's rather seldom, I think).

In addition to the new evidence source and rules (visible to the end users), the changes also add two basic classes, **MultiRuleEvidenceSource** and **RuleType**. That should be of help to developers who may ever need to add an evidence source with multiple rules not sharing a kind of uniform panel design. The two classes also add some other "goodies" that I was lacking as a developer and/or as a user. [That said, MultiRuleEvidenceSource is a subclass of EvidenceSource, thus the former "fits" the current design of the latter and that design did not assume non-uniform panels, unfortunately. As the architecture of ControlPlane gets improved in future versions, I hope that this part will get a better design too -- when preparing to it, maybe those two classes I've added will also give some useful code and/or interface ideas... Before the new architecture is here, the added classes can be a way to implement multi-rule multi-panel evidence sources.]

The implementation only provides English prompts and messages. I kindly hope that other team members will help to properly localize those to other supported languages. I will also appreciate if the guys native in English will review and assess the wording used in terms of its clarity to the end users. [An outstanding item is also to add a good description to the help files. I may be able to get to it sometime later -- or if other members are willing to help on it, it will be great.]

I was testing (and enjoying) the added evidence source and rules for about a week already. But they definitely need a wider exposure, than just my MBP. Those familiar with DNS params, please, go try it...

Finally, any questions or comments from the team are appreciated.