Project

General

Profile

GUIprogress » History » Version 2

Adrian Georgescu, 03/16/2009 01:24 PM

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