telephonyserverplugins/ctsydispatchlayer/inc/requestqueueoneshot.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalAll 
       
    19 */
       
    20 
       
    21 #ifndef REQUESTQUEUEONESHOT_H
       
    22 #define REQUESTQUEUEONESHOT_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32std.h>
       
    26 #include <e32base.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CMmDataPackage;
       
    30 class MDispatcherCallback;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  * CRequestQueueOneShot holds a queue of requests which have been completed 
       
    36  * synchronously by the Licensee LTSY but  needs completion 
       
    37  * asynchronously back up to the Common TSY.
       
    38  */
       
    39 class CRequestQueueOneShot : public CAsyncOneShot 
       
    40 	{
       
    41 public:
       
    42 
       
    43 	virtual ~CRequestQueueOneShot();
       
    44 
       
    45 	static CRequestQueueOneShot* NewL();
       
    46 	static CRequestQueueOneShot* NewLC();
       
    47 
       
    48 	/**
       
    49 	 * Class which encapsulates data returned from the Licensee LTSY for 
       
    50 	 * requests which are dealt with synchronously.  The data held in this 
       
    51 	 * object is returned to the Common TSY.
       
    52 	 */
       
    53 	class TIpcDataPackage
       
    54 		{
       
    55 	public:
       
    56 		TIpcDataPackage();
       
    57 		~TIpcDataPackage();
       
    58 	public:
       
    59 		TInt iIpc;
       
    60 		CMmDataPackage* iDataPackage; 	// When this field is assigned to an object,
       
    61 										// this TIpcDataPackage object takes ownership
       
    62 										// of it.
       
    63 		TInt iResultCode;
       
    64 		TBool iCleanupOnly; // Indicates to the dispatcher that it should not 
       
    65 							// complete the request because the TSY is currently 
       
    66 							// closing down. 
       
    67 		MDispatcherCallback* iDispatcherCallback;
       
    68 		TSglQueLink iLink;
       
    69 		}; // class TIpcDataPackage 
       
    70 	
       
    71 	void QueueRequest(TIpcDataPackage& aIpcDataPackage);
       
    72 	
       
    73 protected:
       
    74 
       
    75 	virtual void DoCancel();
       
    76 	virtual void RunL();
       
    77 	
       
    78 private:
       
    79 
       
    80 	CRequestQueueOneShot();
       
    81 	void ConstructL();
       
    82 
       
    83 private:
       
    84 	
       
    85 	TSglQue<TIpcDataPackage> iIpcQueue;
       
    86 
       
    87 	}; // class CRequestQueueOneShot 
       
    88 
       
    89 #endif // REQUESTQUEUEONESHOT_H