summaryrefslogtreecommitdiff
authorharlekin <harlekin>2004-02-22 23:38:58 (UTC)
committer harlekin <harlekin>2004-02-22 23:38:58 (UTC)
commit666a49773d06ac94c19996d763854725c2f7a578 (patch) (unidiff)
treec886c9373ed967ed5dfe468ac6260d4c5218c4d1
parent2fc1e609a40a47df6a38256faccfee7916b59bbd (diff)
downloadopie-666a49773d06ac94c19996d763854725c2f7a578.zip
opie-666a49773d06ac94c19996d763854725c2f7a578.tar.gz
opie-666a49773d06ac94c19996d763854725c2f7a578.tar.bz2
initial checkin of opie linphone, not really usefull yet, just to make sure I dont loose any data
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/linphone/.cvsignore6
-rw-r--r--noncore/net/linphone/linphone.pro12
-rw-r--r--noncore/net/linphone/linphoneconfig.cpp65
-rw-r--r--noncore/net/linphone/linphoneconfig.h21
-rw-r--r--noncore/net/linphone/main.cpp22
-rw-r--r--noncore/net/linphone/mainwidget.ui714
-rw-r--r--noncore/net/linphone/mainwindow.cpp37
-rw-r--r--noncore/net/linphone/mainwindow.h35
-rw-r--r--noncore/net/linphone/qlinphone.cpp210
-rw-r--r--noncore/net/linphone/qlinphone.h138
-rw-r--r--noncore/net/linphone/settingsdialog.ui797
11 files changed, 2057 insertions, 0 deletions
diff --git a/noncore/net/linphone/.cvsignore b/noncore/net/linphone/.cvsignore
new file mode 100644
index 0000000..e971ae6
--- a/dev/null
+++ b/noncore/net/linphone/.cvsignore
@@ -0,0 +1,6 @@
1.moc
2Makefile
3mainwidget.cpp
4mainwidget.h
5settingsdialog.cpp
6settingsdialog.h
diff --git a/noncore/net/linphone/linphone.pro b/noncore/net/linphone/linphone.pro
new file mode 100644
index 0000000..9f9163c
--- a/dev/null
+++ b/noncore/net/linphone/linphone.pro
@@ -0,0 +1,12 @@
1 CONFIG += qt warn on release quick-app
2
3 HEADERS = qlinphone.h mainwindow.h linphoneconfig.h
4 SOURCES = qlinphone.cpp mainwindow.cpp linphoneconfig.cpp main.cpp
5INTERFACES = mainwidget.ui settingsdialog.ui
6
7 INCLUDEPATH+= $(OPIEDIR)/include /usr/include/linphone /usr/include/osipua /usr/include/ortp /usr/include/glib-2.0 /usr/lib/glib-2.0/include
8 DEPENDPATH+= $(OPIEDIR)/include
9LIBS += -lqpe -lopie -llinphone
10 TARGET = olinphone
11
12include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/net/linphone/linphoneconfig.cpp b/noncore/net/linphone/linphoneconfig.cpp
new file mode 100644
index 0000000..ee02e1a
--- a/dev/null
+++ b/noncore/net/linphone/linphoneconfig.cpp
@@ -0,0 +1,65 @@
1#include <qspinbox.h>
2#include <qlineedit.h>
3#include <qcheckbox.h>
4#include <qslider.h>
5
6#include <qpe/config.h>
7
8#include "linphoneconfig.h"
9
10
11LinPhoneConfig::LinPhoneConfig( QWidget* parent , const char* name , bool modal, WFlags fl ) : SettingsDialog( parent, name, modal, fl ) {
12 loadConfig();
13}
14
15LinPhoneConfig::~LinPhoneConfig() {
16}
17
18void LinPhoneConfig::loadConfig() {
19 Config cfg("opie-phone");
20 cfg.setGroup( "net" );
21 cfg.setGroup( "sip" );
22 PortSpin->setValue( cfg.readNumEntry( "sip_port", 5060 ) );
23 UserPartLine->setText( cfg.readEntry( "username", "" ) );
24 HostPartLine->setText( cfg.readEntry( "hostname", "" ) );
25 CheckBoxReg->setChecked( cfg.readBoolEntry( "use_registrar", 0 ) );
26 ServerAddressLine->setText( cfg.readEntry( "registrar", "" ) );
27 // cannot use crypt due to gnome stuff in linephone
28 PasswordLine->setText( cfg.readEntry( "reg_password", "" ) );
29 RecordLine->setText( cfg.readEntry( "addr_of_rec", "" ) );
30 CheckBoxProxy->setChecked( cfg.readBoolEntry( "as_proxy", 0 ) );
31 cfg.setGroup( "rtp" );
32 RTPPort->setText( cfg.readEntry( "audio_rtp_port", "" ) );
33 SliderJitter->setValue( cfg.readNumEntry( "jitt_comp", 60 ) );
34 cfg.setGroup( "audio" );
35 // source
36 cfg.setGroup( "video" );
37 cfg.setGroup( "codecs" );
38 cfg.setGroup( "address_book" );
39}
40
41void LinPhoneConfig::writeConfig() {
42 Config cfg("opie-phone");
43 cfg.setGroup( "net" );
44 cfg.setGroup( "sip" );
45 cfg.writeEntry( "sip_port", PortSpin->value() );
46 cfg.writeEntry( "username", UserPartLine->text() );
47 cfg.writeEntry( "hostname", HostPartLine->text() );
48 cfg.writeEntry( "use_registrar", CheckBoxReg->isChecked() );
49 cfg.writeEntry( "registrar", ServerAddressLine->text() );
50 cfg.writeEntry( "reg_password", PasswordLine->text() );
51 cfg.writeEntry( "addr_of_rec", RecordLine->text() );
52 cfg.writeEntry( "as_proxy", CheckBoxProxy->isChecked() );
53 cfg.setGroup( "rtp" );
54 cfg.writeEntry( "audio_rtp_port", RTPPort->text() );
55 cfg.writeEntry( "jitt_comp", SliderJitter->value() );
56 cfg.setGroup( "audio" );
57 cfg.setGroup( "video" );
58 cfg.setGroup( "codecs" );
59 cfg.setGroup( "address_book" );
60}
61
62void LinPhoneConfig::accept() {
63 writeConfig();
64 QDialog::accept();
65}
diff --git a/noncore/net/linphone/linphoneconfig.h b/noncore/net/linphone/linphoneconfig.h
new file mode 100644
index 0000000..6ab8947
--- a/dev/null
+++ b/noncore/net/linphone/linphoneconfig.h
@@ -0,0 +1,21 @@
1#ifndef LINPHONECONFIG_H
2#define LINPHONECONFIG_H
3
4#include "settingsdialog.h"
5
6class LinPhoneConfig : public SettingsDialog {
7
8 Q_OBJECT
9
10public:
11 LinPhoneConfig( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
12 virtual ~LinPhoneConfig();
13
14private slots:
15 void accept();
16
17private:
18 void writeConfig();
19 void loadConfig();
20};
21#endif
diff --git a/noncore/net/linphone/main.cpp b/noncore/net/linphone/main.cpp
new file mode 100644
index 0000000..9146fee
--- a/dev/null
+++ b/noncore/net/linphone/main.cpp
@@ -0,0 +1,22 @@
1/***************************************************************************
2 main-opie.cpp - description
3 -------------------
4 begin : ven mai 23 19:26:00 CEST 2003
5 copyright : (C) 2003 by Simon Morlat
6 email : simon.morlat@linphone.org
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17#include <opie/oapplicationfactory.h>
18#include "mainwindow.h"
19
20OPIE_EXPORT_APP( OApplicationFactory<MainWindow> )
21
22
diff --git a/noncore/net/linphone/mainwidget.ui b/noncore/net/linphone/mainwidget.ui
new file mode 100644
index 0000000..b354713
--- a/dev/null
+++ b/noncore/net/linphone/mainwidget.ui
@@ -0,0 +1,714 @@
1<!DOCTYPE UI><UI>
2<class>_QLinphoneMainWidget</class>
3<widget>
4 <class>QWidget</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>_QLinphoneMainWidget</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>385</width>
15 <height>410</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>sizePolicy</name>
20 <sizepolicy>
21 <hsizetype>7</hsizetype>
22 <vsizetype>7</vsizetype>
23 </sizepolicy>
24 </property>
25 <property stdset="1">
26 <name>caption</name>
27 <string>opie-phone</string>
28 <comment>SIP internet phone</comment>
29 </property>
30 <property stdset="1">
31 <name>icon</name>
32 <pixmap>image0</pixmap>
33 </property>
34 <property>
35 <name>layoutMargin</name>
36 </property>
37 <property>
38 <name>layoutSpacing</name>
39 </property>
40 <hbox>
41 <property stdset="1">
42 <name>margin</name>
43 <number>3</number>
44 </property>
45 <property stdset="1">
46 <name>spacing</name>
47 <number>3</number>
48 </property>
49 <widget>
50 <class>QFrame</class>
51 <property stdset="1">
52 <name>name</name>
53 <cstring>Frame5</cstring>
54 </property>
55 <property stdset="1">
56 <name>sizePolicy</name>
57 <sizepolicy>
58 <hsizetype>7</hsizetype>
59 <vsizetype>7</vsizetype>
60 </sizepolicy>
61 </property>
62 <property stdset="1">
63 <name>frameShape</name>
64 <enum>StyledPanel</enum>
65 </property>
66 <property stdset="1">
67 <name>frameShadow</name>
68 <enum>Raised</enum>
69 </property>
70 <property>
71 <name>layoutMargin</name>
72 </property>
73 <property>
74 <name>layoutSpacing</name>
75 </property>
76 <vbox>
77 <property stdset="1">
78 <name>margin</name>
79 <number>3</number>
80 </property>
81 <property stdset="1">
82 <name>spacing</name>
83 <number>3</number>
84 </property>
85 <widget>
86 <class>QLineEdit</class>
87 <property stdset="1">
88 <name>name</name>
89 <cstring>sip_url</cstring>
90 </property>
91 <property stdset="1">
92 <name>text</name>
93 <string>sip:</string>
94 </property>
95 </widget>
96 <widget>
97 <class>QLayoutWidget</class>
98 <property stdset="1">
99 <name>name</name>
100 <cstring>Layout10</cstring>
101 </property>
102 <hbox>
103 <property stdset="1">
104 <name>margin</name>
105 <number>0</number>
106 </property>
107 <property stdset="1">
108 <name>spacing</name>
109 <number>6</number>
110 </property>
111 <widget>
112 <class>QPushButton</class>
113 <property stdset="1">
114 <name>name</name>
115 <cstring>_callbutton</cstring>
116 </property>
117 <property stdset="1">
118 <name>text</name>
119 <string>Call/Answer</string>
120 </property>
121 </widget>
122 <widget>
123 <class>QPushButton</class>
124 <property stdset="1">
125 <name>name</name>
126 <cstring>_hangupbutton</cstring>
127 </property>
128 <property stdset="1">
129 <name>text</name>
130 <string>Hangup/Refuse</string>
131 </property>
132 </widget>
133 </hbox>
134 </widget>
135 <widget>
136 <class>QCheckBox</class>
137 <property stdset="1">
138 <name>name</name>
139 <cstring>CheckBox1</cstring>
140 </property>
141 <property stdset="1">
142 <name>text</name>
143 <string>Show more</string>
144 </property>
145 </widget>
146 <widget>
147 <class>QTabWidget</class>
148 <property stdset="1">
149 <name>name</name>
150 <cstring>TabWidget2</cstring>
151 </property>
152 <property>
153 <name>layoutMargin</name>
154 </property>
155 <property>
156 <name>layoutSpacing</name>
157 </property>
158 <widget>
159 <class>QWidget</class>
160 <property stdset="1">
161 <name>name</name>
162 <cstring>tab</cstring>
163 </property>
164 <attribute>
165 <name>title</name>
166 <string>Sound</string>
167 </attribute>
168 <grid>
169 <property stdset="1">
170 <name>margin</name>
171 <number>3</number>
172 </property>
173 <property stdset="1">
174 <name>spacing</name>
175 <number>3</number>
176 </property>
177 <spacer row="0" column="0" >
178 <property>
179 <name>name</name>
180 <cstring>Spacer2</cstring>
181 </property>
182 <property stdset="1">
183 <name>orientation</name>
184 <enum>Vertical</enum>
185 </property>
186 <property stdset="1">
187 <name>sizeType</name>
188 <enum>Expanding</enum>
189 </property>
190 <property>
191 <name>sizeHint</name>
192 <size>
193 <width>20</width>
194 <height>20</height>
195 </size>
196 </property>
197 </spacer>
198 <widget row="1" column="0" rowspan="1" colspan="2" >
199 <class>QLabel</class>
200 <property stdset="1">
201 <name>name</name>
202 <cstring>TextLabel1</cstring>
203 </property>
204 <property stdset="1">
205 <name>text</name>
206 <string>Output Level</string>
207 </property>
208 </widget>
209 <widget row="3" column="0" rowspan="1" colspan="2" >
210 <class>QLabel</class>
211 <property stdset="1">
212 <name>name</name>
213 <cstring>TextLabel2</cstring>
214 </property>
215 <property stdset="1">
216 <name>text</name>
217 <string>Input Level</string>
218 </property>
219 </widget>
220 <spacer row="5" column="0" >
221 <property>
222 <name>name</name>
223 <cstring>Spacer3</cstring>
224 </property>
225 <property stdset="1">
226 <name>orientation</name>
227 <enum>Vertical</enum>
228 </property>
229 <property stdset="1">
230 <name>sizeType</name>
231 <enum>Expanding</enum>
232 </property>
233 <property>
234 <name>sizeHint</name>
235 <size>
236 <width>20</width>
237 <height>20</height>
238 </size>
239 </property>
240 </spacer>
241 <widget row="4" column="0" >
242 <class>QSlider</class>
243 <property stdset="1">
244 <name>name</name>
245 <cstring>SliderInput</cstring>
246 </property>
247 <property stdset="1">
248 <name>maxValue</name>
249 <number>100</number>
250 </property>
251 <property stdset="1">
252 <name>orientation</name>
253 <enum>Horizontal</enum>
254 </property>
255 </widget>
256 <widget row="4" column="1" >
257 <class>QLabel</class>
258 <property stdset="1">
259 <name>name</name>
260 <cstring>TextLabel2_2</cstring>
261 </property>
262 <property stdset="1">
263 <name>text</name>
264 <string>TextLabel2</string>
265 </property>
266 </widget>
267 <widget row="2" column="1" >
268 <class>QLabel</class>
269 <property stdset="1">
270 <name>name</name>
271 <cstring>TextLabel1_2</cstring>
272 </property>
273 <property stdset="1">
274 <name>text</name>
275 <string>TextLabel1</string>
276 </property>
277 </widget>
278 <widget row="2" column="0" >
279 <class>QSlider</class>
280 <property stdset="1">
281 <name>name</name>
282 <cstring>SliderOutput</cstring>
283 </property>
284 <property stdset="1">
285 <name>maxValue</name>
286 <number>100</number>
287 </property>
288 <property stdset="1">
289 <name>orientation</name>
290 <enum>Horizontal</enum>
291 </property>
292 </widget>
293 </grid>
294 </widget>
295 <widget>
296 <class>QWidget</class>
297 <property stdset="1">
298 <name>name</name>
299 <cstring>tab</cstring>
300 </property>
301 <attribute>
302 <name>title</name>
303 <string>Avail</string>
304 </attribute>
305 </widget>
306 <widget>
307 <class>QWidget</class>
308 <property stdset="1">
309 <name>name</name>
310 <cstring>tab</cstring>
311 </property>
312 <attribute>
313 <name>title</name>
314 <string>DTMF</string>
315 </attribute>
316 <vbox>
317 <property stdset="1">
318 <name>margin</name>
319 <number>3</number>
320 </property>
321 <property stdset="1">
322 <name>spacing</name>
323 <number>3</number>
324 </property>
325 <widget>
326 <class>QLineEdit</class>
327 <property stdset="1">
328 <name>name</name>
329 <cstring>LineEdit2</cstring>
330 </property>
331 </widget>
332 <widget>
333 <class>QLayoutWidget</class>
334 <property stdset="1">
335 <name>name</name>
336 <cstring>Layout5</cstring>
337 </property>
338 <hbox>
339 <property stdset="1">
340 <name>margin</name>
341 <number>0</number>
342 </property>
343 <property stdset="1">
344 <name>spacing</name>
345 <number>6</number>
346 </property>
347 <widget>
348 <class>QPushButton</class>
349 <property stdset="1">
350 <name>name</name>
351 <cstring>PushB1</cstring>
352 </property>
353 <property stdset="1">
354 <name>text</name>
355 <string>1</string>
356 </property>
357 </widget>
358 <widget>
359 <class>QPushButton</class>
360 <property stdset="1">
361 <name>name</name>
362 <cstring>PushB2</cstring>
363 </property>
364 <property stdset="1">
365 <name>text</name>
366 <string>2</string>
367 </property>
368 </widget>
369 <widget>
370 <class>QPushButton</class>
371 <property stdset="1">
372 <name>name</name>
373 <cstring>PushB3</cstring>
374 </property>
375 <property stdset="1">
376 <name>text</name>
377 <string>3</string>
378 </property>
379 </widget>
380 </hbox>
381 </widget>
382 <widget>
383 <class>QLayoutWidget</class>
384 <property stdset="1">
385 <name>name</name>
386 <cstring>Layout6</cstring>
387 </property>
388 <hbox>
389 <property stdset="1">
390 <name>margin</name>
391 <number>0</number>
392 </property>
393 <property stdset="1">
394 <name>spacing</name>
395 <number>6</number>
396 </property>
397 <widget>
398 <class>QPushButton</class>
399 <property stdset="1">
400 <name>name</name>
401 <cstring>PushB4</cstring>
402 </property>
403 <property stdset="1">
404 <name>text</name>
405 <string>4</string>
406 </property>
407 </widget>
408 <widget>
409 <class>QPushButton</class>
410 <property stdset="1">
411 <name>name</name>
412 <cstring>PushB5</cstring>
413 </property>
414 <property stdset="1">
415 <name>text</name>
416 <string>5</string>
417 </property>
418 </widget>
419 <widget>
420 <class>QPushButton</class>
421 <property stdset="1">
422 <name>name</name>
423 <cstring>PushB6</cstring>
424 </property>
425 <property stdset="1">
426 <name>text</name>
427 <string>6</string>
428 </property>
429 </widget>
430 </hbox>
431 </widget>
432 <widget>
433 <class>QLayoutWidget</class>
434 <property stdset="1">
435 <name>name</name>
436 <cstring>Layout7</cstring>
437 </property>
438 <hbox>
439 <property stdset="1">
440 <name>margin</name>
441 <number>0</number>
442 </property>
443 <property stdset="1">
444 <name>spacing</name>
445 <number>6</number>
446 </property>
447 <widget>
448 <class>QPushButton</class>
449 <property stdset="1">
450 <name>name</name>
451 <cstring>PushB7</cstring>
452 </property>
453 <property stdset="1">
454 <name>text</name>
455 <string>7</string>
456 </property>
457 </widget>
458 <widget>
459 <class>QPushButton</class>
460 <property stdset="1">
461 <name>name</name>
462 <cstring>PushB8</cstring>
463 </property>
464 <property stdset="1">
465 <name>text</name>
466 <string>8</string>
467 </property>
468 </widget>
469 <widget>
470 <class>QPushButton</class>
471 <property stdset="1">
472 <name>name</name>
473 <cstring>PushB9</cstring>
474 </property>
475 <property stdset="1">
476 <name>text</name>
477 <string>9</string>
478 </property>
479 </widget>
480 </hbox>
481 </widget>
482 <widget>
483 <class>QLayoutWidget</class>
484 <property stdset="1">
485 <name>name</name>
486 <cstring>Layout8</cstring>
487 </property>
488 <hbox>
489 <property stdset="1">
490 <name>margin</name>
491 <number>0</number>
492 </property>
493 <property stdset="1">
494 <name>spacing</name>
495 <number>6</number>
496 </property>
497 <widget>
498 <class>QPushButton</class>
499 <property stdset="1">
500 <name>name</name>
501 <cstring>PushButton12</cstring>
502 </property>
503 <property stdset="1">
504 <name>text</name>
505 <string>*</string>
506 </property>
507 </widget>
508 <widget>
509 <class>QPushButton</class>
510 <property stdset="1">
511 <name>name</name>
512 <cstring>PushB0</cstring>
513 </property>
514 <property stdset="1">
515 <name>text</name>
516 <string>0</string>
517 </property>
518 </widget>
519 <widget>
520 <class>QPushButton</class>
521 <property stdset="1">
522 <name>name</name>
523 <cstring>PushBSharp</cstring>
524 </property>
525 <property stdset="1">
526 <name>text</name>
527 <string>#</string>
528 </property>
529 </widget>
530 </hbox>
531 </widget>
532 </vbox>
533 </widget>
534 <widget>
535 <class>QWidget</class>
536 <property stdset="1">
537 <name>name</name>
538 <cstring>tab</cstring>
539 </property>
540 <attribute>
541 <name>title</name>
542 <string>My friends</string>
543 </attribute>
544 <vbox>
545 <property stdset="1">
546 <name>margin</name>
547 <number>3</number>
548 </property>
549 <property stdset="1">
550 <name>spacing</name>
551 <number>3</number>
552 </property>
553 <widget>
554 <class>QListView</class>
555 <property stdset="1">
556 <name>name</name>
557 <cstring>FriendListView</cstring>
558 </property>
559 </widget>
560 <widget>
561 <class>QLayoutWidget</class>
562 <property stdset="1">
563 <name>name</name>
564 <cstring>Layout10</cstring>
565 </property>
566 <hbox>
567 <property stdset="1">
568 <name>margin</name>
569 <number>0</number>
570 </property>
571 <property stdset="1">
572 <name>spacing</name>
573 <number>6</number>
574 </property>
575 <widget>
576 <class>QPushButton</class>
577 <property stdset="1">
578 <name>name</name>
579 <cstring>PushButtonAdd</cstring>
580 </property>
581 <property stdset="1">
582 <name>text</name>
583 <string>Add friend</string>
584 </property>
585 </widget>
586 <widget>
587 <class>QPushButton</class>
588 <property stdset="1">
589 <name>name</name>
590 <cstring>PushButtonDel</cstring>
591 </property>
592 <property stdset="1">
593 <name>text</name>
594 <string>delete</string>
595 </property>
596 </widget>
597 <widget>
598 <class>QPushButton</class>
599 <property stdset="1">
600 <name>name</name>
601 <cstring>PushButton17</cstring>
602 </property>
603 <property stdset="1">
604 <name>text</name>
605 <string>Add add. book</string>
606 </property>
607 </widget>
608 </hbox>
609 </widget>
610 </vbox>
611 </widget>
612 </widget>
613 <spacer>
614 <property>
615 <name>name</name>
616 <cstring>Spacer4</cstring>
617 </property>
618 <property stdset="1">
619 <name>orientation</name>
620 <enum>Vertical</enum>
621 </property>
622 <property stdset="1">
623 <name>sizeType</name>
624 <enum>Expanding</enum>
625 </property>
626 <property>
627 <name>sizeHint</name>
628 <size>
629 <width>20</width>
630 <height>20</height>
631 </size>
632 </property>
633 </spacer>
634 <widget>
635 <class>Line</class>
636 <property stdset="1">
637 <name>name</name>
638 <cstring>Line1</cstring>
639 </property>
640 <property stdset="1">
641 <name>orientation</name>
642 <enum>Horizontal</enum>
643 </property>
644 </widget>
645 <widget>
646 <class>QLabel</class>
647 <property stdset="1">
648 <name>name</name>
649 <cstring>status_bar</cstring>
650 </property>
651 <property stdset="1">
652 <name>text</name>
653 <string>Status</string>
654 </property>
655 </widget>
656 </vbox>
657 </widget>
658 </hbox>
659</widget>
660<customwidgets>
661 <customwidget>
662 <class>QListView</class>
663 <header location="global">qlistview.h</header>
664 <sizehint>
665 <width>-1</width>
666 <height>-1</height>
667 </sizehint>
668 <container>0</container>
669 <sizepolicy>
670 <hordata>5</hordata>
671 <verdata>5</verdata>
672 </sizepolicy>
673 <pixmap>image1</pixmap>
674 </customwidget>
675</customwidgets>
676<images>
677 <image>
678 <name>image0</name>
679 <data format="XPM.GZ" length="8246">789cb5985b532a4912c7dfcfa73026df4e6ce470e946888d7df08622a2888ae0c63e6475370a0272157562bffbfebb2aabbc9d9970cecc1e02e1d7999559999595559c5fbf6ff5daadadefbf7e5bae64354cb6923b596c7d4fd793c9f3bffff3afdfbefd1217b6a278ab542a6c957ef9c7b75fce575bc9d6e9c334cb41c6002ad87f399b8972a4bcb15cf52cf3c055cb9172d5b179544e94939c8b85c0a9e7a2b33f749cbfacbd7be548e54f96ab415e56f6f29972d5313d0676fed6ca8963a69c4b85c0578ef1c471d573c9f96b2a47ca6dcb35cfe641b9ea98aa816b56bfa59c289b9ccb45cfe6c573b968e5278ecb05d54f3c3b39dd58ae79e6a172a4f2b97255ed5d0776feac3c2a7ab91905b67232ca3a1ff3ca6e7ce6382a38e65dcf91f3df548ed4deb6672737b796c5ebcbb3b2d7bff2acf676028be5997255c78f025bb9dc28272a1f0476e3ed7ac5253f9ef702bbf14b653ffe29b0934f1cc705c766e939b69b4b0e9563c7e4c68bd767f1ece4bcad1cebfcba9e557ead5c531e0576f6f69553959bc0ce9eada74ac98f972365af9f0676f6ca8e2b45e53bcf1537bea71c3b265bdf1509fac79e557fa81c3bb9649e55be50ae3936cfcaa932e7bc5df6fa66a1acf153ddb3dabb0aece45365b5c78781dd7cd4fe76d1b111cfdb652bbf558e9d9c6b968dd7a754d9cb179edd783350f6f3697b7672be0d6cacbfbe72ea986cfeaa653f9efb9edd78ba0c6cf5b9a99caafd24b093b71d57353ebe0fecfcaf3c579dfd3be558d99e175513ecdf38f6e3a9e259f547cab1fa7ff6ece466aaacf3a73dcf4e2e75e554ed1de45c8b82bd13653fbee859c797023bf94059edf14e60177feab8a6f3e7416037fed6732db2fa3a9f5aace35f3c3b393bff89f727e781ddfc9d7e12ecef2bab3dce3cabbf8ab28f67e159e5bb81132bb7f52d91d7e79e67a74ff7819d7e4139557bd3c0562ec79ec5c577e4588a2adf538ed59e5d6f4982bdaa63d1fcf14160a79f28fbf1879e9d3f79501695973dabdcf65393fb77f19d06b6fadc52d6f15cf4ecc6d39972a6f1343cabfc38b0f31f3b3625c7c6de2f4ceaed9bb1b2b757f0acf39d39c678c7fb819d7ec7b371f2ae7245e7130576f12c3d3b7d5a2b8bdaab797672b6f94962ef9fcf94bd7d09ece29d28fb7c5160e77fec59e77ba9acf9e2c03abf46e0d4eac78e138d972e023bf98ee724b672bb7f92101f9f2b7bfb7dc7c1de26b0b377aaacf9e242602be727cfce9f59298b93d3ae6795dbfd94c6de9e6c023bfd9ab21fdff1ecc6cb85b2e683bb9e35de526037ff33c7a9e643ee025bb9719c797b429e9d3e478ec37809ecfc373ca74ebfaeacf9e04d60a73ff1ecf465ad2c8ec9f68bace2c75316d88daf288b63ea7956ff17ca1a3fc79e553e0dec7edf141d673a7f3a0f6ce564ef5759e6c7d3cab1d7e757b6fadc51ae283f78ce2a76fc525954bef6ece4627f9f0c2a61fc5c59e5ece599f22cb0d53f5ffdff5f7fc50f130b1b4e38e58c0778dff2dddfe787873ce27b1ef384a7fcc0339ebf7b2ffeba1f3bf725af78cd8fb0f8c81b7ee2677ee11d78dee53ddee703aef3e1cffb819523ccdfcd79cd0dd83ee6261ff2095e2d3ee533bcda7cce1dbee0cb9ff1c35798ed13e69ec7d0c52a5c738ffbd66efebac1930217b9c4658ee065ce315778fbcff9e12af23485fddccb92175c23e653223e2322b19f069f093f520aeb2be8c10b6534f8ba1fbea25b1b035682eef89a86b03aa27bce684c132ed1941e684673aed3829688b08068d6d05dc1d3faab7ee89136762dbafc4c4ff40c1f2fdcc2ac0fe1778776e06d97f66840fb8823816e420754a743eed08a8e38faaa1f64bc4d0d3ae6436ad209b5e894ceb8496d3c5fd3c2561b62a573c2ba23ca0bbaa42baaf30d3e17348266f72b7e30b323ba460e7a985b05dffbc8d20d9e16a8881d93d86cceecdbee192a5199228aa942db54a506f7be160f57a9867c60cec8761ddff01616c2e70d56aa63d76d22623fd75442cda562704f4b2942950f3996ec8ffdc8801772cb290d503d73fb5ad9988812da83c74b1ecb1daa6141c71463952ee161c83d48f7b13a13ca30a394ae78f3d1d35b3f32e21db997b1e4fa1798ed1a59c92b75841ae8e36f9d6a94c814eb728c9e56c59e69c983cc644ee75c9005388fbd2e4b59c99a873ff6032f8732b6797b41e46e0de6744d45ccf54836f2447579b6bb31f750c43e59c98bece0492203ca6486711bbb7f229acb2e1dffd8cf6b07c4be3842be7ab2878ca4ba3e135e62956bf8ded1795740893cc93ee28ce400332aa34623d5375c94fa673ff428a1ff2173981bea758cce729eaf8f1c71260b640df9c7eb09bdad629f37641ff9426e25df0311aaad956b40ef529a58e3db8f7e60a9f6a61e4eb0f235ecce3e4d685f5aa8b202f2a3b587b57b91d3fc3b6abe80cc0d309b36edc919bac22d62aa5959dec33734ffb43e19a5d20eb9bb9121f6f889ada731767e94c7626b2f8fa983782de3ef0b2af110cf06b28bf8ce316edfe9d10346773ed71b35dff674ecf03e6ae9426378f7c62e7e426eed77d950996f85d15a87d8c935ece57bbb8e15b9c4897b447b9feafa4a1a6ffcccf85d0cef3fd1c70a6ebdc0e788772a5d64f31a59ebf3b12cd0cef3f59bc93577f3bdf4266f53f9d02fe444369f6309ef1831641adfb1f4798908477283156374df99dd49f9ae5ad2ee3b3f6d1a7dec167896d839efe345ef63829f3b9c3dcaf2c435ac4e03796af05c8ad24065c08794f0bc20e3377eca382bcb9f3c45549418fbbf8b9df431a68eac72ef762ff5b1cf2fb1b73bb4918a3d37705a705fb6f94caaaf7e642435baa7ea673fc8c292aed08b069fd729ef637915db1adc487e0f79c1fd6a4587e8ee9c9fecf9a96b58c23d515ad412f3b99ff373feeb13eb4bf0f3b9ee56e8343dd403439ac7708c1abfe19621e7c1be856b465ef386bd9c980f9ed025a64e863ef9e3da5b613d76b880336880589a38179cf597d7cffc6614e23941af664e358aa131b94f6987275726c1cda9fe312678eb60ed4694d26998bfbd0be59ff64d74f29a3744fd98af06b6db1ecea03b8c8ea9873e7260ef3933f4ce217ec14fd0893ec4a473f76f42a7127b1f9a68e65a865feb1ab5d6371975d16f2f50f70d39c5de4bb07f629c75796515a96306e616f7b9d6fb98cc1dee5a2f32f3eb81bf13f7c6df67de36c3f7fd009d7689dd72cd97d4451fbd92b619d11c7533c609d437f798fd0a5e7b6688aedaf7315166c688e3f44d3ca4f1a4d4351377a2bde9d706ebd9e5c84c99cc0313ce86f0827684ddd5b4674f4c9199413e0bfb66285d7a575f5245ff8cbc87b77e707758a066f6696e32dc428a4466eef5e8ca8cd0171ecdc41858c73d10b53ec64a96f3fe4703b3785d1f33e65abe8e26f9b83f9c1fba412c389965cec62ca5670c763fc1e71027a59815aa36c2497782f543c6d019c7f6343c9186c96fdc880331c08394df47f1c94f8a6c47b81b9569475ae87d4d9c399dbc8ab15eb87d20e12b7b033ae03dc4d0f5d610558a3b694926a8c5dff1f0ea4796a8e0183db089aa15dcd362fbfba28e6c9f4b01bb196736aa0c273fa2bae6a6345f6de611fcb187573fe616fbe3597003c3ac23ac7486ea2ac2eb1332d1c65dbd877acb30f304f545d2fe8add1fe70d153c454ef25bc1193ae30c7364dcd38a2631eb7c8fa2c74db0be8fe89411b7e5e467fdd80ccc25321bf3e4ba0c6a6e803333fd981574fd062af0533d7dddcffb17f67d11abd295c95b3fa8c85323e6f9cf67eef77fcf61f51b7c83b2d8332fe641fd64b85f574df277fa81d5850c4dfe5baa801a89786056dc356bd4dba753f7aff9b1779e1acecb1af64e0fb598a0daaed107e9eff683ec0d8551d3114ebc0d6239e0eacf54f557ffff006b15a183ff9407f5f3df7f7efb1f2140aae1</data>
680 </image>
681 <image>
682 <name>image1</name>
683 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1ddec44f503c0ae2a154410f53d0ed20e2bf6bdb656dd6861dd23d9a66591b0587fd1654235ebded6f0edcd53e419d87ae7b1f4f9b8f906d0bfe012317426a70b07bdc2f3ec77f8ed6b89559061a0343d06a124cc105596482585094bc0ae599b04646c9018926491b2205e140c485cace25755c175d0a967b622ff900b8cc9c7d29af594ea722d589167f813aa852ba07d94b9dce296e883fe7bb163f23896753</data>
684 </image>
685</images>
686<connections>
687 <connection>
688 <sender>_callbutton</sender>
689 <signal>clicked()</signal>
690 <receiver>_QLinphoneMainWidget</receiver>
691 <slot>callOrAccept()</slot>
692 </connection>
693 <connection>
694 <sender>_hangupbutton</sender>
695 <signal>clicked()</signal>
696 <receiver>_QLinphoneMainWidget</receiver>
697 <slot>terminateCall()</slot>
698 </connection>
699 <connection>
700 <sender>SliderOutput</sender>
701 <signal>valueChanged(int)</signal>
702 <receiver>TextLabel1_2</receiver>
703 <slot>setNum(int)</slot>
704 </connection>
705 <connection>
706 <sender>SliderInput</sender>
707 <signal>valueChanged(int)</signal>
708 <receiver>TextLabel2_2</receiver>
709 <slot>setNum(int)</slot>
710 </connection>
711 <slot access="public">callOrAccept()</slot>
712 <slot access="public">terminateCall()</slot>
713</connections>
714</UI>
diff --git a/noncore/net/linphone/mainwindow.cpp b/noncore/net/linphone/mainwindow.cpp
new file mode 100644
index 0000000..1bd9987
--- a/dev/null
+++ b/noncore/net/linphone/mainwindow.cpp
@@ -0,0 +1,37 @@
1#include <qlayout.h>
2#include <qpe/resource.h>
3#include <qpe/qpeapplication.h>
4
5#include "mainwindow.h"
6#include "linphoneconfig.h"
7
8MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
9: QMainWindow( parent, name, flags ) {
10
11 setCaption( tr( "Sip Phone" ) );
12 setToolBarsMovable( false );
13
14 toolBar = new QToolBar( this );
15 toolBar->setHorizontalStretchable( true );
16 menuBar = new QMenuBar( toolBar );
17 prefMenu = new QPopupMenu( menuBar );
18 menuBar->insertItem( tr( "Connection" ), prefMenu );
19
20 settings = new QAction( tr("Settings"), QIconSet( Resource::loadPixmap("SettingsIcon") ), 0, 0, this);
21 settings->addTo( prefMenu );
22 connect( settings, SIGNAL( activated() ),
23 SLOT( slotSettings() ) );
24
25 mainWidget = new QLinphoneMainWidget( this, "qlinphone", WStyle_ContextHelp );
26 setCentralWidget( mainWidget );
27}
28
29
30MainWindow::~MainWindow() {}
31
32void MainWindow::slotSettings() {
33 LinPhoneConfig settings( this, 0, true, WStyle_ContextHelp );
34 QPEApplication::execDialog( &settings );
35 // FIXME - only in OK case
36 mainWidget->createLinphoneCore();
37}
diff --git a/noncore/net/linphone/mainwindow.h b/noncore/net/linphone/mainwindow.h
new file mode 100644
index 0000000..5a9bafb
--- a/dev/null
+++ b/noncore/net/linphone/mainwindow.h
@@ -0,0 +1,35 @@
1#ifndef MAINWINDOW_H
2#define MAINWINDOW_H
3
4#include <qmainwindow.h>
5
6#include <qtoolbar.h>
7#include <qmenubar.h>
8#include <qaction.h>
9
10#include "qlinphone.h"
11
12class MainWindow : public QMainWindow {
13 Q_OBJECT
14
15public:
16 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 );
17 virtual ~MainWindow();
18
19 static QString appName() {
20 return QString::fromLatin1("olinphone");
21 }
22
23 QLinphoneMainWidget *mainWidget;
24 QToolBar *toolBar;
25 QMenuBar *menuBar;
26 QPopupMenu *prefMenu;
27
28 QAction *settings;
29
30public slots:
31 void slotSettings();
32
33};
34
35#endif
diff --git a/noncore/net/linphone/qlinphone.cpp b/noncore/net/linphone/qlinphone.cpp
new file mode 100644
index 0000000..3cc2ebc
--- a/dev/null
+++ b/noncore/net/linphone/qlinphone.cpp
@@ -0,0 +1,210 @@
1/***************************************************************************
2 qlinphone.cpp - description
3 -------------------
4 begin : sam mai 24 2003
5 copyright : (C) 2003 by Simon Morlat, 2004 Maximilian Reiss
6 email : simon.morlat@linphone.org, harlekin@handhelds.org
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#include "qlinphone.h"
19#include <qlineedit.h>
20#include <qlabel.h>
21#include <qwidget.h>
22#include <qslider.h>
23#include <qtabwidget.h>
24#include <qcheckbox.h>
25#include <qmessagebox.h>
26#include <qpe/config.h>
27#include <qpe/qpeapplication.h>
28#include <linphonecore.h>
29
30extern "C" {
31 static void stub(LinphoneCore*lc, char*msg) {}
32
33 static void qt_show(LinphoneCore *lc) {
34 QLinphoneMainWidget *w=(QLinphoneMainWidget*)lc->data;
35 w->pushGuiTask(new ShowTask(w));
36 }
37
38 static void qt_inv_recv(LinphoneCore *lc, char *from) {
39 QLinphoneMainWidget *w=(QLinphoneMainWidget*)lc->data;
40 QString tmp(from);
41 w->pushGuiTask(new InviteReceivedTask(w,tmp));
42 }
43
44 static void qt_display_status(LinphoneCore *lc, char *status) {
45 QLinphoneMainWidget *w=(QLinphoneMainWidget*)lc->data;
46 QString tmp(status);
47 w->pushGuiTask(new UpdateStatusBarTask(w,tmp));
48 }
49 static void qt_display_message(LinphoneCore *lc, char *message) {
50 QString qmsg(message);
51 QLinphoneMainWidget *w=(QLinphoneMainWidget*)lc->data;
52 w->pushGuiTask(new DisplayMessageTask(w,qmsg,DisplayMessageTask::Info));
53 }
54 static void qt_display_warning(LinphoneCore *lc, char *message) {
55 QLinphoneMainWidget *w=(QLinphoneMainWidget*)lc->data;
56 QString qmsg(message);
57 w->pushGuiTask(new DisplayMessageTask(w,qmsg,DisplayMessageTask::Warn));
58 }
59 static void qt_display_url(LinphoneCore *lc, char *message, char *url) {
60 QLinphoneMainWidget *w=(QLinphoneMainWidget*)lc->data;
61 QString qmsg=QString(message)+QString(url);
62 w->pushGuiTask(new DisplayMessageTask(w,qmsg,DisplayMessageTask::Info));
63 }
64 static void qt_notify_recv(LinphoneCore *lc, const char *url, const char *status) {
65 }
66
67 LinphoneCoreVTable lcvtable={
68 show:
69 qt_show,
70 inv_recv:
71 qt_inv_recv,
72 bye_recv :
73 stub,
74 notify_recv :
75 qt_notify_recv,
76 display_status :
77 qt_display_status,
78 display_message :
79 qt_display_message,
80 display_warning :
81 qt_display_warning,
82 display_url :
83 qt_display_url,
84 display_question :
85 stub
86 };
87
88
89} //extern "C"
90
91void UpdateStatusBarTask::execute() {
92 static_cast<QLinphoneMainWidget*>(_w)->displayStatus(_msg);
93}
94
95void InviteReceivedTask::execute() {
96 static_cast<QLinphoneMainWidget*>(_w)->inviteReceived(_msg);
97}
98
99void DisplayMessageTask::execute() {
100 switch(_msgtype) {
101 case Info:
102 QMessageBox::information(0,QObject::tr("Information"),_msg);
103 break;
104 case Warn:
105 QMessageBox::warning(0,QObject::tr("Warning"),_msg);
106 break;
107 }
108}
109
110QLinphoneMainWidget::QLinphoneMainWidget(QWidget* parent , const char* name , WFlags fl ) :
111_QLinphoneMainWidget( parent, name, fl ) {
112
113 readConfig();
114 createLinphoneCore();
115 connect( CheckBox1, SIGNAL( toggled( bool ) ), this, SLOT( slotHide( bool ) ) );
116 CheckBox1->setChecked( true );
117}
118
119QLinphoneMainWidget::~QLinphoneMainWidget() {
120 linphone_core_destroy(_core);
121 writeConfig();
122}
123
124void QLinphoneMainWidget::slotHide( bool show ) {
125 if ( show ) {
126 TabWidget2->show();
127 } else {
128 TabWidget2->hide();
129 }
130}
131
132void QLinphoneMainWidget::callOrAccept() {
133 if (linphone_core_inc_invite_pending(_core)) {
134 linphone_core_accept_dialog(_core,NULL);
135 return;
136 }
137 QString url=sip_url->text();
138 linphone_core_invite(_core,(char*)url.ascii());
139}
140void QLinphoneMainWidget::terminateCall() {
141 linphone_core_terminate_dialog(_core,NULL);
142}
143
144void QLinphoneMainWidget::inviteReceived(QString &tmp) {
145 sip_url->setText(tmp);
146}
147
148void QLinphoneMainWidget::displayStatus(QString &msg) {
149 status_bar->setText(msg);
150}
151
152void QLinphoneMainWidget::pushGuiTask(GuiTask* g) {
153 _mutex.lock();
154 _actionq.enqueue(g);
155 _mutex.unlock();
156 printf("New action added to task list.\n");
157}
158
159void QLinphoneMainWidget::processGuiTasks() {
160 GuiTask *g;
161 _mutex.lock();
162 while(!_actionq.isEmpty()) {
163 g=_actionq.dequeue();
164 printf("Executing action...\n");
165 g->execute();
166 delete g;
167 }
168 _mutex.unlock();
169}
170
171void QLinphoneMainWidget::timerEvent(QTimerEvent *t) {
172 processGuiTasks();
173}
174
175void QLinphoneMainWidget::readConfig() {
176 Config cfg( "opie-phone" );
177 cfg.setGroup( "audio" );
178 SliderInput->setValue( cfg.readNumEntry( "rec_lev", 50 ) );
179 SliderOutput->setValue( cfg.readNumEntry( "play_lev", 50 ) );
180}
181
182void QLinphoneMainWidget::writeConfig() {
183 Config cfg( "opie-phone" );
184 cfg.setGroup( "audio" );
185 cfg.writeEntry( "rec_lev", SliderInput->value() );
186 cfg.writeEntry( "playlev", SliderOutput->value() );
187}
188
189void QLinphoneMainWidget::helpAbout() {
190 QMessageBox::about(this,tr("About Linphone"),tr("QT version of linphone\nJuly 2003 - Made in old Europe."));
191}
192
193void QLinphoneMainWidget::createLinphoneCore() {
194 if ( _core ) {
195 linphone_core_destroy(_core);
196 }
197
198 gchar *home=getenv("HOME");
199 gchar *suffix="/Settings/opie-phone.conf";
200 if (home==0)
201 home=strdup("/root");
202 gchar *config=new char[strlen(home)+strlen(suffix)+2];
203 sprintf(config,"%s/%s",home,suffix);
204 /* tracing for osip */
205 TRACE_INITIALIZE((trace_level_t)5,stdout);
206 _core=linphone_core_new(&lcvtable,config,(gpointer)this);
207 delete [] config;
208 startTimer(10);
209}
210
diff --git a/noncore/net/linphone/qlinphone.h b/noncore/net/linphone/qlinphone.h
new file mode 100644
index 0000000..4192a4c
--- a/dev/null
+++ b/noncore/net/linphone/qlinphone.h
@@ -0,0 +1,138 @@
1/***************************************************************************
2 qlinphone.h - description
3 -------------------
4 begin : sam mai 24 2003
5 copyright : (C) 2003 by Simon Morlat, 2004 Maximilian Reiss
6 email : simon.morlat@linphone.org, harlekin@handhelds.org
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifdef HAVE_CONFIG_H
19#include <config.h>
20#endif
21#include "mainwidget.h"
22#include <qobject.h>
23#include <qpushbutton.h>
24#include <qqueue.h>
25#include <pthread.h>
26
27class GuiTask {
28public:
29 GuiTask(QWidget *w) {
30 _w=w;
31 }
32 virtual void execute()=0;
33 virtual ~GuiTask() {}
34 ;
35protected:
36 QWidget *_w;
37};
38
39class ShowTask: public GuiTask {
40public:
41ShowTask(QWidget *w) : GuiTask(w) {}
42 ;
43private:
44 void execute() {
45 _w->show();
46 }
47};
48
49class DisplaySomethingTask : public GuiTask {
50public:
51DisplaySomethingTask(QWidget* w,QString &msg): GuiTask(w) {
52 _msg=msg;
53 }
54protected:
55 QString _msg;
56};
57
58class UpdateStatusBarTask : public DisplaySomethingTask {
59public:
60UpdateStatusBarTask(QWidget *w,QString &msg) :DisplaySomethingTask(w,msg) {}
61 ;
62private:
63 void execute();
64};
65
66class InviteReceivedTask : public DisplaySomethingTask {
67public:
68InviteReceivedTask(QWidget *w,QString &msg) :DisplaySomethingTask(w,msg) {}
69 ;
70private:
71 void execute();
72};
73
74class DisplayMessageTask : public DisplaySomethingTask {
75public:
76 enum MessageType{Info,Warn};
77DisplayMessageTask(QWidget *w,QString &msg,MessageType type) : DisplaySomethingTask(w,msg) {
78 _msgtype=type;
79 };
80private:
81 void execute();
82 MessageType _msgtype;
83};
84
85
86
87typedef struct _LinphoneCore LinphoneCore;
88
89class MyMutex {
90public:
91 MyMutex() {
92 pthread_mutex_init(&_mutex,NULL);
93 }
94 void lock() {
95 pthread_mutex_lock(&_mutex);
96 }
97 void unlock() {
98 pthread_mutex_unlock(&_mutex);
99 }
100 ~MyMutex() {
101 pthread_mutex_destroy(&_mutex);
102 }
103private:
104 pthread_mutex_t _mutex;
105};
106
107class QLinphoneMainWidget : public _QLinphoneMainWidget {
108
109Q_OBJECT
110
111public:
112 QLinphoneMainWidget(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
113 ~QLinphoneMainWidget();
114
115
116 void callOrAccept();
117 void terminateCall();
118 void inviteReceived(QString &from);
119 void displayStatus(QString &status);
120 void helpAbout();
121 // make it private
122 void createLinphoneCore();
123 void pushGuiTask(GuiTask* g);
124
125private slots:
126 void slotHide( bool show );
127
128private:
129 void readConfig();
130 void writeConfig();
131 void processGuiTasks();
132 void timerEvent(QTimerEvent *);
133 LinphoneCore *_core;
134 QQueue<GuiTask> _actionq;
135 MyMutex _mutex;
136};
137
138
diff --git a/noncore/net/linphone/settingsdialog.ui b/noncore/net/linphone/settingsdialog.ui
new file mode 100644
index 0000000..69d3228
--- a/dev/null
+++ b/noncore/net/linphone/settingsdialog.ui
@@ -0,0 +1,797 @@
1<!DOCTYPE UI><UI>
2<class>SettingsDialog</class>
3<widget>
4 <class>QDialog</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>SettingsDialog</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>393</width>
15 <height>459</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>caption</name>
20 <string>Settings</string>
21 </property>
22 <property>
23 <name>layoutMargin</name>
24 </property>
25 <property>
26 <name>layoutSpacing</name>
27 </property>
28 <vbox>
29 <property stdset="1">
30 <name>margin</name>
31 <number>3</number>
32 </property>
33 <property stdset="1">
34 <name>spacing</name>
35 <number>3</number>
36 </property>
37 <widget>
38 <class>QTabWidget</class>
39 <property stdset="1">
40 <name>name</name>
41 <cstring>TabWidget4</cstring>
42 </property>
43 <property>
44 <name>layoutMargin</name>
45 </property>
46 <property>
47 <name>layoutSpacing</name>
48 </property>
49 <widget>
50 <class>QWidget</class>
51 <property stdset="1">
52 <name>name</name>
53 <cstring>tab</cstring>
54 </property>
55 <attribute>
56 <name>title</name>
57 <string>Network</string>
58 </attribute>
59 <vbox>
60 <property stdset="1">
61 <name>margin</name>
62 <number>3</number>
63 </property>
64 <property stdset="1">
65 <name>spacing</name>
66 <number>3</number>
67 </property>
68 <widget>
69 <class>QGroupBox</class>
70 <property stdset="1">
71 <name>name</name>
72 <cstring>GroupBox1</cstring>
73 </property>
74 <property stdset="1">
75 <name>title</name>
76 <string>NAT traversal options (experimental)</string>
77 </property>
78 <property stdset="1">
79 <name>orientation</name>
80 <enum>Vertical</enum>
81 </property>
82 <property>
83 <name>layoutMargin</name>
84 </property>
85 <property>
86 <name>layoutSpacing</name>
87 </property>
88 <vbox>
89 <property stdset="1">
90 <name>margin</name>
91 <number>3</number>
92 </property>
93 <property stdset="1">
94 <name>spacing</name>
95 <number>3</number>
96 </property>
97 <widget>
98 <class>QLayoutWidget</class>
99 <property stdset="1">
100 <name>name</name>
101 <cstring>Layout15</cstring>
102 </property>
103 <vbox>
104 <property stdset="1">
105 <name>margin</name>
106 <number>0</number>
107 </property>
108 <property stdset="1">
109 <name>spacing</name>
110 <number>6</number>
111 </property>
112 <widget>
113 <class>QCheckBox</class>
114 <property stdset="1">
115 <name>name</name>
116 <cstring>CheckBoxNAT</cstring>
117 </property>
118 <property stdset="1">
119 <name>text</name>
120 <string>Enable</string>
121 </property>
122 </widget>
123 <widget>
124 <class>QLabel</class>
125 <property stdset="1">
126 <name>name</name>
127 <cstring>TextLabel1</cstring>
128 </property>
129 <property stdset="1">
130 <name>enabled</name>
131 <bool>false</bool>
132 </property>
133 <property stdset="1">
134 <name>text</name>
135 <string>Firewall ip address (in dot notations):</string>
136 </property>
137 </widget>
138 <widget>
139 <class>QLineEdit</class>
140 <property stdset="1">
141 <name>name</name>
142 <cstring>NatIpField</cstring>
143 </property>
144 <property stdset="1">
145 <name>enabled</name>
146 <bool>false</bool>
147 </property>
148 </widget>
149 </vbox>
150 </widget>
151 </vbox>
152 </widget>
153 <widget>
154 <class>QGroupBox</class>
155 <property stdset="1">
156 <name>name</name>
157 <cstring>GroupBox2</cstring>
158 </property>
159 <property stdset="1">
160 <name>title</name>
161 <string>RTP properties</string>
162 </property>
163 <property>
164 <name>layoutMargin</name>
165 </property>
166 <property>
167 <name>layoutSpacing</name>
168 </property>
169 <vbox>
170 <property stdset="1">
171 <name>margin</name>
172 <number>3</number>
173 </property>
174 <property stdset="1">
175 <name>spacing</name>
176 <number>3</number>
177 </property>
178 <widget>
179 <class>QLayoutWidget</class>
180 <property stdset="1">
181 <name>name</name>
182 <cstring>Layout17</cstring>
183 </property>
184 <hbox>
185 <property stdset="1">
186 <name>margin</name>
187 <number>0</number>
188 </property>
189 <property stdset="1">
190 <name>spacing</name>
191 <number>6</number>
192 </property>
193 <widget>
194 <class>QLabel</class>
195 <property stdset="1">
196 <name>name</name>
197 <cstring>TextLabel2</cstring>
198 </property>
199 <property stdset="1">
200 <name>text</name>
201 <string>RTP port used for audio</string>
202 </property>
203 </widget>
204 <widget>
205 <class>QLineEdit</class>
206 <property stdset="1">
207 <name>name</name>
208 <cstring>RTPPort</cstring>
209 </property>
210 </widget>
211 </hbox>
212 </widget>
213 <widget>
214 <class>QLayoutWidget</class>
215 <property stdset="1">
216 <name>name</name>
217 <cstring>Layout15</cstring>
218 </property>
219 <hbox>
220 <property stdset="1">
221 <name>margin</name>
222 <number>0</number>
223 </property>
224 <property stdset="1">
225 <name>spacing</name>
226 <number>6</number>
227 </property>
228 <widget>
229 <class>QLabel</class>
230 <property stdset="1">
231 <name>name</name>
232 <cstring>TextLabel3</cstring>
233 </property>
234 <property stdset="1">
235 <name>text</name>
236 <string>buffer miliiseconds:</string>
237 </property>
238 </widget>
239 <widget>
240 <class>QSlider</class>
241 <property stdset="1">
242 <name>name</name>
243 <cstring>SliderJitter</cstring>
244 </property>
245 <property stdset="1">
246 <name>maxValue</name>
247 <number>512</number>
248 </property>
249 <property stdset="1">
250 <name>orientation</name>
251 <enum>Horizontal</enum>
252 </property>
253 </widget>
254 <widget>
255 <class>QLabel</class>
256 <property stdset="1">
257 <name>name</name>
258 <cstring>TextLabel3_2</cstring>
259 </property>
260 <property stdset="1">
261 <name>text</name>
262 <string>TextLabel3</string>
263 </property>
264 </widget>
265 </hbox>
266 </widget>
267 </vbox>
268 </widget>
269 </vbox>
270 </widget>
271 <widget>
272 <class>QWidget</class>
273 <property stdset="1">
274 <name>name</name>
275 <cstring>tab</cstring>
276 </property>
277 <attribute>
278 <name>title</name>
279 <string>Sound device</string>
280 </attribute>
281 <vbox>
282 <property stdset="1">
283 <name>margin</name>
284 <number>3</number>
285 </property>
286 <property stdset="1">
287 <name>spacing</name>
288 <number>3</number>
289 </property>
290 <widget>
291 <class>QGroupBox</class>
292 <property stdset="1">
293 <name>name</name>
294 <cstring>GroupBox3</cstring>
295 </property>
296 <property stdset="1">
297 <name>title</name>
298 <string>Sound properties</string>
299 </property>
300 <grid>
301 <property stdset="1">
302 <name>margin</name>
303 <number>11</number>
304 </property>
305 <property stdset="1">
306 <name>spacing</name>
307 <number>6</number>
308 </property>
309 <widget row="1" column="0" >
310 <class>QLabel</class>
311 <property stdset="1">
312 <name>name</name>
313 <cstring>TextLabel5</cstring>
314 </property>
315 <property stdset="1">
316 <name>text</name>
317 <string>Source:</string>
318 </property>
319 </widget>
320 <widget row="1" column="1" >
321 <class>QComboBox</class>
322 <property stdset="1">
323 <name>name</name>
324 <cstring>SourceCombo</cstring>
325 </property>
326 </widget>
327 <widget row="0" column="0" >
328 <class>QLabel</class>
329 <property stdset="1">
330 <name>name</name>
331 <cstring>TextLabel4</cstring>
332 </property>
333 <property stdset="1">
334 <name>text</name>
335 <string>Device:</string>
336 </property>
337 </widget>
338 <widget row="0" column="1" >
339 <class>QComboBox</class>
340 <property stdset="1">
341 <name>name</name>
342 <cstring>DeviceCombo</cstring>
343 </property>
344 </widget>
345 </grid>
346 </widget>
347 </vbox>
348 </widget>
349 <widget>
350 <class>QWidget</class>
351 <property stdset="1">
352 <name>name</name>
353 <cstring>tab</cstring>
354 </property>
355 <attribute>
356 <name>title</name>
357 <string>SIP</string>
358 </attribute>
359 <vbox>
360 <property stdset="1">
361 <name>margin</name>
362 <number>3</number>
363 </property>
364 <property stdset="1">
365 <name>spacing</name>
366 <number>3</number>
367 </property>
368 <widget>
369 <class>QGroupBox</class>
370 <property stdset="1">
371 <name>name</name>
372 <cstring>GroupBox4</cstring>
373 </property>
374 <property stdset="1">
375 <name>title</name>
376 <string>Basic</string>
377 </property>
378 <property>
379 <name>layoutMargin</name>
380 </property>
381 <property>
382 <name>layoutSpacing</name>
383 </property>
384 <vbox>
385 <property stdset="1">
386 <name>margin</name>
387 <number>3</number>
388 </property>
389 <property stdset="1">
390 <name>spacing</name>
391 <number>3</number>
392 </property>
393 <widget>
394 <class>QLayoutWidget</class>
395 <property stdset="1">
396 <name>name</name>
397 <cstring>Layout19</cstring>
398 </property>
399 <property>
400 <name>layoutSpacing</name>
401 </property>
402 <hbox>
403 <property stdset="1">
404 <name>margin</name>
405 <number>0</number>
406 </property>
407 <property stdset="1">
408 <name>spacing</name>
409 <number>3</number>
410 </property>
411 <widget>
412 <class>QLabel</class>
413 <property stdset="1">
414 <name>name</name>
415 <cstring>TextLabel6</cstring>
416 </property>
417 <property stdset="1">
418 <name>text</name>
419 <string>Port:</string>
420 </property>
421 </widget>
422 <spacer>
423 <property>
424 <name>name</name>
425 <cstring>Spacer7</cstring>
426 </property>
427 <property stdset="1">
428 <name>orientation</name>
429 <enum>Horizontal</enum>
430 </property>
431 <property stdset="1">
432 <name>sizeType</name>
433 <enum>Expanding</enum>
434 </property>
435 <property>
436 <name>sizeHint</name>
437 <size>
438 <width>20</width>
439 <height>20</height>
440 </size>
441 </property>
442 </spacer>
443 <widget>
444 <class>QSpinBox</class>
445 <property stdset="1">
446 <name>name</name>
447 <cstring>PortSpin</cstring>
448 </property>
449 <property stdset="1">
450 <name>maxValue</name>
451 <number>64000</number>
452 </property>
453 <property stdset="1">
454 <name>value</name>
455 <number>5060</number>
456 </property>
457 </widget>
458 </hbox>
459 </widget>
460 <widget>
461 <class>QLayoutWidget</class>
462 <property stdset="1">
463 <name>name</name>
464 <cstring>Layout20</cstring>
465 </property>
466 <property>
467 <name>layoutSpacing</name>
468 </property>
469 <vbox>
470 <property stdset="1">
471 <name>margin</name>
472 <number>0</number>
473 </property>
474 <property stdset="1">
475 <name>spacing</name>
476 <number>3</number>
477 </property>
478 <widget>
479 <class>QLabel</class>
480 <property stdset="1">
481 <name>name</name>
482 <cstring>TextLabel7</cstring>
483 </property>
484 <property stdset="1">
485 <name>text</name>
486 <string>Sip address:</string>
487 </property>
488 </widget>
489 <widget>
490 <class>QLayoutWidget</class>
491 <property stdset="1">
492 <name>name</name>
493 <cstring>Layout18</cstring>
494 </property>
495 <hbox>
496 <property stdset="1">
497 <name>margin</name>
498 <number>0</number>
499 </property>
500 <property stdset="1">
501 <name>spacing</name>
502 <number>6</number>
503 </property>
504 <widget>
505 <class>QLabel</class>
506 <property stdset="1">
507 <name>name</name>
508 <cstring>TextLabel8</cstring>
509 </property>
510 <property stdset="1">
511 <name>text</name>
512 <string>sip:</string>
513 </property>
514 </widget>
515 <widget>
516 <class>QLineEdit</class>
517 <property stdset="1">
518 <name>name</name>
519 <cstring>UserPartLine</cstring>
520 </property>
521 </widget>
522 <widget>
523 <class>QLabel</class>
524 <property stdset="1">
525 <name>name</name>
526 <cstring>TextLabel9</cstring>
527 </property>
528 <property stdset="1">
529 <name>text</name>
530 <string>@</string>
531 </property>
532 </widget>
533 <widget>
534 <class>QLineEdit</class>
535 <property stdset="1">
536 <name>name</name>
537 <cstring>HostPartLine</cstring>
538 </property>
539 </widget>
540 </hbox>
541 </widget>
542 </vbox>
543 </widget>
544 </vbox>
545 </widget>
546 <widget>
547 <class>QGroupBox</class>
548 <property stdset="1">
549 <name>name</name>
550 <cstring>GroupBox5</cstring>
551 </property>
552 <property stdset="1">
553 <name>title</name>
554 <string>Remote services</string>
555 </property>
556 <property>
557 <name>layoutMargin</name>
558 </property>
559 <property>
560 <name>layoutSpacing</name>
561 </property>
562 <vbox>
563 <property stdset="1">
564 <name>margin</name>
565 <number>3</number>
566 </property>
567 <property stdset="1">
568 <name>spacing</name>
569 <number>3</number>
570 </property>
571 <widget>
572 <class>QCheckBox</class>
573 <property stdset="1">
574 <name>name</name>
575 <cstring>CheckBoxReg</cstring>
576 </property>
577 <property stdset="1">
578 <name>text</name>
579 <string>Use sip registrar</string>
580 </property>
581 </widget>
582 <widget>
583 <class>QLayoutWidget</class>
584 <property stdset="1">
585 <name>name</name>
586 <cstring>Layout21</cstring>
587 </property>
588 <grid>
589 <property stdset="1">
590 <name>margin</name>
591 <number>0</number>
592 </property>
593 <property stdset="1">
594 <name>spacing</name>
595 <number>6</number>
596 </property>
597 <widget row="2" column="0" >
598 <class>QLabel</class>
599 <property stdset="1">
600 <name>name</name>
601 <cstring>TextLabel13</cstring>
602 </property>
603 <property stdset="1">
604 <name>enabled</name>
605 <bool>false</bool>
606 </property>
607 <property stdset="1">
608 <name>text</name>
609 <string>Address of record:</string>
610 </property>
611 </widget>
612 <widget row="0" column="1" >
613 <class>QLineEdit</class>
614 <property stdset="1">
615 <name>name</name>
616 <cstring>ServerAddressLine</cstring>
617 </property>
618 <property stdset="1">
619 <name>enabled</name>
620 <bool>false</bool>
621 </property>
622 </widget>
623 <widget row="2" column="1" >
624 <class>QLineEdit</class>
625 <property stdset="1">
626 <name>name</name>
627 <cstring>RecordLine</cstring>
628 </property>
629 <property stdset="1">
630 <name>enabled</name>
631 <bool>false</bool>
632 </property>
633 </widget>
634 <widget row="1" column="1" >
635 <class>QLineEdit</class>
636 <property stdset="1">
637 <name>name</name>
638 <cstring>PasswordLine</cstring>
639 </property>
640 <property stdset="1">
641 <name>enabled</name>
642 <bool>false</bool>
643 </property>
644 <property stdset="1">
645 <name>echoMode</name>
646 <enum>Password</enum>
647 </property>
648 </widget>
649 <widget row="0" column="0" >
650 <class>QLabel</class>
651 <property stdset="1">
652 <name>name</name>
653 <cstring>TextLabel11</cstring>
654 </property>
655 <property stdset="1">
656 <name>enabled</name>
657 <bool>false</bool>
658 </property>
659 <property stdset="1">
660 <name>text</name>
661 <string>Server address:</string>
662 </property>
663 </widget>
664 <widget row="1" column="0" >
665 <class>QLabel</class>
666 <property stdset="1">
667 <name>name</name>
668 <cstring>TextLabel12</cstring>
669 </property>
670 <property stdset="1">
671 <name>enabled</name>
672 <bool>false</bool>
673 </property>
674 <property stdset="1">
675 <name>text</name>
676 <string>Password:</string>
677 </property>
678 </widget>
679 </grid>
680 </widget>
681 <widget>
682 <class>QCheckBox</class>
683 <property stdset="1">
684 <name>name</name>
685 <cstring>CheckBoxProxy</cstring>
686 </property>
687 <property stdset="1">
688 <name>enabled</name>
689 <bool>false</bool>
690 </property>
691 <property stdset="1">
692 <name>text</name>
693 <string>Use this registrar as proxy</string>
694 </property>
695 </widget>
696 </vbox>
697 </widget>
698 </vbox>
699 </widget>
700 <widget>
701 <class>QWidget</class>
702 <property stdset="1">
703 <name>name</name>
704 <cstring>tab</cstring>
705 </property>
706 <attribute>
707 <name>title</name>
708 <string>Codecs</string>
709 </attribute>
710 <vbox>
711 <property stdset="1">
712 <name>margin</name>
713 <number>11</number>
714 </property>
715 <property stdset="1">
716 <name>spacing</name>
717 <number>6</number>
718 </property>
719 <widget>
720 <class>QLabel</class>
721 <property stdset="1">
722 <name>name</name>
723 <cstring>TextLabel14</cstring>
724 </property>
725 <property stdset="1">
726 <name>text</name>
727 <string>later</string>
728 </property>
729 </widget>
730 </vbox>
731 </widget>
732 </widget>
733 </vbox>
734</widget>
735<connections>
736 <connection>
737 <sender>SliderJitter</sender>
738 <signal>valueChanged(int)</signal>
739 <receiver>TextLabel3_2</receiver>
740 <slot>setNum(int)</slot>
741 </connection>
742 <connection>
743 <sender>CheckBoxNAT</sender>
744 <signal>toggled(bool)</signal>
745 <receiver>NatIpField</receiver>
746 <slot>setEnabled(bool)</slot>
747 </connection>
748 <connection>
749 <sender>CheckBoxNAT</sender>
750 <signal>toggled(bool)</signal>
751 <receiver>TextLabel1</receiver>
752 <slot>setEnabled(bool)</slot>
753 </connection>
754 <connection>
755 <sender>CheckBoxReg</sender>
756 <signal>toggled(bool)</signal>
757 <receiver>CheckBoxProxy</receiver>
758 <slot>setEnabled(bool)</slot>
759 </connection>
760 <connection>
761 <sender>CheckBoxReg</sender>
762 <signal>toggled(bool)</signal>
763 <receiver>PasswordLine</receiver>
764 <slot>setEnabled(bool)</slot>
765 </connection>
766 <connection>
767 <sender>CheckBoxReg</sender>
768 <signal>toggled(bool)</signal>
769 <receiver>RecordLine</receiver>
770 <slot>setEnabled(bool)</slot>
771 </connection>
772 <connection>
773 <sender>CheckBoxReg</sender>
774 <signal>toggled(bool)</signal>
775 <receiver>ServerAddressLine</receiver>
776 <slot>setEnabled(bool)</slot>
777 </connection>
778 <connection>
779 <sender>CheckBoxReg</sender>
780 <signal>toggled(bool)</signal>
781 <receiver>TextLabel11</receiver>
782 <slot>setEnabled(bool)</slot>
783 </connection>
784 <connection>
785 <sender>CheckBoxReg</sender>
786 <signal>toggled(bool)</signal>
787 <receiver>TextLabel12</receiver>
788 <slot>setEnabled(bool)</slot>
789 </connection>
790 <connection>
791 <sender>CheckBoxReg</sender>
792 <signal>toggled(bool)</signal>
793 <receiver>TextLabel13</receiver>
794 <slot>setEnabled(bool)</slot>
795 </connection>
796</connections>
797</UI>