Add basic capabilities (RFC3840). Patch by Marc Petit-Huguenin <marc@8x8.com>.

git-svn-id: svn://10.0.0.236/branches/ZAP_20050610_BRANCH@207253 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
alex%croczilla.com
2006-08-13 08:37:48 +00:00
parent ae4675fabe
commit 2d50fed13c
3 changed files with 80 additions and 1 deletions

View File

@@ -104,12 +104,50 @@
<rows>
<irow>
<label control="urn:mozilla:zap:preference"
value="&preference.label;:"/>
value="&preference.label;"/>
<textbox type="zap-formwidget" id="urn:mozilla:zap:preference"/>
<info>
<description>&preference.description;</description>
</info>
</irow>
<irow>
<label control="urn:mozilla:zap:feature-class"
value="&class.label;"/>
<menulist type="zap-formwidget" id="urn:mozilla:zap:feature-class">
<menupopup id="services_list_popup"
datasources="rdf:null"
ref="urn:mozilla:zap:feature-classes">
<menuitem value="urn:mozilla:zap:feature-class-personal"
label="&class.personal;"/>
<menuitem value="urn:mozilla:zap:feature-class-business"
label="&class.business;"/>
</menupopup>
</menulist>
<info>
<description>&class.description;</description>
</info>
</irow>
<irow>
<label control="urn:mozilla:zap:feature-priority"
value="&priority.label;"/>
<menulist type="zap-formwidget" id="urn:mozilla:zap:feature-priority">
<menupopup id="services_list_popup"
datasources="rdf:null"
ref="urn:mozilla:zap:feature-priorities">
<menuitem value="urn:mozilla:zap:feature-priority-non-urgent"
label="&priority.non-urgent;"/>
<menuitem value="urn:mozilla:zap:feature-priority-normal"
label="&priority.normal;"/>
<menuitem value="urn:mozilla:zap:feature-priority-urgent"
label="&priority.urgent;"/>
<menuitem value="urn:mozilla:zap:feature-priority-emergency"
label="&priority.emergency;"/>
</menupopup>
</menulist>
<info>
<description>&priority.description;</description>
</info>
</irow>
<irow>
<label control="urn:mozilla:zap:authentication_username"
value="&authenticationUsername.label;"/>

View File

@@ -599,6 +599,8 @@ Identity.rdfLiteralAttrib("urn:mozilla:zap:nodetype", "identity");
Identity.rdfLiteralAttrib("urn:mozilla:zap:display_name", "");
Identity.rdfLiteralAttrib("urn:mozilla:zap:organization", "");
Identity.rdfLiteralAttrib("urn:mozilla:zap:preference", "0.1");
Identity.rdfLiteralAttrib("urn:mozilla:zap:feature-class", "feature-class-personal");
Identity.rdfLiteralAttrib("urn:mozilla:zap:feature-priority", "feature-priority-normal");
Identity.rdfLiteralAttrib("urn:mozilla:zap:automatic_registration", "true");
Identity.rdfLiteralAttrib("urn:mozilla:zap:authentication_username", "");
Identity.rdfLiteralAttrib("urn:mozilla:zap:service",
@@ -1529,6 +1531,35 @@ Registration.fun(
// add a q-value
contactHeader.setParameter("q", this.group.identity["urn:mozilla:zap:preference"]);
}
contactHeader.setParameter("audio", "");
contactHeader.setParameter("application", "\"FALSE\"");
contactHeader.setParameter("data", "\"FALSE\"");
contactHeader.setParameter("control", "\"FALSE\"");
contactHeader.setParameter("video", "\"FALSE\"");
// XXX should be true when ToIP will be committed
contactHeader.setParameter("text", "\"FALSE\"");
contactHeader.setParameter("automata", "\"FALSE\"");
var featureClass = this.group.identity["urn:mozilla:zap:feature-class"] == "urn:mozilla:zap:feature-class-business" ? "business" : "personal";
contactHeader.setParameter("class", "\"" + featureClass + "\"");
contactHeader.setParameter("duplex", "");
contactHeader.setParameter("mobility", "\"FALSE\"");
contactHeader.setParameter("description", "\"" + wUserAgent + "\"");
var featurePriority = this.group.identity["urn:mozilla:zap:feature-priority"];
if (featurePriority == "urn:mozilla:zap:feature-priority-non-urgent") {
featurePriority = 10;
}
else if (featurePriority == "urn:mozilla:zap:feature-priority-normal") {
featurePriority = 20;
}
else if (featurePriority == "urn:mozilla:zap:feature-priority-urgent") {
featurePriority = 30;
}
else if (featurePriority == "urn:mozilla:zap:feature-priority-emergency") {
featurePriority = 40;
}
contactHeader.setParameter("priority", "\"" + featurePriority + "\"");
contactHeader.setParameter("actor", "\"principal\"");
contactHeader.setParameter("message", "\"FALSE\"");
if (this.group.interval) {
// add an expires parameter

View File

@@ -149,6 +149,16 @@
<!ENTITY watchContact.description "If checked, zap will attempt to subscribe to the presence status of contacts associated with this identity.">
<!ENTITY preference.label "Preference:">
<!ENTITY preference.description "Optional value (&quot;q&quot; parameter) in the range 0.001-1.000 indicating the relative preference for this user agent/identity compared to other registration bindings for this address-of-record.">
<!ENTITY class.label "Class:">
<!ENTITY class.personal "Personal">
<!ENTITY class.business "Business">
<!ENTITY class.description "Indicates the setting, business or personal, for this identity.">
<!ENTITY priority.label "Priority:">
<!ENTITY priority.non-urgent "Non-Urgent">
<!ENTITY priority.normal "Normal">
<!ENTITY priority.urgent "Urgent">
<!ENTITY priority.emergency "Emergency">
<!ENTITY priority.description "Indicates the call priorities the identity is willing to handle. A value of X means that the identity is willing to take calls with priority X and higher.">
<!ENTITY authenticationUsername.label "Authentication Username:">
<!ENTITY authenticationUsername.description "Optional username for authenticating with the registrar for this address-of-record. If this field is left blank, zap assumes that the authentication username is identical to the username part of the address-of-record (as it usually is).">
<!ENTITY service.label "Service:">