|
1 /* |
|
2 * Copyright (c) 2005 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: Registration Timer class declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef SEN_REGISTRATION_TIMER |
|
22 #define SEN_REGISTRATION_TIMER |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 |
|
27 // CONSTANTS |
|
28 const TInt KSenDefaultRegistrationTimeout = 1; // 1 second |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 #ifdef EKA2 |
|
33 NONSHARABLE_CLASS( MSenRegistrationActor ) |
|
34 #else |
|
35 class MSenRegistrationActor |
|
36 #endif |
|
37 { |
|
38 public: |
|
39 // Registers the files observer (connection agent) and/or RProperty subscription for (file) progress (BLOB) info |
|
40 virtual TInt RegisterAndSubscribeFileProgressObserversL() = 0; |
|
41 }; |
|
42 |
|
43 |
|
44 #ifdef EKA2 |
|
45 //NONSHARABLE_CLASS(CSenRegistrationTimer) : public CTimer |
|
46 NONSHARABLE_CLASS( CSenRegistrationTimer ) : public CActive |
|
47 #else |
|
48 //class CSenRegistrationTimer : public CTimer |
|
49 class CSenRegistrationTimer : public CActive |
|
50 #endif |
|
51 { |
|
52 public: |
|
53 static CSenRegistrationTimer* NewL( MSenRegistrationActor& aActor, TInt aRegistrationTimeoutInSecs = KSenDefaultRegistrationTimeout ); |
|
54 static CSenRegistrationTimer* NewLC( MSenRegistrationActor& aActor, TInt aRegistrationTimeoutInSecs = KSenDefaultRegistrationTimeout ); |
|
55 |
|
56 ~CSenRegistrationTimer(); |
|
57 |
|
58 /** |
|
59 * Calling this method will activate the registration, that will happen N seconds. |
|
60 */ |
|
61 void IssueRegistrations( TBool aRegisterFilesObserver = ETrue ); |
|
62 |
|
63 virtual void RunL(); |
|
64 void DoCancel(); |
|
65 |
|
66 //virtual TInt RunError(TInt aError); |
|
67 |
|
68 private: |
|
69 CSenRegistrationTimer( MSenRegistrationActor& aActor, TInt aRegistrationTimeoutInSecs ); |
|
70 void ConstructL(); |
|
71 |
|
72 private: // Data: |
|
73 MSenRegistrationActor& iActor; |
|
74 TInt iRegistrationTimeoutInSecs; |
|
75 RTimer iTimer; |
|
76 // Registration flags |
|
77 TBool iRegisterFilesObserver; |
|
78 }; |
|
79 |
|
80 #endif // SEN_REGISTRATION_TIMER |
|
81 |
|
82 // End of File |