ODF » History » Version 9
Adrian Georgescu, 11/04/2014 01:20 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 | 9 | Adrian Georgescu | This by far the simplest way. Establish a standard chat stream and add _'application/odf+xml'_ to the lists of supported payloads. Then add an attribute to the MSRP stream to signal the support for this feature: |
16 | 8 | Adrian Georgescu | |
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 | 1 | Adrian Georgescu | |
25 | 9 | Adrian Georgescu | After session negotiation, the clients can invoke their corespondent GUI elements related to the collaborative editing. |
26 | 1 | Adrian Georgescu | |
27 | 9 | Adrian Georgescu | This will work with any MSRP implementation, the data will piggy-back on top of an existent stream which makes development of a other end-points easy as no internal mechanism of session initiation must be done. |
28 | 7 | Adrian Georgescu | |
29 | 1 | Adrian Georgescu | h4. Variant 2 |
30 | 7 | Adrian Georgescu | |
31 | 9 | Adrian Georgescu | Create a new media type based on MSRP protocol similar to file-transfer or screen sharing. See SIP SIMPLE Client SDK MSRP streams definition: |
32 | 2 | Adrian Georgescu | |
33 | 1 | Adrian Georgescu | <pre> |
34 | sipsimple/streams/msrp.py |
||
35 | </pre> |
||
36 | |||
37 | 7 | Adrian Georgescu | Example of a new type of stream |
38 | 3 | Adrian Georgescu | |
39 | <pre> |
||
40 | class ODFStream(MSRPStreamBase): |
||
41 | type = 'odf' |
||
42 | |||
43 | media_type = 'odf' |
||
44 | accept_types = ['application/odf+xml'] |
||
45 | accept_wrapped_types = ['*'] |
||
46 | </pre> |
||
47 | 1 | Adrian Georgescu | |
48 | 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. |
||
49 | 7 | Adrian Georgescu | |
50 | 9 | Adrian Georgescu | This mechanism will require similar changes in other clients that wish to implement this feature. |
51 | 1 | Adrian Georgescu | |
52 | 6 | Adrian Georgescu | h3. Presence |
53 | 1 | Adrian Georgescu | |
54 | 9 | Adrian Georgescu | Optionally, the end-points supporting this feature can advertise this capability by publishing it using the SIP SIMPLE Presence payload. For this, the end-point capabilities must be extended to support off. |
55 | 1 | Adrian Georgescu | |
56 | <pre> |
||
57 | 4 | Adrian Georgescu | sipsimple/payloads/caps.py |
58 | 1 | Adrian Georgescu | </pre> |
59 | 6 | Adrian Georgescu | |
60 | h2. GUI changes |
||
61 | |||
62 | 9 | Adrian Georgescu | The GUI must handle sessions for incoming and outgoing media stream defined above by creating its own controller that it is invoked either when negotiating the session, when a proper payload arrives over the chat channel or when user clicks in the GUI. |