imstutils/imconversationview/tsrc/imcvuiengine_test/dummytestadaptation/src/cossprotocolloginrequest.cpp
branchRCL_3
changeset 28 3104fc151679
parent 27 2b7283837edb
child 29 9a48e301e94b
equal deleted inserted replaced
27:2b7283837edb 28:3104fc151679
     1 /*
       
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Login Request to the Network Server.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "COSSProtocolLoginRequest.h"
       
    20 #include <ximpprotocolconnectionhost.h>
       
    21 #include "mossprotocolconnectionmanager.h"
       
    22 #include "COSSProtocolConnection.h"
       
    23 #include "cossprotocolconnectionmanager.h"
       
    24 #include <string.h>
       
    25 
       
    26 #include <e32math.h>
       
    27 
       
    28 #include <ximperrors.hrh>
       
    29 
       
    30 /**
       
    31 * operations state enums variables 
       
    32 */
       
    33 
       
    34 enum LoginStates
       
    35 	{
       
    36 	EAuthFailed = 3,
       
    37 	ETpConnError = -6997,
       
    38 	// add if  required
       
    39 	};
       
    40 // ======== MEMBER FUNCTIONS ========
       
    41 
       
    42 // ---------------------------------------------------------------------------
       
    43 // COSSProtocolLoginRequest::COSSProtocolLoginRequest()
       
    44 // ---------------------------------------------------------------------------
       
    45 //
       
    46 COSSProtocolLoginRequest::COSSProtocolLoginRequest (
       
    47     MOSSProtocolConnectionManager& aConnMan,
       
    48     TXIMPRequestId aRequestId ) :
       
    49 		CActive ( CActive::EPriorityStandard  ),
       
    50 		iRequestId ( aRequestId ),
       
    51 		iConnMan ( aConnMan )
       
    52 	{
       
    53 	//LOGGER ( TXT ( "COSSProtocolLoginRequest::COSSProtocolLoginRequest Start" ) );
       
    54 	CActiveScheduler::Add ( this );
       
    55 	//LOGGER ( TXT ( "COSSProtocolLoginRequest::COSSProtocolLoginRequest End" ) );
       
    56 	}
       
    57 
       
    58 // COSSProtocolLoginRequest::ConstructL()
       
    59 // ---------------------------------------------------------------------------
       
    60 //
       
    61 void COSSProtocolLoginRequest::ConstructL()
       
    62 	{
       
    63 	//LOGGER ( TXT ( "COSSProtocolLoginRequest::COSSProtocolLoginRequest Start-End" ) );
       
    64 	//LOGGER ( TXT ( "COSSProtocolLoginRequest::COSSProtocolLoginRequest End" ) );
       
    65 	}
       
    66 
       
    67 
       
    68 // ---------------------------------------------------------------------------
       
    69 // COSSProtocolLoginRequest::NewL()
       
    70 // ---------------------------------------------------------------------------
       
    71 //
       
    72 COSSProtocolLoginRequest* COSSProtocolLoginRequest::NewL (
       
    73     MOSSProtocolConnectionManager& aConnMan,
       
    74     TXIMPRequestId aRequestId )
       
    75 	{
       
    76 	//LOGGER ( TXT ( "COSSProtocolLoginRequest::NewL Start" ) );
       
    77 
       
    78 	COSSProtocolLoginRequest* self =
       
    79 	    new ( ELeave ) COSSProtocolLoginRequest ( aConnMan, aRequestId );
       
    80 	CleanupStack::PushL ( self );
       
    81 	self->ConstructL();
       
    82 	CleanupStack::Pop ( self );
       
    83 
       
    84 	//LOGGER ( TXT ( "COSSProtocolLoginRequest::NewL End" ) );
       
    85 	return self;
       
    86 	}
       
    87 
       
    88 
       
    89 // ---------------------------------------------------------------------------
       
    90 // COSSProtocolLoginRequest::NewLC()
       
    91 // ---------------------------------------------------------------------------
       
    92 //
       
    93 COSSProtocolLoginRequest* COSSProtocolLoginRequest::NewLC (
       
    94     MOSSProtocolConnectionManager& aConnMan,
       
    95     TXIMPRequestId aRequestId )
       
    96 	{
       
    97 	//LOGGER ( TXT ( "COSSProtocolLoginRequest::NewLC Start" ) );
       
    98 
       
    99 	COSSProtocolLoginRequest* self =
       
   100 	    COSSProtocolLoginRequest::NewL ( aConnMan, aRequestId );
       
   101 	CleanupStack::PushL ( self );
       
   102 
       
   103 	//LOGGER ( TXT ( "COSSProtocolLoginRequest::NewLC End" ) );
       
   104 	return self;
       
   105 	}
       
   106 
       
   107 // ---------------------------------------------------------------------------
       
   108 // COSSProtocolLoginRequest::~COSSProtocolLoginRequest()
       
   109 // ---------------------------------------------------------------------------
       
   110 //
       
   111 COSSProtocolLoginRequest::~COSSProtocolLoginRequest()
       
   112 	{
       
   113 	//LOGGER ( TXT ( "::~COSSProtocolLoginRequest Start-End" ) );
       
   114 	Cancel();
       
   115 	//LOGGER ( TXT ( "::~COSSProtocolLoginRequest End\n" ) );
       
   116 	}
       
   117 
       
   118 
       
   119 // ---------------------------------------------------------------------------
       
   120 // COSSProtocolLoginRequest::DoCancel()
       
   121 // ---------------------------------------------------------------------------
       
   122 //
       
   123 void COSSProtocolLoginRequest::DoCancel()
       
   124 	{
       
   125 	}
       
   126 
       
   127 
       
   128 // ---------------------------------------------------------------------------
       
   129 // COSSProtocolLoginRequest::RunL()
       
   130 // ---------------------------------------------------------------------------
       
   131 //
       
   132 void COSSProtocolLoginRequest::RunL()
       
   133 	{
       
   134 	//LOGGER ( TXT ( "COSSProtocolLoginRequest::RunL Start" ) );
       
   135 
       
   136 	  iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KErrNone );
       
   137 
       
   138 	}
       
   139 
       
   140 
       
   141 // ---------------------------------------------------------------------------
       
   142 // COSSProtocolLoginRequest::RunError()
       
   143 // ---------------------------------------------------------------------------
       
   144 //
       
   145 TInt COSSProtocolLoginRequest::RunError ( TInt  aError )
       
   146 	{
       
   147 	//LOGGER ( TXT ( "COSSProtocolLoginRequest::RunError Start" ) );
       
   148 
       
   149 	iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, aError );
       
   150 
       
   151 	delete this;
       
   152 	//LOGGER ( TXT ( "COSSProtocolLoginRequest::RunError End" ) );
       
   153 	return KErrNone;
       
   154 	}
       
   155 
       
   156 
       
   157 // ---------------------------------------------------------------------------
       
   158 // COSSProtocolLoginRequest::IssueLoginRequestL()
       
   159 // ---------------------------------------------------------------------------
       
   160 //
       
   161 void COSSProtocolLoginRequest::IssueLoginRequestL()
       
   162 	{
       
   163 	//LOGGER ( TXT ( "COSSProtocolLoginRequest::IssueLoginRequestL Start" ) );
       
   164 
       
   165 	//LOGGER ( TXT ( "COSSProtocolConnection::OpenSessionL() End" ) );
       
   166 	}
       
   167 // ---------------------------------------------------------------------------
       
   168 // COSSProtocolLoginRequest::GenResourceId()
       
   169 // ---------------------------------------------------------------------------
       
   170 //
       
   171 TPtrC COSSProtocolLoginRequest::GenResourceId( const TDesC& aResourceId )
       
   172     {
       
   173     
       
   174      }  
       
   175 
       
   176 // End of file