GUIprogress

Version 4 (Adrian Georgescu, 07/25/2010 09:11 am)

1 1 Adrian Georgescu
= SIP SIMPLE client GUI  =
2 1 Adrian Georgescu
3 1 Adrian Georgescu
Development blueprint for the development of a cross platform GUI for the SIP SIMPLE client library.
4 1 Adrian Georgescu
5 1 Adrian Georgescu
== Background ==
6 1 Adrian Georgescu
7 1 Adrian Georgescu
SIP SIMPLE client is a Python software library that allows for easy development of Internet
8 1 Adrian Georgescu
communications end-points based on SIP and related protocols for voice,
9 1 Adrian Georgescu
rich presence, session based instant messaging (IM), file transfers and desktop sharing. 
10 1 Adrian Georgescu
Other media types can be easily added by using an extensible high-level API.
11 1 Adrian Georgescu
12 1 Adrian Georgescu
== Stages ==
13 1 Adrian Georgescu
14 1 Adrian Georgescu
The implementation of the GUI consists of the following stages:
15 1 Adrian Georgescu
16 4 Adrian Georgescu
 1. ~~Design and implementation of a middleware API~~
17 4 Adrian Georgescu
 1. ~~Implementation of a notification bus ~~
18 4 Adrian Georgescu
 1. ~~Identifications of the GUI events~~
19 4 Adrian Georgescu
 1. ~~Identifications of the GUI visual elements~~
20 4 Adrian Georgescu
 1. ~~Identification of GUI toolkits~~
21 4 Adrian Georgescu
 1. ~~Study GUI toolkit documentation~~
22 4 Adrian Georgescu
 1. ~~Identify the platform dependent modifications required for the library~~
23 4 Adrian Georgescu
 1. ~~Implement a prototype GUI~~
24 4 Adrian Georgescu
 1. ~~Fine tune middleware classes and events~~
25 4 Adrian Georgescu
 1. ~~Finalize the specifications for the GUI development~~
26 1 Adrian Georgescu
 1. Implement cross platform GUI based
27 1 Adrian Georgescu
 1. Create GUI installation packages for each target OS
28 1 Adrian Georgescu
 1. Deploy GUI to end user and collect feedback
29 1 Adrian Georgescu
 1. Update GUI with end-user feed back
30 1 Adrian Georgescu
31 2 Adrian Georgescu
Below is a rough visual representation of the progress for each component. 
32 2 Adrian Georgescu
33 2 Adrian Georgescu
[[Image(sipsimple-gui-development.png)]]
34 1 Adrian Georgescu
35 1 Adrian Georgescu
==  Design and implementation of a middleware API ==
36 1 Adrian Georgescu
37 1 Adrian Georgescu
The GUI should not be aware about the underlying protocols and their interaction. this requires the building of an extra layer between the GUI and the protocol components (called middleware). The middleware has been implemented as an addition to SIP SIMPLE library as follows:
38 1 Adrian Georgescu
39 1 Adrian Georgescu
 * [browser:sipsimple/session.py] - event driven high level class for handling sessions
40 1 Adrian Georgescu
 * [browser:sipsimple/account.py] - account manager to handle multiple SIP accounts
41 1 Adrian Georgescu
 * [browser:sipsimple/configuration/settings.py] - storage container for middleware and GUI settings
42 1 Adrian Georgescu
 
43 1 Adrian Georgescu
== Implementation of a notification bus ==
44 1 Adrian Georgescu
45 3 Adrian Georgescu
The notification bus is a mechanism to receive notifications from the underlying SIP SIMPLE libraries and translate them into GUI events.
46 1 Adrian Georgescu
47 3 Adrian Georgescu
It has been implemented into version 1.1.0 of python application from http://pypi.python.org/pypi/python-application/
48 1 Adrian Georgescu
49 1 Adrian Georgescu
== Identifications of the GUI events ==
50 1 Adrian Georgescu
51 1 Adrian Georgescu
Such events consists of notifications for sessions or presence notification from the underlying components. 
52 1 Adrian Georgescu
53 1 Adrian Georgescu
==== notifications ====
54 1 Adrian Georgescu
55 1 Adrian Georgescu
 '''SCSessionChangedState'''::
56 1 Adrian Georgescu
  Will be sent whenever the {{{Session}}} object changes its state.
57 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
58 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
59 1 Adrian Georgescu
  [[BR]]''prev_state'':[[BR]]
60 1 Adrian Georgescu
  The previous state state the object was in.
61 1 Adrian Georgescu
  [[BR]]''state'':[[BR]]
62 1 Adrian Georgescu
  The new state the object is in.
63 1 Adrian Georgescu
 '''SCSessionNewIncoming'''::
64 1 Adrian Georgescu
  Will be sent when a new incoming {{{Session}}} is received.
65 1 Adrian Georgescu
  The application should listen for this notification from all objects specifically to get informed of incoming sessions.
66 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
67 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
68 1 Adrian Georgescu
  [[BR]]''has_audio'':[[BR]]
69 1 Adrian Georgescu
  A boolean indicating if the remote party proposed an audio stream within this session.
70 1 Adrian Georgescu
  [[BR]]''has_chat'':[[BR]]
71 1 Adrian Georgescu
  A boolean indicating if the remote party proposed a chat stream within this session.
72 1 Adrian Georgescu
 '''SCSessionNewOutgoing'''::
73 1 Adrian Georgescu
  Will be sent when the applcation requests a new outgoing {{{Session}}}.
74 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
75 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
76 1 Adrian Georgescu
 '''SCSessionGotRingIndication'''::
77 1 Adrian Georgescu
  Will be sent when an outgoing {{{Session}}} receives an indication that a remote device is ringing.
78 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
79 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
80 1 Adrian Georgescu
 '''SCSessionWillStart'''::
81 1 Adrian Georgescu
  Will be sent just before a {{{Session}}} completes negotiation.
82 1 Adrian Georgescu
  In terms of SIP, this is sent after the final response to the {{{INVITE}}}, but before the {{{ACK}}}.
83 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
84 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
85 1 Adrian Georgescu
 '''SCSessionDidStart'''::
86 1 Adrian Georgescu
  Will be sent when a {{{Session}}} completes negotiation.
87 1 Adrian Georgescu
  In terms of SIP this is sent after the {{{ACK}}} was sent or received.
88 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
89 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
90 1 Adrian Georgescu
 '''SCSessionDidFail'''::
91 1 Adrian Georgescu
  This notification is sent whenever the session fails.
92 1 Adrian Georgescu
  The failure reason is included in the data attributes.
93 1 Adrian Georgescu
  This notification is always followed by {{{SCSessionDidEnd}}}.
94 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
95 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
96 1 Adrian Georgescu
  [[BR]]''originator'':[[BR]]
97 1 Adrian Georgescu
  A string indicating the origin of the failure.
98 1 Adrian Georgescu
  This will either be "local" or "remote".
99 1 Adrian Georgescu
  [[BR]]''code'':[[BR]]
100 1 Adrian Georgescu
  The SIP error code of the failure.
101 1 Adrian Georgescu
  If this is 0, the error was an internal exception.
102 1 Adrian Georgescu
  [[BR]]''reason'':[[BR]]
103 1 Adrian Georgescu
  A string explaining the reason of the failure.
104 1 Adrian Georgescu
 '''SCSessionWillEnd'''::
105 1 Adrian Georgescu
  Will be sent just before terminating a {{{Session}}} at the request of the application.
106 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
107 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
108 1 Adrian Georgescu
 '''SCSessionDidEnd'''::
109 1 Adrian Georgescu
  Will be sent always when a {{{Session}}} ends, either because of a failure (in which case it is preceded by {{{SCSessionDidFail}}}), remote or local session termination.
110 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
111 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
112 1 Adrian Georgescu
  [[BR]]''originator'':[[BR]]
113 1 Adrian Georgescu
  A string indicating who originated the termination.
114 1 Adrian Georgescu
  This will either be "local" or "remote".
115 1 Adrian Georgescu
 '''SCSessionGotHoldRequest'''::
116 1 Adrian Georgescu
  Will be sent when the session got put on hold, either by the local or the remote party.
117 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
118 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
119 1 Adrian Georgescu
  [[BR]]''originator'':[[BR]]
120 1 Adrian Georgescu
  A string indicating who originated the hold request, and consequently in which direction the session got put on hold.
121 1 Adrian Georgescu
 '''SCSessionGotUnholdRequest'''::
122 1 Adrian Georgescu
  Will be sent when the session got taken out of hold, either by the local or the remote party.
123 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
124 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
125 1 Adrian Georgescu
  [[BR]]''originator'':[[BR]]
126 1 Adrian Georgescu
  A string indicating who sent the original hold request, and consequently in which direction the session got taken out of hold.
127 1 Adrian Georgescu
 '''SCSessionWillStartRecordingAudio'''::
128 1 Adrian Georgescu
  Will be sent when the application requested that the audio stream active within the session be record to a {{{.wav}}} file, just before recording starts.
129 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
130 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
131 1 Adrian Georgescu
  [[BR]]''file_name'':[[BR]]
132 1 Adrian Georgescu
  The name of the recording {{{.wav}}} file, including full path.
133 1 Adrian Georgescu
 '''SCSessionDidStartRecordingAudio'''::
134 1 Adrian Georgescu
  Will be sent when the application requested that the audio stream active within the session be record to a {{{.wav}}} file, just after recording starts.
135 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
136 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
137 1 Adrian Georgescu
  [[BR]]''file_name'':[[BR]]
138 1 Adrian Georgescu
  The name of the recording {{{.wav}}} file, including full path.
139 1 Adrian Georgescu
 '''SCSessionWillStopRecordingAudio'''::
140 1 Adrian Georgescu
  Will be sent when the application requested ending the recording to a {{{.wav}}} file, just before recording stops.
141 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
142 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
143 1 Adrian Georgescu
  [[BR]]''file_name'':[[BR]]
144 1 Adrian Georgescu
  The name of the recording {{{.wav}}} file, including full path.
145 1 Adrian Georgescu
 '''SCSessionDidStopRecordingAudio'''::
146 1 Adrian Georgescu
  Will be sent when the application requested ending the recording to a {{{.wav}}} file, just before recording stops.
147 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
148 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
149 1 Adrian Georgescu
  [[BR]]''file_name'':[[BR]]
150 1 Adrian Georgescu
  The name of the recording {{{.wav}}} file, including full path.
151 1 Adrian Georgescu
 '''SCSessionGotNoAudio'''::
152 1 Adrian Georgescu
  This notification will be sent if 5 seconds after the audio stream starts, no audio was received from the remote party.
153 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
154 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
155 1 Adrian Georgescu
 '''SCSessionGotDTMF'''::
156 1 Adrian Georgescu
  Will be send if there is a DMTF digit received from the remote party on the audio stream. 
157 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
158 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
159 1 Adrian Georgescu
  [[BR]]''digit'':[[BR]]
160 1 Adrian Georgescu
  The DTMF digit that was received, in the form of a string of length 1.
161 1 Adrian Georgescu
 '''SCSessionGotMessage'''::
162 1 Adrian Georgescu
  Will be sent whenever a MSRP message is received on the chat stream of the session.
163 1 Adrian Georgescu
  [[BR]]''content'':[[BR]]
164 1 Adrian Georgescu
  The body of the message.
165 1 Adrian Georgescu
  [[BR]]''content_type'':[[BR]]
166 1 Adrian Georgescu
  The Content-Type of the body.
167 1 Adrian Georgescu
  [[BR]]''cpim_headers'':[[BR]]
168 1 Adrian Georgescu
  A dictionary of headers included in the CPIM wrapper.
169 1 Adrian Georgescu
  [[BR]]''message'':[[BR]]
170 1 Adrian Georgescu
  Raw MSRP message, an msrplib.protocol.MSRPData instance
171 1 Adrian Georgescu
 '''SCSessionDidDeliverMessage'''::
172 1 Adrian Georgescu
  Will be sent when a previously sent MSRP chat message got delivered to the remote party.
173 1 Adrian Georgescu
  [[BR]]''message_id'':[[BR]]
174 1 Adrian Georgescu
  The unique identifier of this message as a string, as previously returned by the {{{send_message()}}} method.
175 1 Adrian Georgescu
  [[BR]]''code'':[[BR]]
176 1 Adrian Georgescu
  The response code of the confirmation report.
177 1 Adrian Georgescu
  [[BR]]''reason'':[[BR]]
178 1 Adrian Georgescu
  The reason string of the confirmation report.
179 1 Adrian Georgescu
  [[BR]]''message'':[[BR]]
180 1 Adrian Georgescu
  Raw MSRP message, an msrplib.protocol.MSRPData instance
181 1 Adrian Georgescu
 '''SCSessionDidDeliverMessage'''::
182 1 Adrian Georgescu
  Will be sent when a previously sent MSRP chat message did not get delivered to the remote party.
183 1 Adrian Georgescu
  [[BR]]''message_id'':[[BR]]
184 1 Adrian Georgescu
  The unique identifier of this message as a string, as previously returned by the {{{send_message()}}} method.
185 1 Adrian Georgescu
  [[BR]]''code'':[[BR]]
186 1 Adrian Georgescu
  The response code of the confirmation report.
187 1 Adrian Georgescu
  [[BR]]''reason'':[[BR]]
188 1 Adrian Georgescu
  The reason string of the confirmation report.
189 1 Adrian Georgescu
  [[BR]]''message'':[[BR]]
190 1 Adrian Georgescu
  Raw MSRP message, an msrplib.protocol.MSRPData instance
191 1 Adrian Georgescu
 '''SCSessionGotStreamProposal'''::
192 1 Adrian Georgescu
  Will be sent when either the local or the remote party proposes to add a stream to the session.
193 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
194 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
195 1 Adrian Georgescu
  [[BR]]''proposer'':[[BR]]
196 1 Adrian Georgescu
  The party that did the stream proposal, can be either "local" or "remote".
197 1 Adrian Georgescu
  [[BR]]''adds_audio'':[[BR]]
198 1 Adrian Georgescu
  A boolean indicating if the proposal would add an audio stream.
199 1 Adrian Georgescu
  [[BR]]''adds_chat'':[[BR]]
200 1 Adrian Georgescu
  A boolean indicating if the proposal would add a chat stream.
201 1 Adrian Georgescu
 '''SCSessionRejectedStreamProposal'''::
202 1 Adrian Georgescu
  Will be sent when either the local or the remote party rejects a proposal to have (a) stream(s) added to the session.
203 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
204 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
205 1 Adrian Georgescu
  [[BR]]''proposer'':[[BR]]
206 1 Adrian Georgescu
  The party that did the stream proposal, can be either "local" or "remote".
207 1 Adrian Georgescu
  [[BR]]''reason'':[[BR]]
208 1 Adrian Georgescu
  The reason for rejecting the stream proposal.
209 1 Adrian Georgescu
 '''SCSessionRejectedStreamProposal'''::
210 1 Adrian Georgescu
  Will be sent when either the local or the remote party accepts a proposal to have (a) stream(s) added to the session.
211 1 Adrian Georgescu
  [[BR]]''timestamp'':[[BR]]
212 1 Adrian Georgescu
  A {{{datetime.datetime}}} object indicating when the notification was sent.
213 1 Adrian Georgescu
  [[BR]]''proposer'':[[BR]]
214 1 Adrian Georgescu
  The party that did the stream proposal, can be either "local" or "remote".
215 1 Adrian Georgescu
216 1 Adrian Georgescu
 
217 1 Adrian Georgescu
== Identification of GUI toolkits ==
218 1 Adrian Georgescu
219 3 Adrian Georgescu
The following toolkits have been identified:
220 1 Adrian Georgescu
221 3 Adrian Georgescu
 * Cocoa for MacOSX OS - used for prototyping the final middleware and GUI specifications
222 1 Adrian Georgescu
 * QT - used for Linux, Windows and other supported OS based
223 1 Adrian Georgescu
224 1 Adrian Georgescu
== Study GUI toolkit documentation ==
225 1 Adrian Georgescu
226 1 Adrian Georgescu
Cocoa toolkit documentation has been studied.