summaryrefslogtreecommitdiffstats
path: root/dcoppython/shell/pcop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dcoppython/shell/pcop.cpp')
-rw-r--r--dcoppython/shell/pcop.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/dcoppython/shell/pcop.cpp b/dcoppython/shell/pcop.cpp
index 42a75b4e..ea2d53ba 100644
--- a/dcoppython/shell/pcop.cpp
+++ b/dcoppython/shell/pcop.cpp
@@ -36,7 +36,7 @@ namespace PythonDCOP {
}
PCOPObject::PCOPObject(PyObject *py_obj, const char *objid) :
- DCOPObject(TTQCString(objid)), m_py_obj(py_obj)
+ DCOPObject(TQCString(objid)), m_py_obj(py_obj)
{
m_methods.setAutoDelete(true);
}
@@ -45,8 +45,8 @@ namespace PythonDCOP {
{
}
- bool PCOPObject::process(const TTQCString &fun, const TTQByteArray &data,
- TTQCString& replyType, TTQByteArray &replyData)
+ bool PCOPObject::process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData)
{
bool result = py_process(fun,data,replyType,replyData);
if (PyErr_Occurred()) {
@@ -59,8 +59,8 @@ namespace PythonDCOP {
return result;
}
- bool PCOPObject::py_process(const TTQCString &fun, const TTQByteArray &data,
- TTQCString& replyType, TTQByteArray &replyData)
+ bool PCOPObject::py_process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData)
{
kdDebug(70001) << "PCOPObject::process - fun=" << fun << " replyType=" << replyType << endl;
@@ -79,7 +79,7 @@ namespace PythonDCOP {
// return false;
// }
- TTQDataStream str_arg(data, IO_ReadOnly);
+ TQDataStream str_arg(data, IO_ReadOnly);
PyObject *args = PyTuple_New( meth->paramCount() );
for(int c=0;c<meth->paramCount();c++) {
kdDebug(70001) << "Demarshalling type: " << meth->param(c)->signature() << endl;
@@ -118,7 +118,7 @@ namespace PythonDCOP {
replyType = meth->type()->signature();
PCOPType repl(replyType);
if (repl.isMarshallable(result)) {
- TTQDataStream str_repl(replyData, IO_WriteOnly);
+ TQDataStream str_repl(replyData, IO_WriteOnly);
repl.marshal(result,str_repl);
Py_DECREF(result);
return true;
@@ -139,15 +139,15 @@ namespace PythonDCOP {
}
- bool PCOPObject::setMethodList(TTQAsciiDict<PyObject> meth_list) {
+ bool PCOPObject::setMethodList(TQAsciiDict<PyObject> meth_list) {
bool ok = true;
- for(TTQAsciiDictIterator<PyObject> it(meth_list);
+ for(TQAsciiDictIterator<PyObject> it(meth_list);
it.current(); ++it) {
PCOPMethod *meth = NULL;
if (ok) {
- meth = new PCOPMethod(TTQCString(it.currentKey()));
+ meth = new PCOPMethod(TQCString(it.currentKey()));
if (!meth || !meth->setPythonMethod(it.current())) {
if (meth) delete meth;
@@ -167,10 +167,10 @@ namespace PythonDCOP {
TQCStringList PCOPObject::functions() {
TQCStringList funcs = DCOPObject::functions();
- for(TTQAsciiDictIterator<PCOPMethod> it(m_methods);
+ for(TQAsciiDictIterator<PCOPMethod> it(m_methods);
it.current(); ++it) {
PCOPMethod *meth = it.current();
- TTQCString func = meth->type()->signature();
+ TQCString func = meth->type()->signature();
func += ' ';
func += meth->signature();
funcs << func;
@@ -184,7 +184,7 @@ namespace PythonDCOP {
PyObject *PCOPObject::methodList() {
PyObject *result = PyList_New(m_methods.count());
int c=0;
- for(TTQAsciiDictIterator<PCOPMethod> it(m_methods);
+ for(TQAsciiDictIterator<PCOPMethod> it(m_methods);
it.current(); ++it, ++c) {
PyObject *tuple = PyTuple_New(2);
PyList_SetItem(result, c, tuple);
@@ -194,12 +194,12 @@ namespace PythonDCOP {
return result;
}
- PCOPMethod *PCOPObject::matchMethod(const TTQCString &fun) {
+ PCOPMethod *PCOPObject::matchMethod(const TQCString &fun) {
return m_methods.find(fun);
}
- PCOPType::PCOPType( const TTQCString& type )
+ PCOPType::PCOPType( const TQCString& type )
{
m_leftType = NULL;
m_rightType = NULL;
@@ -236,9 +236,9 @@ namespace PythonDCOP {
if (m_rightType) delete m_rightType;
}
- TTQCString PCOPType::signature() const
+ TQCString PCOPType::signature() const
{
- TTQCString str = m_type;
+ TQCString str = m_type;
if ( m_leftType )
{
str += "<";
@@ -256,7 +256,7 @@ namespace PythonDCOP {
return str;
}
- bool PCOPType::marshal( PyObject* obj, TTQDataStream& str ) const
+ bool PCOPType::marshal( PyObject* obj, TQDataStream& str ) const
{
return Marshaller::instance()->marshal(*this, obj, str);
}
@@ -266,12 +266,12 @@ namespace PythonDCOP {
return Marshaller::instance()->canMarshal(*this, obj);
}
- PyObject* PCOPType::demarshal( TTQDataStream& str ) const
+ PyObject* PCOPType::demarshal( TQDataStream& str ) const
{
return Marshaller::instance()->demarshal(*this, str);
}
- PCOPMethod::PCOPMethod( const TTQCString& signature ) :
+ PCOPMethod::PCOPMethod( const TQCString& signature ) :
m_py_method(NULL)
{
@@ -298,7 +298,7 @@ namespace PythonDCOP {
m_name = signature.mid( k + 1, i - k - 1 );
// Strip the parameters
- TTQCString p = signature.mid( i + 1, j - i - 1 ).stripWhiteSpace();
+ TQCString p = signature.mid( i + 1, j - i - 1 ).stripWhiteSpace();
if ( !p.isEmpty() ) {
// Make the algorithm terminate
@@ -401,12 +401,12 @@ namespace PythonDCOP {
{
}
- const PCOPMethod* PCOPClass::method( const TTQCString &name, PyObject *argTuple )
+ const PCOPMethod* PCOPClass::method( const TQCString &name, PyObject *argTuple )
{
if ( !argTuple )
return m_methods[ name ];
- TTQAsciiDictIterator<PCOPMethod> it( m_methods );
+ TQAsciiDictIterator<PCOPMethod> it( m_methods );
for (; it.current(); ++it )
if ( it.currentKey() == name &&
it.current()->paramCount() == PyTuple_Size( argTuple ) )
@@ -440,7 +440,7 @@ namespace PythonDCOP {
ImportedModules::setInstance( new ImportedModules );
int argc = 0;
char **argv = NULL;
- m_qapp = new TTQApplication(argc,argv,false);
+ m_qapp = new TQApplication(argc,argv,false);
}
Client::~Client()
@@ -488,14 +488,14 @@ namespace PythonDCOP {
if ( !PyTuple_Check( tuple ) )
return NULL;
- TTQByteArray replyData;
- TTQCString replyType;
- TTQByteArray data;
- TTQDataStream params( data, IO_WriteOnly );
+ TQByteArray replyData;
+ TQCString replyType;
+ TQByteArray data;
+ TQDataStream params( data, IO_WriteOnly );
- TTQCString appname( arg1 );
- TTQCString objname( arg2 );
- TTQCString funcname( arg3 );
+ TQCString appname( arg1 );
+ TQCString objname( arg2 );
+ TQCString funcname( arg3 );
//
// Remove escape characters
@@ -538,7 +538,7 @@ namespace PythonDCOP {
return NULL;
}
- TTQCString signature = m->signature();
+ TQCString signature = m->signature();
kdDebug(70001) << "The signature is " << signature.data() << endl;
kdDebug(70001) << "The method takes " << m->paramCount() << " parameters" << endl;
@@ -578,7 +578,7 @@ namespace PythonDCOP {
//
// ### Check wether that was sane
PCOPType type( replyType );
- TTQDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
return type.demarshal( reply );
}
@@ -601,7 +601,7 @@ namespace PythonDCOP {
PyObject *object_list( PyObject */*self*/, PyObject *args) {
const char *app;
if (PyArg_ParseTuple(args, (char*)"s", &app)) {
- TQCStringList objects = Client::instance()->dcop()->remoteObjects(TTQCString(app));
+ TQCStringList objects = Client::instance()->dcop()->remoteObjects(TQCString(app));
return make_py_list(objects);
}
return NULL;
@@ -610,7 +610,7 @@ namespace PythonDCOP {
PyObject *method_list( PyObject */*self*/, PyObject *args) {
const char *app, *obj;
if (PyArg_ParseTuple(args, (char*)"ss", &app, &obj)) {
- TQCStringList methods = Client::instance()->dcop()->remoteFunctions(TTQCString(app), TTQCString(obj) );
+ TQCStringList methods = Client::instance()->dcop()->remoteFunctions(TQCString(app), TQCString(obj) );
return make_py_list(methods);
}
return NULL;
@@ -620,7 +620,7 @@ namespace PythonDCOP {
const char *appid;
int add_pid = 1;
if (PyArg_ParseTuple(args, (char*)"s|i", &appid, &add_pid)) {
- TTQCString actual_appid = Client::instance()->dcop()->registerAs(TTQCString(appid), add_pid!=0);
+ TQCString actual_appid = Client::instance()->dcop()->registerAs(TQCString(appid), add_pid!=0);
return PyString_FromString(actual_appid.data());
}
return NULL;
@@ -650,7 +650,7 @@ namespace PythonDCOP {
PyList_Check(method_list)) {
// extract each tuple from the list, aborting if any is invalid
- TTQAsciiDict<PyObject> meth_list;
+ TQAsciiDict<PyObject> meth_list;
int size = PyList_Size(method_list);
for(int c=0;c<size;c++) {
PyObject *tuple = PyList_GetItem(method_list,c);
@@ -692,7 +692,7 @@ namespace PythonDCOP {
int volint = 0;
if (PyArg_ParseTuple(args, (char*)"sssss|i", &sender, &senderObj, &signal, &receiverObj, &slot, &volint)) {
- bool success = Client::instance()->dcop()->connectDCOPSignal(TTQCString(sender), TTQCString(senderObj), TTQCString(signal), TTQCString(receiverObj), TTQCString(slot), (volint == 1)?true:false);
+ bool success = Client::instance()->dcop()->connectDCOPSignal(TQCString(sender), TQCString(senderObj), TQCString(signal), TQCString(receiverObj), TQCString(slot), (volint == 1)?true:false);
return Py_BuildValue("i", success?1:0);
}
return NULL;
@@ -706,7 +706,7 @@ namespace PythonDCOP {
const char *slot;
if (PyArg_ParseTuple(args, (char*)"sssss", &sender, &senderObj, &signal, &receiverObj, &slot)) {
- bool success = Client::instance()->dcop()->disconnectDCOPSignal(TTQCString(sender), TTQCString(senderObj), TTQCString(signal), TTQCString(receiverObj), TTQCString(slot));
+ bool success = Client::instance()->dcop()->disconnectDCOPSignal(TQCString(sender), TQCString(senderObj), TQCString(signal), TQCString(receiverObj), TQCString(slot));
return Py_BuildValue("i", success?1:0);
}
return NULL;