os/graphics/windowing/windowserverplugins/openwfc/inc/openwfcjob.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 1995-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 #ifndef OPENWFCJOB_H_
    17 #define OPENWFCJOB_H_
    18 
    19 #include <e32std.h>
    20 #include <WF/wfc.h>
    21 
    22 #define KNullThreadId 0
    23 
    24 class COpenWfcJobManger;
    25 
    26 struct TOpenWfcJob
    27 	{
    28 	enum EOpenWfcJobId
    29 		{
    30 			EInvalidJobId = 0,
    31 			EComposeJobId,
    32 			EPauseCompositionJobId,
    33 			EResumeCompositionJobId,
    34 		};
    35 	
    36 	TOpenWfcJob(COpenWfcJobManger& aJobManager);
    37 	
    38 
    39 	~TOpenWfcJob();
    40 	
    41 	void Set(EOpenWfcJobId aJob, 
    42 			 TThreadId aThreadId = KNullThreadId, 
    43 			 TRequestStatus* aRequest = NULL);
    44 	
    45 	void Reset();
    46 	
    47 	EOpenWfcJobId JobId();
    48 	
    49 	void CompleteRequest(TInt aResult);
    50 	
    51 	void Run();
    52 	
    53 	TDblQueLink iDlink;
    54 	COpenWfcJobManger& iJobManager;
    55 	EOpenWfcJobId iJobId;
    56 	TThreadId iCallingThread;
    57 	TRequestStatus* iCompleteRequest;
    58 	};
    59 
    60 inline TOpenWfcJob::EOpenWfcJobId TOpenWfcJob::JobId()
    61 	{
    62 	return iJobId;
    63 	}
    64 
    65 #endif /* OPENWFCJOB_H_ */