Project

General

Profile

GUIprogress » History » Version 1

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