|
1 // Copyright (c) 2002-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 // $Workfile: SendMessageState.h $ |
|
15 // $Author: Simonk $ |
|
16 // $Revision: 1 $ |
|
17 // $Date: 23/01/02 14:53 $ |
|
18 // |
|
19 // |
|
20 |
|
21 #ifndef __SENDMESSAGESTATE_H__ |
|
22 #define __SENDMESSAGESTATE_H__ |
|
23 |
|
24 #include "harness.h" //CActiveTestState |
|
25 |
|
26 // Stub support. |
|
27 const TInt KMaxStubResultStrLength = 40; |
|
28 |
|
29 class CObexClientTest; |
|
30 |
|
31 |
|
32 class CSendMessageState : public CActiveTestState |
|
33 /** |
|
34 * Sends an outgoing message. This is a long-running, asynchronous |
|
35 * operation. The state is therefore implemented as an active object. |
|
36 * It is possible to check the progress of this operation and cancel |
|
37 * it before it completes. |
|
38 */ |
|
39 { |
|
40 public: |
|
41 CSendMessageState(const TDesC& aStubDesiredResult, CObexClientTest& aClientTest); |
|
42 void StartL(TRequestStatus& aStatus); |
|
43 |
|
44 ~CSendMessageState(); |
|
45 void RunL(); |
|
46 void DoCancel(); |
|
47 |
|
48 static TInt TimerCallback(TAny* aPtr); |
|
49 |
|
50 protected: |
|
51 CObexClientTest& iClientTest; |
|
52 TUint32 iTargetID; |
|
53 |
|
54 private: |
|
55 CMsvEntrySelection* iSelection; |
|
56 CPeriodic* iTimer; |
|
57 TBool iSendComplete; |
|
58 TBool iCancel; |
|
59 TBool iCancelled; |
|
60 TBool iCheckProgress; |
|
61 TBuf<64> iConnectPassword; |
|
62 // Stub support. |
|
63 TBuf<KMaxStubResultStrLength> iStubDesiredResult; // Expected to returned from the stub. |
|
64 }; |
|
65 |
|
66 |
|
67 #endif //__SENDMESSAGESTATE_H__ |