|
Version 6.4 |
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Textual RepresentationObjects can be represented as a single-line or multi-line text (depending on the context). Object representation elements can be separated using "white spaces". Only the space symbol can be used as a "white space" in single-line texts.In multi-line texts the space and "horizontal tab" symbols, as well as the EOL (End-Of-Line, CR and/or LF) symbols are treated as "white spaces". Additionally, a "comment" is treated as a "white space", where a comment consists of:
Atomic ObjectsAtomic objects are unstructured, generic data-type objects. StringsA string is a sequence of UTF-8 encoded text bytes, not containing a binary zero byte. A textual representation of a string is either an atom - a sequence of Latin letters (in the ASCII encoding) and digits,
or a quoted string - a sequence of any printable symbols (using the UTF-8 encoding) except the quotation mark and the backslash symbol,
enclosed into the quotation marks (").
If you want to include the quotation mark symbol into a quoted string, include the backslash symbol and the quotation mark, if you
want to include the backslash symbol into a quoted string, include two backslash symbols.
You can use the \r symbol combination to include the carriage-return symbol into a string,
you can use the \n symbol combination to include the line-feed symbol into a string, and
you can use the \e symbol combination to include the system-independent End-Of-Line symbol(s) into a string.
You can use the \t symbol combination to include the tabulation symbol into a string.
You can use the \nnn symbol combination to include any symbol into a string,
if nnn is a 3-digit decimal number equal to the ASCII code of the desired symbol.
You can use the \u'nnn' symbol combination to include any Unicode symbol into a string,
if nnn is a hexadecimal number equal to the Unicode code of the desired symbol.
In multi-line texts, a string can be represented as two or more consecutive strings with zero or more white spaces between them. This feature allows you to break very long string objects into several strings and put them on multiple text lines. DataBlocksDataBlocks are basic, unstructured blocks of binary data. They are composed as
text strings with the Base64 encoding of binary data enclosed into brackets.
White spaces can be placed before and after the brackets and between any symbols of the encoded data. NumbersNumbers are basic, unstructured data objects. Each Number object contains one 64-bit signed integer value.
A Number is presented as a text string starting with the # symbol, followed by an optional minus (-) symbol,
followed by either 1 or more decimal digits, or by the base-indicator and 1 or more digits of the specified base.
The base indicator 0x specifies the base value 16 (a hexadecimal number), the base indicator 0o specifies the base value 8 (a octal number), the base indicator 0b specifies the base value 2 (a binary number).
Time StampsTime Stamps are basic, unstructured data objects. Each Time Stamp object contains one global time value.
The time value is presented in GMT time, as a text string starting with the #T symbols, and containing
the day, months, year, and, optionally, the hour, minute, and the second values.
There are 2 special Time Stamps - for the "remote past" (#TPAST) and
for the "remote future" (#TFUTURE).
IP AddressesIP Addresses are basic, unstructured data objects.
Each IP Address object contains an IPv4 or IPv6 address, and, optionally a port number.
The IP Address is presented as a text string starting with the #I symbols,
and containing the canonical IPv4 or IPv6 address, optionally followed by the port number.
Null ObjectA null-object is a unique atomic object used to represent absence of any other object.
The Null Object is presented as the #NULL# text string. False ObjectA false-object is a unique atomic object used to represent boolean false.
The False Object is presented as the #FALSE# text string. Other ObjectsWhen the Server converts internal data objects into the text presentation,
it may encounter some custom, application-specific objects. These objects
are presented as #(objectName:address) text strings,
where objectName is an alpha-numeric object class name, and address is a hexadecimal number -
the object memory address.
These objects must NOT be used in text presentation being converted into a data object. Structured ObjectsArraysAn array object is an ordered set of objects (array elements). Array textual representation is a list of its element representations,
separated with the comma (,) symbols, and enclosed into the parentheses.
An array element can be any object - a string, an array, a dictionary, etc.
Any number of spaces, tabulation symbols, and/or line breaks (end-of-line symbols) can be placed
between a parenthesis and an element, and between an element and a comma symbol.
An array may have zero elements (an empty array).
DictionariesA dictionary object is a set of key-value pairs. Dictionary keys are strings. Each key in a dictionary should be unique. The dictionary keys are processed as case-sensitive strings, unless explicitly specified otherwise. Any object can be used as a value associated with a key. A dictionary textual representation is a sequence of its key value pairs, enclosed into
the curvy brackets.
Each pair is represented as its key string representation, followed by the equal (=) symbol, followed by the textual representation of the associated value object, followed by the semicolon (;) symbol.
XMLAn XML object is an XML document. It has a name, a set of namespaces (strings), a set attributes with string values, and zero, one, or several body elements. Each body element is either a string or an XML object. An XML object textual representation is its standard textual representation, starting with the angle bracket symbol. Formal Syntax RulesBelow is the formal syntax definition for textual representations of the basic type objects.
XML ObjectsCommuniGate Pro can convert complex structures (such as vCards, iCalendar, SDP objects) into generic XML objects. An XML presentation may also be required for Objects such as datablocks, arrays, or dictionaries. This section specifies the CommuniGate Pro XML presentation for all these objects and complex structures. StringA string is presented as a text element.
If a string contains special characters, it should be represented as a binString element with a text body containing the base64-encoded string. An empty string is presented as an empty binString element. DatablockA datablock is presented as a base64 XML element.
NumberA number is presented as a number XML element.
Time StampA Time Stamp is presented as a date XML element.
IP AddressesAn IP Address is presented as an ipAddr XML element.
Null-valueA null-value object is presented as an empty null XML element. False-valueA false-value object is presented as an empty false XML element. ArrayAn array is presented as a sequence of one or more subValue XML elements.
DictionaryA dictionary is presented as a sequence of one or more subKey XML elements.
vCardThis XML element represents a vCard object (as specified in the Jabber/XEP vCard XML documents).
vCardGroupThis XML element represents a vCardGroup object.
iCalendarThis XML element represents an iCalendar object.
vCalendarThis XML element represents a vCalendar object.
vtimezoneThis XML element represents a VTIMEZONE object.
BEGIN:VTIMEZONE
TZID:Europe/Central BEGIN:STANDARD DTSTART:19710101T030000 TZOFFSETFROM:+0200 TZOFFSETTO:+0100 RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU END:STANDARD BEGIN:DAYLIGHT DTSTART:19710101T020000 TZOFFSETFROM:+0100 TZOFFSETTO:+0200 RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU END:DAYLIGHT END:VTIMEZONE
<vtimezone>
<tzid>Europe/Central</tzid> <standard> <dtstart>19710101T030000</dtstart> <tzoffsetto>+0100</tzoffsetto> <rrule>FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU</rrule> </standard> <daylight> <dtstart>19710101T020000</dtstart> <tzoffsetto>+0200</tzoffsetto> <rrule>FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU</rrule> </daylight> </vtimezone> vevent, vtodoThese XML elements represent VEVENT and VTODO objects.
Example: BEGIN:VEVENT
ORGANIZER;CN="Jim Smith":MAILTO:jim_smith@example.com RRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=MO,TU,WE,TH;UNTIL=20060305T000000Z DTSTAMP:20051204T140844Z UID:566852630.4@mail.example.com SEQUENCE:1 SUMMARY:test - recurrent DTSTART;TZID=NorthAmerica/Pacific:20051204T100000 DTEND;TZID=NorthAmerica/Pacific:20051204T110000 X-MICROSOFT-CDO-BUSYSTATUS:BUSY LAST-MODIFIED:20051204T140844Z CREATED:20051204T140844Z PRIORITY:5 END:VEVENT BEGIN:VEVENT UID:566852630.4@mail.example.com RECURRENCE-ID:20051206T180000Z SUMMARY:test - recurrent (later this time) DTSTART;TZID=NorthAmerica/Pacific:20051206T120000 DTEND;TZID=NorthAmerica/Pacific:20051206T130000 END:VEVENT <vevent>
<organizer CN="Jim Smith">jim_smith@example.com</organizer> <rrule>FREQ=WEEKLY;INTERVAL=2;BYDAY=MO,TU,WE,TH;UNTIL=20060305T000000Z</rrule> <dtstamp>20051204T140844Z</dtstamp> <uid>566852630.4@mail.example.com</uid> <sequence>1</sequence> <summary>test - recurrent</summary> <dtstart tzid="NorthAmerica/Pacific">20051204T100000</dtstart> <dtend tzid="NorthAmerica/Pacific">20051204T110000</dtend> <busystatus>BUSY</busystatus> <last-modified>20051204T140844Z</last-modified> <created>20051204T140844Z</created> <priority>5</priority> <exceptions> <uid>566852630.4@mail.example.com</uid> <recurrenceId>20051206T180000Z</recurrenceId> <summary>test - recurrent (later this time)</summary> <dtstart tzid="NorthAmerica/Pacific">20051206T120000</dtstart> <dtend tzid="NorthAmerica/Pacific">20051206T130000</dtend> </exceptions> </vevent> vfreebusyThese XML elements represent VFREEBUSY objects.
Example: BEGIN:VFREEBUSY
DTSTART:20080329T075517Z DTEND:20080604T075517Z DTSTAMP:20080405T075517Z FREEBUSY:20080329T075517Z/20080329T120000Z FREEBUSY:20080330T070000Z/20080330T120000Z FREEBUSY:20080331T070000Z/20080331T120000Z END:VFREEBUSY <vfreebusy dtend="20080604T075517Z" dtstamp="20080405T075517Z" dtstart="20080329T075517Z">
<freebusy dtend="20080329T120000Z" dtstart="20080329T075517Z" /> <freebusy dtend="20080330T120000Z" dtstart="20080330T070000Z" /> <freebusy dtend="20080331T120000Z" dtstart="20080331T070000Z" /> </vfreebusy> xruleThis XML element represents an recurrence object.
RRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=MO,TU,WE,TH;UNTIL=20060305T000000Z
<xrule freq="WEEKLY" interval="2" until="20060305T000000Z">
<BYDAY>MO</BYDAY><BYDAY>TU</BYDAY><BYDAY>WE</BYDAY><BYDAY>TH</BYDAY> </xrule> Example: RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
<xrule freq="YEARLY">
<BYMONTH>10</BYMONTH><BYDAY week="-1">SU</BYDAY> </xrule> x509This XML element represents an X.509 Certificate.
sdpThis XML element represents an SDP object.
mediaThis XML element represents an SDP Media object.
codecThis XML element represents an SDP Media codec.
attrThis XML element represents an SDP or SDP Media attribute.
infoThis XML element represents an SDP or SDP Media information field element. Supported elements are:for SDP: info, uri, email, phone, phone, bandwidth, time, repeat, zone, and key elements; for SDP Media: title, bandwidth, and key elements;
Example: a sample SDP document and its XML presentation: v=0
o=- 6385718 9999 IN IP4 192.168.1.65 s=- e=support@communigate.ru c=IN IP4 192.168.1.65 t=0 0 a=sdpattr1:sdpvalue a=sdpattr2 m=audio 16398 RTP/AVP 0 4 8 101 t=title value a=rtpmap:0 PCMU/8000 a=rtpmap:4 G723/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv a=mediaattr1:mediavalue a=mediaattr2
<sdp ip="[192.168.1.65]" origUser="-" sessionID="6385718" sessionVersion="9999" originIP="[192.168.1.65]">
<email>support@communigate.ru</email> <attr name="sdpattr1">sdpvalue</attr> <attr name="sdpattr2" /> <media media="audio" ip="[192.168.1.65]:16398" protocol="RTP/AVP" direction="sendrecv"> <codec id="0" name="PCMU/8000" /> <codec id="4" name="G723/8000" /> <codec id="8" name="PCMA/8000" /> <codec id="101" name="telephone-event/8000" format="0-15" /> <title>title value</title> <attr name="mediaattr1">mediavalue</attr> <attr name="mediaattr2" /> </media> </sdp> ASN.1CommuniGate Pro can convert ASN.1 structures into generic objects. Each ASN.1 data element is converted into an array. For ASN.1 data elements of the Universal class, the array element number 0 is a string with the data element type:
boolean,
integer,
bits,
octets,
null,
false,
oid,
objdescr,
external,
real,
enum,
embed,
string,
reloid,
rsrv1,
rsrv2,
seq,
set,
stringNum,
stringPrint,
stringT61,
stringIA5,
string22,
timeUTC,
time,
stringGraphic,
stringISO64,
stringGeneral,
stringUniversal,
string29,
stringBMP,
string31.
For "primitive" data elements, the remaining array element contain the the data element presentation, which depends on the data element type:
|