Changeset 18 for pjproject/main
- Timestamp:
- Nov 7, 2005 3:47:28 PM (19 years ago)
- Location:
- pjproject/main/pjlib
- Files:
-
- 6 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/main/pjlib/build
- Property svn:ignore
-
old new 6 6 *.opt 7 7 *.plg 8 test*.txt
-
- Property svn:ignore
-
pjproject/main/pjlib/build/os-win32.mak
r2 r18 8 8 # to all operating systems should go in Makefile instead. 9 9 # 10 export PJLIB_OBJS += addr_resolv_sock.o guid_win32.o ioqueue_winnt.o\10 export PJLIB_OBJS += addr_resolv_sock.o guid_win32.o \ 11 11 log_writer_stdout.o os_core_win32.o \ 12 12 os_error_win32.o os_time_ansi.o os_timestamp_common.o \ 13 13 os_timestamp_win32.o \ 14 14 pool_policy_malloc.o sock_bsd.o sock_select.o 15 16 export PJLIB_OBJS += ioqueue_win32.o 17 #export PJLIB_OBJS += ioqueue_select.o 18 19 export PJLIB_OBJS += file_io_win32.o 20 #export PJLIB_OBJS += file_io_ansi.o 15 21 16 22 # -
pjproject/main/pjlib/build/pjlib.dsp
r17 r18 195 195 # Begin Source File 196 196 197 SOURCE=..\src\pj\file_access_win32.c 198 # End Source File 199 # Begin Source File 200 201 SOURCE=..\src\pj\file_io_ansi.c 202 # PROP Exclude_From_Build 1 203 # End Source File 204 # Begin Source File 205 206 SOURCE=..\src\pj\file_io_win32.c 207 # End Source File 208 # Begin Source File 209 197 210 SOURCE=..\src\pj\guid.c 198 211 # End Source File … … 474 487 475 488 SOURCE=..\include\pj\fifobuf.h 489 # End Source File 490 # Begin Source File 491 492 SOURCE=..\include\pj\file_access.h 493 # End Source File 494 # Begin Source File 495 496 SOURCE=..\include\pj\file_io.h 476 497 # End Source File 477 498 # Begin Source File -
pjproject/main/pjlib/build/pjlib_test.dsp
r17 r18 108 108 # Begin Source File 109 109 110 SOURCE="..\src\pjlib-test\file.c" 111 # End Source File 112 # Begin Source File 113 110 114 SOURCE="..\src\pjlib-test\ioq_perf.c" 111 115 # End Source File -
pjproject/main/pjlib/include/pj/addr_resolv.h
r6 r18 15 15 16 16 /** 17 * @defgroup pj_addr_resolve Address Resolution17 * @defgroup pj_addr_resolve Network Address Resolution 18 18 * @ingroup PJ_IO 19 19 * @{ -
pjproject/main/pjlib/include/pj/ioqueue.h
r14 r18 15 15 16 16 /** 17 * @defgroup PJ_IO Network I/O18 * @brief Network I/O17 * @defgroup PJ_IO Input/Output 18 * @brief Input/Output 19 19 * @ingroup PJ_OS 20 20 * … … 53 53 * completed. 54 54 * 55 * The I/O Queue can work on both socket and file descriptors. For 56 * asynchronous file operations however, one must make sure that the correct 57 * file I/O back-end is used, because not all file I/O back-end can be 58 * used with the ioqueue. Please see \ref PJ_FILE_IO for more details. 59 * 55 60 * The framework works natively in platforms where asynchronous operation API 56 61 * exists, such as in Windows NT with IoCompletionPort/IOCP. In other … … 61 66 * The I/O queue provides more than just unified abstraction. It also: 62 67 * - makes sure that the operation uses the most effective way to utilize 63 * the underlying mechanism, to provide the maximum theoritical68 * the underlying mechanism, to achieve the maximum theoritical 64 69 * throughput possible on a given platform. 65 70 * - choose the most efficient mechanism for event polling on a given … … 488 493 int *addrlen); 489 494 490 491 495 /** 492 496 * Instruct the I/O Queue to write to the handle. This function will return … … 530 534 531 535 /** 532 * This function behaves similarly as #pj_ioqueue_write(), except that 533 * pj_sock_sendto() (or equivalent) will be called to send the data. 536 * Instruct the I/O Queue to write to the handle. This function will return 537 * immediately (i.e. non-blocking) regardless whether some data has been 538 * transfered. If the function can't complete immediately, the caller will 539 * be notified about the completion when it calls pj_ioqueue_poll(). If 540 * operation completes immediately and data has been transfered, the function 541 * returns PJ_SUCCESS and the callback will NOT be called. 534 542 * 535 543 * @param key the key that identifies the handle. -
pjproject/main/pjlib/include/pj/list.h
r11 r18 46 46 * @hideinitializer 47 47 */ 48 #define PJ_DECL_LIST_MEMBER(type) type *prev; /** List @a prev. */ \ 49 type *next /** List @a next. */ 48 #define PJ_DECL_LIST_MEMBER(type) \ 49 /** List @a prev. */ \ 50 type *prev; \ 51 /** List @a next. */ \ 52 type *next 50 53 51 54 -
pjproject/main/pjlib/include/pj/pool.h
r11 r18 127 127 struct pj_pool_t 128 128 { 129 PJ_DECL_LIST_MEMBER(struct pj_pool_t); 129 PJ_DECL_LIST_MEMBER(struct pj_pool_t); /**< Standard list elements. */ 130 130 131 131 /** Pool name */ -
pjproject/main/pjlib/include/pj/types.h
r4 r18 64 64 #define PJ_FALSE 0 65 65 66 /** 67 * File offset type. 68 */ 69 #if defined(PJ_HAS_INT64) && PJ_HAS_INT64!=0 70 typedef pj_int64_t pj_off_t; 71 #else 72 typedef pj_ssize_t pj_off_t; 73 #endif 66 74 67 75 /////////////////////////////////////////////////////////////////////////////// -
pjproject/main/pjlib/include/pj/xml.h
r11 r18 31 31 struct pj_xml_attr 32 32 { 33 PJ_DECL_LIST_MEMBER(pj_xml_attr); 34 pj_str_t name; /**< Attribute name.*/35 pj_str_t value; /**< Attribute value.*/33 PJ_DECL_LIST_MEMBER(pj_xml_attr); /**< Standard list elements. */ 34 pj_str_t name; /**< Attribute name. */ 35 pj_str_t value; /**< Attribute value. */ 36 36 }; 37 37 … … 40 40 typedef struct pj_xml_node_head 41 41 { 42 PJ_DECL_LIST_MEMBER(pj_xml_node); 42 PJ_DECL_LIST_MEMBER(pj_xml_node); /**< Standard list elements. */ 43 43 } pj_xml_node_head; 44 44 … … 46 46 struct pj_xml_node 47 47 { 48 PJ_DECL_LIST_MEMBER(pj_xml_node); /** List @a prev and @a next member */49 pj_str_t name; /** Node name.*/50 pj_xml_attr attr_head; /** Attribute list.*/51 pj_xml_node_head node_head; /** Node list.*/52 pj_str_t content; /** Node content.*/48 PJ_DECL_LIST_MEMBER(pj_xml_node); /**< List @a prev and @a next member */ 49 pj_str_t name; /**< Node name. */ 50 pj_xml_attr attr_head; /**< Attribute list. */ 51 pj_xml_node_head node_head; /**< Node list. */ 52 pj_str_t content; /**< Node content. */ 53 53 }; 54 54 -
pjproject/main/pjlib/include/pjlib.h
r4 r18 17 17 #include <pj/except.h> 18 18 #include <pj/fifobuf.h> 19 #include <pj/file_access.h> 20 #include <pj/file_io.h> 19 21 #include <pj/guid.h> 20 22 #include <pj/hash.h> -
pjproject/main/pjlib/src/pj/ioqueue_winnt.c
r11 r18 36 36 37 37 /* 38 * OVERLAP structure for send and receive.38 * OVERLAPPPED structure for send and receive. 39 39 */ 40 40 typedef struct ioqueue_overlapped … … 76 76 }; 77 77 78 /* Type of handle in the key. */ 79 enum handle_type 80 { 81 HND_IS_UNKNOWN, 82 HND_IS_FILE, 83 HND_IS_SOCKET, 84 }; 85 78 86 /* 79 87 * Structure for individual socket. … … 84 92 HANDLE hnd; 85 93 void *user_data; 94 enum handle_type hnd_type; 86 95 #if PJ_HAS_TCP 87 96 int connecting; … … 318 327 rec->ioqueue = ioqueue; 319 328 rec->hnd = (HANDLE)sock; 329 rec->hnd_type = HND_IS_SOCKET; 320 330 rec->user_data = user_data; 321 331 pj_memcpy(&rec->cb, cb, sizeof(pj_ioqueue_callback)); … … 364 374 } 365 375 #endif 376 if (key->hnd_type == HND_IS_FILE) { 377 CloseHandle(key->hnd); 378 } 366 379 return PJ_SUCCESS; 367 380 } … … 506 519 507 520 PJ_CHECK_STACK(); 508 PJ_ASSERT_RETURN(key && op_key && buffer , PJ_EINVAL);521 PJ_ASSERT_RETURN(key && op_key && buffer && length, PJ_EINVAL); 509 522 510 523 op_key_rec = (union operation_key*)op_key->internal__; -
pjproject/main/pjlib/src/pjlib-samples/list.c
r6 r18 16 16 { 17 17 // This must be the first member declared in the struct! 18 PJ_DECL_LIST_MEMBER(struct my_node) 18 PJ_DECL_LIST_MEMBER(struct my_node); 19 19 int value; 20 20 }; -
pjproject/main/pjlib/src/pjlib-test/test.c
r17 r18 32 32 mem = &caching_pool.factory; 33 33 34 pj_log_set_level(3); 35 pj_log_set_decor(PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_TIME | 36 PJ_LOG_HAS_MICRO_SEC); 37 34 38 rc = pj_init(); 35 39 if (rc != 0) { … … 38 42 } 39 43 40 pj_log_set_level(3);41 pj_log_set_decor(PJ_LOG_HAS_NEWLINE);42 44 pj_dump_config(); 43 45 pj_caching_pool_init( &caching_pool, &pj_pool_factory_default_policy, 0 ); … … 127 129 #endif 128 130 131 #if INCLUDE_FILE_TEST 132 DO_TEST( file_test() ); 133 #endif 134 129 135 #if INCLUDE_XML_TEST 130 136 DO_TEST( xml_test() ); -
pjproject/main/pjlib/src/pjlib-test/test.h
r11 r18 9 9 #define GROUP_OS 0 10 10 #define GROUP_DATA_STRUCTURE 0 11 #define GROUP_NETWORK 1 11 #define GROUP_NETWORK 0 12 #define GROUP_FILE 1 12 13 #define GROUP_EXTRA 0 13 14 … … 33 34 #define INCLUDE_TCP_IOQUEUE_TEST GROUP_NETWORK 34 35 #define INCLUDE_IOQUEUE_PERF_TEST GROUP_NETWORK 36 #define INCLUDE_FILE_TEST GROUP_FILE 35 37 #define INCLUDE_XML_TEST GROUP_EXTRA 36 38 … … 69 71 extern int tcp_ioqueue_test(void); 70 72 extern int ioqueue_perf_test(void); 73 extern int file_test(void); 71 74 extern int xml_test(void); 72 75
Note: See TracChangeset
for help on using the changeset viewer.