--- a/emailservices/emailframework/src/CFSClientAPIRequestHandler.cpp Mon Mar 15 12:39:10 2010 +0200
+++ b/emailservices/emailframework/src/CFSClientAPIRequestHandler.cpp Wed Mar 31 21:08:33 2010 +0300
@@ -26,53 +26,24 @@
// CFSMailRequestHandler::CFSMailRequestHandler
// -----------------------------------------------------------------------------
CFSClientAPIRequestHandler::CFSClientAPIRequestHandler(
- MEmailClientPluginManager* aPluginManager ) : iPluginManager(aPluginManager), iInstanceCounter( 1 )
+ MEmailClientPluginManager* aPluginManager ) : iPluginManager(aPluginManager)
{
FUNC_LOG;
+
+ // store pointer to TLS
+ TInt err = Dll::SetTls(static_cast<TAny*>(this));
}
// -----------------------------------------------------------------------------
// CFSMailRequestHandler::~CFSMailRequestHandler
// -----------------------------------------------------------------------------
+
CFSClientAPIRequestHandler::~CFSClientAPIRequestHandler()
{
FUNC_LOG;
}
// -----------------------------------------------------------------------------
-// CFSMailRequestHandler::GetInstanceL
-// -----------------------------------------------------------------------------
-CFSClientAPIRequestHandler* CFSClientAPIRequestHandler::GetInstanceL( MEmailClientPluginManager* aPluginManager )
- {
- CFSClientAPIRequestHandler *requestHandler = static_cast<CFSClientAPIRequestHandler*>( Dll::Tls() );
- if ( requestHandler == NULL )
- {
- requestHandler = CFSClientAPIRequestHandler::NewL( aPluginManager );
- }
- else
- {
- requestHandler->iInstanceCounter++;
- }
-
- return requestHandler;
- }
-
-// -----------------------------------------------------------------------------
-// CFSMailRequestHandler::ReleaseInstance
-// -----------------------------------------------------------------------------
-void CFSClientAPIRequestHandler::ReleaseInstance()
- {
- if( iInstanceCounter > 1 )
- {
- iInstanceCounter--;
- }
- else
- {
- delete this;
- }
- }
-
-// -----------------------------------------------------------------------------
// CFSMailRequestHandler::NewL
// -----------------------------------------------------------------------------
CFSClientAPIRequestHandler* CFSClientAPIRequestHandler::NewL(