Module: pysyncml.ctype¶
The pysyncml.ctype module exposes the pysyncml.ContentTypeInfo class, which abstracts content-type handling with respect to transmission, reception and preferred status within SyncML handling.
- class pysyncml.ctype.ContentTypeInfo(ctype=None, versions=None, preferred=False, transmit=True, receive=True, *args, **kw)[source]¶
The ContentTypeInfo class defines a content-type handling capability of a pysyncml Agent.
The ContentTypeInfo constructor supports the following parameters:
Parameters: - ctype – specifies the content-type string, for example 'text/plain'.
- versions – a version string (or list thereof) of the specified ctype that are supported, for example ['1.0', '1.1'].
- preferred – boolean specifying whether or not this is the preferred content-type. Note that only one ContentTypeInfo can be marked as being preferred.
- transmit – boolean specifying whether or not the Agent can transmit this content-type, i.e. a call to pysyncml.Agent.dumpItem with this content-type will succeed.
- receive – boolean specifying whether or not the Agent can receive this content-type, i.e. a call to pysyncml.Agent.loadItem with this content-type will succeed.