Changeset 127 for pjproject/trunk/pjsip/include/pjsip/sip_msg.h
- Timestamp:
- Jan 30, 2006 6:40:05 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_msg.h
r119 r127 174 174 */ 175 175 PJSIP_H_ACCEPT, 176 PJSIP_H_ACCEPT_ENCODING_UNIMP, 177 PJSIP_H_ACCEPT_LANGUAGE_UNIMP, 178 PJSIP_H_ALERT_INFO_UNIMP, 176 PJSIP_H_ACCEPT_ENCODING_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 177 PJSIP_H_ACCEPT_LANGUAGE_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 178 PJSIP_H_ALERT_INFO_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 179 179 PJSIP_H_ALLOW, 180 PJSIP_H_AUTHENTICATION_INFO_UNIMP, 180 PJSIP_H_AUTHENTICATION_INFO_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 181 181 PJSIP_H_AUTHORIZATION, 182 182 PJSIP_H_CALL_ID, 183 PJSIP_H_CALL_INFO_UNIMP, 183 PJSIP_H_CALL_INFO_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 184 184 PJSIP_H_CONTACT, 185 PJSIP_H_CONTENT_DISPOSITION_UNIMP, 186 PJSIP_H_CONTENT_ENCODING_UNIMP, 187 PJSIP_H_CONTENT_LANGUAGE_UNIMP, 185 PJSIP_H_CONTENT_DISPOSITION_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 186 PJSIP_H_CONTENT_ENCODING_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 187 PJSIP_H_CONTENT_LANGUAGE_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 188 188 PJSIP_H_CONTENT_LENGTH, 189 189 PJSIP_H_CONTENT_TYPE, 190 190 PJSIP_H_CSEQ, 191 PJSIP_H_DATE_UNIMP, 192 PJSIP_H_ERROR_INFO_UNIMP, 191 PJSIP_H_DATE_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 192 PJSIP_H_ERROR_INFO_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 193 193 PJSIP_H_EXPIRES, 194 194 PJSIP_H_FROM, 195 PJSIP_H_IN_REPLY_TO_UNIMP, 195 PJSIP_H_IN_REPLY_TO_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 196 196 PJSIP_H_MAX_FORWARDS, 197 PJSIP_H_MIME_VERSION_UNIMP, 197 PJSIP_H_MIME_VERSION_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 198 198 PJSIP_H_MIN_EXPIRES, 199 PJSIP_H_ORGANIZATION_UNIMP, 200 PJSIP_H_PRIORITY_UNIMP, 199 PJSIP_H_ORGANIZATION_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 200 PJSIP_H_PRIORITY_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 201 201 PJSIP_H_PROXY_AUTHENTICATE, 202 202 PJSIP_H_PROXY_AUTHORIZATION, 203 PJSIP_H_PROXY_REQUIRE_UNIMP, 203 PJSIP_H_PROXY_REQUIRE_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 204 204 PJSIP_H_RECORD_ROUTE, 205 PJSIP_H_REPLY_TO_UNIMP, 205 PJSIP_H_REPLY_TO_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 206 206 PJSIP_H_REQUIRE, 207 207 PJSIP_H_RETRY_AFTER, 208 208 PJSIP_H_ROUTE, 209 PJSIP_H_SERVER_UNIMP, 210 PJSIP_H_SUBJECT_UNIMP, 209 PJSIP_H_SERVER_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 210 PJSIP_H_SUBJECT_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 211 211 PJSIP_H_SUPPORTED, 212 PJSIP_H_TIMESTAMP_UNIMP, 212 PJSIP_H_TIMESTAMP_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 213 213 PJSIP_H_TO, 214 214 PJSIP_H_UNSUPPORTED, 215 PJSIP_H_USER_AGENT_UNIMP, 215 PJSIP_H_USER_AGENT_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 216 216 PJSIP_H_VIA, 217 PJSIP_H_WARNING_UNIMP, 217 PJSIP_H_WARNING_UNIMP, /* N/A, use pjsip_generic_string_hdr */ 218 218 PJSIP_H_WWW_AUTHENTICATE, 219 219 … … 749 749 char *buf, pj_size_t size); 750 750 751 752 /* 753 * Some usefull macros to find common headers. 754 */ 755 756 757 /** 758 * Find Call-ID header. 759 * 760 * @param msg The message. 761 * @return Call-ID header instance. 762 */ 763 #define PJSIP_MSG_CID_HDR(msg) \ 764 ((pjsip_cid_hdr*)pjsip_msg_find_hdr(msg, PJSIP_H_CALL_ID, NULL)) 765 766 /** 767 * Find CSeq header. 768 * 769 * @param msg The message. 770 * @return CSeq header instance. 771 */ 772 #define PJSIP_MSG_CSEQ_HDR(msg) \ 773 ((pjsip_cseq_hdr*)pjsip_msg_find_hdr(msg, PJSIP_H_CSEQ, NULL)) 774 775 /** 776 * Find From header. 777 * 778 * @param msg The message. 779 * @return From header instance. 780 */ 781 #define PJSIP_MSG_FROM_HDR(msg) \ 782 ((pjsip_from_hdr*)pjsip_msg_find_hdr(msg, PJSIP_H_FROM, NULL)) 783 784 /** 785 * Find To header. 786 * 787 * @param msg The message. 788 * @return To header instance. 789 */ 790 #define PJSIP_MSG_TO_HDR(msg) \ 791 ((pjsip_to_hdr*)pjsip_msg_find_hdr(msg, PJSIP_H_TO, NULL)) 792 793 751 794 /** 752 795 * @} … … 767 810 typedef struct pjsip_generic_string_hdr 768 811 { 769 PJSIP_DECL_HDR_MEMBER(struct pjsip_generic_string_hdr); /**< Standard header field. */ 770 pj_str_t hvalue; /**< hvalue */ 812 /** Standard header field. */ 813 PJSIP_DECL_HDR_MEMBER(struct pjsip_generic_string_hdr); 814 /** hvalue */ 815 pj_str_t hvalue; 771 816 } pjsip_generic_string_hdr; 772 817 … … 779 824 * @param hname The header name to be assigned to the header, or NULL to 780 825 * assign the header name with some string. 826 * @param hvalue Optional string to be assigned as the value. 781 827 * 782 828 * @return The header, or THROW exception. 783 829 */ 784 PJ_DECL(pjsip_generic_string_hdr*) pjsip_generic_string_hdr_create( pj_pool_t *pool,785 const pj_str_t *hname );786 787 /**788 * Create a generic header along with the text content.789 *790 * @param pool The pool.791 * @param hname The header name.792 * @param hvalue The header text content.793 *794 * @return The header instance.795 */796 830 PJ_DECL(pjsip_generic_string_hdr*) 797 pjsip_generic_string_hdr_create_with_text( pj_pool_t *pool, 798 const pj_str_t *hname, 799 const pj_str_t *hvalue); 831 pjsip_generic_string_hdr_create( pj_pool_t *pool, 832 const pj_str_t *hname, 833 const pj_str_t *hvalue); 834 835 /** 836 * Initialize a preallocated memory with the header structure. This function 837 * should only be called when application uses its own memory allocation to 838 * allocate memory block for the specified header (e.g. in C++, when the 839 * header is allocated with "new" operator). 840 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 841 * which allocates memory and initialize it in one go. 842 * 843 * @param pool Pool for additional memory allocation if required. 844 * @param mem Pre-allocated memory to be initialized as the header. 845 * @param hname The header name to be assigned to the header, or NULL to 846 * assign the header name with some string later. 847 * @param hvalue Optional string to be assigned as the value. 848 * 849 * @return The header instance, which points to the same memory 850 * location as the mem argument. 851 */ 852 PJ_DECL(pjsip_generic_string_hdr*) 853 pjsip_generic_string_hdr_init( pj_pool_t *pool, 854 void *mem, 855 const pj_str_t *hname, 856 const pj_str_t *hvalue); 857 800 858 801 859 /** … … 828 886 * @param hname The header name to be assigned to the header, or NULL to 829 887 * assign the header name with some string. 888 * @param hvalue The value to be assigned to the header. 830 889 * 831 890 * @return The header, or THROW exception. 832 891 */ 833 PJ_DECL(pjsip_generic_int_hdr*) pjsip_generic_int_hdr_create( pj_pool_t *pool, 834 const pj_str_t *hname ); 835 836 /** 837 * Create a generic header along with the value. 838 * 839 * @param pool The pool. 840 * @param hname The header name. 841 * @param value The header value content. 842 * 843 * @return The header instance. 844 */ 845 PJ_DECL(pjsip_generic_int_hdr*) 846 pjsip_generic_int_hdr_create_with_value( pj_pool_t *pool, 847 const pj_str_t *hname, 848 int value); 892 PJ_DECL(pjsip_generic_int_hdr*) pjsip_generic_int_hdr_create( pj_pool_t *pool, 893 const pj_str_t *hname, 894 int hvalue ); 895 896 897 /** 898 * Initialize a preallocated memory with the header structure. This function 899 * should only be called when application uses its own memory allocation to 900 * allocate memory block for the specified header (e.g. in C++, when the 901 * header is allocated with "new" operator). 902 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 903 * which allocates memory and initialize it in one go. 904 * 905 * @param pool Pool for additional memory allocation if required. 906 * @param mem Pre-allocated memory to be initialized as the header. 907 * @param hname The header name to be assigned to the header, or NULL to 908 * assign the header name with some string later. 909 * @param value Value to be assigned to the header. 910 * 911 * @return The header instance, which points to the same memory 912 * location as the mem argument. 913 */ 914 PJ_DECL(pjsip_generic_int_hdr*) pjsip_generic_int_hdr_init( pj_pool_t *pool, 915 void *mem, 916 const pj_str_t *hname, 917 int value ); 849 918 850 919 /** … … 874 943 * 875 944 * @param pool Pool to allocate memory from. 945 * @param hname Header name. 876 946 * 877 947 * @return New generic array header. 878 948 */ 879 PJ_DECL(pjsip_generic_array_hdr*) pjsip_generic_array_create(pj_pool_t *pool, 880 const pj_str_t *hnames); 949 PJ_DECL(pjsip_generic_array_hdr*) pjsip_generic_array_hdr_create(pj_pool_t *pool, 950 const pj_str_t *hname); 951 952 /** 953 * Initialize a preallocated memory with the header structure. This function 954 * should only be called when application uses its own memory allocation to 955 * allocate memory block for the specified header (e.g. in C++, when the 956 * header is allocated with "new" operator). 957 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 958 * which allocates memory and initialize it in one go. 959 * 960 * @param pool Pool for additional memory allocation if required. 961 * @param mem Pre-allocated memory to be initialized as the header. 962 * @param hname The header name to be assigned to the header, or NULL to 963 * assign the header name with some string later. 964 * 965 * @return The header instance, which points to the same memory 966 * location as the mem argument. 967 */ 968 PJ_DECL(pjsip_generic_array_hdr*) pjsip_generic_array_hdr_init(pj_pool_t *pool, 969 void *mem, 970 const pj_str_t *hname); 971 881 972 882 973 /** … … 906 997 PJ_DECL(pjsip_accept_hdr*) pjsip_accept_hdr_create(pj_pool_t *pool); 907 998 999 /** 1000 * Initialize a preallocated memory with the header structure. This function 1001 * should only be called when application uses its own memory allocation to 1002 * allocate memory block for the specified header (e.g. in C++, when the 1003 * header is allocated with "new" operator). 1004 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 1005 * which allocates memory and initialize it in one go. 1006 * 1007 * @param pool Pool for additional memory allocation if required. 1008 * @param mem Pre-allocated memory to be initialized as the header. 1009 * 1010 * @return The header instance, which points to the same memory 1011 * location as the mem argument. 1012 */ 1013 PJ_DECL(pjsip_accept_hdr*) pjsip_accept_hdr_init( pj_pool_t *pool, 1014 void *mem ); 908 1015 909 1016 /** … … 929 1036 PJ_DECL(pjsip_allow_hdr*) pjsip_allow_hdr_create(pj_pool_t *pool); 930 1037 1038 1039 1040 /** 1041 * Initialize a preallocated memory with the header structure. This function 1042 * should only be called when application uses its own memory allocation to 1043 * allocate memory block for the specified header (e.g. in C++, when the 1044 * header is allocated with "new" operator). 1045 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 1046 * which allocates memory and initialize it in one go. 1047 * 1048 * @param pool Pool for additional memory allocation if required. 1049 * @param mem Pre-allocated memory to be initialized as the header. 1050 * 1051 * @return The header instance, which points to the same memory 1052 * location as the mem argument. 1053 */ 1054 PJ_DECL(pjsip_allow_hdr*) pjsip_allow_hdr_init( pj_pool_t *pool, 1055 void *mem ); 931 1056 932 1057 /** … … 962 1087 963 1088 /** 1089 * Initialize a preallocated memory with the header structure. This function 1090 * should only be called when application uses its own memory allocation to 1091 * allocate memory block for the specified header (e.g. in C++, when the 1092 * header is allocated with "new" operator). 1093 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 1094 * which allocates memory and initialize it in one go. 1095 * 1096 * @param pool Pool for additional memory allocation if required. 1097 * @param mem Pre-allocated memory to be initialized as the header. 1098 * 1099 * @return The header instance, which points to the same memory 1100 * location as the mem argument. 1101 */ 1102 PJ_DECL(pjsip_cid_hdr*) pjsip_cid_hdr_init( pj_pool_t *pool, 1103 void *mem ); 1104 1105 1106 /** 964 1107 * @} 965 1108 */ … … 988 1131 */ 989 1132 PJ_DECL(pjsip_clen_hdr*) pjsip_clen_hdr_create( pj_pool_t *pool ); 1133 1134 /** 1135 * Initialize a preallocated memory with the header structure. This function 1136 * should only be called when application uses its own memory allocation to 1137 * allocate memory block for the specified header (e.g. in C++, when the 1138 * header is allocated with "new" operator). 1139 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 1140 * which allocates memory and initialize it in one go. 1141 * 1142 * @param pool Pool for additional memory allocation if required. 1143 * @param mem Pre-allocated memory to be initialized as the header. 1144 * 1145 * @return The header instance, which points to the same memory 1146 * location as the mem argument. 1147 */ 1148 PJ_DECL(pjsip_clen_hdr*) pjsip_clen_hdr_init( pj_pool_t *pool, 1149 void *mem ); 1150 990 1151 991 1152 /** … … 1017 1178 */ 1018 1179 PJ_DECL(pjsip_cseq_hdr*) pjsip_cseq_hdr_create( pj_pool_t *pool ); 1180 1181 /** 1182 * Initialize a preallocated memory with the header structure. This function 1183 * should only be called when application uses its own memory allocation to 1184 * allocate memory block for the specified header (e.g. in C++, when the 1185 * header is allocated with "new" operator). 1186 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 1187 * which allocates memory and initialize it in one go. 1188 * 1189 * @param pool Pool for additional memory allocation if required. 1190 * @param mem Pre-allocated memory to be initialized as the header. 1191 * 1192 * @return The header instance, which points to the same memory 1193 * location as the mem argument. 1194 */ 1195 PJ_DECL(pjsip_cseq_hdr*) pjsip_cseq_hdr_init( pj_pool_t *pool, 1196 void *mem ); 1019 1197 1020 1198 /** … … 1055 1233 1056 1234 /** 1235 * Initialize a preallocated memory with the header structure. This function 1236 * should only be called when application uses its own memory allocation to 1237 * allocate memory block for the specified header (e.g. in C++, when the 1238 * header is allocated with "new" operator). 1239 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 1240 * which allocates memory and initialize it in one go. 1241 * 1242 * @param pool Pool for additional memory allocation if required. 1243 * @param mem Pre-allocated memory to be initialized as the header. 1244 * 1245 * @return The header instance, which points to the same memory 1246 * location as the mem argument. 1247 */ 1248 PJ_DECL(pjsip_contact_hdr*) pjsip_contact_hdr_init( pj_pool_t *pool, 1249 void *mem ); 1250 1251 /** 1057 1252 * @} 1058 1253 */ … … 1084 1279 1085 1280 /** 1281 * Initialize a preallocated memory with the header structure. This function 1282 * should only be called when application uses its own memory allocation to 1283 * allocate memory block for the specified header (e.g. in C++, when the 1284 * header is allocated with "new" operator). 1285 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 1286 * which allocates memory and initialize it in one go. 1287 * 1288 * @param pool Pool for additional memory allocation if required. 1289 * @param mem Pre-allocated memory to be initialized as the header. 1290 * 1291 * @return The header instance, which points to the same memory 1292 * location as the mem argument. 1293 */ 1294 PJ_DECL(pjsip_ctype_hdr*) pjsip_ctype_hdr_init( pj_pool_t *pool, 1295 void *mem ); 1296 1297 /** 1086 1298 * @} 1087 1299 */ … … 1100 1312 * Create a new Expires header. 1101 1313 * 1102 * @param pool The pool. 1103 * @return A new Expires header. 1104 */ 1105 PJ_DECL(pjsip_expires_hdr*) pjsip_expires_hdr_create( pj_pool_t *pool ); 1314 * @param pool The pool. 1315 * @param value The expiration value. 1316 * 1317 * @return A new Expires header. 1318 */ 1319 PJ_DECL(pjsip_expires_hdr*) pjsip_expires_hdr_create( pj_pool_t *pool, 1320 int value); 1321 1322 /** 1323 * Initialize a preallocated memory with the header structure. This function 1324 * should only be called when application uses its own memory allocation to 1325 * allocate memory block for the specified header (e.g. in C++, when the 1326 * header is allocated with "new" operator). 1327 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 1328 * which allocates memory and initialize it in one go. 1329 * 1330 * @param pool Pool for additional memory allocation if required. 1331 * @param mem Pre-allocated memory to be initialized as the header. 1332 * @param value The expiration value. 1333 * 1334 * @return The header instance, which points to the same memory 1335 * location as the mem argument. 1336 */ 1337 PJ_DECL(pjsip_expires_hdr*) pjsip_expires_hdr_init( pj_pool_t *pool, 1338 void *mem, 1339 int value ); 1340 1106 1341 1107 1342 /** … … 1142 1377 1143 1378 /** 1379 * Initialize a preallocated memory with the header structure. This function 1380 * should only be called when application uses its own memory allocation to 1381 * allocate memory block for the specified header (e.g. in C++, when the 1382 * header is allocated with "new" operator). 1383 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 1384 * which allocates memory and initialize it in one go. 1385 * 1386 * @param pool Pool for additional memory allocation if required. 1387 * @param mem Pre-allocated memory to be initialized as the header. 1388 * 1389 * @return The header instance, which points to the same memory 1390 * location as the mem argument. 1391 */ 1392 PJ_DECL(pjsip_from_hdr*) pjsip_from_hdr_init( pj_pool_t *pool, 1393 void *mem ); 1394 1395 /** 1144 1396 * Create a To header. 1145 1397 * … … 1150 1402 1151 1403 /** 1404 * Initialize a preallocated memory with the header structure. This function 1405 * should only be called when application uses its own memory allocation to 1406 * allocate memory block for the specified header (e.g. in C++, when the 1407 * header is allocated with "new" operator). 1408 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 1409 * which allocates memory and initialize it in one go. 1410 * 1411 * @param pool Pool for additional memory allocation if required. 1412 * @param mem Pre-allocated memory to be initialized as the header. 1413 * 1414 * @return The header instance, which points to the same memory 1415 * location as the mem argument. 1416 */ 1417 PJ_DECL(pjsip_to_hdr*) pjsip_to_hdr_init( pj_pool_t *pool, 1418 void *mem ); 1419 1420 /** 1152 1421 * Convert the header to a From header. 1153 1422 * … … 1155 1424 * @return "From" header. 1156 1425 */ 1157 PJ_DECL(pjsip_from_hdr*) pjsip_fromto_ set_from( pjsip_fromto_hdr *hdr );1426 PJ_DECL(pjsip_from_hdr*) pjsip_fromto_hdr_set_from( pjsip_fromto_hdr *hdr ); 1158 1427 1159 1428 /** … … 1163 1432 * @return "To" header. 1164 1433 */ 1165 PJ_DECL(pjsip_to_hdr*) pjsip_fromto_ set_to( pjsip_fromto_hdr *hdr );1434 PJ_DECL(pjsip_to_hdr*) pjsip_fromto_hdr_set_to( pjsip_fromto_hdr *hdr ); 1166 1435 1167 1436 /** … … 1177 1446 * @{ 1178 1447 */ 1179 typedef pjsip_generic_int_hdr pjsip_max_f orwards_hdr;1448 typedef pjsip_generic_int_hdr pjsip_max_fwd_hdr; 1180 1449 1181 1450 /** … … 1183 1452 * 1184 1453 * @param pool The pool. 1454 * @param value The Max-Forwards value. 1185 1455 * 1186 1456 * @return New Max-Forwards header instance. 1187 1457 */ 1188 PJ_DECL(pjsip_max_forwards_hdr*) pjsip_max_forwards_hdr_create(pj_pool_t *pool); 1189 1458 PJ_DECL(pjsip_max_fwd_hdr*) 1459 pjsip_max_fwd_hdr_create(pj_pool_t *pool, int value); 1460 1461 1462 /** 1463 * Initialize a preallocated memory with the header structure. This function 1464 * should only be called when application uses its own memory allocation to 1465 * allocate memory block for the specified header (e.g. in C++, when the 1466 * header is allocated with "new" operator). 1467 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 1468 * which allocates memory and initialize it in one go. 1469 * 1470 * @param pool Pool for additional memory allocation if required. 1471 * @param mem Pre-allocated memory to be initialized as the header. 1472 * @param value The Max-Forwards value. 1473 * 1474 * @return The header instance, which points to the same memory 1475 * location as the mem argument. 1476 */ 1477 PJ_DECL(pjsip_max_fwd_hdr*) 1478 pjsip_max_fwd_hdr_init( pj_pool_t *pool, void *mem, int value ); 1190 1479 1191 1480 /** … … 1204 1493 1205 1494 /** 1206 * Create new M ax-Forwards header instance.1495 * Create new Min-Expires header instance. 1207 1496 * 1208 1497 * @param pool The pool. 1209 * 1210 * @return New Max-Forwards header instance. 1211 */ 1212 PJ_DECL(pjsip_min_expires_hdr*) pjsip_min_expires_hdr_create(pj_pool_t *pool); 1213 1498 * @param value The Min-Expires value. 1499 * 1500 * @return New Min-Expires header instance. 1501 */ 1502 PJ_DECL(pjsip_min_expires_hdr*) pjsip_min_expires_hdr_create(pj_pool_t *pool, 1503 int value); 1504 1505 1506 /** 1507 * Initialize a preallocated memory with the header structure. This function 1508 * should only be called when application uses its own memory allocation to 1509 * allocate memory block for the specified header (e.g. in C++, when the 1510 * header is allocated with "new" operator). 1511 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 1512 * which allocates memory and initialize it in one go. 1513 * 1514 * @param pool Pool for additional memory allocation if required. 1515 * @param mem Pre-allocated memory to be initialized as the header. 1516 * @param value The Min-Expires value. 1517 * 1518 * @return The header instance, which points to the same memory 1519 * location as the mem argument. 1520 */ 1521 PJ_DECL(pjsip_min_expires_hdr*) pjsip_min_expires_hdr_init( pj_pool_t *pool, 1522 void *mem, 1523 int value ); 1214 1524 1215 1525 /** … … 1250 1560 PJ_DECL(pjsip_rr_hdr*) pjsip_rr_hdr_create( pj_pool_t *pool ); 1251 1561 1562 /** 1563 * Initialize a preallocated memory with the header structure. This function 1564 * should only be called when application uses its own memory allocation to 1565 * allocate memory block for the specified header (e.g. in C++, when the 1566 * header is allocated with "new" operator). 1567 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 1568 * which allocates memory and initialize it in one go. 1569 * 1570 * @param pool Pool for additional memory allocation if required. 1571 * @param mem Pre-allocated memory to be initialized as the header. 1572 * 1573 * @return The header instance, which points to the same memory 1574 * location as the mem argument. 1575 */ 1576 PJ_DECL(pjsip_rr_hdr*) pjsip_rr_hdr_init( pj_pool_t *pool, 1577 void *mem ); 1578 1252 1579 /** 1253 1580 * Create new Route header from the pool. … … 1258 1585 PJ_DECL(pjsip_route_hdr*) pjsip_route_hdr_create( pj_pool_t *pool ); 1259 1586 1587 /** 1588 * Initialize a preallocated memory with the header structure. This function 1589 * should only be called when application uses its own memory allocation to 1590 * allocate memory block for the specified header (e.g. in C++, when the 1591 * header is allocated with "new" operator). 1592 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 1593 * which allocates memory and initialize it in one go. 1594 * 1595 * @param pool Pool for additional memory allocation if required. 1596 * @param mem Pre-allocated memory to be initialized as the header. 1597 * 1598 * @return The header instance, which points to the same memory 1599 * location as the mem argument. 1600 */ 1601 PJ_DECL(pjsip_route_hdr*) pjsip_route_hdr_init( pj_pool_t *pool, 1602 void *mem ); 1603 1260 1604 /** 1261 1605 * Convert generic routing header to Record-Route header. … … 1296 1640 PJ_DECL(pjsip_require_hdr*) pjsip_require_hdr_create(pj_pool_t *pool); 1297 1641 1642 /** 1643 * Initialize a preallocated memory with the header structure. This function 1644 * should only be called when application uses its own memory allocation to 1645 * allocate memory block for the specified header (e.g. in C++, when the 1646 * header is allocated with "new" operator). 1647 * For normal applications, they should use pjsip_xxx_hdr_create() instead, 1648 * which allocates memory and initialize it in one go. 1649 * 1650 * @param pool Pool for additional memory allocation if required. 1651 * @param mem Pre-allocated memory to be initialized as the header. 1652 * 1653 * @return The header instance, which points to the same memory 1654 * location as the mem argument. 1655 */ 1656 PJ_DECL(pjsip_require_hdr*) pjsip_require_hdr_init( pj_pool_t *pool, 1657 void *mem ); 1298 1658 1299 1659 /** … … 1315 1675 * 1316 1676 * @param pool The pool. 1677 * @param value The Retry-After value. 1317 1678 * 1318 1679 * @return New Retry-After header instance. 1319 1680 */ 1320 PJ_DECL(pjsip_retry_after_hdr*) pjsip_retry_after_hdr_create(pj_pool_t *pool); 1681 PJ_DECL(pjsip_retry_after_hdr*) pjsip_retry_after_hdr_create(pj_pool_t *pool, 1682 int value); 1683 1684 /** 1685 * Initialize a preallocated memory with the header structure. 1686 * 1687 * @param pool Pool for additional memory allocation if required. 1688 * @param mem Pre-allocated memory to be initialized as the header. 1689 * @param value The Retry-After value. 1690 * 1691 * @return The header instance, which points to the same memory 1692 * location as the mem argument. 1693 */ 1694 PJ_DECL(pjsip_retry_after_hdr*) pjsip_retry_after_hdr_init( pj_pool_t *pool, 1695 void *mem, 1696 int value ); 1321 1697 1322 1698 … … 1343 1719 PJ_DECL(pjsip_supported_hdr*) pjsip_supported_hdr_create(pj_pool_t *pool); 1344 1720 1721 /** 1722 * Initialize a preallocated memory with the header structure. 1723 * 1724 * @param pool Pool for additional memory allocation if required. 1725 * @param mem Pre-allocated memory to be initialized as the header. 1726 * 1727 * @return The header instance, which points to the same memory 1728 * location as the mem argument. 1729 */ 1730 PJ_DECL(pjsip_supported_hdr*) pjsip_supported_hdr_init( pj_pool_t *pool, 1731 void *mem ); 1345 1732 1346 1733 /** … … 1366 1753 PJ_DECL(pjsip_unsupported_hdr*) pjsip_unsupported_hdr_create(pj_pool_t *pool); 1367 1754 1755 /** 1756 * Initialize a preallocated memory with the header structure. 1757 * 1758 * @param pool Pool for additional memory allocation if required. 1759 * @param mem Pre-allocated memory to be initialized as the header. 1760 * 1761 * @return The header instance, which points to the same memory 1762 * location as the mem argument. 1763 */ 1764 PJ_DECL(pjsip_unsupported_hdr*) pjsip_unsupported_hdr_init( pj_pool_t *pool, 1765 void *mem ); 1368 1766 1369 1767 /** … … 1409 1807 1410 1808 /** 1809 * Initialize a preallocated memory with the header structure. 1810 * 1811 * @param pool Pool for additional memory allocation if required. 1812 * @param mem Pre-allocated memory to be initialized as the header. 1813 * 1814 * @return The header instance, which points to the same memory 1815 * location as the mem argument. 1816 */ 1817 PJ_DECL(pjsip_via_hdr*) pjsip_via_hdr_init( pj_pool_t *pool, 1818 void *mem ); 1819 1820 /** 1411 1821 * @} 1412 1822 */
Note: See TracChangeset
for help on using the changeset viewer.