?? echo_impl_cb.cpp
字號:
/*
Created by eSoap Code Generator for C++, >>> DEMO <<< Version - 1.08
**** DO NOT EDIT THIS FILE. *****
Time: Sun Sep 09 09:37:51 2001
**** CODE CREATED USING AN UNREGISTERED VERSION OF ESOAPCG.
Please, after the initial testing, you *MUST* buy a
copy of this application to continue using it.
* Limits of this version:
+ 5 functions per interface
+ 5 User defined types( Complex Types )
*/
#include <assert.h>
#include "soap_server.h"
#include "soap_envelope.h"
#include "Echo_impl.h"
/* must be the last include */
#ifdef MEMWATCH
#include <memwatch.h>
#endif
namespace echo {
const char *Echo_Impl::NS_URI = "http://tempuri.com/";
Echo_Impl::Echo_Impl()
: __currentBlock( 0 )
{
}
Echo_Impl::~Echo_Impl()
{
}
void Echo_Impl::activate()
{
typedef MemberCallback< esoap::MethodDataBlock, Echo_Impl > Echo_CB;
struct Echo_MethodPair
{
const char *name;
int (Echo_Impl::*member )(esoap::MethodDataBlock *);
};
static Echo_MethodPair listMethods[] =
{
{ "getGIF", &Echo_Impl::getGIF_impl },
};
for( int i = 0; i < sizeof( listMethods ) / sizeof( listMethods[ 0 ] ); i++ )
{
Echo_CB *mc = new Echo_CB( listMethods[i].member, this );
esoap::Server::instance()->getRegistry().addMethod( listMethods[i].name, mc );
}
}
void Echo_Impl::deactivate()
{
typedef MemberCallback< esoap::MethodDataBlock, Echo_Impl > Echo_CB;
struct Echo_MethodPair
{
const char *name;
int (Echo_Impl::*member )(esoap::MethodDataBlock *);
};
static Echo_MethodPair listMethods[] =
{
{ "getGIF", &Echo_Impl::getGIF_impl },
};
for( int i = 0; i < sizeof( listMethods ) / sizeof( listMethods[ 0 ] ); i++ )
{
esoap::Server::instance()->getRegistry().removeMethod(listMethods[i].name );
}
}
int Echo_Impl::getGIF_impl( esoap::MethodDataBlock *mdata )
{
__currentBlock = mdata;
esoap::Method *m = mdata->in()->getMethod();
if( !m )
{
mdata->out()->setFault( esoap::Fault::Server,
"Missing method element" );
return 0;
}
esoap::Packet o_return;
o_return = getGIF( );
esoap::Method *resp = mdata->out()->setMethod( "m:getGIFResponse", NS_URI );
resp->addBinary( "return", o_return );
return 0;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -