|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 |
|
20 #include "menusrvobject.h" |
|
21 #include "menusrvdef.h" |
|
22 |
|
23 // ================= MEMBER FUNCTIONS ======================= |
|
24 |
|
25 // --------------------------------------------------------- |
|
26 // CMenuSrvObject::SetPending |
|
27 // --------------------------------------------------------- |
|
28 // |
|
29 void CMenuSrvObject::SetPending( const RMessage2 &aMessage ) |
|
30 { |
|
31 __ASSERT_DEBUG( !iPending, User::Invariant() ); |
|
32 iMessage = aMessage; |
|
33 iPending = ETrue; |
|
34 } |
|
35 |
|
36 // --------------------------------------------------------- |
|
37 // CMenuSrvObject::PanicIfPendingL |
|
38 // --------------------------------------------------------- |
|
39 // |
|
40 void CMenuSrvObject::PanicIfPendingL( const RMessage2& aMessage ) |
|
41 { |
|
42 if ( iPending ) |
|
43 { |
|
44 // Another message is already being served. |
|
45 aMessage.Panic( KMenuSrvName, KErrInUse ); |
|
46 User::Leave( KErrInUse ); |
|
47 } |
|
48 } |
|
49 |
|
50 // --------------------------------------------------------- |
|
51 // CMenuSrvObject::Complete() |
|
52 // --------------------------------------------------------- |
|
53 // |
|
54 void CMenuSrvObject::Complete( TInt aReason ) |
|
55 { |
|
56 if ( iPending ) |
|
57 { |
|
58 iMessage.Complete( aReason ); |
|
59 iPending = EFalse; |
|
60 } |
|
61 } |
|
62 |
|
63 // End of File |