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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #include "openwfcjob.h"
17 #include "openwfcjobmanager.h"
19 TOpenWfcJob::TOpenWfcJob(COpenWfcJobManger& aJobManager):
20 iJobManager(aJobManager),
21 iJobId(EInvalidJobId),
22 iCallingThread(KNullThreadId),
23 iCompleteRequest(NULL)
28 void TOpenWfcJob::Set(EOpenWfcJobId aJob,
30 TRequestStatus* aRequest)
33 iCallingThread = aThreadId;
34 iCompleteRequest =aRequest;
35 JQLOG(("** TOpenWfcJob::Sett() : iCompleteRequest(0x%x) iJobId(%d)", aRequest, aJob));
39 void TOpenWfcJob::Reset()
41 iJobId = EInvalidJobId;
42 iCallingThread = KNullThreadId;
43 iCompleteRequest =NULL;
46 TOpenWfcJob::~TOpenWfcJob()
51 void TOpenWfcJob::Run()
56 JQLOG(("** LAUNCH * TOpenWfcJob::Run EComposeJobId"));
57 iJobManager.DoComposeJob(*this);
59 case EPauseCompositionJobId:
60 JQLOG(("** LAUNCH * TOpenWfcJob::Run EPauseCompositionJobId"));
61 iJobManager.DoPauseCompositionJob(*this);
63 case EResumeCompositionJobId:
64 JQLOG(("** LAUNCH * TOpenWfcJob::Run EResumeCompositionJobId"));
65 iJobManager.DoResumeCompositionJob(*this);
68 JQLOG(("** ERROR * TOpenWfcJob::Run jobId(%d)", iJobId));
73 void TOpenWfcJob::CompleteRequest(TInt aResult)
79 if (thread.Open(iCallingThread) == KErrNone)
81 JQLOG(("** TOpenWfcJob::CompleteRequest(): CompleteReq(0x%x))", iCompleteRequest));
82 thread.RequestComplete(iCompleteRequest, aResult);