supl/locationomasuplprotocolhandler/protocolhandlerver1/inc/epos_comasuplcompleteselfrequestor.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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:   Class for doing self complete operation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_COMASUPLSELFCOMPLETEREQUESTOR_H
       
    21 #define C_COMASUPLSELFCOMPLETEREQUESTOR_H
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 /**
       
    26  *  MCompleteSelfRequest ... observer for self completion.
       
    27  *  
       
    28  *  @lib eposomasuplprotocolhandler.lib
       
    29  *  @since S60 v3.1u
       
    30  */
       
    31 class MCompleteSelfRequest
       
    32 {
       
    33 	public:
       
    34 		/**
       
    35 		* RequestCompleted Method,called after request has been completed by Active Scheduler
       
    36 		* @since Series 60 3.1M
       
    37 		* @param None
       
    38 		* @return None
       
    39 		*/ 
       
    40 		virtual void RequestCompletedL() = 0;
       
    41 		
       
    42 		/**
       
    43 		* StartInvalidSessionL Method is invoked by the active object
       
    44 		* when there is a session request with invalid session ID
       
    45 		* @since Series 60 3.1M
       
    46 		* @param None
       
    47 		* @return None
       
    48 		*/ 
       
    49 		virtual void StartInvalidSessionL() = 0;
       
    50 		/**
       
    51 		* StartInvalidSessionL Method is invoked by the active object
       
    52 		* when there is a session request with invalid session ID
       
    53 		* @since Series 60 3.1M
       
    54 		* @param None
       
    55 		* @return None
       
    56 		*/ 
       
    57 		virtual void HandleInvalidSLPSession() = 0;
       
    58 		
       
    59 };
       
    60 
       
    61 /**
       
    62  *  Class for doing self complete operation.
       
    63  *  
       
    64  *  @lib eposomasuplprotocolhandler.lib
       
    65  *  @since S60 v3.1u
       
    66  */
       
    67 
       
    68 class COMASuplCompleteSelfRequestor : public CActive
       
    69 {
       
    70 	// Enum definition
       
    71 	enum TOMASuplCompleteStatus
       
    72 	{
       
    73 		ESUPL_PACKET_RECEIVE,
       
    74 		ESUPL_INVALID_SESSIONID,
       
    75 		ESUPL_INVALID_SLP_SESSIONID
       
    76 	};
       
    77 	
       
    78 	public :  // Constructor 
       
    79 		/**
       
    80 		* NewL Method.
       
    81 		* @since Series 60 3.1u
       
    82 		* @param MEventCompletionObserver
       
    83 		* @return Instance of COMASuplCompleteSelfRequestor
       
    84 		*/ 
       
    85 		static COMASuplCompleteSelfRequestor* NewL(MCompleteSelfRequest& aObserver);
       
    86 		
       
    87 		/**
       
    88 		* Destructor.
       
    89 		*/
       
    90 		~COMASuplCompleteSelfRequestor();
       
    91 		
       
    92 	public :		
       
    93 		/**
       
    94 		* CompleteSelf Method, request for self completion
       
    95 		* @since Series 60 3.1u
       
    96 		* @param None
       
    97 		* @return None
       
    98 		*/ 
       
    99 		void CompleteSelf();
       
   100 		
       
   101 		/**
       
   102 		* CompleteInvalidSession for completing the request in case of invalid session ID
       
   103 		* @since Series 60 3.1u
       
   104 		* @param None
       
   105 		* @return None
       
   106 		*/
       
   107 		void CompleteInvalidSession();
       
   108 		
       
   109 		/**
       
   110 		* CompleteInvalidSLPSession for completing the request in case of invalid session ID
       
   111 		* @since Series 60 3.1u
       
   112 		* @param None
       
   113 		* @return None
       
   114 		*/
       
   115 		void CompleteInvalidSLPSession();
       
   116 		
       
   117 	private : 
       
   118 		/**
       
   119 		* Constuctor 
       
   120 		* @since Series 60 3.1u
       
   121 		* @param aObserver, MCompleteSelfRequest
       
   122 		* @return None
       
   123 		*/
       
   124 
       
   125 		COMASuplCompleteSelfRequestor(MCompleteSelfRequest& aObserver);
       
   126 		
       
   127 		/**
       
   128 		* By default Symbian 2nd phase constructor is private.
       
   129 		*/
       
   130 		void ConstructL();
       
   131 
       
   132   protected :  // Functions from CActive
       
   133       /**
       
   134       * From CActive 
       
   135       * To handle request completion
       
   136       */
       
   137       void RunL();
       
   138       
       
   139 	  /**
       
   140 	  * From CActive 
       
   141 	  * To cancel the asynchronous requests
       
   142 	  */
       
   143    	  void DoCancel();  
       
   144 
       
   145      
       
   146 	private : //Data
       
   147 			MCompleteSelfRequest& iObserver;    
       
   148 			TOMASuplCompleteStatus iCompStatus;
       
   149 };
       
   150 
       
   151 #endif //C_COMASUPLSELFCOMPLETEREQUESTOR_H