Browse code

- fixed some more issues with py_sems. It should work with the example now. - added an example for py_sems (py_sems_ex/early_media.py). - added audio features to py_sems.

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

Raphael Coeffic authored on 19/02/2007 14:07:37
Showing 31 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,110 @@
1
+import base64,time,os
2
+
3
+from py_sems_log import *
4
+from py_sems import *
5
+from py_sems_lib import *
6
+
7
+class PySemsScript(PySemsDialog):
8
+
9
+	def __init__(self):
10
+		
11
+		debug("***** __init__ *******")
12
+		PySemsDialog.__init__(self)
13
+		self.initial_req = None
14
+		self.ann = None
15
+
16
+	def onInvite(self,req):
17
+
18
+		
19
+		ann_file = self.getAnnounceFile(req)
20
+		self.ann = AmAudioFile()
21
+
22
+		try:
23
+			self.ann.open(ann_file)
24
+
25
+			self.initial_req = AmSipRequest(req)
26
+			debug("dlg.local_tag: %s" % self.dlg.local_tag)
27
+		
28
+			debug("***** onInvite *******")
29
+			(res,sdp_reply) = self.acceptAudio(req.body,req.hdrs)
30
+			if res < 0:
31
+				self.dlg.reply(req,500)
32
+		
33
+			debug("res = %s" % repr(res))
34
+			debug("sdp_reply = %s" % sdp_reply)
35
+		
36
+			if self.dlg.reply(req,183,"OK","application/sdp",sdp_reply,"") <> 0:
37
+				self.setStopped()
38
+		except:
39
+			self.dlg.reply(req,500,"File not found","","","")
40
+			self.ann = None
41
+			self.setStopped()
42
+			raise
43
+		
44
+		
45
+  	def onSessionStart(self,req):
46
+
47
+  		debug("***** onSessionStart *******")
48
+		PySemsDialog.onSessionStart(self,req)
49
+
50
+		self.localreq = AmSipRequest(req)
51
+		self.setOutput(self.ann)
52
+
53
+
54
+	def onCancel(self):
55
+		
56
+		debug("***** onCancel *******")
57
+
58
+		self.dlg.reply(self.initial_req,487,"Call terminated","","","")
59
+		self.setStopped()
60
+
61
+
62
+	def getAnnounceFile(self,req):
63
+
64
+		announce_file = config["announce_path"] + req.domain + "/" + get_header_param(req.r_uri, "play") + ".wav"
65
+
66
+		debug("trying '%s'",announce_file)
67
+		if os.path.exists(announce_file):
68
+			return announce_file
69
+
70
+		announce_file = config["announce_path"] + req.user + ".wav"
71
+		debug("trying '%s'",announce_file)
72
+		if os.path.exists(announce_file):
73
+			return announce_file
74
+
75
+		announce_file = config["announce_path"] + config["announce_file"]
76
+		debug("using default '%s'",announce_file)
77
+		return announce_file
78
+
79
+
80
+	def process(self,ev):
81
+
82
+		debug("*********** PySemsScript.process **************")
83
+		if isinstance(ev,AmAudioEvent):
84
+		  if ev.event_id == AmAudioEvent.cleared:
85
+
86
+			debug("AmAudioEvent.cleared")
87
+
88
+			code = getHeader(self.localreq.hdrs,"P-Final-Reply-Code")
89
+			reason = getHeader(self.localreq.hdrs,"P-Final-Reply-Reason")
90
+
91
+			if reason == "":
92
+				reason = "OK"
93
+			
94
+			code_i = 400
95
+			try:
96
+				code_i = int(code)
97
+				if (code_i < 300) or (code_i>699):
98
+					debug("Invalid reply code: %d",code_i)
99
+			except:
100
+				debug("Invalid reply code: %s",code)
101
+	
102
+			debug("Replying %d %s" % (code_i, reason))
103
+			self.dlg.reply(self.localreq, code_i, reason, "", "", "")
104
+			self.setStopped()
105
+			return
106
+		
107
+		PySemsDialog.process(self,ev);
108
+		return
109
+
110
+			
... ...
@@ -46,7 +46,7 @@ using std::set;
46 46
 
47 47
 EXPORT_SESSION_FACTORY(PySemsFactory,MOD_NAME);
48 48
 
49
-PyMODINIT_FUNC initpy_sems();
49
+PyMODINIT_FUNC initpy_sems_lib();
50 50
 
51 51
 struct PythonGIL
52 52
 {
... ...
@@ -182,8 +182,8 @@ void PySemsFactory::import_py_sems_builtins()
182 182
     // add log level for the log module
183 183
     PyModule_AddIntConstant(py_sems_module, "SEMS_LOG_LEVEL",log_level);
184 184
 
185
-    import_module("log");
186
-    initpy_sems();
185
+    import_module("py_sems_log");
186
+    initpy_sems_lib();
187 187
 }
188 188
 
189 189
 void PySemsFactory::import_module(const char* modname)
... ...
@@ -103,8 +103,6 @@ class PySemsDialog : public AmB2BCallerSession
103 103
     PyObject  *py_dlg;
104 104
 
105 105
     bool callPyEventHandler(char* name, char* fmt, ...);
106
-    
107
-    void process(AmEvent* event);
108 106
 
109 107
 public:
110 108
     AmDynInvoke* user_timer;
... ...
@@ -123,6 +121,9 @@ public:
123 121
 
124 122
 /*     void onOtherBye(const AmSipRequest& req); */
125 123
 /*     void onOtherReply(const AmSipReply& r); */
124
+
125
+    void process(AmEvent* event);
126
+
126 127
 };
127 128
 
128 129
 #endif
129 130
similarity index 79%
130 131
rename from apps/py_sems/py/log.py
131 132
rename to apps/py_sems/py/py_sems_log.py
... ...
@@ -14,7 +14,7 @@ def log(level, msg, args):
14 14
 	else:
15 15
 		tmp_msg = msg
16 16
 		
17
-	ivr.log(level,"Ivr-Python: " + tmp_msg + "\n")
17
+	py_sems.log(level,"PySems: " + tmp_msg + "\n")
18 18
 
19 19
 
20 20
 def error(msg, args=None):
... ...
@@ -47,13 +47,13 @@ def stacktrace(tb):
47 47
 
48 48
 def log_excepthook(exception, value, tb):
49 49
 
50
-	error('********** Ivr-Python exception report ****************')
50
+	error('********** PySems exception report ****************')
51 51
 	error(str(exception) + ' raised: ' + str(value))
52 52
 	stacktrace(tb)
53
-	error('********** end of Ivr-Python exception report *********')
53
+	error('********** end of PySems exception report *********')
54 54
 
55 55
 
56 56
 
57 57
 # init code
58 58
 sys.excepthook = log_excepthook
59
-debug("Python-Ivr logging started")
59
+debug("PySems logging started")
60 60
new file mode 100644
... ...
@@ -0,0 +1,95 @@
1
+
2
+struct AmEvent
3
+{
4
+%TypeHeaderCode
5
+#include "../../../core/AmEvent.h"
6
+%End
7
+
8
+    int event_id;
9
+    bool processed;
10
+
11
+    AmEvent(int /*event_id*/);
12
+    virtual ~AmEvent();
13
+
14
+%ConvertToSubClassCode
15
+	if(dynamic_cast<AmAudioEvent*>(sipCpp)){
16
+		sipClass = sipClass_AmAudioEvent;
17
+	}
18
+	else {
19
+		sipClass = sipClass_AmEvent;
20
+	}
21
+%End
22
+
23
+};
24
+
25
+class AmAudioEvent: AmEvent
26
+{
27
+
28
+%TypeHeaderCode
29
+#include "../../../core/AmAudio.h"
30
+%End
31
+
32
+public:
33
+    enum EventType {
34
+	
35
+	noAudio, // Audio class has nothing to play and/or record anymore
36
+
37
+	// Audio input & output have been cleared: 
38
+	// !!! sent only from AmSession !!!
39
+	cleared  
40
+    };
41
+
42
+    AmAudioEvent(int /*id*/);
43
+};
44
+
45
+
46
+
47
+class AmAudioFile
48
+{
49
+
50
+%TypeHeaderCode
51
+#include "../../../core/AmAudio.h"
52
+%End
53
+
54
+public:
55
+    AmAudioFile();
56
+
57
+
58
+    enum OpenMode { 
59
+	Read=1, 
60
+	Write=2 
61
+    };
62
+
63
+    bool getLoop();
64
+%MethodCode
65
+	sipRes = sipCpp->loop.get();
66
+%End
67
+
68
+    void setLoop(bool);
69
+%MethodCode
70
+	sipCpp->loop.set(a0);
71
+%End
72
+
73
+
74
+    int open(const string& /*filename*/, 
75
+	     OpenMode /*mode*/ = AmAudioFile::Read,
76
+	     bool /*is_tmp*/ = false);
77
+
78
+    void rewind();
79
+    void close();
80
+    int getDataSize();
81
+
82
+
83
+private:
84
+    AmAudioFile(const AmAudioFile&);
85
+
86
+};
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
... ...
@@ -31,6 +31,9 @@ public:
31 31
     string next_hop;  // next_hop for t_uac_dlg
32 32
     
33 33
     string key; // transaction key to be used in t_reply
34
+
35
+    
34 36
 };
35 37
 
36 38
 string getHeader(const string& /* hdrs */,const string& /* hdr_name */);
39
+string getHeader(const string& /*hdrs*/, const string& /*hdr_name*/, const string& /*compact_hdr_name*/);
37 40
new file mode 100644
... ...
@@ -0,0 +1,7 @@
1
+
2
+%ModuleHeaderCode
3
+#include "AmUtils.h"
4
+%End
5
+
6
+// get a header parameter value
7
+string get_header_param(const string& /*hdr_string*/, const string& /*param_name*/);
... ...
@@ -1,14 +1,14 @@
1 1
 TARGET = py_sems_lib.so
2
-OFILES = sippy_sems_libcmodule.o sippy_sems_libPySemsDialog.o sippy_sems_libAmSipDialog.o sippy_sems_libAmSipReply.o sippy_sems_libAmSipRequest.o sippy_sems_libstring.o
3
-HFILES = sipAPIpy_sems_lib.h sippy_sems_libPySemsDialog.h sippy_sems_libAmSipDialog.h sippy_sems_libAmSipReply.h sippy_sems_libAmSipRequest.h sippy_sems_libstring.h 
2
+OFILES = sippy_sems_libcmodule.o sippy_sems_libPySemsDialog.o sippy_sems_libAmAudioFile.o sippy_sems_libAmAudioEvent.o sippy_sems_libAmEvent.o sippy_sems_libAmSipDialog.o sippy_sems_libAmSipReply.o sippy_sems_libAmSipRequest.o sippy_sems_libstring.o
3
+HFILES = sipAPIpy_sems_lib.h sippy_sems_libPySemsDialog.h sippy_sems_libAmAudioFile.h sippy_sems_libAmAudioEvent.h sippy_sems_libAmEvent.h sippy_sems_libAmSipDialog.h sippy_sems_libAmSipReply.h sippy_sems_libAmSipRequest.h sippy_sems_libstring.h 
4 4
 
5 5
 CC = gcc
6 6
 CXX = g++
7 7
 LINK = g++
8 8
 CPPFLAGS = -I. -I$(COREPATH) -I/usr/include/python2.3
9 9
 CFLAGS = -pipe -fPIC -O2 -w
10
-CXXFLAGS = -Wall -Wno-reorder -pipe -fPIC -O2 -w
11
-LFLAGS = -shared
10
+CXXFLAGS = -Wall -Wno-reorder -g -pipe -fPIC -O2 -w
11
+LFLAGS = -g -shared
12 12
 LIBS = 
13 13
 .SUFFIXES: .c .o .cpp .cc .cxx .C
14 14
 
... ...
@@ -41,6 +41,9 @@ clean:
41 41
 	-rm -f $(TARGET)
42 42
 	-rm -f sippy_sems_libcmodule.o
43 43
 	-rm -f sippy_sems_libPySemsDialog.o
44
+	-rm -f sippy_sems_libAmAudioFile.o
45
+	-rm -f sippy_sems_libAmAudioEvent.o
46
+	-rm -f sippy_sems_libAmEvent.o
44 47
 	-rm -f sippy_sems_libAmSipDialog.o
45 48
 	-rm -f sippy_sems_libAmSipReply.o
46 49
 	-rm -f sippy_sems_libAmSipRequest.o
... ...
@@ -26,8 +26,13 @@ public:
26 26
     virtual void onBye(const AmSipRequest& /* req */);
27 27
     virtual void onDtmf(int /* event */, int /* duration_msec */);
28 28
 
29
-//    virtual void onOtherBye(const AmSipRequest& /* req */);
30
-//    virtual void onOtherReply(const AmSipReply& /* r */);
29
+
30
+    void setInput(AmAudioFile* /In/ /*in*/);
31
+    void setOutput(AmAudioFile* /In/ /*out*/);
32
+    void setInOut(AmAudioFile* /In/ /*in*/, AmAudioFile* /*out*/);
33
+
34
+    virtual void process(AmEvent* /*In,Out*/);
35
+
31 36
 
32 37
 private:
33 38
     PySemsDialog(const PySemsDialog&);
... ...
@@ -14,8 +14,9 @@ os.system(" ".join([config.sip_bin, "-c", ".", "-b", build_file, "py_sems.sip"])
14 14
 # Create the Makefile.
15 15
 makefile = sipconfig.SIPModuleMakefile(config, build_file, makefile="Makefile.gen")
16 16
 
17
-makefile.extra_cxxflags = ["-Wall -Wno-reorder"]
17
+makefile.extra_cxxflags = ["-Wall -Wno-reorder -g"]
18 18
 makefile.extra_include_dirs = ["$(COREPATH)"]
19
+makefile.extra_lflags = ["-g"]
19 20
 makefile._warnings = 0
20 21
 
21 22
 # Generate the Makefile itself.
... ...
@@ -1,3 +1,3 @@
1 1
 target = py_sems_lib
2
-sources = sippy_sems_libcmodule.cpp sippy_sems_libPySemsDialog.cpp sippy_sems_libAmSipDialog.cpp sippy_sems_libAmSipReply.cpp sippy_sems_libAmSipRequest.cpp sippy_sems_libstring.cpp
3
-headers = sipAPIpy_sems_lib.h sippy_sems_libPySemsDialog.h sippy_sems_libAmSipDialog.h sippy_sems_libAmSipReply.h sippy_sems_libAmSipRequest.h sippy_sems_libstring.h
2
+sources = sippy_sems_libcmodule.cpp sippy_sems_libPySemsDialog.cpp sippy_sems_libAmAudioFile.cpp sippy_sems_libAmAudioEvent.cpp sippy_sems_libAmEvent.cpp sippy_sems_libAmSipDialog.cpp sippy_sems_libAmSipReply.cpp sippy_sems_libAmSipRequest.cpp sippy_sems_libstring.cpp
3
+headers = sipAPIpy_sems_lib.h sippy_sems_libPySemsDialog.h sippy_sems_libAmAudioFile.h sippy_sems_libAmAudioEvent.h sippy_sems_libAmEvent.h sippy_sems_libAmSipDialog.h sippy_sems_libAmSipReply.h sippy_sems_libAmSipRequest.h sippy_sems_libstring.h
... ...
@@ -4,4 +4,6 @@
4 4
 %Include AmSipRequest.sip
5 5
 %Include AmSipReply.sip
6 6
 %Include AmSipDialog.sip
7
+%Include AmAudio.sip
7 8
 %Include PySemsDialog.sip
9
+%Include AmUtils.sip
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * Internal module API header file.
3 3
  *
4
- * Generated by SIP 4.1.1 (4.1.1-255) on Fri Feb 16 10:10:16 2007
4
+ * Generated by SIP 4.1.1 (4.1.1-255) on Mon Feb 19 14:57:35 2007
5 5
  */
6 6
 
7 7
 #ifndef _py_sems_libAPI_H
... ...
@@ -9,6 +9,9 @@
9 9
 
10 10
 
11 11
 #include <sip.h>
12
+#line 3 "AmUtils.sip"
13
+#include "AmUtils.h"
14
+#line 15 "sipAPIpy_sems_lib.h"
12 15
 
13 16
 
14 17
 /*
... ...
@@ -17,6 +20,9 @@
17 20
  */
18 21
 
19 22
 #define	sipName_PySemsDialog	sipNm_py_sems_lib_PySemsDialog
23
+#define	sipName_AmAudioFile	sipNm_py_sems_lib_AmAudioFile
24
+#define	sipName_AmAudioEvent	sipNm_py_sems_lib_AmAudioEvent
25
+#define	sipName_AmEvent	sipNm_py_sems_lib_AmEvent
20 26
 #define	sipName_AmSipDialog	sipNm_py_sems_lib_AmSipDialog
21 27
 #define	sipName_AmSipReply	sipNm_py_sems_lib_AmSipReply
22 28
 #define	sipName_AmSipRequest	sipNm_py_sems_lib_AmSipRequest
... ...
@@ -73,6 +79,11 @@
73 79
 
74 80
 
75 81
 /* The strings used by this module. */
82
+extern char sipNm_py_sems_lib_get_header_param[];
83
+extern char sipNm_py_sems_lib_process[];
84
+extern char sipNm_py_sems_lib_setInOut[];
85
+extern char sipNm_py_sems_lib_setOutput[];
86
+extern char sipNm_py_sems_lib_setInput[];
76 87
 extern char sipNm_py_sems_lib_onDtmf[];
77 88
 extern char sipNm_py_sems_lib_onBye[];
78 89
 extern char sipNm_py_sems_lib_onCancel[];
... ...
@@ -82,6 +93,21 @@ extern char sipNm_py_sems_lib_setStopped[];
82 93
 extern char sipNm_py_sems_lib_acceptAudio[];
83 94
 extern char sipNm_py_sems_lib_dlg[];
84 95
 extern char sipNm_py_sems_lib_PySemsDialog[];
96
+extern char sipNm_py_sems_lib_getDataSize[];
97
+extern char sipNm_py_sems_lib_close[];
98
+extern char sipNm_py_sems_lib_rewind[];
99
+extern char sipNm_py_sems_lib_open[];
100
+extern char sipNm_py_sems_lib_setLoop[];
101
+extern char sipNm_py_sems_lib_getLoop[];
102
+extern char sipNm_py_sems_lib_Write[];
103
+extern char sipNm_py_sems_lib_Read[];
104
+extern char sipNm_py_sems_lib_AmAudioFile[];
105
+extern char sipNm_py_sems_lib_cleared[];
106
+extern char sipNm_py_sems_lib_noAudio[];
107
+extern char sipNm_py_sems_lib_AmAudioEvent[];
108
+extern char sipNm_py_sems_lib_processed[];
109
+extern char sipNm_py_sems_lib_event_id[];
110
+extern char sipNm_py_sems_lib_AmEvent[];
85 111
 extern char sipNm_py_sems_lib_reinvite[];
86 112
 extern char sipNm_py_sems_lib_update[];
87 113
 extern char sipNm_py_sems_lib_cancel[];
88 114
new file mode 100644
... ...
@@ -0,0 +1,136 @@
1
+/*
2
+ * Interface wrapper code.
3
+ *
4
+ * Generated by SIP 4.1.1 (4.1.1-255) on Mon Feb 19 14:57:35 2007
5
+ */
6
+
7
+#include "sipAPIpy_sems_lib.h"
8
+#include "sippy_sems_libAmAudioEvent.h"
9
+
10
+sipAmAudioEvent::sipAmAudioEvent(int a0): AmAudioEvent(a0), sipPySelf(0)
11
+{
12
+	sipCommonCtor(NULL,0);
13
+}
14
+
15
+sipAmAudioEvent::sipAmAudioEvent(const AmAudioEvent& a0): AmAudioEvent(a0), sipPySelf(0)
16
+{
17
+	sipCommonCtor(NULL,0);
18
+}
19
+
20
+sipAmAudioEvent::~sipAmAudioEvent()
21
+{
22
+	sipCommonDtor(sipPySelf);
23
+}
24
+
25
+
26
+/* Cast a pointer to a type somewhere in its superclass hierarchy. */
27
+static void *cast_AmAudioEvent(void *ptr,sipWrapperType *targetClass)
28
+{
29
+	void *res;
30
+
31
+	if (targetClass == sipClass_AmAudioEvent)
32
+		return ptr;
33
+
34
+	if ((res = sipCast_AmEvent((AmEvent *)(AmAudioEvent *)ptr,targetClass)) != NULL)
35
+		return res;
36
+
37
+	return NULL;
38
+}
39
+
40
+
41
+static void dealloc_AmAudioEvent(sipWrapper *sipSelf)
42
+{
43
+	if (!sipIsSimple(sipSelf))
44
+		reinterpret_cast<sipAmAudioEvent *>(sipSelf -> u.cppPtr) -> sipPySelf = NULL;
45
+
46
+	if (sipIsPyOwned(sipSelf))
47
+	{
48
+		if (!sipIsSimple(sipSelf))
49
+			delete reinterpret_cast<sipAmAudioEvent *>(sipSelf -> u.cppPtr);
50
+		else
51
+			delete reinterpret_cast<AmAudioEvent *>(sipSelf -> u.cppPtr);
52
+	}
53
+}
54
+
55
+
56
+static void *init_AmAudioEvent(sipWrapper *sipSelf,PyObject *sipArgs,int *)
57
+{
58
+	int sipArgsParsed = 0;
59
+	sipAmAudioEvent *sipCpp = 0;
60
+
61
+	if (!sipCpp)
62
+	{
63
+		int a0;
64
+
65
+		if (sipParseArgs(&sipArgsParsed,sipArgs,"i",&a0))
66
+		{
67
+			sipCpp = new sipAmAudioEvent(a0);
68
+		}
69
+	}
70
+
71
+	if (!sipCpp)
72
+	{
73
+		const AmAudioEvent * a0;
74
+
75
+		if (sipParseArgs(&sipArgsParsed,sipArgs,"J1",sipClass_AmAudioEvent,&a0))
76
+		{
77
+			sipCpp = new sipAmAudioEvent(*a0);
78
+		}
79
+	}
80
+
81
+	if (!sipCpp)
82
+	{
83
+		sipNoCtor(sipArgsParsed,sipNm_py_sems_lib_AmAudioEvent);
84
+		return 0;
85
+	}
86
+
87
+	sipCpp -> sipPySelf = sipSelf;
88
+
89
+	return sipCpp;
90
+}
91
+
92
+
93
+static void *forceConvertTo_AmAudioEvent(PyObject *valobj,int *iserrp)
94
+{
95
+	if (*iserrp || valobj == NULL)
96
+		return NULL;
97
+
98
+	if (valobj == Py_None || sipIsSubClassInstance(valobj,sipClass_AmAudioEvent))
99
+		return sipConvertToCpp(valobj,sipClass_AmAudioEvent,iserrp);
100
+
101
+	sipBadClass(sipNm_py_sems_lib_AmAudioEvent);
102
+
103
+	*iserrp = 1;
104
+
105
+	return NULL;
106
+}
107
+
108
+
109
+/* Define this type's super-types. */
110
+static sipSuperClassDef supers_AmAudioEvent[] = {{2, 255, 1}};
111
+
112
+static sipEnumValueInstanceDef enums_AmAudioEvent[] = {
113
+	{sipNm_py_sems_lib_cleared, AmAudioEvent::cleared},
114
+	{sipNm_py_sems_lib_noAudio, AmAudioEvent::noAudio}
115
+};
116
+
117
+
118
+/* The main type data structure. */
119
+sipTypeDef sipType_AmAudioEvent = {
120
+	0,
121
+	"py_sems_lib.AmAudioEvent",
122
+	-1,
123
+	supers_AmAudioEvent,
124
+	0,
125
+	0, 0,
126
+	2, enums_AmAudioEvent,
127
+	0,
128
+	init_AmAudioEvent,
129
+	dealloc_AmAudioEvent,
130
+	cast_AmAudioEvent,
131
+	forceConvertTo_AmAudioEvent,
132
+	0,
133
+	0,
134
+	0,
135
+	{0, 0, 0, 0, 0, 0}
136
+};
0 137
new file mode 100644
... ...
@@ -0,0 +1,38 @@
1
+/*
2
+ * Interface header file.
3
+ *
4
+ * Generated by SIP 4.1.1 (4.1.1-255) on Mon Feb 19 14:57:35 2007
5
+ */
6
+
7
+#ifndef _py_sems_libAmAudioEvent_h
8
+#define	_py_sems_libAmAudioEvent_h
9
+
10
+#line 29 "AmAudio.sip"
11
+#include "../../../core/AmAudio.h"
12
+#line 13 "sippy_sems_libAmAudioEvent.h"
13
+
14
+#include "sippy_sems_libAmEvent.h"
15
+
16
+
17
+#define	sipClass_AmAudioEvent	sipModuleAPI_py_sems_lib.em_types[3]
18
+#define	sipCast_AmAudioEvent	sipType_AmAudioEvent.td_cast
19
+#define	sipForceConvertTo_AmAudioEvent	sipType_AmAudioEvent.td_fcto
20
+
21
+extern sipTypeDef sipType_AmAudioEvent;
22
+
23
+
24
+class sipAmAudioEvent : public AmAudioEvent
25
+{
26
+public:
27
+	sipAmAudioEvent(int);
28
+	sipAmAudioEvent(const AmAudioEvent&);
29
+	~sipAmAudioEvent();
30
+
31
+	sipWrapper *sipPySelf;
32
+
33
+private:
34
+	sipAmAudioEvent(const sipAmAudioEvent &);
35
+	sipAmAudioEvent &operator = (const sipAmAudioEvent &);
36
+};
37
+
38
+#endif
0 39
new file mode 100644
... ...
@@ -0,0 +1,255 @@
1
+/*
2
+ * Interface wrapper code.
3
+ *
4
+ * Generated by SIP 4.1.1 (4.1.1-255) on Mon Feb 19 14:57:35 2007
5
+ */
6
+
7
+#include "sipAPIpy_sems_lib.h"
8
+#include "sippy_sems_libAmAudioFile.h"
9
+
10
+
11
+static PyObject *meth_AmAudioFile_getLoop(PyObject *sipSelf,PyObject *sipArgs)
12
+{
13
+	int sipArgsParsed = 0;
14
+
15
+	{
16
+		AmAudioFile *sipCpp;
17
+
18
+		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipSelf,sipClass_AmAudioFile,&sipCpp))
19
+		{
20
+			bool sipRes = 0;
21
+
22
+#line 65 "AmAudio.sip"
23
+	sipRes = sipCpp->loop.get();
24
+#line 25 "sippy_sems_libAmAudioFile.cpp"
25
+
26
+			return PyBool_FromLong(sipRes);
27
+		}
28
+	}
29
+
30
+	/* Raise an exception if the arguments couldn't be parsed. */
31
+	sipNoMethod(sipArgsParsed,sipNm_py_sems_lib_AmAudioFile,sipNm_py_sems_lib_getLoop);
32
+
33
+	return NULL;
34
+}
35
+
36
+
37
+static PyObject *meth_AmAudioFile_setLoop(PyObject *sipSelf,PyObject *sipArgs)
38
+{
39
+	int sipArgsParsed = 0;
40
+
41
+	{
42
+		bool a0;
43
+		AmAudioFile *sipCpp;
44
+
45
+		if (sipParseArgs(&sipArgsParsed,sipArgs,"mb",sipSelf,sipClass_AmAudioFile,&sipCpp,&a0))
46
+		{
47
+#line 70 "AmAudio.sip"
48
+	sipCpp->loop.set(a0);
49
+#line 50 "sippy_sems_libAmAudioFile.cpp"
50
+
51
+			Py_INCREF(Py_None);
52
+			return Py_None;
53
+		}
54
+	}
55
+
56
+	/* Raise an exception if the arguments couldn't be parsed. */
57
+	sipNoMethod(sipArgsParsed,sipNm_py_sems_lib_AmAudioFile,sipNm_py_sems_lib_setLoop);
58
+
59
+	return NULL;
60
+}
61
+
62
+
63
+static PyObject *meth_AmAudioFile_open(PyObject *sipSelf,PyObject *sipArgs)
64
+{
65
+	int sipArgsParsed = 0;
66
+
67
+	{
68
+		const string * a0;
69
+		int a0IsTemp = 0;
70
+		AmAudioFile::OpenMode a1 = AmAudioFile::Read;
71
+		bool a2 = 0;
72
+		AmAudioFile *sipCpp;
73
+
74
+		if (sipParseArgs(&sipArgsParsed,sipArgs,"mM1|eb",sipSelf,sipClass_AmAudioFile,&sipCpp,sipConvertTo_string,&a0,&a0IsTemp,&a1,&a2))
75
+		{
76
+			int sipRes;
77
+
78
+			sipRes = sipCpp -> AmAudioFile::open(*a0,a1,a2);
79
+
80
+			if (a0IsTemp)
81
+				delete const_cast<string *>(a0);
82
+
83
+			return PyInt_FromLong((long)sipRes);
84
+		}
85
+	}
86
+
87
+	/* Raise an exception if the arguments couldn't be parsed. */
88
+	sipNoMethod(sipArgsParsed,sipNm_py_sems_lib_AmAudioFile,sipNm_py_sems_lib_open);
89
+
90
+	return NULL;
91
+}
92
+
93
+
94
+static PyObject *meth_AmAudioFile_rewind(PyObject *sipSelf,PyObject *sipArgs)
95
+{
96
+	int sipArgsParsed = 0;
97
+
98
+	{
99
+		AmAudioFile *sipCpp;
100
+
101
+		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipSelf,sipClass_AmAudioFile,&sipCpp))
102
+		{
103
+			sipCpp -> AmAudioFile::rewind();
104
+
105
+			Py_INCREF(Py_None);
106
+			return Py_None;
107
+		}
108
+	}
109
+
110
+	/* Raise an exception if the arguments couldn't be parsed. */
111
+	sipNoMethod(sipArgsParsed,sipNm_py_sems_lib_AmAudioFile,sipNm_py_sems_lib_rewind);
112
+
113
+	return NULL;
114
+}
115
+
116
+
117
+static PyObject *meth_AmAudioFile_close(PyObject *sipSelf,PyObject *sipArgs)
118
+{
119
+	int sipArgsParsed = 0;
120
+
121
+	{
122
+		AmAudioFile *sipCpp;
123
+
124
+		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipSelf,sipClass_AmAudioFile,&sipCpp))
125
+		{
126
+			sipCpp -> AmAudioFile::close();
127
+
128
+			Py_INCREF(Py_None);
129
+			return Py_None;
130
+		}
131
+	}
132
+
133
+	/* Raise an exception if the arguments couldn't be parsed. */
134
+	sipNoMethod(sipArgsParsed,sipNm_py_sems_lib_AmAudioFile,sipNm_py_sems_lib_close);
135
+
136
+	return NULL;
137
+}
138
+
139
+
140
+static PyObject *meth_AmAudioFile_getDataSize(PyObject *sipSelf,PyObject *sipArgs)
141
+{
142
+	int sipArgsParsed = 0;
143
+
144
+	{
145
+		AmAudioFile *sipCpp;
146
+
147
+		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipSelf,sipClass_AmAudioFile,&sipCpp))
148
+		{
149
+			int sipRes;
150
+
151
+			sipRes = sipCpp -> AmAudioFile::getDataSize();
152
+
153
+			return PyInt_FromLong((long)sipRes);
154
+		}
155
+	}
156
+
157
+	/* Raise an exception if the arguments couldn't be parsed. */
158
+	sipNoMethod(sipArgsParsed,sipNm_py_sems_lib_AmAudioFile,sipNm_py_sems_lib_getDataSize);
159
+
160
+	return NULL;
161
+}
162
+
163
+
164
+/* Cast a pointer to a type somewhere in its superclass hierarchy. */
165
+static void *cast_AmAudioFile(void *ptr,sipWrapperType *targetClass)
166
+{
167
+	if (targetClass == sipClass_AmAudioFile)
168
+		return ptr;
169
+
170
+	return NULL;
171
+}
172
+
173
+
174
+static void dealloc_AmAudioFile(sipWrapper *sipSelf)
175
+{
176
+	if (sipIsPyOwned(sipSelf))
177
+	{
178
+		delete reinterpret_cast<AmAudioFile *>(sipSelf -> u.cppPtr);
179
+	}
180
+}
181
+
182
+
183
+static void *init_AmAudioFile(sipWrapper *,PyObject *sipArgs,int *)
184
+{
185
+	int sipArgsParsed = 0;
186
+	AmAudioFile *sipCpp = 0;
187
+
188
+	if (!sipCpp)
189
+	{
190
+		if (sipParseArgs(&sipArgsParsed,sipArgs,""))
191
+		{
192
+			sipCpp = new AmAudioFile();
193
+		}
194
+	}
195
+
196
+	if (!sipCpp)
197
+	{
198
+		sipNoCtor(sipArgsParsed,sipNm_py_sems_lib_AmAudioFile);
199
+		return 0;
200
+	}
201
+
202
+	return sipCpp;
203
+}
204
+
205
+
206
+static void *forceConvertTo_AmAudioFile(PyObject *valobj,int *iserrp)
207
+{
208
+	if (*iserrp || valobj == NULL)
209
+		return NULL;
210
+
211
+	if (valobj == Py_None || sipIsSubClassInstance(valobj,sipClass_AmAudioFile))
212
+		return sipConvertToCpp(valobj,sipClass_AmAudioFile,iserrp);
213
+
214
+	sipBadClass(sipNm_py_sems_lib_AmAudioFile);
215
+
216
+	*iserrp = 1;
217
+
218
+	return NULL;
219
+}
220
+
221
+
222
+static PyMethodDef methods_AmAudioFile[] = {
223
+	{sipNm_py_sems_lib_close, meth_AmAudioFile_close, METH_VARARGS, NULL},
224
+	{sipNm_py_sems_lib_getDataSize, meth_AmAudioFile_getDataSize, METH_VARARGS, NULL},
225
+	{sipNm_py_sems_lib_getLoop, meth_AmAudioFile_getLoop, METH_VARARGS, NULL},
226
+	{sipNm_py_sems_lib_open, meth_AmAudioFile_open, METH_VARARGS, NULL},
227
+	{sipNm_py_sems_lib_rewind, meth_AmAudioFile_rewind, METH_VARARGS, NULL},
228
+	{sipNm_py_sems_lib_setLoop, meth_AmAudioFile_setLoop, METH_VARARGS, NULL}
229
+};
230
+
231
+static sipEnumValueInstanceDef enums_AmAudioFile[] = {
232
+	{sipNm_py_sems_lib_Read, AmAudioFile::Read},
233
+	{sipNm_py_sems_lib_Write, AmAudioFile::Write}
234
+};
235
+
236
+
237
+/* The main type data structure. */
238
+sipTypeDef sipType_AmAudioFile = {
239
+	0,
240
+	"py_sems_lib.AmAudioFile",
241
+	-1,
242
+	0,
243
+	0,
244
+	6, methods_AmAudioFile,
245
+	2, enums_AmAudioFile,
246
+	0,
247
+	init_AmAudioFile,
248
+	dealloc_AmAudioFile,
249
+	cast_AmAudioFile,
250
+	forceConvertTo_AmAudioFile,
251
+	0,
252
+	0,
253
+	0,
254
+	{0, 0, 0, 0, 0, 0}
255
+};
0 256
new file mode 100644
... ...
@@ -0,0 +1,23 @@
1
+/*
2
+ * Interface header file.
3
+ *
4
+ * Generated by SIP 4.1.1 (4.1.1-255) on Mon Feb 19 14:57:35 2007
5
+ */
6
+
7
+#ifndef _py_sems_libAmAudioFile_h
8
+#define	_py_sems_libAmAudioFile_h
9
+
10
+#line 51 "AmAudio.sip"
11
+#include "../../../core/AmAudio.h"
12
+#line 13 "sippy_sems_libAmAudioFile.h"
13
+
14
+#include "sippy_sems_libstring.h"
15
+
16
+
17
+#define	sipClass_AmAudioFile	sipModuleAPI_py_sems_lib.em_types[1]
18
+#define	sipCast_AmAudioFile	sipType_AmAudioFile.td_cast
19
+#define	sipForceConvertTo_AmAudioFile	sipType_AmAudioFile.td_fcto
20
+
21
+extern sipTypeDef sipType_AmAudioFile;
22
+
23
+#endif
0 24
new file mode 100644
... ...
@@ -0,0 +1,192 @@
1
+/*
2
+ * Interface wrapper code.
3
+ *
4
+ * Generated by SIP 4.1.1 (4.1.1-255) on Mon Feb 19 14:57:35 2007
5
+ */
6
+
7
+#include "sipAPIpy_sems_lib.h"
8
+#include "sippy_sems_libAmEvent.h"
9
+
10
+sipAmEvent::sipAmEvent(int a0): AmEvent(a0), sipPySelf(0)
11
+{
12
+	sipCommonCtor(NULL,0);
13
+}
14
+
15
+sipAmEvent::sipAmEvent(const AmEvent& a0): AmEvent(a0), sipPySelf(0)
16
+{
17
+	sipCommonCtor(NULL,0);
18
+}
19
+
20
+sipAmEvent::~sipAmEvent()
21
+{
22
+	sipCommonDtor(sipPySelf);
23
+}
24
+
25
+
26
+/* Cast a pointer to a type somewhere in its superclass hierarchy. */
27
+static void *cast_AmEvent(void *ptr,sipWrapperType *targetClass)
28
+{
29
+	if (targetClass == sipClass_AmEvent)
30
+		return ptr;
31
+
32
+	return NULL;
33
+}
34
+
35
+
36
+static void dealloc_AmEvent(sipWrapper *sipSelf)
37
+{
38
+	if (!sipIsSimple(sipSelf))
39
+		reinterpret_cast<sipAmEvent *>(sipSelf -> u.cppPtr) -> sipPySelf = NULL;
40
+
41
+	if (sipIsPyOwned(sipSelf))
42
+	{
43
+		if (!sipIsSimple(sipSelf))
44
+			delete reinterpret_cast<sipAmEvent *>(sipSelf -> u.cppPtr);
45
+		else
46
+			delete reinterpret_cast<AmEvent *>(sipSelf -> u.cppPtr);
47
+	}
48
+}
49
+
50
+
51
+static void *init_AmEvent(sipWrapper *sipSelf,PyObject *sipArgs,int *)
52
+{
53
+	int sipArgsParsed = 0;
54
+	sipAmEvent *sipCpp = 0;
55
+
56
+	if (!sipCpp)
57
+	{
58
+		int a0;
59
+
60
+		if (sipParseArgs(&sipArgsParsed,sipArgs,"i",&a0))
61
+		{
62
+			sipCpp = new sipAmEvent(a0);
63
+		}
64
+	}
65
+
66
+	if (!sipCpp)
67
+	{
68
+		const AmEvent * a0;
69
+
70
+		if (sipParseArgs(&sipArgsParsed,sipArgs,"J1",sipClass_AmEvent,&a0))
71
+		{
72
+			sipCpp = new sipAmEvent(*a0);
73
+		}
74
+	}
75
+
76
+	if (!sipCpp)
77
+	{
78
+		sipNoCtor(sipArgsParsed,sipNm_py_sems_lib_AmEvent);
79
+		return 0;
80
+	}
81
+
82
+	sipCpp -> sipPySelf = sipSelf;
83
+
84
+	return sipCpp;
85
+}
86
+
87
+
88
+static PyObject *var_AmEvent_processed(PyObject *sipSelf,PyObject *valobj)
89
+{
90
+	bool val;
91
+	AmEvent *sipCpp = reinterpret_cast<AmEvent *>(sipGetCppPtr((sipWrapper *)sipSelf,sipClass_AmEvent));
92
+
93
+	if (!sipCpp)
94
+		return NULL;
95
+
96
+	if (valobj == NULL)
97
+	{
98
+		val = sipCpp -> processed;
99
+
100
+		valobj = PyBool_FromLong(val);
101
+
102
+		return valobj;
103
+	}
104
+
105
+	val = (bool)PyInt_AsLong(valobj);
106
+
107
+	if (PyErr_Occurred() != NULL)
108
+	{
109
+		sipBadSetType(sipNm_py_sems_lib_AmEvent,sipNm_py_sems_lib_processed);
110
+		return NULL;
111
+	}
112
+
113
+	sipCpp -> processed = val;
114
+
115
+	Py_INCREF(Py_None);
116
+	return Py_None;
117
+}
118
+
119
+
120
+static PyObject *var_AmEvent_event_id(PyObject *sipSelf,PyObject *valobj)
121
+{
122
+	int val;
123
+	AmEvent *sipCpp = reinterpret_cast<AmEvent *>(sipGetCppPtr((sipWrapper *)sipSelf,sipClass_AmEvent));
124
+
125
+	if (!sipCpp)
126
+		return NULL;
127
+
128
+	if (valobj == NULL)
129
+	{
130
+		val = sipCpp -> event_id;
131
+
132
+		valobj = PyInt_FromLong((long)val);
133
+
134
+		return valobj;
135
+	}
136
+
137
+	val = (int)PyInt_AsLong(valobj);
138
+
139
+	if (PyErr_Occurred() != NULL)
140
+	{
141
+		sipBadSetType(sipNm_py_sems_lib_AmEvent,sipNm_py_sems_lib_event_id);
142
+		return NULL;
143
+	}
144
+
145
+	sipCpp -> event_id = val;
146
+
147
+	Py_INCREF(Py_None);
148
+	return Py_None;
149
+}
150
+
151
+PyMethodDef variables_AmEvent[] = {
152
+	{sipNm_py_sems_lib_processed, var_AmEvent_processed, 0, NULL},
153
+	{sipNm_py_sems_lib_event_id, var_AmEvent_event_id, 0, NULL},
154
+	{0, 0, 0, 0}
155
+};
156
+
157
+
158
+static void *forceConvertTo_AmEvent(PyObject *valobj,int *iserrp)
159
+{
160
+	if (*iserrp || valobj == NULL)
161
+		return NULL;
162
+
163
+	if (valobj == Py_None || sipIsSubClassInstance(valobj,sipClass_AmEvent))
164
+		return sipConvertToCpp(valobj,sipClass_AmEvent,iserrp);
165
+
166
+	sipBadClass(sipNm_py_sems_lib_AmEvent);
167
+
168
+	*iserrp = 1;
169
+
170
+	return NULL;
171
+}
172
+
173
+
174
+/* The main type data structure. */
175
+sipTypeDef sipType_AmEvent = {
176
+	0,
177
+	"py_sems_lib.AmEvent",
178
+	-1,
179
+	0,
180
+	0,
181
+	0, 0,
182
+	0, 0,
183
+	variables_AmEvent,
184
+	init_AmEvent,
185
+	dealloc_AmEvent,
186
+	cast_AmEvent,
187
+	forceConvertTo_AmEvent,
188
+	0,
189
+	0,
190
+	0,
191
+	{0, 0, 0, 0, 0, 0}
192
+};
0 193
new file mode 100644
... ...
@@ -0,0 +1,36 @@
1
+/*
2
+ * Interface header file.
3
+ *
4
+ * Generated by SIP 4.1.1 (4.1.1-255) on Mon Feb 19 14:57:35 2007
5
+ */
6
+
7
+#ifndef _py_sems_libAmEvent_h
8
+#define	_py_sems_libAmEvent_h
9
+
10
+#line 5 "AmAudio.sip"
11
+#include "../../../core/AmEvent.h"
12
+#line 13 "sippy_sems_libAmEvent.h"
13
+
14
+
15
+#define	sipClass_AmEvent	sipModuleAPI_py_sems_lib.em_types[2]
16
+#define	sipCast_AmEvent	sipType_AmEvent.td_cast
17
+#define	sipForceConvertTo_AmEvent	sipType_AmEvent.td_fcto
18
+
19
+extern sipTypeDef sipType_AmEvent;
20
+
21
+
22
+class sipAmEvent : public AmEvent
23
+{
24
+public:
25
+	sipAmEvent(int);
26
+	sipAmEvent(const AmEvent&);
27
+	~sipAmEvent();
28
+
29
+	sipWrapper *sipPySelf;
30
+
31
+private:
32
+	sipAmEvent(const sipAmEvent &);
33
+	sipAmEvent &operator = (const sipAmEvent &);
34
+};
35
+
36
+#endif
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * Interface wrapper code.
3 3
  *
4
- * Generated by SIP 4.1.1 (4.1.1-255) on Fri Feb 16 10:10:16 2007
4
+ * Generated by SIP 4.1.1 (4.1.1-255) on Mon Feb 19 14:57:35 2007
5 5
  */
6 6
 
7 7
 #include "sipAPIpy_sems_lib.h"
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * Interface header file.
3 3
  *
4
- * Generated by SIP 4.1.1 (4.1.1-255) on Fri Feb 16 10:10:16 2007
4
+ * Generated by SIP 4.1.1 (4.1.1-255) on Mon Feb 19 14:57:35 2007
5 5
  */
6 6
 
7 7
 #ifndef _py_sems_libAmSipDialog_h
... ...
@@ -16,7 +16,7 @@
16 16
 #include "sippy_sems_libAmSipReply.h"
17 17
 
18 18
 
19
-#define	sipClass_AmSipDialog	sipModuleAPI_py_sems_lib.em_types[1]
19
+#define	sipClass_AmSipDialog	sipModuleAPI_py_sems_lib.em_types[4]
20 20
 #define	sipCast_AmSipDialog	sipType_AmSipDialog.td_cast
21 21
 #define	sipForceConvertTo_AmSipDialog	sipType_AmSipDialog.td_fcto
22 22
 
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * Interface wrapper code.
3 3
  *
4
- * Generated by SIP 4.1.1 (4.1.1-255) on Fri Feb 16 10:10:16 2007
4
+ * Generated by SIP 4.1.1 (4.1.1-255) on Mon Feb 19 14:57:35 2007
5 5
  */
6 6
 
7 7
 #include "sipAPIpy_sems_lib.h"
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * Interface header file.
3 3
  *
4
- * Generated by SIP 4.1.1 (4.1.1-255) on Fri Feb 16 10:10:16 2007
4
+ * Generated by SIP 4.1.1 (4.1.1-255) on Mon Feb 19 14:57:35 2007
5 5
  */
6 6
 
7 7
 #ifndef _py_sems_libAmSipReply_h
... ...
@@ -14,7 +14,7 @@
14 14
 #include "sippy_sems_libstring.h"
15 15
 
16 16
 
17
-#define	sipClass_AmSipReply	sipModuleAPI_py_sems_lib.em_types[2]
17
+#define	sipClass_AmSipReply	sipModuleAPI_py_sems_lib.em_types[5]
18 18
 #define	sipCast_AmSipReply	sipType_AmSipReply.td_cast
19 19
 #define	sipForceConvertTo_AmSipReply	sipType_AmSipReply.td_fcto
20 20
 
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * Interface wrapper code.
3 3
  *
4
- * Generated by SIP 4.1.1 (4.1.1-255) on Fri Feb 16 10:10:16 2007
4
+ * Generated by SIP 4.1.1 (4.1.1-255) on Mon Feb 19 14:57:35 2007
5 5
  */
6 6
 
7 7
 #include "sipAPIpy_sems_lib.h"
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * Interface header file.
3 3
  *
4
- * Generated by SIP 4.1.1 (4.1.1-255) on Fri Feb 16 10:10:16 2007
4
+ * Generated by SIP 4.1.1 (4.1.1-255) on Mon Feb 19 14:57:35 2007
5 5
  */
6 6
 
7 7
 #ifndef _py_sems_libAmSipRequest_h
... ...
@@ -14,7 +14,7 @@
14 14
 #include "sippy_sems_libstring.h"
15 15
 
16 16
 
17
-#define	sipClass_AmSipRequest	sipModuleAPI_py_sems_lib.em_types[3]
17
+#define	sipClass_AmSipRequest	sipModuleAPI_py_sems_lib.em_types[6]
18 18
 #define	sipCast_AmSipRequest	sipType_AmSipRequest.td_cast
19 19
 #define	sipForceConvertTo_AmSipRequest	sipType_AmSipRequest.td_fcto
20 20
 
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * Interface wrapper code.
3 3
  *
4
- * Generated by SIP 4.1.1 (4.1.1-255) on Fri Feb 16 10:10:16 2007
4
+ * Generated by SIP 4.1.1 (4.1.1-255) on Mon Feb 19 14:57:35 2007
5 5
  */
6 6
 
7 7
 #include "sipAPIpy_sems_lib.h"
... ...
@@ -9,7 +9,7 @@
9 9
 
10 10
 sipPySemsDialog::sipPySemsDialog(): PySemsDialog(), sipPySelf(0)
11 11
 {
12
-	sipCommonCtor(sipPyMethods,5);
12
+	sipCommonCtor(sipPyMethods,6);
13 13
 }
14 14
 
15 15
 sipPySemsDialog::~sipPySemsDialog()
... ...
@@ -19,7 +19,7 @@ sipPySemsDialog::~sipPySemsDialog()
19 19
 
20 20
 void sipPySemsDialog::onInvite(const AmSipRequest& a0)
21 21
 {
22
-	extern void sipVH_py_sems_lib_1(sip_gilstate_t,PyObject *,const AmSipRequest&);
22
+	extern void sipVH_py_sems_lib_2(sip_gilstate_t,PyObject *,const AmSipRequest&);
23 23
 
24 24
 	sip_gilstate_t sipGILState;
25 25
 	PyObject *meth;
... ...
@@ -32,12 +32,12 @@ void sipPySemsDialog::onInvite(const AmSipRequest& a0)
32 32
 		return;
33 33
 	}
34 34
 
35
-	sipVH_py_sems_lib_1(sipGILState,meth,a0);
35
+	sipVH_py_sems_lib_2(sipGILState,meth,a0);
36 36
 }
37 37
 
38 38
 void sipPySemsDialog::onSessionStart(const AmSipRequest& a0)
39 39
 {
40
-	extern void sipVH_py_sems_lib_1(sip_gilstate_t,PyObject *,const AmSipRequest&);
40
+	extern void sipVH_py_sems_lib_2(sip_gilstate_t,PyObject *,const AmSipRequest&);
41 41
 
42 42
 	sip_gilstate_t sipGILState;
43 43
 	PyObject *meth;
... ...
@@ -50,12 +50,12 @@ void sipPySemsDialog::onSessionStart(const AmSipRequest& a0)
50 50
 		return;
51 51
 	}
52 52
 
53
-	sipVH_py_sems_lib_1(sipGILState,meth,a0);
53
+	sipVH_py_sems_lib_2(sipGILState,meth,a0);
54 54
 }
55 55
 
56 56
 void sipPySemsDialog::onCancel()
57 57
 {
58
-	extern void sipVH_py_sems_lib_2(sip_gilstate_t,PyObject *);
58
+	extern void sipVH_py_sems_lib_3(sip_gilstate_t,PyObject *);
59 59
 
60 60
 	sip_gilstate_t sipGILState;
61 61
 	PyObject *meth;
... ...
@@ -68,12 +68,12 @@ void sipPySemsDialog::onCancel()
68 68
 		return;
69 69
 	}
70 70
 
71
-	sipVH_py_sems_lib_2(sipGILState,meth);
71
+	sipVH_py_sems_lib_3(sipGILState,meth);
72 72
 }
73 73
 
74 74
 void sipPySemsDialog::onBye(const AmSipRequest& a0)
75 75
 {
76
-	extern void sipVH_py_sems_lib_1(sip_gilstate_t,PyObject *,const AmSipRequest&);
76
+	extern void sipVH_py_sems_lib_2(sip_gilstate_t,PyObject *,const AmSipRequest&);
77 77
 
78 78
 	sip_gilstate_t sipGILState;
79 79
 	PyObject *meth;
... ...
@@ -86,12 +86,12 @@ void sipPySemsDialog::onBye(const AmSipRequest& a0)
86 86
 		return;
87 87
 	}
88 88
 
89
-	sipVH_py_sems_lib_1(sipGILState,meth,a0);
89
+	sipVH_py_sems_lib_2(sipGILState,meth,a0);
90 90
 }
91 91
 
92 92
 void sipPySemsDialog::onDtmf(int a0,int a1)
93 93
 {
94
-	extern void sipVH_py_sems_lib_0(sip_gilstate_t,PyObject *,int,int);
94
+	extern void sipVH_py_sems_lib_1(sip_gilstate_t,PyObject *,int,int);
95 95
 
96 96
 	sip_gilstate_t sipGILState;
97 97
 	PyObject *meth;
... ...
@@ -104,7 +104,25 @@ void sipPySemsDialog::onDtmf(int a0,int a1)
104 104
 		return;
105 105
 	}
106 106
 
107
-	sipVH_py_sems_lib_0(sipGILState,meth,a0,a1);
107
+	sipVH_py_sems_lib_1(sipGILState,meth,a0,a1);
108
+}
109
+
110
+void sipPySemsDialog::process(AmEvent *a0)
111
+{
112
+	extern void sipVH_py_sems_lib_0(sip_gilstate_t,PyObject *,AmEvent *);
113
+
114
+	sip_gilstate_t sipGILState;
115
+	PyObject *meth;
116
+
117
+	meth = sipIsPyMethod(&sipGILState,&sipPyMethods[5],sipPySelf,NULL,sipNm_py_sems_lib_process);
118
+
119
+	if (!meth)
120
+	{
121
+		PySemsDialog::process(a0);
122
+		return;
123
+	}
124
+
125
+	sipVH_py_sems_lib_0(sipGILState,meth,a0);
108 126
 }
109 127
 
110 128
 
... ...
@@ -287,6 +305,103 @@ static PyObject *meth_PySemsDialog_onDtmf(PyObject *sipSelf,PyObject *sipArgs)
287 305
 }
288 306
 
289 307
 
308
+static PyObject *meth_PySemsDialog_setInput(PyObject *sipSelf,PyObject *sipArgs)
309
+{
310
+	int sipArgsParsed = 0;
311
+
312
+	{
313
+		AmAudioFile * a0;
314
+		PySemsDialog *sipCpp;
315
+
316
+		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ0",sipSelf,sipClass_PySemsDialog,&sipCpp,sipClass_AmAudioFile,&a0))
317
+		{
318
+			sipCpp -> PySemsDialog::setInput(a0);
319
+
320
+			Py_INCREF(Py_None);
321
+			return Py_None;
322
+		}
323
+	}
324
+
325
+	/* Raise an exception if the arguments couldn't be parsed. */
326
+	sipNoMethod(sipArgsParsed,sipNm_py_sems_lib_PySemsDialog,sipNm_py_sems_lib_setInput);
327
+
328
+	return NULL;
329
+}
330
+
331
+
332
+static PyObject *meth_PySemsDialog_setOutput(PyObject *sipSelf,PyObject *sipArgs)
333
+{
334
+	int sipArgsParsed = 0;
335
+
336
+	{
337
+		AmAudioFile * a0;
338
+		PySemsDialog *sipCpp;
339
+
340
+		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ0",sipSelf,sipClass_PySemsDialog,&sipCpp,sipClass_AmAudioFile,&a0))
341
+		{
342
+			sipCpp -> PySemsDialog::setOutput(a0);
343
+
344
+			Py_INCREF(Py_None);
345
+			return Py_None;
346
+		}
347
+	}
348
+
349
+	/* Raise an exception if the arguments couldn't be parsed. */
350
+	sipNoMethod(sipArgsParsed,sipNm_py_sems_lib_PySemsDialog,sipNm_py_sems_lib_setOutput);
351
+
352
+	return NULL;
353
+}
354
+
355
+
356
+static PyObject *meth_PySemsDialog_setInOut(PyObject *sipSelf,PyObject *sipArgs)
357
+{
358
+	int sipArgsParsed = 0;
359
+
360
+	{
361
+		AmAudioFile * a0;
362
+		AmAudioFile * a1;
363
+		PySemsDialog *sipCpp;
364
+
365
+		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ0J0",sipSelf,sipClass_PySemsDialog,&sipCpp,sipClass_AmAudioFile,&a0,sipClass_AmAudioFile,&a1))
366
+		{
367
+			sipCpp -> PySemsDialog::setInOut(a0,a1);
368
+
369
+			Py_INCREF(Py_None);
370
+			return Py_None;
371
+		}
372
+	}
373
+
374
+	/* Raise an exception if the arguments couldn't be parsed. */
375
+	sipNoMethod(sipArgsParsed,sipNm_py_sems_lib_PySemsDialog,sipNm_py_sems_lib_setInOut);
376
+
377
+	return NULL;
378
+}
379
+
380
+
381
+static PyObject *meth_PySemsDialog_process(PyObject *sipSelf,PyObject *sipArgs)
382
+{
383
+	int sipArgsParsed = 0;
384
+
385
+	{
386
+		AmEvent * a0;
387
+		PySemsDialog *sipCpp;
388
+
389
+		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ0",sipSelf,sipClass_PySemsDialog,&sipCpp,sipClass_AmEvent,&a0))
390
+		{
391
+			sipCpp -> PySemsDialog::process(a0);
392
+
393
+			Py_INCREF(Py_None);
394
+			return Py_None;
395
+		}
396
+	}
397
+
398
+	/* Raise an exception if the arguments couldn't be parsed. */
399
+	sipNoMethod(sipArgsParsed,sipNm_py_sems_lib_PySemsDialog,sipNm_py_sems_lib_process);
400
+
401
+	return NULL;
402
+}
403
+
404
+
290 405
 /* Cast a pointer to a type somewhere in its superclass hierarchy. */
291 406
 static void *cast_PySemsDialog(void *ptr,sipWrapperType *targetClass)
292 407
 {
... ...
@@ -398,6 +513,10 @@ static PyMethodDef methods_PySemsDialog[] = {
398 513
 	{sipNm_py_sems_lib_onDtmf, meth_PySemsDialog_onDtmf, METH_VARARGS, NULL},
399 514
 	{sipNm_py_sems_lib_onInvite, meth_PySemsDialog_onInvite, METH_VARARGS, NULL},
400