//
// CCgeepApiXmlRpc.cpp class
// Copyright (c) SafeLogic, 2000 - 2009
//
// XML-RPC wrapper class for cGeep API calls
//
// Last Updates: 
// 25 nov. 2009 18:05 Nicolas de Pomereu
//

#include "CgeepApiXmlRpc.h"
 
#define XML_RPC_LAST_CALL_NOT_EXECUTED "XML_RPC_LAST_CALL_NOT_EXECUTED"
#define XML_RPC_LAST_CALL_IS_FAULT	   "XML_RPC_LAST_CALL_IS_FAULT"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CCgeepApiXmlRpc::CCgeepApiXmlRpc()
{
    m_returnArray = new char[1];
    m_serverStarted = false;
}
 
CCgeepApiXmlRpc::~CCgeepApiXmlRpc()
{
    delete m_returnArray;
    c->close();
}
 
//
// Connect to the remote Xml Rpc Server
//
void CCgeepApiXmlRpc::connectToServer(char * host, int port)
{
    if (! m_serverStarted)
    {
        c = new XmlRpcClient (host, port);
    }
 
    m_serverStarted = true;;
}
 
char * CCgeepApiXmlRpc::getCharParm(char * parm)
{
    if (parm == NULL)
    {
        return "null";
    }
    else
    {
        return parm;
    }
}
 
//
// Return an allocated char array from an ANSI C++ string content
//
char * CCgeepApiXmlRpc::stringToCharArray(std::string s)
{
    try
    {
        if (s.c_str() == NULL)
        {
            m_returnArray = new char [1];
            return NULL;
        }
 
        // Convert the ANSI string to a C *str
        int return_size = s.length();
        
        m_returnArray = new char[return_size +1];
        strcpy(m_returnArray, s.c_str());
 
        m_returnArray[return_size] = '\0'; // NULL TERMINATE !
        return m_returnArray;
    }
    catch (...)
    {
        return NULL;
    }   
}
 
 
 
 
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
bool CCgeepApiXmlRpc::isOperationOk(void)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    
          
 
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.isOperationOk", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	bool b = (int(result) != 0);
	return b;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::getErrorCode(void)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    
	if (! m_isExecuted)
	{
		return XML_RPC_LAST_CALL_NOT_EXECUTED;
	}
 
	if (c->isFault())
	{
		return XML_RPC_LAST_CALL_IS_FAULT; 
	}
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.getErrorCode", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
bool CCgeepApiXmlRpc::isOperationOkForTask(int parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = parm_1;
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.isOperationOkForTask", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	bool b = (int(result) != 0);
	return b;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::getErrorCodeForTask(int parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = parm_1;
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.getErrorCodeForTask", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::getExceptionForTask(int parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = parm_1;
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.getExceptionForTask", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::getStackTraceForTask(int parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = parm_1;
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.getStackTraceForTask", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::addCommandLineParameter(char * parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.addCommandLineParameter", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::executeCommandLine(void)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.executeCommandLine", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::getKeyRingDirectory(void)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.getKeyRingDirectory", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::setKeyRingDirectory(char * parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.setKeyRingDirectory", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::generateKeyPair(char * parm_1, char * parm_2, char * parm_3, int parm_4, char * parm_5, char * parm_6)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    valuesToPass[2] = getCharParm(parm_3);
    valuesToPass[3] = parm_4;
    valuesToPass[4] = getCharParm(parm_5);
    valuesToPass[5] = getCharParm(parm_6);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.generateKeyPair", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::changePassphrase(char * parm_1, char * parm_2, char * parm_3)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    valuesToPass[2] = getCharParm(parm_3);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.changePassphrase", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::listKeys(char * parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.listKeys", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::exportPublicKey(char * parm_1, char * parm_2)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.exportPublicKey", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::exportPublicAndPrivateKey(char * parm_1, char * parm_2)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.exportPublicAndPrivateKey", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::importKey(char * parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.importKey", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::signKey(char * parm_1, char * parm_2, char * parm_3)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    valuesToPass[2] = getCharParm(parm_3);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.signKey", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::removeKeySignature(char * parm_1, char * parm_2, char * parm_3)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    valuesToPass[2] = getCharParm(parm_3);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.removeKeySignature", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::addPhoto(char * parm_1, char * parm_2, char * parm_3)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    valuesToPass[2] = getCharParm(parm_3);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.addPhoto", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::deletePhoto(char * parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.deletePhoto", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::deleteKey(char * parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.deleteKey", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::revokeKey(char * parm_1, char * parm_2)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.revokeKey", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::searchKeysOnHkpServer(char * parm_1, char * parm_2)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.searchKeysOnHkpServer", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::receiveKey(char * parm_1, char * parm_2)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.receiveKey", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::sendKey(char * parm_1, char * parm_2)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.sendKey", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::wipe(char * parm_1, int parm_2, int parm_3)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = parm_2;
    valuesToPass[2] = parm_3;
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.wipe", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::setCharset(char * parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.setCharset", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::getCharset(void)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.getCharset", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::getSymmetricAlgorithm(void)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.getSymmetricAlgorithm", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::setSymmetricAlgorithm(char * parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.setSymmetricAlgorithm", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::encryptSymmetricString(char * parm_1, char * parm_2)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.encryptSymmetricString", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::decryptSymmetricString(char * parm_1, char * parm_2)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.decryptSymmetricString", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::setArmorModeForFiles(bool parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = (parm_1)?1:0;
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.setArmorModeForFiles", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::encryptSymmetric(char * parm_1, char * parm_2, char * parm_3, int parm_4)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    valuesToPass[2] = getCharParm(parm_3);
    valuesToPass[3] = parm_4;
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.encryptSymmetric", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::decryptSymmetric(char * parm_1, char * parm_2, char * parm_3, int parm_4)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    valuesToPass[2] = getCharParm(parm_3);
    valuesToPass[3] = parm_4;
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.decryptSymmetric", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
int CCgeepApiXmlRpc::getPercentProcessedForTask(int parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = parm_1;
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.getPercentProcessedForTask", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return int(result);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
bool CCgeepApiXmlRpc::cancelTask(int parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = parm_1;
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.cancelTask", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	bool b = (int(result) != 0);
	return b;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::resetRecipientsKeys(void)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.resetRecipientsKeys", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::addRecipientKey(char * parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.addRecipientKey", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::encryptString(char * parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.encryptString", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::getUserIdForStringDecryption(char * parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.getUserIdForStringDecryption", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::decryptString(char * parm_1, char * parm_2, char * parm_3)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    valuesToPass[2] = getCharParm(parm_3);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.decryptString", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::encrypt(char * parm_1, char * parm_2, int parm_3)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    valuesToPass[2] = parm_3;    
 
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.encrypt", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::getUserIdForDecryption(char * parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.getUserIdForDecryption", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::decrypt(char * parm_1, char * parm_2, char * parm_3, char * parm_4, int parm_5)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    valuesToPass[2] = getCharParm(parm_3);
    valuesToPass[3] = getCharParm(parm_4);
    valuesToPass[4] = parm_5;
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.decrypt", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::getSignatureStatus(void)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.getSignatureStatus", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::getSignatureStatusForTask(int parm_1)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = parm_1;
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.getSignatureStatusForTask", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::signDetached(char * parm_1, char * parm_2, char * parm_3, char * parm_4, int parm_5)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    valuesToPass[2] = getCharParm(parm_3);
    valuesToPass[3] = getCharParm(parm_4);
    valuesToPass[4] = parm_5;
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.signDetached", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::verifyDetached(char * parm_1, char * parm_2, int parm_3)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    valuesToPass[2] = parm_3;
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.verifyDetached", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
void  CCgeepApiXmlRpc::signAndEncrypt(char * parm_1, char * parm_2, char * parm_3, char * parm_4, int parm_5)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    valuesToPass[0] = getCharParm(parm_1);
    valuesToPass[1] = getCharParm(parm_2);
    valuesToPass[2] = getCharParm(parm_3);
    valuesToPass[3] = getCharParm(parm_4);
    valuesToPass[4] = parm_5;
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.signAndEncrypt", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	return;
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::getStackTrace(void)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.getStackTrace", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::getException(void)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.getException", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}
 
// Standard C++ XmmRpc++ DLL  Interface - Code generated by SafeLogic.
char * CCgeepApiXmlRpc::getVersion(void)
{
    XmlRpcValue valuesToPass;
    XmlRpcValue result;    
    
    // Set the values to pass (if any)
    
          
    // Execute the remote Java method
    m_isExecuted = c->execute("CgeepApiXmlRpc.getVersion", valuesToPass, result);
   
    // Cast the values before return depending on the type and return      	
	std::string stringResult = result; 
	return stringToCharArray(stringResult);
}