|
1 // Copyright (c) 2000-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 // Header for defining a dummy version of the CNifAgentRef class |
|
15 // for testing purposes |
|
16 // |
|
17 // |
|
18 |
|
19 #if !defined(__TNIFAGENTREF_H__) |
|
20 #define __TNIFAGENTREF_H__ |
|
21 |
|
22 #include <comms-infras/nifagt.h> |
|
23 #include "TNifNotify.h" |
|
24 |
|
25 class CNifAgentBase; |
|
26 class CNifAgentRef : public CBase, public MNifAgentNotify |
|
27 /** |
|
28 @internalComponent |
|
29 */ |
|
30 { |
|
31 public: |
|
32 // Factory |
|
33 IMPORT_C static CNifAgentRef* NewL(MDummyNifToAgtHarnessNotify *aNotify, |
|
34 const TBool aCSDAgent = true); |
|
35 |
|
36 // Destructor |
|
37 IMPORT_C ~CNifAgentRef(); |
|
38 |
|
39 // Test commands to drive the Agent |
|
40 IMPORT_C void Connect(); |
|
41 IMPORT_C void ReConnect(); |
|
42 IMPORT_C void Disconnect(); |
|
43 IMPORT_C void WaitForIncoming(); |
|
44 |
|
45 // Retrieve Completion return code |
|
46 IMPORT_C void GetCompletionCode(TInt& aCompletionCode); |
|
47 IMPORT_C void GetProgressStage(TInt& aProgressStage); |
|
48 |
|
49 // MNifAgentNotify virtuals |
|
50 virtual void ConnectComplete(TInt aStatus); |
|
51 virtual void ReconnectComplete(TInt aStatus); |
|
52 virtual void AuthenticateComplete(TInt aStatus); |
|
53 virtual void ServiceStarted(); |
|
54 virtual void ServiceClosed(); |
|
55 virtual void DisconnectComplete(); |
|
56 virtual void AgentProgress(TInt aStage, TInt aError); |
|
57 virtual void AgentProgress(TSubConnectionUniqueId aSubConnectionUniqueId, TInt aStage, TInt aError); |
|
58 virtual TInt Notification(TAgentToNifEventType aEvent, TAny* aInfo); |
|
59 virtual TInt IncomingConnectionReceived(); |
|
60 virtual void AgentEvent(TNetworkAdaptorEventType aEventType, TUint aEvent, const TDesC8& aEventData, TAny* aSource); |
|
61 virtual TName Name() const; |
|
62 virtual void Close(); |
|
63 |
|
64 private: |
|
65 // Constructor |
|
66 CNifAgentRef(MDummyNifToAgtHarnessNotify *aNotify); |
|
67 |
|
68 // Agent Constructor |
|
69 void ConstructL(const TBool aCSDAgent = true); |
|
70 |
|
71 private: |
|
72 CNifAgentBase* iAgent; |
|
73 CNifAgentBase* iAgentInfo; |
|
74 MDummyNifToAgtHarnessNotify* iNotify; |
|
75 TName iName; |
|
76 TInt iCompletionCode; |
|
77 TInt iProgressStage; |
|
78 RLibrary iLibrary; |
|
79 TBool iDisconnectRequired; |
|
80 }; |
|
81 |
|
82 #endif |