Browse code

py_sems: updated to new API, wip, still doesn't compile

Stefan Sayer authored on 01/04/2014 10:22:09
Showing 1 changed files
... ...
@@ -27,7 +27,7 @@ class PySemsB2ABDialog
27 27
 
28 28
 public:
29 29
 
30
-    AmSipDialog dlg;
30
+    AmSipDialog* dlg;
31 31
 
32 32
     PySemsB2ABDialog();
33 33
 
Browse code

updated py_sems for new AmSession/AmB2BSession API (wip)

Stefan Sayer authored on 18/07/2011 17:35:33
Showing 1 changed files
... ...
@@ -36,15 +36,13 @@ public:
36 36
     fprintf(stderr,"------------- dealloc_PySemsB2ABDialog ----------\n");
37 37
 %End
38 38
 
39
-    int acceptAudio(const string& /* body */,
40
-		    const string& /* hdrs */,
41
-		    string* /Out/ /* sdp_reply */);
42
-
43 39
     void setStopped();
40
+    virtual void onBeforeDestroy();
44 41
 
45 42
     virtual void onInvite(const AmSipRequest& /* req */);
46
-    virtual void onSessionStart(const AmSipRequest& /* req */);
47
-    virtual void onCancel();
43
+    virtual void onCancel(const AmSipRequest& /* req */);
44
+    virtual void onSessionStart();
45
+    virtual void onEarlySessionStart();
48 46
 
49 47
     virtual void onBye(const AmSipRequest& /* req */);
50 48
     virtual void onDtmf(int /* event */, int /* duration_msec */);
Browse code

b2b with media relay changes:

b2ab_caller_owns_connector.patch:
AmB2ABCallerSession owns the session connector.
Caller session waits for callee session to end before it ends itself.

early media support for B2ABSession.



git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1164 8eb893ce-cfd4-0310-b710-fb5ebe64c474

Stefan Sayer authored on 08/12/2008 14:30:29
Showing 1 changed files
... ...
@@ -1,4 +1,23 @@
1 1
 
2
+class AmSessionAudioConnector
3
+{
4
+%TypeHeaderCode
5
+#include "../../../core/AmB2ABSession.h"
6
+%End
7
+public:
8
+	AmSessionAudioConnector();
9
+
10
+	~AmSessionAudioConnector();
11
+
12
+	void block();
13
+
14
+	void release();
15
+
16
+	void waitReleased();
17
+private:
18
+	AmSessionAudioConnector(const AmSessionAudioConnector&);
19
+};
20
+
2 21
 class PySemsB2ABDialog
3 22
 {
4 23
 %TypeHeaderCode
... ...
@@ -62,7 +81,7 @@ class AmB2ABCalleeSession
62 81
 #include "../../../core/AmB2ABSession.h"
63 82
 %End
64 83
 public:
65
-  AmB2ABCalleeSession(const string& /*other_local_tag*/);
84
+  AmB2ABCalleeSession(const string& /*other_local_tag*/, AmSessionAudioConnector* );
66 85
 
67 86
   void connectSession();
68 87
   void disconnectSession();
... ...
@@ -83,7 +102,7 @@ class PySemsB2ABCalleeDialog : AmB2ABCalleeSession
83 102
 #include "../../../core/AmB2ABSession.h"
84 103
 %End
85 104
 public:
86
-  PySemsB2ABCalleeDialog(const string& /*other_local_tag*/);
105
+  PySemsB2ABCalleeDialog(const string& /*other_local_tag*/, AmSessionAudioConnector* /* connector */);
87 106
 
88 107
 protected:
89 108
   virtual void onPyB2ABEvent(PySemsB2ABEvent* /TransferBack/);
Browse code

added setInOut, setInput, setOutput

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@374 8eb893ce-cfd4-0310-b710-fb5ebe64c474

Stefan Sayer authored on 13/06/2007 09:59:39
Showing 1 changed files
... ...
@@ -67,6 +67,10 @@ public:
67 67
   void connectSession();
68 68
   void disconnectSession();
69 69
 
70
+  void setInput(AmAudioFile* /In/ /*in*/);
71
+  void setOutput(AmAudioFile* /In/ /*out*/);
72
+  void setInOut(AmAudioFile* /In/ /*in*/, AmAudioFile* /In/ /*out*/);
73
+
70 74
 private:
71 75
   AmB2ABCalleeSession(const AmB2ABCalleeSession& /* other_s*/);
72 76
 
Browse code

PySemsB2ABCalleeDialog added, which has onPyB2ABEvent handler to pass events between b2ab sessions

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@366 8eb893ce-cfd4-0310-b710-fb5ebe64c474

Stefan Sayer authored on 12/06/2007 16:33:09
Showing 1 changed files
... ...
@@ -49,14 +49,14 @@ public:
49 49
 protected:
50 50
   virtual AmB2ABCalleeSession* createCalleeSession() /Factory/;
51 51
 
52
-  virtual void onB2ABEvent(B2ABEvent* /In,Out/);
52
+  virtual void onB2ABEvent(PySemsB2ABEvent* /TransferBack/);
53 53
 
54
-  virtual void relayEvent(AmEvent* ev);	
54
+  virtual void relayEvent(PySemsB2ABEvent* ev /Transfer/);	
55 55
 private:
56 56
   PySemsB2ABDialog(const PySemsB2ABDialog&);
57 57
 };
58 58
 
59
-class AmB2ABCalleeSession
59
+class AmB2ABCalleeSession 
60 60
 {
61 61
 %TypeHeaderCode
62 62
 #include "../../../core/AmB2ABSession.h"
... ...
@@ -64,8 +64,6 @@ class AmB2ABCalleeSession
64 64
 public:
65 65
   AmB2ABCalleeSession(const string& /*other_local_tag*/);
66 66
 
67
-  void onB2ABEvent(B2ABEvent* /*In,Out*/);
68
-
69 67
   void connectSession();
70 68
   void disconnectSession();
71 69
 
... ...
@@ -74,13 +72,28 @@ private:
74 72
 
75 73
 };
76 74
 
77
-class B2ABEvent
78
-: AmEvent 
75
+class PySemsB2ABCalleeDialog : AmB2ABCalleeSession
79 76
 {
80 77
 %TypeHeaderCode
78
+#include "../PySemsB2ABDialog.h"
81 79
 #include "../../../core/AmB2ABSession.h"
82 80
 %End
83 81
 public:
84
-  B2ABEvent(int /* ev_id */);
82
+  PySemsB2ABCalleeDialog(const string& /*other_local_tag*/);
83
+
84
+protected:
85
+  virtual void onPyB2ABEvent(PySemsB2ABEvent* /TransferBack/);
86
+
87
+private:
88
+  PySemsB2ABCalleeDialog(const PySemsB2ABCalleeDialog& /* other_s*/);
89
+};
90
+
91
+class PySemsB2ABEvent
92
+{
93
+%TypeHeaderCode
94
+#include "../PySemsB2ABDialog.h"
95
+%End
96
+public:
97
+  PySemsB2ABEvent(int /* ev_id */);
85 98
 };
86 99
 
Browse code

B2ABEvent declared as descendant of AmEvent (needed for casting to AmEvent in wrapper)

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@330 8eb893ce-cfd4-0310-b710-fb5ebe64c474

Stefan Sayer authored on 14/05/2007 13:12:52
Showing 1 changed files
... ...
@@ -75,6 +75,7 @@ private:
75 75
 };
76 76
 
77 77
 class B2ABEvent
78
+: AmEvent 
78 79
 {
79 80
 %TypeHeaderCode
80 81
 #include "../../../core/AmB2ABSession.h"
Browse code

* Made B2ABEvent public.

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@317 8eb893ce-cfd4-0310-b710-fb5ebe64c474

Juha Heinanen authored on 28/04/2007 09:59:49
Showing 1 changed files
... ...
@@ -79,6 +79,7 @@ class B2ABEvent
79 79
 %TypeHeaderCode
80 80
 #include "../../../core/AmB2ABSession.h"
81 81
 %End
82
+public:
82 83
   B2ABEvent(int /* ev_id */);
83 84
 };
84 85
 
Browse code

- removed unneed generated files. - corrected bug PySemsB2ABDialog.sip

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@298 8eb893ce-cfd4-0310-b710-fb5ebe64c474

Raphael Coeffic authored on 03/04/2007 11:55:54
Showing 1 changed files
... ...
@@ -32,7 +32,7 @@ public:
32 32
 
33 33
     void setInput(AmAudioFile* /In/ /*in*/);
34 34
     void setOutput(AmAudioFile* /In/ /*out*/);
35
-    void setInOut(AmAudioFile* /In/ /*in*/, AmAudioFile* /*out*/);
35
+    void setInOut(AmAudioFile* /In/ /*in*/, AmAudioFile* /In/ /*out*/);
36 36
 
37 37
     virtual void process(AmEvent* /*In,Out*/);
38 38
     
... ...
@@ -40,14 +40,16 @@ public:
40 40
 	 	       const string& /*remote_uri*/,
41 41
 		       const string& /*local_party*/,
42 42
 		       const string& /*local_uri*/);
43
-    void reconnectAudio(); 
43
+
44
+    void connectSession();
45
+    void disconnectSession();
44 46
 
45 47
     int getCalleeStatus();
46 48
 
47 49
 protected:
48
-  virtual AmB2ABCalleeSession* createCalleeSession();
50
+  virtual AmB2ABCalleeSession* createCalleeSession() /Factory/;
49 51
 
50
-  virtual void onB2ABEvent(B2ABEvent* /*In,Out*/);
52
+  virtual void onB2ABEvent(B2ABEvent* /In,Out/);
51 53
 
52 54
   virtual void relayEvent(AmEvent* ev);	
53 55
 private:
... ...
@@ -63,7 +65,10 @@ public:
63 65
   AmB2ABCalleeSession(const string& /*other_local_tag*/);
64 66
 
65 67
   void onB2ABEvent(B2ABEvent* /*In,Out*/);
66
-  void reconnectAudio();
68
+
69
+  void connectSession();
70
+  void disconnectSession();
71
+
67 72
 private:
68 73
   AmB2ABCalleeSession(const AmB2ABCalleeSession& /* other_s*/);
69 74
 
Browse code

some more b2ab classes

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@291 8eb893ce-cfd4-0310-b710-fb5ebe64c474

Stefan Sayer authored on 28/03/2007 22:58:25
Showing 1 changed files
... ...
@@ -1,9 +1,9 @@
1 1
 
2
-
3 2
 class PySemsB2ABDialog
4 3
 {
5 4
 %TypeHeaderCode
6 5
 #include "../PySemsB2ABDialog.h"
6
+#include "../../../core/AmB2ABSession.h"
7 7
 %End
8 8
 
9 9
 public:
... ...
@@ -30,14 +30,50 @@ public:
30 30
     virtual void onBye(const AmSipRequest& /* req */);
31 31
     virtual void onDtmf(int /* event */, int /* duration_msec */);
32 32
 
33
-
34 33
     void setInput(AmAudioFile* /In/ /*in*/);
35 34
     void setOutput(AmAudioFile* /In/ /*out*/);
36 35
     void setInOut(AmAudioFile* /In/ /*in*/, AmAudioFile* /*out*/);
37 36
 
38 37
     virtual void process(AmEvent* /*In,Out*/);
38
+    
39
+    void connectCallee(const string& /*remote_party*/,
40
+	 	       const string& /*remote_uri*/,
41
+		       const string& /*local_party*/,
42
+		       const string& /*local_uri*/);
43
+    void reconnectAudio(); 
44
+
45
+    int getCalleeStatus();
39 46
 
47
+protected:
48
+  virtual AmB2ABCalleeSession* createCalleeSession();
40 49
 
50
+  virtual void onB2ABEvent(B2ABEvent* /*In,Out*/);
51
+
52
+  virtual void relayEvent(AmEvent* ev);	
41 53
 private:
42
-    PySemsB2ABDialog(const PySemsB2ABDialog&);
54
+  PySemsB2ABDialog(const PySemsB2ABDialog&);
43 55
 };
56
+
57
+class AmB2ABCalleeSession
58
+{
59
+%TypeHeaderCode
60
+#include "../../../core/AmB2ABSession.h"
61
+%End
62
+public:
63
+  AmB2ABCalleeSession(const string& /*other_local_tag*/);
64
+
65
+  void onB2ABEvent(B2ABEvent* /*In,Out*/);
66
+  void reconnectAudio();
67
+private:
68
+  AmB2ABCalleeSession(const AmB2ABCalleeSession& /* other_s*/);
69
+
70
+};
71
+
72
+class B2ABEvent
73
+{
74
+%TypeHeaderCode
75
+#include "../../../core/AmB2ABSession.h"
76
+%End
77
+  B2ABEvent(int /* ev_id */);
78
+};
79
+
Browse code

py_sems can be used with AmSession, AmB2BSession, and AmB2ABSession now: AmSession -> derive in Python from PySemsDialog AmB2BSession -> PySemsB2BDialog AmB2ABSession -> PySemsB2ABDialog

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@290 8eb893ce-cfd4-0310-b710-fb5ebe64c474

Stefan Sayer authored on 28/03/2007 21:03:22
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,43 @@
1
+
2
+
3
+class PySemsB2ABDialog
4
+{
5
+%TypeHeaderCode
6
+#include "../PySemsB2ABDialog.h"
7
+%End
8
+
9
+public:
10
+
11
+    AmSipDialog dlg;
12
+
13
+    PySemsB2ABDialog();
14
+
15
+    virtual ~PySemsB2ABDialog();
16
+%MethodCode
17
+    fprintf(stderr,"------------- dealloc_PySemsB2ABDialog ----------\n");
18
+%End
19
+
20
+    int acceptAudio(const string& /* body */,
21
+		    const string& /* hdrs */,
22
+		    string* /Out/ /* sdp_reply */);
23
+
24
+    void setStopped();
25
+
26
+    virtual void onInvite(const AmSipRequest& /* req */);
27
+    virtual void onSessionStart(const AmSipRequest& /* req */);
28
+    virtual void onCancel();
29
+
30
+    virtual void onBye(const AmSipRequest& /* req */);
31
+    virtual void onDtmf(int /* event */, int /* duration_msec */);
32
+
33
+
34
+    void setInput(AmAudioFile* /In/ /*in*/);
35
+    void setOutput(AmAudioFile* /In/ /*out*/);
36
+    void setInOut(AmAudioFile* /In/ /*in*/, AmAudioFile* /*out*/);
37
+
38
+    virtual void process(AmEvent* /*In,Out*/);
39
+
40
+
41
+private:
42
+    PySemsB2ABDialog(const PySemsB2ABDialog&);
43
+};