'ExtensionFromChange', 'ExtensionGruu', 'ExtensionHistinfo',
    'ExtensionJoin', 'ExtensionNoRefSub', 'ExtensionPath',
    'ExtensionPrecondition', 'ExtensionPref', 'ExtensionPrivacy',
    'ExtensionRecipientListInvite', 'ExtensionRecipientListSubscribe',
    'ExtensionReplaces', 'ExtensionResourcePriority', 'ExtensionSdpAnat',
    'ExtensionSecAgree', 'ExtensionTdialog', 'ExtensionTimer', 'Schemes',
    'Scheme', 'Actor', 'ActorPrincipal', 'ActorAttendant', 'ActorMsgTaker',
    'ActorInformation', 'IsFocus', 'Languages', 'Language', 'Servcaps',
    'Mobility', 'MobilityFixed', 'MobilityMobile', 'Devcaps',
    'ServcapsExtension', 'EventPackagesExtension', 'PriorityExtension',
    'MethodsExtension', 'ExtensionsExtension', 'DevcapsExtension',
    'MobilityExtension'
]

caps_namespace = "urn:ietf:params:xml:ns:pidf:caps"
PIDFApplication.register_namespace(caps_namespace, prefix='caps')


# Marker mixins
class ServcapsExtension(object):
    pass


class EventPackagesExtension(object):
    pass


class PriorityExtension(object):
    pass

Beispiel #2
0
           'PlaceType',
           'AudioPrivacy',
           'TextPrivacy',
           'VideoPrivacy',
           'Privacy',
           'Relationship',
           'ServiceClass',
           'Sphere',
           'StatusIcon',
           'TimeOffset',
           'UserInput',
           'Class',
           'Other']

rpid_namespace = 'urn:ietf:params:xml:ns:pidf:rpid'
PIDFApplication.register_namespace(rpid_namespace, prefix='rpid')


## Marker mixins

class ActivityElement(object): pass
class MoodElement(object): pass
class PlaceTypeElement(object): pass
class PrivacyElement(object): pass
class SphereElement(object): pass


## Attribute value types

class AudioPlaceValue(str):
    def __new__(cls, value):
Beispiel #3
0
            'Language',
            'Servcaps',
            'Mobility',
            'MobilityFixed',
            'MobilityMobile',
            'Devcaps',
            'ServcapsExtension',
            'EventPackagesExtension',
            'PriorityExtension',
            'MethodsExtension',
            'ExtensionsExtension',
            'DevcapsExtension',
            'MobilityExtension']

caps_namespace = "urn:ietf:params:xml:ns:pidf:caps"
PIDFApplication.register_namespace(caps_namespace, prefix='caps')

# Marker mixins
class ServcapsExtension(object): pass
class EventPackagesExtension(object): pass
class PriorityExtension(object): pass
class MethodsExtension(object): pass
class ExtensionsExtension(object): pass
class DevcapsExtension(object): pass
class MobilityExtension(object): pass


class BooleanValue(object):
    def __new__(cls, value):
        if type(value) is str and value in ('true', 'false'):
            return str.__new__(str, value)
from sipsimple.payloads import parse_qname, ParserError, ValidationError, XMLElement, XMLListElement, XMLEmptyElement, XMLStringElement, XMLAttribute, XMLElementChild
from sipsimple.payloads.presdm import PIDFApplication, ServiceExtension, PersonExtension, DeviceExtension, Note, NotesAttribute, Service, Person, Device
from sipsimple.payloads.util import UnsignedLong
from sipsimple.util import Timestamp

__all__ = [
    'rpid_namespace', 'ActivityElement', 'MoodElement', 'PlaceTypeElement',
    'PrivacyElement', 'SphereElement', 'RPIDNote', 'Activities', 'Mood',
    'PlaceIs', 'AudioPlaceInformation', 'VideoPlaceInformation',
    'TextPlaceInformation', 'PlaceType', 'AudioPrivacy', 'TextPrivacy',
    'VideoPrivacy', 'Privacy', 'Relationship', 'ServiceClass', 'Sphere',
    'StatusIcon', 'TimeOffset', 'UserInput', 'Class', 'Other'
]

rpid_namespace = 'urn:ietf:params:xml:ns:pidf:rpid'
PIDFApplication.register_namespace(rpid_namespace, prefix='rpid')

## Marker mixins


class ActivityElement(object):
    pass


class MoodElement(object):
    pass


class PlaceTypeElement(object):
    pass
Beispiel #5
0
#

"""
CIPID handling according to RFC4482

This module provides an extension to PIDF (module sipsimple.payloads.presdm)
to provide additional contact information about a presentity.
"""

from sipsimple.payloads import XMLStringElement
from sipsimple.payloads.presdm import PIDFApplication, ServiceExtension, PersonExtension, Service, Person

__all__ = ['cipid_namespace', 'Card', 'DisplayName', 'Homepage', 'Icon', 'Map', 'Sound']

cipid_namespace = "urn:ietf:params:xml:ns:pidf:cipid"
PIDFApplication.register_namespace(cipid_namespace, prefix='c')

class Card(XMLStringElement, PersonExtension, ServiceExtension):
    _xml_tag = 'card'
    _xml_namespace = cipid_namespace
    _xml_application = PIDFApplication

Person.register_extension('card', type=Card)
Service.register_extension('card', type=Card)

class DisplayName(XMLStringElement, PersonExtension, ServiceExtension):
    _xml_tag = 'display-name'
    _xml_namespace = cipid_namespace
    _xml_application = PIDFApplication
    _xml_lang = True