equal
deleted
inserted
replaced
|
1 // Copyright (c) 2003-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 __AGSSIGNAL_H__ |
|
17 #define __AGSSIGNAL_H__ |
|
18 |
|
19 |
|
20 // class TAgnSignal |
|
21 |
|
22 class TAgnSignal |
|
23 { |
|
24 public: |
|
25 inline TAgnSignal() {} |
|
26 inline TInt Set(const TDesC& aCommand); |
|
27 // |
|
28 inline TAgnSignal(TRequestStatus& aStatus); |
|
29 inline TPtrC Command() const; |
|
30 public: |
|
31 TRequestStatus* iStatus; |
|
32 TThreadId iId; |
|
33 }; |
|
34 |
|
35 inline TAgnSignal::TAgnSignal(TRequestStatus& aStatus) |
|
36 :iStatus(&aStatus),iId(RThread().Id()) |
|
37 {aStatus=KRequestPending;} |
|
38 inline TPtrC TAgnSignal::Command() const |
|
39 {return TPtrC((const TText*)this,sizeof(*this)/sizeof(TText));} |
|
40 inline TInt TAgnSignal::Set(const TDesC& aCommand) |
|
41 {return aCommand.Size()!=sizeof(*this) ? KErrGeneral : (Mem::Copy(this,aCommand.Ptr(),sizeof(*this)),KErrNone);} |
|
42 |
|
43 |
|
44 TInt ThreadFunction(TAgnSignal& aPtr); |
|
45 |
|
46 #endif |