equal
deleted
inserted
replaced
63 |
63 |
64 // ---------------------------------------------------------- |
64 // ---------------------------------------------------------- |
65 // CSimpleConnection::ConstructL |
65 // CSimpleConnection::ConstructL |
66 // ---------------------------------------------------------- |
66 // ---------------------------------------------------------- |
67 // |
67 // |
68 void CSimpleConnection::ConstructL( TInt32 aServiceId ) |
68 void CSimpleConnection::ConstructL() |
69 { |
69 { |
70 // Create CSimpleSipConnection entity in simplesiputils.dll |
70 // Create CSimpleSipConnection entity in simplesiputils.dll |
71 iConnection = CSimpleSipConnection::NewL(); |
71 iConnection = CSimpleSipConnection::NewL(); |
72 // Set operation id ranges |
72 // Set operation id ranges |
73 iLimitLowerValue = TSimpleEngineUtils::OpIdRange(); |
73 iLimitLowerValue = TSimpleEngineUtils::OpIdRange(); |
77 // start to listen to status events |
77 // start to listen to status events |
78 IncreaseOpId(); |
78 IncreaseOpId(); |
79 CSimpleEngineRequest* req = CSimpleEngineRequest::NewL( |
79 CSimpleEngineRequest* req = CSimpleEngineRequest::NewL( |
80 *this, MSimpleEngineRequest::EListenEvents, iOpId ); |
80 *this, MSimpleEngineRequest::EListenEvents, iOpId ); |
81 CleanupStack::PushL( req ); |
81 CleanupStack::PushL( req ); |
82 if ( aServiceId ) |
|
83 { |
|
84 iConnection->SetServiceId( aServiceId ); |
|
85 } |
|
86 iConnection->DispatchReqL( *req ); |
82 iConnection->DispatchReqL( *req ); |
87 iRequestList.AddLast( *req ); |
83 iRequestList.AddLast( *req ); |
88 CleanupStack::Pop( req ); |
84 CleanupStack::Pop( req ); |
89 } |
85 } |
90 |
86 |
98 #ifdef _DEBUG |
94 #ifdef _DEBUG |
99 TSimpleLogger::Log(_L("SimpleConnection: NewL" )); |
95 TSimpleLogger::Log(_L("SimpleConnection: NewL" )); |
100 #endif |
96 #endif |
101 CSimpleConnection* self = new (ELeave) CSimpleConnection( aObserver ); |
97 CSimpleConnection* self = new (ELeave) CSimpleConnection( aObserver ); |
102 CleanupStack::PushL( self ); |
98 CleanupStack::PushL( self ); |
103 self->ConstructL( NULL ); |
99 self->ConstructL(); |
104 CleanupStack::Pop( self ); |
|
105 return self; |
|
106 } |
|
107 |
|
108 // ---------------------------------------------------------- |
|
109 // CSimpleConnection::NewL |
|
110 // ---------------------------------------------------------- |
|
111 // |
|
112 CSimpleConnection* CSimpleConnection::NewL( |
|
113 MSimpleConnectionObserver& aObserver, TInt32 aServiceId ) |
|
114 { |
|
115 #ifdef _DEBUG |
|
116 TSimpleLogger::Log(_L("SimpleConnection: NewL" )); |
|
117 #endif |
|
118 CSimpleConnection* self = new (ELeave) CSimpleConnection( aObserver ); |
|
119 CleanupStack::PushL( self ); |
|
120 self->ConstructL( aServiceId ); |
|
121 CleanupStack::Pop( self ); |
100 CleanupStack::Pop( self ); |
122 return self; |
101 return self; |
123 } |
102 } |
124 |
103 |
125 // ---------------------------------------------------------- |
104 // ---------------------------------------------------------- |