imservices/ossprotocoladaptation/inc/cossprotocolloginrequest.h
branchRCL_3
changeset 14 7797b2f86d2b
parent 13 b6f2a363adf7
child 16 cfe5eb8bb9ca
equal deleted inserted replaced
13:b6f2a363adf7 14:7797b2f86d2b
     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 
       
    20 #ifndef _COSSPROTOCOLLOGINREQUEST_H_
       
    21 #define _COSSPROTOCOLLOGINREQUEST_H_
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <e32std.h>
       
    26 #include <ximpbase.h>
       
    27 #include "ossprotocolpluginlogger.h"
       
    28 #include "ossprotocloliterals.h"
       
    29 // FORWARD DECLARATIONS
       
    30 
       
    31 class MOSSProtocolConnectionManager;
       
    32 
       
    33 class COSSProtocolConnectionManager;
       
    34 
       
    35 
       
    36 const TInt KImpsMaxResourceIdLen 	= 64;  // maximum Resource ID, this is not sure!
       
    37 
       
    38 /**
       
    39  * COSSProtocolLoginRequest
       
    40  *
       
    41  * Issue Login Request to the Network Server
       
    42  *
       
    43  */
       
    44 NONSHARABLE_CLASS (  COSSProtocolLoginRequest ) : public CActive
       
    45 
       
    46 
       
    47 	{
       
    48 
       
    49 public:
       
    50 
       
    51 	static COSSProtocolLoginRequest* NewLC ( MOSSProtocolConnectionManager& aConnMan,
       
    52 	TXIMPRequestId aRequestId );
       
    53 	static COSSProtocolLoginRequest* NewL ( MOSSProtocolConnectionManager& aConnMan,
       
    54 	                                        TXIMPRequestId aRequestId );
       
    55 	virtual ~COSSProtocolLoginRequest();
       
    56 
       
    57 
       
    58 private:
       
    59 
       
    60 	COSSProtocolLoginRequest ( MOSSProtocolConnectionManager& aConnMan,
       
    61 	                           TXIMPRequestId aRequestId  );
       
    62 	void ConstructL();
       
    63 
       
    64 
       
    65 private: // from CActive
       
    66 
       
    67 	void DoCancel();
       
    68 	/*
       
    69 	 * RunL() function also deletes the request object once the activity is done
       
    70 	 *
       
    71 	 */
       
    72 	void RunL();
       
    73 	TInt RunError ( TInt aError );
       
    74 
       
    75 private:  // new methods
       
    76 
       
    77    /**
       
    78 	* Resource Id  Generator
       
    79 	* Leaves with KErrNotFound if no value
       
    80 	* @return ResourceId 
       
    81 	*/
       
    82 	TPtrC GenResourceId( const TDesC& aResourceId );
       
    83 public:
       
    84 
       
    85    /**
       
    86 	* Issue login request to the isolation server
       
    87 	*/
       
    88 	void IssueLoginRequestL();
       
    89 
       
    90 
       
    91 private: // data
       
    92 
       
    93    /**
       
    94 	* OWN:Request Id from ximpfw
       
    95 	*/
       
    96 	TXIMPRequestId iRequestId;
       
    97    /**
       
    98 	* Send data request to pure data handler generates the id
       
    99 	*/
       
   100 	TInt iSendId;
       
   101    /**
       
   102     * OSS Protocol Plugin Connection Manager
       
   103    	* Not own.
       
   104 	*/
       
   105 	MOSSProtocolConnectionManager& iConnMan;
       
   106 
       
   107    /** 
       
   108     * Resource ID Implementation
       
   109    	* Not own.
       
   110 	*/
       
   111 	TBuf<KImpsMaxResourceIdLen>          iResourceId;  
       
   112 	
       
   113 	/**
       
   114 	 * Own user id
       
   115 	 */
       
   116 	HBufC* iUserName;
       
   117 	};
       
   118 
       
   119 
       
   120 #endif // _COSSPROTOCOLLOGINREQUEST_H_
       
   121