|
1 /* |
|
2 * Copyright (c) 2002 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 the License "Symbian Foundation License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Handler class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef TESTHANDLERS_H |
|
20 #define TESTHANDLERS_H |
|
21 |
|
22 |
|
23 #include <e32base.h> |
|
24 #include "imconnection.h" |
|
25 #include "imclient.h" |
|
26 #include "imerrors.h" |
|
27 #include <flogger.h> |
|
28 // FORWARD Declarations |
|
29 |
|
30 // CLASS DECLARATIONS |
|
31 |
|
32 //************************************************************************************* |
|
33 // CIMApiClientHandler |
|
34 //************************************************************************************* |
|
35 class CIMApiClientHandler : public MImObserver, public CBase |
|
36 { |
|
37 public: |
|
38 static CIMApiClientHandler* NewL( TRequestStatus& aStatus ); |
|
39 virtual ~CIMApiClientHandler(); |
|
40 |
|
41 void HandleRegisterL( |
|
42 const TInt aErrorCode ); |
|
43 |
|
44 void HandleMessageSentL( |
|
45 const TInt aOpCode, |
|
46 const TInt aErrorCode ); |
|
47 |
|
48 void HandleNewPToPMessageL( |
|
49 const TInt aErrorCode, |
|
50 const TContactItemId aContactId, |
|
51 const TDesC& aUserId, |
|
52 const TDesC& aMessageType, |
|
53 const TDesC8& aContent ); |
|
54 |
|
55 void HandleNewPToPMessageL( |
|
56 const TInt aErrorCode, |
|
57 const TContactItemId aContactId, |
|
58 const TDesC& aUserId, |
|
59 const TDesC& aMessageType, |
|
60 const TDesC16& aContent ); |
|
61 |
|
62 void HandleSendErrorL( |
|
63 const TInt aOpCode, |
|
64 const TInt aErrorCode, |
|
65 MImClientDetailedError* aDetailedError ); |
|
66 |
|
67 // protected: |
|
68 void TimedOut(); |
|
69 |
|
70 private: |
|
71 CIMApiClientHandler( TRequestStatus& aStatus ); |
|
72 void ConstructL(); |
|
73 |
|
74 private: |
|
75 TRequestStatus& iStatus; |
|
76 |
|
77 }; |
|
78 |
|
79 |
|
80 class CConnectionObserver : public CBase, |
|
81 public MImConnectionObserver |
|
82 { |
|
83 public: |
|
84 static CConnectionObserver* NewL( TRequestStatus& aStatus ); |
|
85 virtual ~CConnectionObserver(); |
|
86 |
|
87 void HandleConnectL( const TInt aErrorCode ); |
|
88 void HandleDisconnectL(); |
|
89 |
|
90 void HandleLoginL( const TInt aErrorCode ); |
|
91 void HandleCancelLoginL( const TInt aErrorCode ); |
|
92 void HandleLogoutL( const TInt aErrorCode ); |
|
93 |
|
94 private: |
|
95 CConnectionObserver( TRequestStatus& aStatus ); |
|
96 void ConstructL(); |
|
97 |
|
98 private: |
|
99 TRequestStatus& iStatus; |
|
100 }; |
|
101 |
|
102 class CTestLogger : public CBase |
|
103 { |
|
104 public: |
|
105 //IMPORT_C static void CTestLogger::Log(TRefByValue<const TDesC> aFmt,...); |
|
106 IMPORT_C static void Log( TRefByValue<const TDesC> aFmt, ... ); |
|
107 }; |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 #endif |