- Timestamp:
- Oct 26, 2007 5:25:35 AM (17 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/build.symbian/pjlibU.def
r1417 r1525 261 261 pj_strtrim @ 260 NONAME 262 262 pj_symbianos_poll @ 261 NONAME 263 pj_thread_create @ 262 NONAME 264 pj_thread_destroy @ 263 NONAME 265 pj_thread_get_name @ 264 NONAME 266 pj_thread_join @ 265 NONAME 267 pj_thread_local_alloc @ 266 NONAME 268 pj_thread_local_free @ 267 NONAME 269 pj_thread_local_get @ 268 NONAME 270 pj_thread_local_set @ 269 NONAME 271 pj_thread_register @ 270 NONAME 272 pj_thread_resume @ 271 NONAME 273 pj_thread_sleep @ 272 NONAME 274 pj_thread_this @ 273 NONAME 275 pj_time_decode @ 274 NONAME 276 pj_time_encode @ 275 NONAME 277 pj_time_gmt_to_local @ 276 NONAME 278 pj_time_local_to_gmt @ 277 NONAME 279 pj_time_val_normalize @ 278 NONAME 280 pj_timer_entry_init @ 279 NONAME 281 pj_timer_heap_cancel @ 280 NONAME 282 pj_timer_heap_count @ 281 NONAME 283 pj_timer_heap_create @ 282 NONAME 284 pj_timer_heap_destroy @ 283 NONAME 285 pj_timer_heap_earliest_time @ 284 NONAME 286 pj_timer_heap_mem_size @ 285 NONAME 287 pj_timer_heap_poll @ 286 NONAME 288 pj_timer_heap_schedule @ 287 NONAME 289 pj_timer_heap_set_lock @ 288 NONAME 290 pj_timer_heap_set_max_timed_out_per_poll @ 289 NONAME 291 pj_unicode_to_ansi @ 290 NONAME 292 pj_utoa @ 291 NONAME 293 pj_utoa_pad @ 292 NONAME 294 platform_strerror @ 293 NONAME 295 snprintf @ 294 NONAME 296 vsnprintf @ 295 NONAME 263 pj_symbianos_set_params @ 262 NONAME 264 pj_thread_create @ 263 NONAME 265 pj_thread_destroy @ 264 NONAME 266 pj_thread_get_name @ 265 NONAME 267 pj_thread_join @ 266 NONAME 268 pj_thread_local_alloc @ 267 NONAME 269 pj_thread_local_free @ 268 NONAME 270 pj_thread_local_get @ 269 NONAME 271 pj_thread_local_set @ 270 NONAME 272 pj_thread_register @ 271 NONAME 273 pj_thread_resume @ 272 NONAME 274 pj_thread_sleep @ 273 NONAME 275 pj_thread_this @ 274 NONAME 276 pj_time_decode @ 275 NONAME 277 pj_time_encode @ 276 NONAME 278 pj_time_gmt_to_local @ 277 NONAME 279 pj_time_local_to_gmt @ 278 NONAME 280 pj_time_val_normalize @ 279 NONAME 281 pj_timer_entry_init @ 280 NONAME 282 pj_timer_heap_cancel @ 281 NONAME 283 pj_timer_heap_count @ 282 NONAME 284 pj_timer_heap_create @ 283 NONAME 285 pj_timer_heap_destroy @ 284 NONAME 286 pj_timer_heap_earliest_time @ 285 NONAME 287 pj_timer_heap_mem_size @ 286 NONAME 288 pj_timer_heap_poll @ 287 NONAME 289 pj_timer_heap_schedule @ 288 NONAME 290 pj_timer_heap_set_lock @ 289 NONAME 291 pj_timer_heap_set_max_timed_out_per_poll @ 290 NONAME 292 pj_unicode_to_ansi @ 291 NONAME 293 pj_utoa @ 292 NONAME 294 pj_utoa_pad @ 293 NONAME 295 platform_strerror @ 294 NONAME 296 snprintf @ 295 NONAME 297 vsnprintf @ 296 NONAME -
pjproject/trunk/build.symbian/pjproject.cww
r1426 r1525 313 313 </WINDOW> 314 314 <WINDOW> 315 <SESSION>- 1</SESSION>316 <EDOCTYPE> 1</EDOCTYPE>317 < PATH USERELATIVEPATHS = "true">..\pjsip-apps\src\symbian_ua\ua.cpp</PATH>315 <SESSION>-2147483648</SESSION> 316 <EDOCTYPE>20</EDOCTYPE> 317 <DEFAULT>true</DEFAULT> 318 318 <MAXIMIZED>true</MAXIMIZED> 319 319 <FRAMELOC> 320 320 <X>4</X> 321 <Y> 4</Y>322 </FRAMELOC> 323 <FRAMESIZE> 324 <W> 557</W>325 <H> 627</H>321 <Y>23</Y> 322 </FRAMELOC> 323 <FRAMESIZE> 324 <W>1464</W> 325 <H>3681</H> 326 326 </FRAMESIZE> 327 327 <DOCKINFO> … … 338 338 </DOCKINFO> 339 339 </WINDOW> 340 <WINDOW> 341 <SESSION>-2147483648</SESSION> 342 <EDOCTYPE>36</EDOCTYPE> 343 <DEFAULT>true</DEFAULT> 344 <FRAMELOC> 345 <X>4</X> 346 <Y>23</Y> 347 </FRAMELOC> 348 <FRAMESIZE> 349 <W>366</W> 350 <H>354</H> 351 </FRAMESIZE> 352 <DOCKINFO> 353 <STATUS>0</STATUS> 354 <ROW></ROW> 355 <COLUMN></COLUMN> 356 <DOCKBARID></DOCKBARID> 357 <PCTWIDTH></PCTWIDTH> 358 <HGT></HGT> 359 <GROUPID> 360 <GIDHIGHPART></GIDHIGHPART> 361 <GIDLOWPART></GIDLOWPART> 362 </GROUPID> 363 </DOCKINFO> 364 </WINDOW> 365 <WINDOW> 366 <SESSION>-2147483648</SESSION> 367 <EDOCTYPE>23</EDOCTYPE> 368 <DEFAULT>true</DEFAULT> 369 <MAXIMIZED>true</MAXIMIZED> 370 <FRAMELOC> 371 <X>6</X> 372 <Y>81</Y> 373 </FRAMELOC> 374 <FRAMESIZE> 375 <W>566</W> 376 <H>477</H> 377 </FRAMESIZE> 378 <DOCKINFO> 379 <STATUS>0</STATUS> 380 <ROW></ROW> 381 <COLUMN></COLUMN> 382 <DOCKBARID></DOCKBARID> 383 <PCTWIDTH></PCTWIDTH> 384 <HGT></HGT> 385 <GROUPID> 386 <GIDHIGHPART></GIDHIGHPART> 387 <GIDLOWPART></GIDLOWPART> 388 </GROUPID> 389 </DOCKINFO> 390 </WINDOW> 340 391 </MWIDEWORKSPACE> -
pjproject/trunk/pjlib/include/pj/os.h
r1405 r1525 293 293 */ 294 294 PJ_DECL(pj_bool_t) pj_symbianos_poll(int priority, int ms_timeout); 295 296 297 /** 298 * This structure declares Symbian OS specific parameters that can be 299 * specified when calling #pj_symbianos_set_params(). 300 */ 301 typedef struct pj_symbianos_params 302 { 303 /** 304 * Optional RSocketServ instance to be used by PJLIB. If this 305 * value is NULL, PJLIB will create a new RSocketServ instance 306 * when pj_init() is called. 307 */ 308 void *rsocketserv; 309 310 /** 311 * Optional RConnection instance to be used by PJLIB when creating 312 * sockets. If this value is NULL, no RConnection will be 313 * specified when creating sockets. 314 */ 315 void *rconnection; 316 317 /** 318 * Optional RHostResolver instance to be used by PJLIB. If this value 319 * is NULL, a new RHostResolver instance will be created when 320 * pj_init() is called. 321 */ 322 void *rhostresolver; 323 324 } pj_symbianos_params; 325 326 /** 327 * Specify Symbian OS parameters to be used by PJLIB. This function MUST 328 * be called before #pj_init() is called. 329 * 330 * @param prm Symbian specific parameters. 331 * 332 * @return PJ_SUCCESS if the parameters can be applied 333 * successfully. 334 */ 335 PJ_DECL(pj_status_t) pj_symbianos_set_params(pj_symbianos_params *prm); 336 295 337 296 338 /** -
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 -
pjproject/trunk/pjlib/src/pj/os_symbian.h
r1420 r1525 21 21 22 22 #include <pj/sock.h> 23 #include <pj/os.h> 23 24 #include <pj/string.h> 24 25 … … 196 197 197 198 // 199 // Set parameters 200 // 201 void SetParameters(pj_symbianos_params *params); 202 203 // 198 204 // Initialize. 199 205 // … … 213 219 RSocketServ &SocketServ() 214 220 { 215 return socketServ_; 216 } 217 221 return appSocketServ_ ? *appSocketServ_ : socketServ_; 222 } 223 224 // Get RConnection instance, if any. 225 RConnection *Connection() 226 { 227 return appConnection_; 228 } 229 218 230 // Convert TInetAddr to pj_sockaddr_in 219 231 static inline void Addr2pj(const TInetAddr & sym_addr, … … 244 256 RHostResolver & GetResolver() 245 257 { 246 return hostResolver_;258 return appHostResolver_ ? *appHostResolver_ : hostResolver_; 247 259 } 248 260 … … 297 309 CPjTimeoutTimer *selectTimeoutTimer_; 298 310 311 // App parameters 312 RSocketServ *appSocketServ_; 313 RConnection *appConnection_; 314 RHostResolver *appHostResolver_; 315 299 316 private: 300 317 PjSymbianOS(); -
pjproject/trunk/pjlib/src/pj/sock_symbian.cpp
r1405 r1525 475 475 /* Create Symbian RSocket */ 476 476 RSocket rSock; 477 rc = rSock.Open(PjSymbianOS::Instance()->SocketServ(), af, type, proto); 477 if (PjSymbianOS::Instance()->Connection()) 478 rc = rSock.Open(PjSymbianOS::Instance()->SocketServ(), 479 af, type, proto, 480 *PjSymbianOS::Instance()->Connection()); 481 else 482 rc = rSock.Open(PjSymbianOS::Instance()->SocketServ(), 483 af, type, proto); 484 478 485 if (rc != KErrNone) 479 486 return PJ_RETURN_OS_ERROR(rc);
Note: See TracChangeset
for help on using the changeset viewer.