ODF » History » Version 8
Adrian Georgescu, 11/04/2014 01:16 PM
1 | 1 | Adrian Georgescu | h1. ODF integration |
---|---|---|---|
2 | |||
3 | 5 | Adrian Georgescu | This documents layout the changes required to support a new type of stream for collaborative editing. |
4 | 1 | Adrian Georgescu | |
5 | 6 | Adrian Georgescu | h2. SDK changes |
6 | 1 | Adrian Georgescu | |
7 | 6 | Adrian Georgescu | h3. Signaling |
8 | |||
9 | 1 | Adrian Georgescu | There is no need to alter anything related to signalling. |
10 | |||
11 | 6 | Adrian Georgescu | h3. Media |
12 | 1 | Adrian Georgescu | |
13 | 7 | Adrian Georgescu | h4. Variant 1 |
14 | |||
15 | 8 | Adrian Georgescu | This by far the simplest way. Establish a standard chat stream and add _'application/odf+xml'_ to the lists of supported payloads. Add an attribute to the MSRP stream to signal the support for this feature: |
16 | |||
17 | <pre> |
||
18 | class BlinkChatStream(ChatStream): |
||
19 | def _create_local_media(self, uri_path): |
||
20 | local_media = super(BlinkChatStream, self)._create_local_media(uri_path) |
||
21 | local_media.attributes.append(SDPAttribute('features', 'history-control icon otf-editor')) |
||
22 | return local_media |
||
23 | </pre> |
||
24 | |||
25 | |||
26 | 7 | Adrian Georgescu | |
27 | h4. Variant 2 |
||
28 | |||
29 | 2 | Adrian Georgescu | A new MSRP media type can be created similar to file-transfer or screen sharing. See SIP SIMPLE Client SDK MSRP streams definition: |
30 | |||
31 | 1 | Adrian Georgescu | <pre> |
32 | sipsimple/streams/msrp.py |
||
33 | </pre> |
||
34 | |||
35 | 7 | Adrian Georgescu | Example of a new type of stream |
36 | 3 | Adrian Georgescu | |
37 | <pre> |
||
38 | class ODFStream(MSRPStreamBase): |
||
39 | type = 'odf' |
||
40 | |||
41 | media_type = 'odf' |
||
42 | accept_types = ['application/odf+xml'] |
||
43 | accept_wrapped_types = ['*'] |
||
44 | </pre> |
||
45 | 1 | Adrian Georgescu | |
46 | Once established, the MSRP stream can cary back and forth payloads of the types specified in the stream definition. Is up to the end-points to handle the actual payloads and match various files shared through this mechanism over the same session. The SIP session id can be used to group together various flows within the same stream. |
||
47 | 7 | Adrian Georgescu | |
48 | 1 | Adrian Georgescu | |
49 | 6 | Adrian Georgescu | h3. Presence |
50 | 1 | Adrian Georgescu | |
51 | The end-points supporting this feature will advertise this capability by publishing it using SIP SIMPLE Presence. For this the end-point capabilities must be extended to support off. |
||
52 | |||
53 | <pre> |
||
54 | sipsimple/payloads/caps.py |
||
55 | 4 | Adrian Georgescu | </pre> |
56 | 6 | Adrian Georgescu | |
57 | h2. GUI changes |
||
58 | |||
59 | The GUI must handle sessions for incoming and outgoing media stream defined above by creating its own controller. |