1 /* |
|
2 * Copyright (c) 2009 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: Telephony Multimedia Service |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "tmsasyncreqao.h" |
|
20 |
|
21 using namespace TMS; |
|
22 |
|
23 // ----------------------------------------------------------------------------- |
|
24 // TMSAsyncReqAO::TMSAsyncReqAO |
|
25 // ----------------------------------------------------------------------------- |
|
26 // |
|
27 TMSAsyncReqAO::TMSAsyncReqAO(TMSAsyncReqObsrv* aObserver) : |
|
28 CActive(CActive::EPriorityStandard), |
|
29 iObserver(aObserver) |
|
30 { |
|
31 CActiveScheduler::Add(this); |
|
32 } |
|
33 |
|
34 // ----------------------------------------------------------------------------- |
|
35 // TMSAsyncReqAO::NewL |
|
36 // ----------------------------------------------------------------------------- |
|
37 // |
|
38 TMSAsyncReqAO* TMSAsyncReqAO::NewL(TMSAsyncReqObsrv* aObserver) |
|
39 { |
|
40 return new (ELeave) TMSAsyncReqAO(aObserver); |
|
41 } |
|
42 |
|
43 // ----------------------------------------------------------------------------- |
|
44 // Destructor |
|
45 // ----------------------------------------------------------------------------- |
|
46 // |
|
47 TMSAsyncReqAO::~TMSAsyncReqAO() |
|
48 { |
|
49 Cancel(); |
|
50 } |
|
51 |
|
52 // ----------------------------------------------------------------------------- |
|
53 // TMSAsyncReqAO::Start |
|
54 // ----------------------------------------------------------------------------- |
|
55 // |
|
56 void TMSAsyncReqAO::Start() |
|
57 { |
|
58 SetActive(); |
|
59 TRequestStatus* status = &iStatus; |
|
60 User::RequestComplete(status, KErrNone); |
|
61 } |
|
62 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // TMSAsyncReqAO::DoCancel |
|
65 // ----------------------------------------------------------------------------- |
|
66 // |
|
67 void TMSAsyncReqAO::DoCancel() |
|
68 { |
|
69 } |
|
70 |
|
71 // ----------------------------------------------------------------------------- |
|
72 // TMSAsyncReqAO::RunError |
|
73 // ----------------------------------------------------------------------------- |
|
74 // |
|
75 TInt TMSAsyncReqAO::RunError(TInt aError) |
|
76 { |
|
77 iObserver->HandleError(aError); |
|
78 return KErrNone; |
|
79 } |
|
80 |
|
81 // ----------------------------------------------------------------------------- |
|
82 // TMSAsyncReqAO::RunL |
|
83 // ----------------------------------------------------------------------------- |
|
84 // |
|
85 void TMSAsyncReqAO::RunL() |
|
86 { |
|
87 iObserver->HandleAsyncReq(); |
|
88 } |
|
89 |
|
90 // End of File |
|