Changeset 1525 for pjproject/trunk/pjlib/src/pj/os_core_symbian.cpp
- Timestamp:
- Oct 26, 2007 5:25:35 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/os_core_symbian.cpp
r1405 r1525 154 154 PjSymbianOS::PjSymbianOS() 155 155 : isSocketServInitialized_(false), isResolverInitialized_(false), 156 console_(NULL), selectTimeoutTimer_(NULL) 157 { 156 console_(NULL), selectTimeoutTimer_(NULL), 157 appSocketServ_(NULL), appConnection_(NULL), appHostResolver_(NULL) 158 { 159 } 160 161 // Set parameters 162 void PjSymbianOS::SetParameters(pj_symbianos_params *params) 163 { 164 appSocketServ_ = (RSocketServ*) params->rsocketserv; 165 appConnection_ = (RConnection*) params->rconnection; 166 appHostResolver_ = (RHostResolver*) params->rhostresolver; 158 167 } 159 168 … … 180 189 #endif 181 190 182 if (!isSocketServInitialized_) { 191 /* Only create RSocketServ if application doesn't specify it 192 * in the parameters 193 */ 194 if (!isSocketServInitialized_ && appSocketServ_ == NULL) { 183 195 err = socketServ_.Connect(); 184 196 if (err != KErrNone) … … 188 200 } 189 201 190 if (!isResolverInitialized_) { 191 err = hostResolver_.Open(SocketServ(), KAfInet, KSockStream); 202 if (!isResolverInitialized_ && appHostResolver_ == NULL) { 203 if (Connection()) 204 err = hostResolver_.Open(SocketServ(), KAfInet, KSockStream, 205 *Connection()); 206 else 207 err = hostResolver_.Open(SocketServ(), KAfInet, KSockStream); 208 192 209 if (err != KErrNone) 193 210 goto on_error; … … 258 275 { 259 276 return 0; 277 } 278 279 280 /* Set Symbian specific parameters */ 281 PJ_DEF(pj_status_t) pj_symbianos_set_params(pj_symbianos_params *prm) 282 { 283 PJ_ASSERT_RETURN(prm != NULL, PJ_EINVAL); 284 PjSymbianOS::Instance()->SetParameters(prm); 285 return PJ_SUCCESS; 260 286 } 261 287
Note: See TracChangeset
for help on using the changeset viewer.