77
|
1 |
|
|
2 |
#include <e32base.h>
|
|
3 |
#include <remcon/clientinfo.h>
|
|
4 |
#include "mockremcontspobserver.h"
|
|
5 |
|
|
6 |
CMockRemConTSPObserver* CMockRemConTSPObserver::NewL()
|
|
7 |
{
|
|
8 |
CMockRemConTSPObserver * self = new ( ELeave ) CMockRemConTSPObserver( );
|
|
9 |
CleanupStack::PushL( self );
|
|
10 |
self->ConstructL();
|
|
11 |
CleanupStack::Pop( self );
|
|
12 |
return self;
|
|
13 |
}
|
|
14 |
CMockRemConTSPObserver::~CMockRemConTSPObserver()
|
|
15 |
{
|
|
16 |
|
|
17 |
}
|
|
18 |
CMockRemConTSPObserver::CMockRemConTSPObserver()
|
|
19 |
{
|
|
20 |
|
|
21 |
}
|
|
22 |
void CMockRemConTSPObserver::ConstructL()
|
|
23 |
{
|
|
24 |
|
|
25 |
|
|
26 |
}
|
|
27 |
|
|
28 |
TInt CMockRemConTSPObserver::Response()
|
|
29 |
{return iObserverResponse; }
|
|
30 |
|
|
31 |
void CMockRemConTSPObserver::SetResponse(TInt aValue)
|
|
32 |
{ iObserverResponse = aValue; }
|
|
33 |
|
|
34 |
|
|
35 |
void CMockRemConTSPObserver::MrctspoDoOutgoingCommandAddressed(TInt aError)
|
|
36 |
{
|
|
37 |
iObserverResponse = aError;
|
|
38 |
}
|
|
39 |
void CMockRemConTSPObserver::MrctspoDoOutgoingCommandPermitted(TBool aIsPermitted)
|
|
40 |
{
|
|
41 |
if( aIsPermitted )
|
|
42 |
{
|
|
43 |
iObserverResponse = KErrNone;
|
|
44 |
}
|
|
45 |
else
|
|
46 |
{
|
|
47 |
iObserverResponse = KErrNotFound;
|
|
48 |
}
|
|
49 |
}
|
|
50 |
void CMockRemConTSPObserver::MrctspoDoIncomingCommandAddressed(TInt aError )
|
|
51 |
{
|
|
52 |
iObserverResponse = aError;
|
|
53 |
}
|
|
54 |
TInt CMockRemConTSPObserver::MrctspoDoGetConnections(TSglQue<TRemConAddress>& /*aConnections*/)
|
|
55 |
{ return 0; }
|
|
56 |
void CMockRemConTSPObserver::MrctspoDoOutgoingResponsePermitted(TBool aIsPermitted)
|
|
57 |
{
|
|
58 |
if( aIsPermitted )
|
|
59 |
{
|
|
60 |
iObserverResponse = KErrNone;
|
|
61 |
}
|
|
62 |
else
|
|
63 |
{
|
|
64 |
iObserverResponse = KErrNotFound;
|
|
65 |
}
|
|
66 |
}
|
|
67 |
void CMockRemConTSPObserver::MrctspoDoIncomingNotifyAddressed(TClientInfo* aClientInfo, TInt aError )
|
|
68 |
{
|
|
69 |
iObserverResponse = aError;
|
|
70 |
if( aClientInfo )
|
|
71 |
{
|
|
72 |
iClientInfo = *aClientInfo;
|
|
73 |
}
|
|
74 |
else
|
|
75 |
{
|
|
76 |
iClientInfo.SecureId().iId = 0;
|
|
77 |
}
|
|
78 |
}
|
|
79 |
void CMockRemConTSPObserver::MrctspoDoReAddressNotifies()
|
|
80 |
{}
|
|
81 |
|
|
82 |
void CMockRemConTSPObserver::MrctspoDoOutgoingNotifyCommandAddressed(TRemConAddress* aConnection, TInt aError)
|
|
83 |
{}
|
|
84 |
void CMockRemConTSPObserver::MrctspoDoOutgoingNotifyCommandPermitted(TBool aIsPermitted)
|
|
85 |
{
|
|
86 |
if( aIsPermitted )
|
|
87 |
{
|
|
88 |
iObserverResponse = KErrNone;
|
|
89 |
}
|
|
90 |
else
|
|
91 |
{
|
|
92 |
iObserverResponse = KErrNotFound;
|
|
93 |
}
|
|
94 |
}
|
|
95 |
void CMockRemConTSPObserver::MrctspoDoIncomingCommandPermitted(TBool aIsPermitted)
|
|
96 |
{
|
|
97 |
if( aIsPermitted )
|
|
98 |
{
|
|
99 |
iObserverResponse = KErrNone;
|
|
100 |
}
|
|
101 |
else
|
|
102 |
{
|
|
103 |
iObserverResponse = KErrNotFound;
|
|
104 |
}
|
|
105 |
}
|
|
106 |
void CMockRemConTSPObserver::MrctspoDoIncomingNotifyPermitted(TBool aIsPermitted)
|
|
107 |
{
|
|
108 |
if( aIsPermitted )
|
|
109 |
{
|
|
110 |
iObserverResponse = KErrNone;
|
|
111 |
}
|
|
112 |
else
|
|
113 |
{
|
|
114 |
iObserverResponse = KErrNotFound;
|
|
115 |
}
|
|
116 |
}
|
|
117 |
TInt CMockRemConTSPObserver::MrctspoSetLocalAddressedClient(const TUid& aBearerUid, const TClientInfo& aClientInfo)
|
|
118 |
{
|
|
119 |
iObserverResponse = KErrNone;
|
|
120 |
iBearerUid = aBearerUid;
|
|
121 |
iClientInfo = aClientInfo;
|
|
122 |
return KErrNone;
|
|
123 |
}
|
|
124 |
|