You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

4059 lines
159 KiB

  1. /*
  2. * Library to access the Personal Folder File (PAB, PST and OST) format
  3. *
  4. * Copyright (C) 2008-2019, Joachim Metz <joachim.metz@gmail.com>
  5. *
  6. * Refer to AUTHORS for acknowledgements.
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU Lesser General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. */
  21. #if !defined( _LIBPFF_H )
  22. #define _LIBPFF_H
  23. #include <libpff/codepage.h>
  24. #include <libpff/definitions.h>
  25. #include <libpff/error.h>
  26. #include <libpff/extern.h>
  27. #include <libpff/features.h>
  28. #include <libpff/mapi.h>
  29. #include <libpff/types.h>
  30. #include <stdio.h>
  31. #if defined( LIBPFF_HAVE_BFIO )
  32. #include <libbfio.h>
  33. #endif
  34. #if defined( __cplusplus )
  35. extern "C" {
  36. #endif
  37. /* -------------------------------------------------------------------------
  38. * Support functions
  39. * ------------------------------------------------------------------------- */
  40. /* Returns the library version
  41. */
  42. LIBPFF_EXTERN \
  43. const char *libpff_get_version(
  44. void );
  45. /* Returns the access flags for reading
  46. */
  47. LIBPFF_EXTERN \
  48. int libpff_get_access_flags_read(
  49. void );
  50. /* Retrieves the narrow system string codepage
  51. * A value of 0 represents no codepage, UTF-8 encoding is used instead
  52. * Returns 1 if successful or -1 on error
  53. */
  54. LIBPFF_EXTERN \
  55. int libpff_get_codepage(
  56. int *codepage,
  57. libpff_error_t **error );
  58. /* Sets the narrow system string codepage
  59. * A value of 0 represents no codepage, UTF-8 encoding is used instead
  60. * Returns 1 if successful or -1 on error
  61. */
  62. LIBPFF_EXTERN \
  63. int libpff_set_codepage(
  64. int codepage,
  65. libpff_error_t **error );
  66. /* Determines if a file contains a PFF file signature
  67. * Returns 1 if true, 0 if not or -1 on error
  68. */
  69. LIBPFF_EXTERN \
  70. int libpff_check_file_signature(
  71. const char *filename,
  72. libpff_error_t **error );
  73. #if defined( LIBPFF_HAVE_WIDE_CHARACTER_TYPE )
  74. /* Determines if a file contains a PFF file signature
  75. * Returns 1 if true, 0 if not or -1 on error
  76. */
  77. LIBPFF_EXTERN \
  78. int libpff_check_file_signature_wide(
  79. const wchar_t *filename,
  80. libpff_error_t **error );
  81. #endif /* defined( LIBPFF_HAVE_WIDE_CHARACTER_TYPE ) */
  82. #if defined( LIBPFF_HAVE_BFIO )
  83. /* Determines if a file contains a PFF file signature using a Basic File IO (bfio) handle
  84. * Returns 1 if true, 0 if not or -1 on error
  85. */
  86. LIBPFF_EXTERN \
  87. int libpff_check_file_signature_file_io_handle(
  88. libbfio_handle_t *file_io_handle,
  89. libpff_error_t **error );
  90. #endif /* defined( LIBPFF_HAVE_BFIO ) */
  91. /* -------------------------------------------------------------------------
  92. * Notify functions
  93. * ------------------------------------------------------------------------- */
  94. /* Sets the verbose notification
  95. */
  96. LIBPFF_EXTERN \
  97. void libpff_notify_set_verbose(
  98. int verbose );
  99. /* Sets the notification stream
  100. * Returns 1 if successful or -1 on error
  101. */
  102. LIBPFF_EXTERN \
  103. int libpff_notify_set_stream(
  104. FILE *stream,
  105. libpff_error_t **error );
  106. /* Opens the notification stream using a filename
  107. * The stream is opened in append mode
  108. * Returns 1 if successful or -1 on error
  109. */
  110. LIBPFF_EXTERN \
  111. int libpff_notify_stream_open(
  112. const char *filename,
  113. libpff_error_t **error );
  114. /* Closes the notification stream if opened using a filename
  115. * Returns 0 if successful or -1 on error
  116. */
  117. LIBPFF_EXTERN \
  118. int libpff_notify_stream_close(
  119. libpff_error_t **error );
  120. /* -------------------------------------------------------------------------
  121. * Error functions
  122. * ------------------------------------------------------------------------- */
  123. /* Frees an error
  124. */
  125. LIBPFF_EXTERN \
  126. void libpff_error_free(
  127. libpff_error_t **error );
  128. /* Prints a descriptive string of the error to the stream
  129. * Returns the number of printed characters if successful or -1 on error
  130. */
  131. LIBPFF_EXTERN \
  132. int libpff_error_fprint(
  133. libpff_error_t *error,
  134. FILE *stream );
  135. /* Prints a descriptive string of the error to the string
  136. * The end-of-string character is not included in the return value
  137. * Returns the number of printed characters if successful or -1 on error
  138. */
  139. LIBPFF_EXTERN \
  140. int libpff_error_sprint(
  141. libpff_error_t *error,
  142. char *string,
  143. size_t size );
  144. /* Prints a backtrace of the error to the stream
  145. * Returns the number of printed characters if successful or -1 on error
  146. */
  147. LIBPFF_EXTERN \
  148. int libpff_error_backtrace_fprint(
  149. libpff_error_t *error,
  150. FILE *stream );
  151. /* Prints a backtrace of the error to the string
  152. * The end-of-string character is not included in the return value
  153. * Returns the number of printed characters if successful or -1 on error
  154. */
  155. LIBPFF_EXTERN \
  156. int libpff_error_backtrace_sprint(
  157. libpff_error_t *error,
  158. char *string,
  159. size_t size );
  160. /* -------------------------------------------------------------------------
  161. * File functions
  162. * ------------------------------------------------------------------------- */
  163. /* Creates a file
  164. * Make sure the value file is referencing, is set to NULL
  165. * Returns 1 if successful or -1 on error
  166. */
  167. LIBPFF_EXTERN \
  168. int libpff_file_initialize(
  169. libpff_file_t **file,
  170. libpff_error_t **error );
  171. /* Frees a file
  172. * Returns 1 if successful or -1 on error
  173. */
  174. LIBPFF_EXTERN \
  175. int libpff_file_free(
  176. libpff_file_t **file,
  177. libpff_error_t **error );
  178. /* Signals the file to abort its current activity
  179. * Returns 1 if successful or -1 on error
  180. */
  181. LIBPFF_EXTERN \
  182. int libpff_file_signal_abort(
  183. libpff_file_t *file,
  184. libpff_error_t **error );
  185. /* Opens a file
  186. * Returns 1 if successful or -1 on error
  187. */
  188. LIBPFF_EXTERN \
  189. int libpff_file_open(
  190. libpff_file_t *file,
  191. const char *filename,
  192. int access_flags,
  193. libpff_error_t **error );
  194. #if defined( LIBPFF_HAVE_WIDE_CHARACTER_TYPE )
  195. /* Opens a file
  196. * Returns 1 if successful or -1 on error
  197. */
  198. LIBPFF_EXTERN \
  199. int libpff_file_open_wide(
  200. libpff_file_t *file,
  201. const wchar_t *filename,
  202. int access_flags,
  203. libpff_error_t **error );
  204. #endif /* defined( LIBPFF_HAVE_WIDE_CHARACTER_TYPE ) */
  205. #if defined( LIBPFF_HAVE_BFIO )
  206. /* Opens a file using a Basic File IO (bfio) handle
  207. * Returns 1 if successful or -1 on error
  208. */
  209. LIBPFF_EXTERN \
  210. int libpff_file_open_file_io_handle(
  211. libpff_file_t *file,
  212. libbfio_handle_t *file_io_handle,
  213. int access_flags,
  214. libpff_error_t **error );
  215. #endif /* defined( LIBPFF_HAVE_BFIO ) */
  216. /* Closes a file
  217. * Returns 0 if successful or -1 on error
  218. */
  219. LIBPFF_EXTERN \
  220. int libpff_file_close(
  221. libpff_file_t *file,
  222. libpff_error_t **error );
  223. /* Determine if the file corrupted
  224. * Returns 1 if corrupted, 0 if not or -1 on error
  225. */
  226. LIBPFF_EXTERN \
  227. int libpff_file_is_corrupted(
  228. libpff_file_t *file,
  229. libpff_error_t **error );
  230. /* Recovers deleted items within a file
  231. * By default only the unallocated space is checked for recoverable items
  232. * Returns 1 if successful or -1 on error
  233. */
  234. LIBPFF_EXTERN \
  235. int libpff_file_recover_items(
  236. libpff_file_t *file,
  237. uint8_t recovery_flags,
  238. libpff_error_t **error );
  239. /* Retrieves the file size
  240. * Returns 1 if successful, 0 if not available or -1 on error
  241. */
  242. LIBPFF_EXTERN \
  243. int libpff_file_get_size(
  244. libpff_file_t *file,
  245. size64_t *size,
  246. libpff_error_t **error );
  247. /* Retrieves the content type
  248. * Returns 1 if successful, 0 if not available or -1 on error
  249. */
  250. LIBPFF_EXTERN \
  251. int libpff_file_get_content_type(
  252. libpff_file_t *file,
  253. uint8_t *content_type,
  254. libpff_error_t **error );
  255. /* Retrieves the file type
  256. * Returns 1 if successful, 0 if not available or -1 on error
  257. */
  258. LIBPFF_EXTERN \
  259. int libpff_file_get_type(
  260. libpff_file_t *file,
  261. uint8_t *type,
  262. libpff_error_t **error );
  263. /* Retrieves the encryption type
  264. * Returns 1 if successful, 0 if not available or -1 on error
  265. */
  266. LIBPFF_EXTERN \
  267. int libpff_file_get_encryption_type(
  268. libpff_file_t *file,
  269. uint8_t *encryption_type,
  270. libpff_error_t **error );
  271. /* Retrieves the ASCII codepage
  272. * Returns 1 if successful or -1 on error
  273. */
  274. LIBPFF_EXTERN \
  275. int libpff_file_get_ascii_codepage(
  276. libpff_file_t *file,
  277. int *ascii_codepage,
  278. libpff_error_t **error );
  279. /* Sets the ASCII codepage
  280. * Returns 1 if successful or -1 on error
  281. */
  282. LIBPFF_EXTERN \
  283. int libpff_file_set_ascii_codepage(
  284. libpff_file_t *file,
  285. int ascii_codepage,
  286. libpff_error_t **error );
  287. /* Retrieves the number of unallocated blocks
  288. * Returns 1 if successful or -1 on error
  289. */
  290. LIBPFF_EXTERN \
  291. int libpff_file_get_number_of_unallocated_blocks(
  292. libpff_file_t *file,
  293. int unallocated_block_type,
  294. int *number_of_unallocated_blocks,
  295. libpff_error_t **error );
  296. /* Retrieves a specific unallocated block
  297. * Returns 1 if successful or -1 on error
  298. */
  299. LIBPFF_EXTERN \
  300. int libpff_file_get_unallocated_block(
  301. libpff_file_t *file,
  302. int unallocated_block_type,
  303. int unallocated_block_index,
  304. off64_t *offset,
  305. size64_t *size,
  306. libpff_error_t **error );
  307. /* Retrieves the root item
  308. * Returns 1 if successful or -1 on error
  309. */
  310. LIBPFF_EXTERN \
  311. int libpff_file_get_root_item(
  312. libpff_file_t *file,
  313. libpff_item_t **root_item,
  314. libpff_error_t **error );
  315. /* Retrieves the message store
  316. * Returns 1 if successful, 0 if not available or -1 on error
  317. */
  318. LIBPFF_EXTERN \
  319. int libpff_file_get_message_store(
  320. libpff_file_t *file,
  321. libpff_item_t **message_store,
  322. libpff_error_t **error );
  323. /* Retrieves the name to ID map
  324. * Returns 1 if successful, 0 if not available or -1 on error
  325. */
  326. LIBPFF_EXTERN \
  327. int libpff_file_get_name_to_id_map(
  328. libpff_file_t *file,
  329. libpff_item_t **name_to_id_map,
  330. libpff_error_t **error );
  331. /* Retrieves the root folder
  332. * Returns 1 if successful, 0 if not available or -1 on error
  333. */
  334. LIBPFF_EXTERN \
  335. int libpff_file_get_root_folder(
  336. libpff_file_t *file,
  337. libpff_item_t **root_folder,
  338. libpff_error_t **error );
  339. /* Retrieves an item for a specific identifier
  340. * Returns 1 if successful, 0 if not available or -1 on error
  341. */
  342. LIBPFF_EXTERN \
  343. int libpff_file_get_item_by_identifier(
  344. libpff_file_t *file,
  345. uint32_t item_identifier,
  346. libpff_item_t **item,
  347. libpff_error_t **error );
  348. /* Retrieves the number of orphan items
  349. * Returns 1 if successful or -1 on error
  350. */
  351. LIBPFF_EXTERN \
  352. int libpff_file_get_number_of_orphan_items(
  353. libpff_file_t *file,
  354. int *number_of_orphan_items,
  355. libpff_error_t **error );
  356. /* Retrieves a specific orphan item
  357. * Returns 1 if successful or -1 on error
  358. */
  359. LIBPFF_EXTERN \
  360. int libpff_file_get_orphan_item_by_index(
  361. libpff_file_t *file,
  362. int orphan_item_index,
  363. libpff_item_t **orphan_item,
  364. libpff_error_t **error );
  365. /* Retrieves the number of recovered items
  366. * Returns 1 if successful or -1 on error
  367. */
  368. LIBPFF_EXTERN \
  369. int libpff_file_get_number_of_recovered_items(
  370. libpff_file_t *file,
  371. int *number_of_recovered_items,
  372. libpff_error_t **error );
  373. /* Retrieves a specific recovered item
  374. * Returns 1 if successful or -1 on error
  375. */
  376. LIBPFF_EXTERN \
  377. int libpff_file_get_recovered_item_by_index(
  378. libpff_file_t *file,
  379. int recovered_item_index,
  380. libpff_item_t **recovered_item,
  381. libpff_error_t **error );
  382. /* -------------------------------------------------------------------------
  383. * File functions - deprecated
  384. * ------------------------------------------------------------------------- */
  385. /* Retrieves a specific orphan item
  386. *
  387. * This function deprecated use libpff_file_get_orphan_item_by_index instead
  388. *
  389. * Returns 1 if successful or -1 on error
  390. */
  391. LIBPFF_DEPRECATED \
  392. LIBPFF_EXTERN \
  393. int libpff_file_get_orphan_item(
  394. libpff_file_t *file,
  395. int orphan_item_index,
  396. libpff_item_t **orphan_item,
  397. libpff_error_t **error );
  398. /* Retrieves a specific recovered item
  399. *
  400. * This function deprecated use libpff_file_get_recovered_item_by_index instead
  401. *
  402. * Returns 1 if successful or -1 on error
  403. */
  404. LIBPFF_DEPRECATED \
  405. LIBPFF_EXTERN \
  406. int libpff_file_get_recovered_item(
  407. libpff_file_t *file,
  408. int recovered_item_index,
  409. libpff_item_t **recovered_item,
  410. libpff_error_t **error );
  411. /* -------------------------------------------------------------------------
  412. * Item functions
  413. * ------------------------------------------------------------------------- */
  414. /* Clones an item
  415. * Returns 1 if successful or -1 on error
  416. */
  417. LIBPFF_EXTERN \
  418. int libpff_item_clone(
  419. libpff_item_t **destination_item,
  420. libpff_item_t *source_item,
  421. libpff_error_t **error );
  422. /* Frees an item
  423. * Returns 1 if successful or -1 on error
  424. */
  425. LIBPFF_EXTERN \
  426. int libpff_item_free(
  427. libpff_item_t **item,
  428. libpff_error_t **error );
  429. /* Retrieves the identifier
  430. * Returns 1 if successful or -1 on error
  431. */
  432. LIBPFF_EXTERN \
  433. int libpff_item_get_identifier(
  434. libpff_item_t *item,
  435. uint32_t *identifier,
  436. libpff_error_t **error );
  437. /* Retrieves the number of record sets
  438. * Returns 1 if successful or -1 on error
  439. */
  440. LIBPFF_EXTERN \
  441. int libpff_item_get_number_of_record_sets(
  442. libpff_item_t *item,
  443. int *number_of_record_sets,
  444. libpff_error_t **error );
  445. /* Retrieves a specific record set
  446. * Returns 1 if successful or -1 on error
  447. */
  448. LIBPFF_EXTERN \
  449. int libpff_item_get_record_set_by_index(
  450. libpff_item_t *item,
  451. int record_set_index,
  452. libpff_record_set_t **record_set,
  453. libpff_error_t **error );
  454. /* Retrieves the number of entries (of a set)
  455. * All sets in an item contain the same number of entries
  456. * Returns 1 if successful or -1 on error
  457. */
  458. LIBPFF_EXTERN \
  459. int libpff_item_get_number_of_entries(
  460. libpff_item_t *item,
  461. uint32_t *number_of_entries,
  462. libpff_error_t **error );
  463. /* Retrieves the type value
  464. * Determines the item type if neccessary
  465. * Returns 1 if successful or -1 on error
  466. */
  467. LIBPFF_EXTERN \
  468. int libpff_item_get_type(
  469. libpff_item_t *item,
  470. uint8_t *item_type,
  471. libpff_error_t **error );
  472. /* Retrieves the number of sub items from a item
  473. * Returns 1 if successful or -1 on error
  474. */
  475. LIBPFF_EXTERN \
  476. int libpff_item_get_number_of_sub_items(
  477. libpff_item_t *item,
  478. int *number_of_sub_items,
  479. libpff_error_t **error );
  480. /* Retrieves the sub item for the specific index from a item
  481. * Returns 1 if successful or -1 on error
  482. */
  483. LIBPFF_EXTERN \
  484. int libpff_item_get_sub_item(
  485. libpff_item_t *item,
  486. int sub_item_index,
  487. libpff_item_t **sub_item,
  488. libpff_error_t **error );
  489. /* Retrieves the sub item for the specific identifier from a item
  490. * Returns 1 if successful, 0 if no such item, or -1 on error
  491. */
  492. LIBPFF_EXTERN \
  493. int libpff_item_get_sub_item_by_identifier(
  494. libpff_item_t *item,
  495. uint32_t sub_item_identifier,
  496. libpff_item_t **sub_item,
  497. libpff_error_t **error );
  498. /* -------------------------------------------------------------------------
  499. * Item functions - deprecated
  500. * ------------------------------------------------------------------------- */
  501. /* Retrieves the number of sets values
  502. *
  503. * This function deprecated use libpff_item_get_number_of_record_sets instead
  504. *
  505. * Returns 1 if successful or -1 on error
  506. */
  507. LIBPFF_DEPRECATED \
  508. LIBPFF_EXTERN \
  509. int libpff_item_get_number_of_sets(
  510. libpff_item_t *item,
  511. uint32_t *number_of_sets,
  512. libpff_error_t **error );
  513. /* Retrieves the entry and value type of a specific entry
  514. * The name to ID map entry is set when available
  515. *
  516. * This function deprecated use libpff_record_entry_get_entry_type instead
  517. *
  518. * Returns 1 if successful or -1 on error
  519. */
  520. LIBPFF_DEPRECATED \
  521. LIBPFF_EXTERN \
  522. int libpff_item_get_entry_type(
  523. libpff_item_t *item,
  524. int record_set_index,
  525. int record_entry_index,
  526. uint32_t *entry_type,
  527. uint32_t *value_type,
  528. libpff_name_to_id_map_entry_t **name_to_id_map_entry,
  529. libpff_error_t **error );
  530. /* Retrieves the value type of a specific entry type
  531. *
  532. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  533. * the name to identifier mapping is ignored. The default behavior is
  534. * the use the mapped entry value. In this case named properties are not
  535. * retrieved.
  536. *
  537. * This function deprecated use libpff_record_entry_get_value_type instead
  538. *
  539. * Returns 1 if successful, 0 if not available or -1 on error
  540. */
  541. LIBPFF_DEPRECATED \
  542. LIBPFF_EXTERN \
  543. int libpff_item_get_value_type(
  544. libpff_item_t *item,
  545. int record_set_index,
  546. uint32_t entry_type,
  547. uint32_t *value_type,
  548. uint8_t flags,
  549. libpff_error_t **error );
  550. /* Retrieves the value of a specific entry
  551. *
  552. * When the LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE is set
  553. * the value type is ignored and set. The default behavior is a strict
  554. * matching of the value type. In this case the value type must be filled
  555. * with the corresponding value type
  556. *
  557. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  558. * the name to identifier mapping is ignored. The default behavior is
  559. * the use the mapped entry value. In this case named properties are not
  560. * retrieved.
  561. *
  562. * This function deprecated use libpff_record_set_get_entry_by_type or libpff_record_entry_get_data instead
  563. *
  564. * Returns 1 if successful, 0 if not available or -1 on error
  565. */
  566. LIBPFF_DEPRECATED \
  567. LIBPFF_EXTERN \
  568. int libpff_item_get_entry_value(
  569. libpff_item_t *item,
  570. int record_set_index,
  571. uint32_t entry_type,
  572. uint32_t *value_type,
  573. uint8_t **value_data,
  574. size_t *value_data_size,
  575. uint8_t flags,
  576. libpff_error_t **error );
  577. /* Retrieves the value of a specific entry for an UTF-8 encoded name
  578. *
  579. * This function deprecated use libpff_record_set_get_entry_by_utf8_name instead
  580. *
  581. * Returns 1 if successful, 0 if not available or -1 on error
  582. */
  583. LIBPFF_DEPRECATED \
  584. LIBPFF_EXTERN \
  585. int libpff_item_get_entry_value_by_utf8_name(
  586. libpff_item_t *item,
  587. int record_set_index,
  588. uint8_t *utf8_entry_name,
  589. size_t utf8_entry_name_length,
  590. uint32_t *value_type,
  591. uint8_t **value_data,
  592. size_t *value_data_size,
  593. libpff_error_t **error );
  594. /* Retrieves the value of a specific entry for an UTF-16 encoded name
  595. *
  596. * This function deprecated use libpff_record_set_get_entry_by_utf16_name instead
  597. *
  598. * Returns 1 if successful, 0 if not available or -1 on error
  599. */
  600. LIBPFF_DEPRECATED \
  601. LIBPFF_EXTERN \
  602. int libpff_item_get_entry_value_by_utf16_name(
  603. libpff_item_t *item,
  604. int record_set_index,
  605. uint16_t *utf16_entry_name,
  606. size_t utf16_entry_name_length,
  607. uint32_t *value_type,
  608. uint8_t **value_data,
  609. size_t *value_data_size,
  610. libpff_error_t **error );
  611. /* Retrieves the boolean value of a specific entry
  612. *
  613. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  614. * the name to identifier mapping is ignored. The default behavior is
  615. * the use the mapped entry value. In this case named properties are not
  616. * retrieved.
  617. *
  618. * This function deprecated use libpff_record_entry_get_value_boolean instead
  619. *
  620. * Returns 1 if successful, 0 if not available or -1 on error
  621. */
  622. LIBPFF_DEPRECATED \
  623. LIBPFF_EXTERN \
  624. int libpff_item_get_entry_value_boolean(
  625. libpff_item_t *item,
  626. int record_set_index,
  627. uint32_t entry_type,
  628. uint8_t *entry_value,
  629. uint8_t flags,
  630. libpff_error_t **error );
  631. /* Retrieves the boolean value of a specific entry for an UTF-8 encoded name
  632. *
  633. * This function deprecated use libpff_record_entry_get_value_boolean instead
  634. *
  635. * Returns 1 if successful, 0 if not available or -1 on error
  636. */
  637. LIBPFF_DEPRECATED \
  638. LIBPFF_EXTERN \
  639. int libpff_item_get_entry_value_boolean_by_utf8_name(
  640. libpff_item_t *item,
  641. int record_set_index,
  642. uint8_t *utf8_entry_name,
  643. size_t utf8_entry_name_length,
  644. uint8_t *entry_value,
  645. libpff_error_t **error );
  646. /* Retrieves the boolean value of a specific entry for an UTF-16 encoded name
  647. *
  648. * This function deprecated use libpff_record_entry_get_value_boolean instead
  649. *
  650. * Returns 1 if successful, 0 if not available or -1 on error
  651. */
  652. LIBPFF_DEPRECATED \
  653. LIBPFF_EXTERN \
  654. int libpff_item_get_entry_value_boolean_by_utf16_name(
  655. libpff_item_t *item,
  656. int record_set_index,
  657. uint16_t *utf16_entry_name,
  658. size_t utf16_entry_name_length,
  659. uint8_t *entry_value,
  660. libpff_error_t **error );
  661. /* Retrieves the 16-bit value of a specific entry
  662. *
  663. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  664. * the name to identifier mapping is ignored. The default behavior is
  665. * the use the mapped entry value. In this case named properties are not
  666. * retrieved.
  667. *
  668. * This function deprecated use libpff_record_entry_get_value_16bit instead
  669. *
  670. * Returns 1 if successful, 0 if not available or -1 on error
  671. */
  672. LIBPFF_DEPRECATED \
  673. LIBPFF_EXTERN \
  674. int libpff_item_get_entry_value_16bit(
  675. libpff_item_t *item,
  676. int record_set_index,
  677. uint32_t entry_type,
  678. uint16_t *entry_value,
  679. uint8_t flags,
  680. libpff_error_t **error );
  681. /* Retrieves the 16-bit value of a specific entry for an UTF-8 encoded name
  682. *
  683. * This function deprecated use libpff_record_entry_get_value_16bit instead
  684. *
  685. * Returns 1 if successful, 0 if not available or -1 on error
  686. */
  687. LIBPFF_DEPRECATED \
  688. LIBPFF_EXTERN \
  689. int libpff_item_get_entry_value_16bit_by_utf8_name(
  690. libpff_item_t *item,
  691. int record_set_index,
  692. uint8_t *utf8_entry_name,
  693. size_t utf8_entry_name_length,
  694. uint16_t *entry_value,
  695. libpff_error_t **error );
  696. /* Retrieves the 16-bit value of a specific entry for an UTF-16 encoded name
  697. *
  698. * This function deprecated use libpff_record_entry_get_value_16bit instead
  699. *
  700. * Returns 1 if successful, 0 if not available or -1 on error
  701. */
  702. LIBPFF_DEPRECATED \
  703. LIBPFF_EXTERN \
  704. int libpff_item_get_entry_value_16bit_by_utf16_name(
  705. libpff_item_t *item,
  706. int record_set_index,
  707. uint16_t *utf16_entry_name,
  708. size_t utf16_entry_name_length,
  709. uint16_t *entry_value,
  710. libpff_error_t **error );
  711. /* Retrieves the 32-bit value of a specific entry
  712. *
  713. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  714. * the name to identifier mapping is ignored. The default behavior is
  715. * the use the mapped entry value. In this case named properties are not
  716. * retrieved.
  717. *
  718. * This function deprecated use libpff_record_entry_get_value_32bit instead
  719. *
  720. * Returns 1 if successful, 0 if not available or -1 on error
  721. */
  722. LIBPFF_DEPRECATED \
  723. LIBPFF_EXTERN \
  724. int libpff_item_get_entry_value_32bit(
  725. libpff_item_t *item,
  726. int record_set_index,
  727. uint32_t entry_type,
  728. uint32_t *entry_value,
  729. uint8_t flags,
  730. libpff_error_t **error );
  731. /* Retrieves the 32-bit value of a specific entry for an UTF-8 encoded name
  732. *
  733. * This function deprecated use libpff_record_entry_get_value_32bit instead
  734. *
  735. * Returns 1 if successful, 0 if not available or -1 on error
  736. */
  737. LIBPFF_DEPRECATED \
  738. LIBPFF_EXTERN \
  739. int libpff_item_get_entry_value_32bit_by_utf8_name(
  740. libpff_item_t *item,
  741. int record_set_index,
  742. uint8_t *utf8_entry_name,
  743. size_t utf8_entry_name_length,
  744. uint32_t *entry_value,
  745. libpff_error_t **error );
  746. /* Retrieves the 32-bit value of a specific entry for an UTF-16 encoded name
  747. *
  748. * This function deprecated use libpff_record_entry_get_value_32bit instead
  749. *
  750. * Returns 1 if successful, 0 if not available or -1 on error
  751. */
  752. LIBPFF_DEPRECATED \
  753. LIBPFF_EXTERN \
  754. int libpff_item_get_entry_value_32bit_by_utf16_name(
  755. libpff_item_t *item,
  756. int record_set_index,
  757. uint16_t *utf16_entry_name,
  758. size_t utf16_entry_name_length,
  759. uint32_t *entry_value,
  760. libpff_error_t **error );
  761. /* Retrieves the 64-bit value of a specific entry
  762. *
  763. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  764. * the name to identifier mapping is ignored. The default behavior is
  765. * the use the mapped entry value. In this case named properties are not
  766. * retrieved.
  767. *
  768. * This function deprecated use libpff_record_entry_get_value_64bit instead
  769. *
  770. * Returns 1 if successful, 0 if not available or -1 on error
  771. */
  772. LIBPFF_DEPRECATED \
  773. LIBPFF_EXTERN \
  774. int libpff_item_get_entry_value_64bit(
  775. libpff_item_t *item,
  776. int record_set_index,
  777. uint32_t entry_type,
  778. uint64_t *entry_value,
  779. uint8_t flags,
  780. libpff_error_t **error );
  781. /* Retrieves the 64-bit value of a specific entry for an UTF-8 encoded name
  782. *
  783. * This function deprecated use libpff_record_entry_get_value_64bit instead
  784. *
  785. * Returns 1 if successful, 0 if not available or -1 on error
  786. */
  787. LIBPFF_DEPRECATED \
  788. LIBPFF_EXTERN \
  789. int libpff_item_get_entry_value_64bit_by_utf8_name(
  790. libpff_item_t *item,
  791. int record_set_index,
  792. uint8_t *utf8_entry_name,
  793. size_t utf8_entry_name_length,
  794. uint64_t *entry_value,
  795. libpff_error_t **error );
  796. /* Retrieves the 64-bit value of a specific entry for an UTF-16 encoded name
  797. *
  798. * This function deprecated use libpff_record_entry_get_value_64bit instead
  799. *
  800. * Returns 1 if successful, 0 if not available or -1 on error
  801. */
  802. LIBPFF_DEPRECATED \
  803. LIBPFF_EXTERN \
  804. int libpff_item_get_entry_value_64bit_by_utf16_name(
  805. libpff_item_t *item,
  806. int record_set_index,
  807. uint16_t *utf16_entry_name,
  808. size_t utf16_entry_name_length,
  809. uint64_t *entry_value,
  810. libpff_error_t **error );
  811. /* Retrieves the 64-bit FILETIME value of a specific entry
  812. *
  813. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  814. * the name to identifier mapping is ignored. The default behavior is
  815. * the use the mapped entry value. In this case named properties are not
  816. * retrieved.
  817. *
  818. * This function deprecated use libpff_record_entry_get_value_filetime instead
  819. *
  820. * Returns 1 if successful, 0 if not available or -1 on error
  821. */
  822. LIBPFF_DEPRECATED \
  823. LIBPFF_EXTERN \
  824. int libpff_item_get_entry_value_filetime(
  825. libpff_item_t *item,
  826. int record_set_index,
  827. uint32_t entry_type,
  828. uint64_t *entry_value,
  829. uint8_t flags,
  830. libpff_error_t **error );
  831. /* Retrieves the 64-bit FILETIME value of a specific entry for an UTF-8 encoded name
  832. *
  833. * This function deprecated use libpff_record_entry_get_value_filetime instead
  834. *
  835. * Returns 1 if successful, 0 if not available or -1 on error
  836. */
  837. LIBPFF_DEPRECATED \
  838. LIBPFF_EXTERN \
  839. int libpff_item_get_entry_value_filetime_by_utf8_name(
  840. libpff_item_t *item,
  841. int record_set_index,
  842. uint8_t *utf8_entry_name,
  843. size_t utf8_entry_name_length,
  844. uint64_t *entry_value,
  845. libpff_error_t **error );
  846. /* Retrieves the 64-bit FILETIME value of a specific entry for an UTF-16 encoded name
  847. *
  848. * This function deprecated use libpff_record_entry_get_value_filetime instead
  849. *
  850. * Returns 1 if successful, 0 if not available or -1 on error
  851. */
  852. LIBPFF_DEPRECATED \
  853. LIBPFF_EXTERN \
  854. int libpff_item_get_entry_value_filetime_by_utf16_name(
  855. libpff_item_t *item,
  856. int record_set_index,
  857. uint16_t *utf16_entry_name,
  858. size_t utf16_entry_name_length,
  859. uint64_t *entry_value,
  860. libpff_error_t **error );
  861. /* Retrieves the size value of a specific entry
  862. *
  863. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  864. * the name to identifier mapping is ignored. The default behavior is
  865. * the use the mapped entry value. In this case named properties are not
  866. * retrieved.
  867. *
  868. * This function deprecated use libpff_record_entry_get_value_size instead
  869. *
  870. * Returns 1 if successful, 0 if not available or -1 on error
  871. */
  872. LIBPFF_DEPRECATED \
  873. LIBPFF_EXTERN \
  874. int libpff_item_get_entry_value_size(
  875. libpff_item_t *item,
  876. int record_set_index,
  877. uint32_t entry_type,
  878. size_t *entry_value,
  879. uint8_t flags,
  880. libpff_error_t **error );
  881. /* Retrieves the size value of a specific entry for an UTF-8 encoded name
  882. *
  883. * This function deprecated use libpff_record_entry_get_value_size instead
  884. *
  885. * Returns 1 if successful, 0 if not available or -1 on error
  886. */
  887. LIBPFF_DEPRECATED \
  888. LIBPFF_EXTERN \
  889. int libpff_item_get_entry_value_size_by_utf8_name(
  890. libpff_item_t *item,
  891. int record_set_index,
  892. uint8_t *utf8_entry_name,
  893. size_t utf8_entry_name_length,
  894. size_t *entry_value,
  895. libpff_error_t **error );
  896. /* Retrieves the size value of a specific entry for an UTF-16 encoded name
  897. *
  898. * This function deprecated use libpff_record_entry_get_value_size instead
  899. *
  900. * Returns 1 if successful, 0 if not available or -1 on error
  901. */
  902. LIBPFF_DEPRECATED \
  903. LIBPFF_EXTERN \
  904. int libpff_item_get_entry_value_size_by_utf16_name(
  905. libpff_item_t *item,
  906. int record_set_index,
  907. uint16_t *utf16_entry_name,
  908. size_t utf16_entry_name_length,
  909. size_t *entry_value,
  910. libpff_error_t **error );
  911. /* Retrieves the floating point value of a specific entry
  912. *
  913. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  914. * the name to identifier mapping is ignored. The default behavior is
  915. * the use the mapped entry value. In this case named properties are not
  916. * retrieved.
  917. *
  918. * This function deprecated use libpff_record_entry_get_value_floating_point instead
  919. *
  920. * Returns 1 if successful, 0 if not available or -1 on error
  921. */
  922. LIBPFF_DEPRECATED \
  923. LIBPFF_EXTERN \
  924. int libpff_item_get_entry_value_floating_point(
  925. libpff_item_t *item,
  926. int record_set_index,
  927. uint32_t entry_type,
  928. double *entry_value,
  929. uint8_t flags,
  930. libpff_error_t **error );
  931. /* Retrieves the floating point value of a specific entry for an UTF-8 encoded name
  932. *
  933. * This function deprecated use libpff_record_entry_get_value_floating_point instead
  934. *
  935. * Returns 1 if successful, 0 if not available or -1 on error
  936. */
  937. LIBPFF_DEPRECATED \
  938. LIBPFF_EXTERN \
  939. int libpff_item_get_entry_value_floating_point_by_utf8_name(
  940. libpff_item_t *item,
  941. int record_set_index,
  942. uint8_t *utf8_entry_name,
  943. size_t utf8_entry_name_length,
  944. double *entry_value,
  945. libpff_error_t **error );
  946. /* Retrieves the floating point value of a specific entry for an UTF-16 encoded name
  947. *
  948. * This function deprecated use libpff_record_entry_get_value_floating_point instead
  949. *
  950. * Returns 1 if successful, 0 if not available or -1 on error
  951. */
  952. LIBPFF_DEPRECATED \
  953. LIBPFF_EXTERN \
  954. int libpff_item_get_entry_value_floating_point_by_utf16_name(
  955. libpff_item_t *item,
  956. int record_set_index,
  957. uint16_t *utf16_entry_name,
  958. size_t utf16_entry_name_length,
  959. double *entry_value,
  960. libpff_error_t **error );
  961. /* Retrieves the UTF-8 string size of a specific entry
  962. * The returned size includes the end of string character
  963. *
  964. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  965. * the name to identifier mapping is ignored. The default behavior is
  966. * the use the mapped entry value. In this case named properties are not
  967. * retrieved.
  968. *
  969. * This function deprecated use libpff_record_entry_get_value_utf8_string_size instead
  970. *
  971. * Returns 1 if successful, 0 if not available or -1 on error
  972. */
  973. LIBPFF_DEPRECATED \
  974. LIBPFF_EXTERN \
  975. int libpff_item_get_entry_value_utf8_string_size(
  976. libpff_item_t *item,
  977. int record_set_index,
  978. uint32_t entry_type,
  979. size_t *utf8_string_size,
  980. uint8_t flags,
  981. libpff_error_t **error );
  982. /* Retrieves the UTF-8 string size of a specific entry for an UTF-8 encoded name
  983. * The returned size includes the end of string character
  984. *
  985. * This function deprecated use libpff_record_entry_get_value_utf8_string_size instead
  986. *
  987. * Returns 1 if successful, 0 if not available or -1 on error
  988. */
  989. LIBPFF_DEPRECATED \
  990. LIBPFF_EXTERN \
  991. int libpff_item_get_entry_value_utf8_string_size_by_utf8_name(
  992. libpff_item_t *item,
  993. int record_set_index,
  994. uint8_t *utf8_entry_name,
  995. size_t utf8_entry_name_length,
  996. size_t *utf8_string_size,
  997. libpff_error_t **error );
  998. /* Retrieves the UTF-8 string size of a specific entry for an UTF-16 encoded name
  999. * The returned size includes the end of string character
  1000. *
  1001. * This function deprecated use libpff_record_entry_get_value_utf8_string_size instead
  1002. *
  1003. * Returns 1 if successful, 0 if not available or -1 on error
  1004. */
  1005. LIBPFF_DEPRECATED \
  1006. LIBPFF_EXTERN \
  1007. int libpff_item_get_entry_value_utf8_string_size_by_utf16_name(
  1008. libpff_item_t *item,
  1009. int record_set_index,
  1010. uint16_t *utf16_entry_name,
  1011. size_t utf16_entry_name_length,
  1012. size_t *utf8_string_size,
  1013. libpff_error_t **error );
  1014. /* Retrieves the UTF-8 string value of a specific entry
  1015. * The function uses a codepage if necessary, it uses the codepage set for the library
  1016. * The size should include the end of string character
  1017. *
  1018. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  1019. * the name to identifier mapping is ignored. The default behavior is
  1020. * the use the mapped entry value. In this case named properties are not
  1021. * retrieved.
  1022. *
  1023. * This function deprecated use libpff_record_entry_get_value_utf8_string instead
  1024. *
  1025. * Returns 1 if successful, 0 if not available or -1 on error
  1026. */
  1027. LIBPFF_DEPRECATED \
  1028. LIBPFF_EXTERN \
  1029. int libpff_item_get_entry_value_utf8_string(
  1030. libpff_item_t *item,
  1031. int record_set_index,
  1032. uint32_t entry_type,
  1033. uint8_t *utf8_string,
  1034. size_t utf8_string_size,
  1035. uint8_t flags,
  1036. libpff_error_t **error );
  1037. /* Retrieves the UTF-8 string of a specific entry for an UTF-8 encoded name
  1038. * The returned size includes the end of string character
  1039. *
  1040. * This function deprecated use libpff_record_entry_get_value_utf8_string instead
  1041. *
  1042. * Returns 1 if successful, 0 if not available or -1 on error
  1043. */
  1044. LIBPFF_DEPRECATED \
  1045. LIBPFF_EXTERN \
  1046. int libpff_item_get_entry_value_utf8_string_by_utf8_name(
  1047. libpff_item_t *item,
  1048. int record_set_index,
  1049. uint8_t *utf8_entry_name,
  1050. size_t utf8_entry_name_length,
  1051. uint8_t *utf8_string,
  1052. size_t utf8_string_size,
  1053. libpff_error_t **error );
  1054. /* Retrieves the UTF-8 string of a specific entry for an UTF-16 encoded name
  1055. * The returned size includes the end of string character
  1056. *
  1057. * This function deprecated use libpff_record_entry_get_value_utf8_string instead
  1058. *
  1059. * Returns 1 if successful, 0 if not available or -1 on error
  1060. */
  1061. LIBPFF_DEPRECATED \
  1062. LIBPFF_EXTERN \
  1063. int libpff_item_get_entry_value_utf8_string_by_utf16_name(
  1064. libpff_item_t *item,
  1065. int record_set_index,
  1066. uint16_t *utf16_entry_name,
  1067. size_t utf16_entry_name_length,
  1068. uint8_t *utf8_string,
  1069. size_t utf8_string_size,
  1070. libpff_error_t **error );
  1071. /* Retrieves the UTF-16 string size of a specific entry
  1072. * The returned size includes the end of string character
  1073. *
  1074. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  1075. * the name to identifier mapping is ignored. The default behavior is
  1076. * the use the mapped entry value. In this case named properties are not
  1077. * retrieved.
  1078. *
  1079. * This function deprecated use libpff_record_entry_get_value_utf16_string_size instead
  1080. *
  1081. * Returns 1 if successful, 0 if not available or -1 on error
  1082. */
  1083. LIBPFF_DEPRECATED \
  1084. LIBPFF_EXTERN \
  1085. int libpff_item_get_entry_value_utf16_string_size(
  1086. libpff_item_t *item,
  1087. int record_set_index,
  1088. uint32_t entry_type,
  1089. size_t *utf16_string_size,
  1090. uint8_t flags,
  1091. libpff_error_t **error );
  1092. /* Retrieves the UTF-16 string size of a specific entry for an UTF-8 encoded name
  1093. * The returned size includes the end of string character
  1094. *
  1095. * This function deprecated use libpff_record_entry_get_value_utf16_string_size instead
  1096. *
  1097. * Returns 1 if successful, 0 if not available or -1 on error
  1098. */
  1099. LIBPFF_DEPRECATED \
  1100. LIBPFF_EXTERN \
  1101. int libpff_item_get_entry_value_utf16_string_size_by_utf8_name(
  1102. libpff_item_t *item,
  1103. int record_set_index,
  1104. uint8_t *utf8_entry_name,
  1105. size_t utf8_entry_name_length,
  1106. size_t *utf16_string_size,
  1107. libpff_error_t **error );
  1108. /* Retrieves the UTF-16 string size of a specific entry for an UTF-16 encoded name
  1109. * The returned size includes the end of string character
  1110. *
  1111. * This function deprecated use libpff_record_entry_get_value_utf16_string_size instead
  1112. *
  1113. * Returns 1 if successful, 0 if not available or -1 on error
  1114. */
  1115. LIBPFF_DEPRECATED \
  1116. LIBPFF_EXTERN \
  1117. int libpff_item_get_entry_value_utf16_string_size_by_utf16_name(
  1118. libpff_item_t *item,
  1119. int record_set_index,
  1120. uint16_t *utf16_entry_name,
  1121. size_t utf16_entry_name_length,
  1122. size_t *utf16_string_size,
  1123. libpff_error_t **error );
  1124. /* Retrieves the UTF-16 string value of a specific entry
  1125. * The function uses a codepage if necessary, it uses the codepage set for the library
  1126. * The size should include the end of string character
  1127. *
  1128. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  1129. * the name to identifier mapping is ignored. The default behavior is
  1130. * the use the mapped entry value. In this case named properties are not
  1131. * retrieved.
  1132. *
  1133. * This function deprecated use libpff_record_entry_get_value_utf16_string instead
  1134. *
  1135. * Returns 1 if successful, 0 if not available or -1 on error
  1136. */
  1137. LIBPFF_DEPRECATED \
  1138. LIBPFF_EXTERN \
  1139. int libpff_item_get_entry_value_utf16_string(
  1140. libpff_item_t *item,
  1141. int record_set_index,
  1142. uint32_t entry_type,
  1143. uint16_t *utf16_string,
  1144. size_t utf16_string_size,
  1145. uint8_t flags,
  1146. libpff_error_t **error );
  1147. /* Retrieves the UTF-16 string of a specific entry for an UTF-8 encoded name
  1148. * The returned size includes the end of string character
  1149. *
  1150. * This function deprecated use libpff_record_entry_get_value_utf16_string instead
  1151. *
  1152. * Returns 1 if successful, 0 if not available or -1 on error
  1153. */
  1154. LIBPFF_DEPRECATED \
  1155. LIBPFF_EXTERN \
  1156. int libpff_item_get_entry_value_utf16_string_by_utf8_name(
  1157. libpff_item_t *item,
  1158. int record_set_index,
  1159. uint8_t *utf8_entry_name,
  1160. size_t utf8_entry_name_length,
  1161. uint16_t *utf16_string,
  1162. size_t utf16_string_size,
  1163. libpff_error_t **error );
  1164. /* Retrieves the UTF-16 string of a specific entry for an UTF-16 encoded name
  1165. * The returned size includes the end of string character
  1166. *
  1167. * This function deprecated use libpff_record_entry_get_value_utf16_string instead
  1168. *
  1169. * Returns 1 if successful, 0 if not available or -1 on error
  1170. */
  1171. LIBPFF_DEPRECATED \
  1172. LIBPFF_EXTERN \
  1173. int libpff_item_get_entry_value_utf16_string_by_utf16_name(
  1174. libpff_item_t *item,
  1175. int record_set_index,
  1176. uint16_t *utf16_entry_name,
  1177. size_t utf16_entry_name_length,
  1178. uint16_t *utf16_string,
  1179. size_t utf16_string_size,
  1180. libpff_error_t **error );
  1181. /* Retrieves the size of a binary data value of a specific entry
  1182. *
  1183. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  1184. * the name to identifier mapping is ignored. The default behavior is
  1185. * the use the mapped entry value. In this case named properties are not
  1186. * retrieved.
  1187. *
  1188. * This function deprecated use libpff_record_entry_get_data_size instead
  1189. *
  1190. * Returns 1 if successful, 0 if not available or -1 on error
  1191. */
  1192. LIBPFF_DEPRECATED \
  1193. LIBPFF_EXTERN \
  1194. int libpff_item_get_entry_value_binary_data_size(
  1195. libpff_item_t *item,
  1196. int record_set_index,
  1197. uint32_t entry_type,
  1198. size_t *binary_data_size,
  1199. uint8_t flags,
  1200. libpff_error_t **error );
  1201. /* Retrieves the size of a binary data value of a specific entry for an UTF-8 encoded name
  1202. *
  1203. * This function deprecated use libpff_record_entry_get_data_size instead
  1204. *
  1205. * Returns 1 if successful, 0 if not available or -1 on error
  1206. */
  1207. LIBPFF_DEPRECATED \
  1208. LIBPFF_EXTERN \
  1209. int libpff_item_get_entry_value_binary_data_size_by_utf8_name(
  1210. libpff_item_t *item,
  1211. int record_set_index,
  1212. uint8_t *utf8_entry_name,
  1213. size_t utf8_entry_name_length,
  1214. size_t *binary_data_size,
  1215. libpff_error_t **error );
  1216. /* Retrieves the size of a binary data value of a specific entry for an UTF-16 encoded name
  1217. *
  1218. * This function deprecated use libpff_record_entry_get_data_size instead
  1219. *
  1220. * Returns 1 if successful, 0 if not available or -1 on error
  1221. */
  1222. LIBPFF_DEPRECATED \
  1223. LIBPFF_EXTERN \
  1224. int libpff_item_get_entry_value_binary_data_size_by_utf16_name(
  1225. libpff_item_t *item,
  1226. int record_set_index,
  1227. uint16_t *utf16_entry_name,
  1228. size_t utf16_entry_name_length,
  1229. size_t *binary_data_size,
  1230. libpff_error_t **error );
  1231. /* Retrieves the binary data value of a specific entry
  1232. *
  1233. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  1234. * the name to identifier mapping is ignored. The default behavior is
  1235. * the use the mapped entry value. In this case named properties are not
  1236. * retrieved.
  1237. *
  1238. * This function deprecated use libpff_record_entry_get_data instead
  1239. *
  1240. * Returns 1 if successful, 0 if not available or -1 on error
  1241. */
  1242. LIBPFF_DEPRECATED \
  1243. LIBPFF_EXTERN \
  1244. int libpff_item_get_entry_value_binary_data(
  1245. libpff_item_t *item,
  1246. int record_set_index,
  1247. uint32_t entry_type,
  1248. uint8_t *binary_data,
  1249. size_t binary_data_size,
  1250. uint8_t flags,
  1251. libpff_error_t **error );
  1252. /* Retrieves the binary data value of a specific entry for an UTF-8 encoded name
  1253. *
  1254. * This function deprecated use libpff_record_entry_get_data instead
  1255. *
  1256. * Returns 1 if successful, 0 if not available or -1 on error
  1257. */
  1258. LIBPFF_DEPRECATED \
  1259. LIBPFF_EXTERN \
  1260. int libpff_item_get_entry_value_binary_data_by_utf8_name(
  1261. libpff_item_t *item,
  1262. int record_set_index,
  1263. uint8_t *utf8_entry_name,
  1264. size_t utf8_entry_name_length,
  1265. uint8_t *binary_data,
  1266. size_t binary_data_size,
  1267. libpff_error_t **error );
  1268. /* Retrieves the binary data value of a specific entry for an UTF-16 encoded name
  1269. *
  1270. * This function deprecated use libpff_record_entry_get_data instead
  1271. *
  1272. * Returns 1 if successful, 0 if not available or -1 on error
  1273. */
  1274. LIBPFF_DEPRECATED \
  1275. LIBPFF_EXTERN \
  1276. int libpff_item_get_entry_value_binary_data_by_utf16_name(
  1277. libpff_item_t *item,
  1278. int record_set_index,
  1279. uint16_t *utf16_entry_name,
  1280. size_t utf16_entry_name_length,
  1281. uint8_t *binary_data,
  1282. size_t binary_data_size,
  1283. libpff_error_t **error );
  1284. /* Retrieves the GUID value of a specific entry
  1285. *
  1286. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  1287. * the name to identifier mapping is ignored. The default behavior is
  1288. * the use the mapped entry value. In this case named properties are not
  1289. * retrieved.
  1290. *
  1291. * This function deprecated use libpff_record_entry_get_data_as_guid instead
  1292. *
  1293. * Returns 1 if successful, 0 if not available or -1 on error
  1294. */
  1295. LIBPFF_DEPRECATED \
  1296. LIBPFF_EXTERN \
  1297. int libpff_item_get_entry_value_guid(
  1298. libpff_item_t *item,
  1299. int record_set_index,
  1300. uint32_t entry_type,
  1301. uint8_t *guid,
  1302. size_t guid_size,
  1303. uint8_t flags,
  1304. libpff_error_t **error );
  1305. /* Retrieves the multi value of a specific entry
  1306. * Creates a new multi value
  1307. *
  1308. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  1309. * the name to identifier mapping is ignored. The default behavior is
  1310. * the use the mapped entry value. In this case named properties are not
  1311. * retrieved.
  1312. *
  1313. * This function deprecated use libpff_record_entry_get_multi_value instead
  1314. *
  1315. * Returns 1 if successful, 0 if not available or -1 on error
  1316. */
  1317. LIBPFF_DEPRECATED \
  1318. LIBPFF_EXTERN \
  1319. int libpff_item_get_entry_multi_value(
  1320. libpff_item_t *item,
  1321. int record_set_index,
  1322. uint32_t entry_type,
  1323. libpff_multi_value_t **multi_value,
  1324. uint8_t flags,
  1325. libpff_error_t **error );
  1326. /* Retrieves the size of the UTF-16 encoded item display name
  1327. * Size includes the end of string character
  1328. * Returns 1 if successful, 0 if not available or -1 on error
  1329. */
  1330. #define libpff_item_get_utf16_display_name_size( item, utf16_string_size, error ) \
  1331. libpff_item_get_entry_value_utf16_string_size( item, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf16_string_size, 0, error )
  1332. /* Retrieves the UTF-16 encoded item display name
  1333. * Returns 1 if successful, 0 if not available or -1 on error
  1334. */
  1335. #define libpff_item_get_utf16_display_name( item, utf16_string, utf16_string_size, error ) \
  1336. libpff_item_get_entry_value_utf16_string( item, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf16_string, utf16_string_size, 0, error )
  1337. /* Retrieves the size of the UTF-16 encoded item address type
  1338. * Size includes the end of string character
  1339. * Returns 1 if successful, 0 if not available or -1 on error
  1340. */
  1341. #define libpff_item_get_utf16_address_type_size( item, utf16_string_size, error ) \
  1342. libpff_item_get_entry_value_utf16_string_size( item, 0, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf16_string_size, 0, error )
  1343. /* Retrieves the UTF-16 encoded item address type
  1344. * Returns 1 if successful, 0 if not available or -1 on error
  1345. */
  1346. #define libpff_item_get_utf16_address_type( item, utf16_string, utf16_string_size, error ) \
  1347. libpff_item_get_entry_value_utf16_string( item, 0, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf16_string, utf16_string_size, 0, error )
  1348. /* Retrieves the size of the UTF-16 encoded item e-mail address
  1349. * Size includes the end of string character
  1350. * Returns 1 if successful, 0 if not available or -1 on error
  1351. */
  1352. #define libpff_item_get_utf16_email_address_size( item, utf16_string_size, error ) \
  1353. libpff_item_get_entry_value_utf16_string_size( item, 0, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf16_string_size, 0, error )
  1354. /* Retrieves the UTF-16 encoded item e-mail address
  1355. * Returns 1 if successful, 0 if not available or -1 on error
  1356. */
  1357. #define libpff_item_get_utf16_email_address( item, utf16_string, size, error ) \
  1358. libpff_item_get_entry_value_utf16_string( item, 0, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf16_string, utf16_string_size, 0, error )
  1359. /* Retrieves the size of the UTF-8 encoded item display name
  1360. * Size includes the end of string character
  1361. * Returns 1 if successful, 0 if not available or -1 on error
  1362. */
  1363. #define libpff_item_get_utf8_display_name_size( item, utf8_string_size, error ) \
  1364. libpff_item_get_entry_value_utf8_string_size( item, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf8_string_size, 0, error )
  1365. /* Retrieves the size of the UTF-8 encoded item address type
  1366. * Size includes the end of string character
  1367. * Returns 1 if successful, 0 if not available or -1 on error
  1368. */
  1369. #define libpff_item_get_utf8_address_type_size( item, utf8_string_size, error ) \
  1370. libpff_item_get_entry_value_utf8_string_size( item, 0, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf8_string_size, 0, error )
  1371. /* Retrieves the size of the UTF-8 encoded item e-mail address
  1372. * Size includes the end of string character
  1373. * Returns 1 if successful, 0 if not available or -1 on error
  1374. */
  1375. #define libpff_item_get_utf8_email_address_size( item, utf8_string_size, error ) \
  1376. libpff_item_get_entry_value_utf8_string_size( item, 0, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf8_string_size, 0, error )
  1377. /* Retrieves the UTF-8 encoded item display name
  1378. * Returns 1 if successful, 0 if not available or -1 on error
  1379. */
  1380. #define libpff_item_get_utf8_display_name( item, utf8_string, utf8_string_size, error ) \
  1381. libpff_item_get_entry_value_utf8_string( item, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf8_string, utf8_string_size, 0, error )
  1382. /* Retrieves the UTF-8 encoded item address type
  1383. * Returns 1 if successful, 0 if not available or -1 on error
  1384. */
  1385. #define libpff_item_get_utf8_address_type( item, utf8_string, utf8_string_size, error ) \
  1386. libpff_item_get_entry_value_utf8_string( item, 0, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf8_string, utf8_string_size, 0, error )
  1387. /* Retrieves the UTF-8 encoded item e-mail address
  1388. * Returns 1 if successful, 0 if not available or -1 on error
  1389. */
  1390. #define libpff_item_get_utf8_email_address( item, utf8_string, size, error ) \
  1391. libpff_item_get_entry_value_utf8_string( item, 0, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf8_string, utf8_string_size, 0, error )
  1392. /* -------------------------------------------------------------------------
  1393. * Name to ID map entry functions
  1394. * ------------------------------------------------------------------------- */
  1395. /* Retrieves the type
  1396. * Returns 1 if successful or -1 on error
  1397. */
  1398. LIBPFF_EXTERN \
  1399. int libpff_name_to_id_map_entry_get_type(
  1400. libpff_name_to_id_map_entry_t *name_to_id_map_entry,
  1401. uint8_t *entry_type,
  1402. libpff_error_t **error );
  1403. /* Retrieves the number
  1404. * Returns 1 if successful or -1 on error
  1405. */
  1406. LIBPFF_EXTERN \
  1407. int libpff_name_to_id_map_entry_get_number(
  1408. libpff_name_to_id_map_entry_t *name_to_id_map_entry,
  1409. uint32_t *number,
  1410. libpff_error_t **error );
  1411. /* Retrieves the UTF-8 string size
  1412. * The returned size includes the end of string character
  1413. * Returns 1 if successful or -1 on error
  1414. */
  1415. LIBPFF_EXTERN \
  1416. int libpff_name_to_id_map_entry_get_utf8_string_size(
  1417. libpff_name_to_id_map_entry_t *name_to_id_map_entry,
  1418. size_t *utf8_string_size,
  1419. libpff_error_t **error );
  1420. /* Retrieves the UTF-8 string
  1421. * The size should include the end of string character
  1422. * Returns 1 if successful or -1 on error
  1423. */
  1424. LIBPFF_EXTERN \
  1425. int libpff_name_to_id_map_entry_get_utf8_string(
  1426. libpff_name_to_id_map_entry_t *name_to_id_map_entry,
  1427. uint8_t *utf8_string,
  1428. size_t utf8_string_size,
  1429. libpff_error_t **error );
  1430. /* Retrieves the UTF-16 string size
  1431. * The returned size includes the end of string character
  1432. * Returns 1 if successful or -1 on error
  1433. */
  1434. LIBPFF_EXTERN \
  1435. int libpff_name_to_id_map_entry_get_utf16_string_size(
  1436. libpff_name_to_id_map_entry_t *name_to_id_map_entry,
  1437. size_t *utf16_string_size,
  1438. libpff_error_t **error );
  1439. /* Retrieves the UTF-16 string
  1440. * The size should include the end of string character
  1441. * Returns 1 if successful or -1 on error
  1442. */
  1443. LIBPFF_EXTERN \
  1444. int libpff_name_to_id_map_entry_get_utf16_string(
  1445. libpff_name_to_id_map_entry_t *name_to_id_map_entry,
  1446. uint16_t *utf16_string,
  1447. size_t utf16_string_size,
  1448. libpff_error_t **error );
  1449. /* Retrieves the GUID
  1450. * Returns 1 if successful or -1 on error
  1451. */
  1452. LIBPFF_EXTERN \
  1453. int libpff_name_to_id_map_entry_get_guid(
  1454. libpff_name_to_id_map_entry_t *name_to_id_map_entry,
  1455. uint8_t *guid,
  1456. size_t size,
  1457. libpff_error_t **error );
  1458. /* -------------------------------------------------------------------------
  1459. * Record set functions
  1460. * ------------------------------------------------------------------------- */
  1461. /* Frees a record set
  1462. * Returns 1 if successful or -1 on error
  1463. */
  1464. LIBPFF_EXTERN \
  1465. int libpff_record_set_free(
  1466. libpff_record_set_t **record_set,
  1467. libpff_error_t **error );
  1468. /* Retrieves the number of entries in the record set
  1469. * Returns 1 if successful or -1 on error
  1470. */
  1471. LIBPFF_EXTERN \
  1472. int libpff_record_set_get_number_of_entries(
  1473. libpff_record_set_t *record_set,
  1474. int *number_of_entries,
  1475. libpff_error_t **error );
  1476. /* Retrieves a specific entry from the record set
  1477. * Returns 1 if successful or -1 on error
  1478. */
  1479. LIBPFF_EXTERN \
  1480. int libpff_record_set_get_entry_by_index(
  1481. libpff_record_set_t *record_set,
  1482. int record_entry_index,
  1483. libpff_record_entry_t **record_entry,
  1484. libpff_error_t **error );
  1485. /* Retrieves the record entry matching the entry and value type pair from the record set
  1486. *
  1487. * When the LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE is set
  1488. * the value type is ignored and set. The default behavior is a strict
  1489. * matching of the value type. In this case the value type must be filled
  1490. * with the corresponding value type
  1491. *
  1492. * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set
  1493. * the name to identifier mapping is ignored. The default behavior is
  1494. * the use the mapped entry value. In this case named properties are not
  1495. * retrieved.
  1496. *
  1497. * Returns 1 if successful, 0 if not available or -1 on error
  1498. */
  1499. LIBPFF_EXTERN \
  1500. int libpff_record_set_get_entry_by_type(
  1501. libpff_record_set_t *record_set,
  1502. uint32_t entry_type,
  1503. uint32_t value_type,
  1504. libpff_record_entry_t **record_entry,
  1505. uint8_t flags,
  1506. libpff_error_t **error );
  1507. /* Retrieves the record entry matching the UTF-8 encoded name from the record set.
  1508. *
  1509. * When the LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE is set
  1510. * the value type is ignored and set. The default behavior is a strict
  1511. * matching of the value type. In this case the value type must be filled
  1512. * with the corresponding value type
  1513. *
  1514. * Returns 1 if successful, 0 if not available or -1 on error
  1515. */
  1516. LIBPFF_EXTERN \
  1517. int libpff_record_set_get_entry_by_utf8_name(
  1518. libpff_record_set_t *record_set,
  1519. const uint8_t *utf8_string,
  1520. size_t utf8_string_length,
  1521. uint32_t value_type,
  1522. libpff_record_entry_t **record_entry,
  1523. uint8_t flags,
  1524. libpff_error_t **error );
  1525. /* Retrieves the record entry matching the UTF-16 encoded name from the record set.
  1526. *
  1527. * When the LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE is set
  1528. * the value type is ignored and set. The default behavior is a strict
  1529. * matching of the value type. In this case the value type must be filled
  1530. * with the corresponding value type
  1531. *
  1532. * Returns 1 if successful, 0 if not available or -1 on error
  1533. */
  1534. LIBPFF_EXTERN \
  1535. int libpff_record_set_get_entry_by_utf16_name(
  1536. libpff_record_set_t *record_set,
  1537. const uint16_t *utf16_string,
  1538. size_t utf16_string_length,
  1539. uint32_t value_type,
  1540. libpff_record_entry_t **record_entry,
  1541. uint8_t flags,
  1542. libpff_error_t **error );
  1543. /* -------------------------------------------------------------------------
  1544. * Record entry functions
  1545. * ------------------------------------------------------------------------- */
  1546. /* Frees a record entry
  1547. * Returns 1 if successful or -1 on error
  1548. */
  1549. LIBPFF_EXTERN \
  1550. int libpff_record_entry_free(
  1551. libpff_record_entry_t **record_entry,
  1552. libpff_error_t **error );
  1553. /* Retrieves the entry type
  1554. * Returns 1 if successful, 0 if not available or -1 on error
  1555. */
  1556. LIBPFF_EXTERN \
  1557. int libpff_record_entry_get_entry_type(
  1558. libpff_record_entry_t *record_entry,
  1559. uint32_t *entry_type,
  1560. libpff_error_t **error );
  1561. /* Retrieves the value type
  1562. * Returns 1 if successful, 0 if not available or -1 on error
  1563. */
  1564. LIBPFF_EXTERN \
  1565. int libpff_record_entry_get_value_type(
  1566. libpff_record_entry_t *record_entry,
  1567. uint32_t *value_type,
  1568. libpff_error_t **error );
  1569. /* Retrieves the name to ID map entry
  1570. * Returns 1 if successful, 0 if not available or -1 on error
  1571. */
  1572. LIBPFF_EXTERN \
  1573. int libpff_record_entry_get_name_to_id_map_entry(
  1574. libpff_record_entry_t *record_entry,
  1575. libpff_name_to_id_map_entry_t **name_to_id_map_entry,
  1576. libpff_error_t **error );
  1577. /* Retrieves the data size
  1578. * Returns 1 if successful or -1 on error
  1579. */
  1580. LIBPFF_EXTERN \
  1581. int libpff_record_entry_get_data_size(
  1582. libpff_record_entry_t *record_entry,
  1583. size_t *data_size,
  1584. libpff_error_t **error );
  1585. /* Retrieves the data
  1586. * Returns 1 if successful or -1 on error
  1587. */
  1588. LIBPFF_EXTERN \
  1589. int libpff_record_entry_get_data(
  1590. libpff_record_entry_t *record_entry,
  1591. uint8_t *data,
  1592. size_t data_size,
  1593. libpff_error_t **error );
  1594. /* Retrieves the data as a boolean value
  1595. * Returns 1 if successful or -1 on error
  1596. */
  1597. LIBPFF_EXTERN \
  1598. int libpff_record_entry_get_data_as_boolean(
  1599. libpff_record_entry_t *record_entry,
  1600. uint8_t *value_boolean,
  1601. libpff_error_t **error );
  1602. /* Retrieves the data as a 16-bit integer value
  1603. * Returns 1 if successful or -1 on error
  1604. */
  1605. LIBPFF_EXTERN \
  1606. int libpff_record_entry_get_data_as_16bit_integer(
  1607. libpff_record_entry_t *record_entry,
  1608. uint16_t *value_16bit,
  1609. libpff_error_t **error );
  1610. /* Retrieves the data as a 32-bit integer value
  1611. * Returns 1 if successful or -1 on error
  1612. */
  1613. LIBPFF_EXTERN \
  1614. int libpff_record_entry_get_data_as_32bit_integer(
  1615. libpff_record_entry_t *record_entry,
  1616. uint32_t *value_32bit,
  1617. libpff_error_t **error );
  1618. /* Retrieves the data as a 32-bit integer value
  1619. * Returns 1 if successful or -1 on error
  1620. */
  1621. LIBPFF_EXTERN \
  1622. int libpff_record_entry_get_data_as_64bit_integer(
  1623. libpff_record_entry_t *record_entry,
  1624. uint64_t *value_64bit,
  1625. libpff_error_t **error );
  1626. /* Retrieves the data as a 64-bit FILETIME value
  1627. * Returns 1 if successful or -1 on error
  1628. */
  1629. LIBPFF_EXTERN \
  1630. int libpff_record_entry_get_data_as_filetime(
  1631. libpff_record_entry_t *record_entry,
  1632. uint64_t *filetime,
  1633. libpff_error_t **error );
  1634. /* Retrieves the data as a 64-bit floatingtime value
  1635. * Returns 1 if successful or -1 on error
  1636. */
  1637. LIBPFF_EXTERN \
  1638. int libpff_record_entry_get_data_as_floatingtime(
  1639. libpff_record_entry_t *record_entry,
  1640. uint64_t *floatingtime,
  1641. libpff_error_t **error );
  1642. /* Retrieves the data as a size value
  1643. * Returns 1 if successful or -1 on error
  1644. */
  1645. LIBPFF_EXTERN \
  1646. int libpff_record_entry_get_data_as_size(
  1647. libpff_record_entry_t *record_entry,
  1648. size64_t *value_size,
  1649. libpff_error_t **error );
  1650. /* Retrieves the data as a floating point value
  1651. * Returns 1 if successful or -1 on error
  1652. */
  1653. LIBPFF_EXTERN \
  1654. int libpff_record_entry_get_data_as_floating_point(
  1655. libpff_record_entry_t *record_entry,
  1656. double *value_floating_point,
  1657. libpff_error_t **error );
  1658. /* Retrieves the size of the data formatted as an UTF-8 string
  1659. * The returned size includes the end of string character
  1660. * Returns 1 if successful or -1 on error
  1661. */
  1662. LIBPFF_EXTERN \
  1663. int libpff_record_entry_get_data_as_utf8_string_size(
  1664. libpff_record_entry_t *record_entry,
  1665. size_t *utf8_string_size,
  1666. libpff_error_t **error );
  1667. /* Retrieves the data formatted as an UTF-8 string
  1668. * The function uses a codepage if necessary, it uses the codepage set for the library
  1669. * The size should include the end of string character
  1670. * Returns 1 if successful or -1 on error
  1671. */
  1672. LIBPFF_EXTERN \
  1673. int libpff_record_entry_get_data_as_utf8_string(
  1674. libpff_record_entry_t *record_entry,
  1675. uint8_t *utf8_string,
  1676. size_t utf8_string_size,
  1677. libpff_error_t **error );
  1678. /* Retrieves the size of the data formatted as an UTF-16 string
  1679. * The returned size includes the end of string character
  1680. * Returns 1 if successful or -1 on error
  1681. */
  1682. LIBPFF_EXTERN \
  1683. int libpff_record_entry_get_data_as_utf16_string_size(
  1684. libpff_record_entry_t *record_entry,
  1685. size_t *utf16_string_size,
  1686. libpff_error_t **error );
  1687. /* Retrieves the data formatted as an UTF-16 string
  1688. * The function uses a codepage if necessary, it uses the codepage set for the library
  1689. * The size should include the end of string character
  1690. * Returns 1 if successful or -1 on error
  1691. */
  1692. LIBPFF_EXTERN \
  1693. int libpff_record_entry_get_data_as_utf16_string(
  1694. libpff_record_entry_t *record_entry,
  1695. uint16_t *utf16_string,
  1696. size_t utf16_string_size,
  1697. libpff_error_t **error );
  1698. /* Retrieves the data as a GUID value
  1699. * Returns 1 if successful or -1 on error
  1700. */
  1701. LIBPFF_EXTERN \
  1702. int libpff_record_entry_get_data_as_guid(
  1703. libpff_record_entry_t *record_entry,
  1704. uint8_t *guid_data,
  1705. size_t guid_data_size,
  1706. libpff_error_t **error );
  1707. /* Retrieves the data as a multi value
  1708. * Returns 1 if successful, 0 if not available or -1 on error
  1709. */
  1710. LIBPFF_EXTERN \
  1711. int libpff_record_entry_get_multi_value(
  1712. libpff_record_entry_t *record_entry,
  1713. libpff_multi_value_t **multi_value,
  1714. libpff_error_t **error );
  1715. /* Reads value data from the current offset into a buffer
  1716. * Returns the number of bytes read or -1 on error
  1717. */
  1718. LIBPFF_EXTERN \
  1719. ssize_t libpff_record_entry_read_buffer(
  1720. libpff_record_entry_t *record_entry,
  1721. uint8_t *buffer,
  1722. size_t buffer_size,
  1723. libpff_error_t **error );
  1724. /* Seeks a certain offset of the value data
  1725. * Returns the offset if seek is successful or -1 on error
  1726. */
  1727. LIBPFF_EXTERN \
  1728. off64_t libpff_record_entry_seek_offset(
  1729. libpff_record_entry_t *record_entry,
  1730. off64_t offset,
  1731. int whence,
  1732. libpff_error_t **error );
  1733. /* -------------------------------------------------------------------------
  1734. * Record entry functions - deprecated
  1735. * ------------------------------------------------------------------------- */
  1736. /* Retrieves the value data size
  1737. *
  1738. * This function deprecated use libpff_record_entry_get_data_size instead
  1739. *
  1740. * Returns 1 if successful or -1 on error
  1741. */
  1742. LIBPFF_DEPRECATED \
  1743. LIBPFF_EXTERN \
  1744. int libpff_record_entry_get_value_data_size(
  1745. libpff_record_entry_t *record_entry,
  1746. size_t *value_data_size,
  1747. libpff_error_t **error );
  1748. /* Copies the value data
  1749. *
  1750. * This function deprecated use libpff_record_entry_get_data instead
  1751. *
  1752. * Returns 1 if successful or -1 on error
  1753. */
  1754. LIBPFF_DEPRECATED \
  1755. LIBPFF_EXTERN \
  1756. int libpff_record_entry_copy_value_data(
  1757. libpff_record_entry_t *record_entry,
  1758. uint8_t *value_data,
  1759. size_t value_data_size,
  1760. libpff_error_t **error );
  1761. /* Retrieves the 8-bit boolean value
  1762. *
  1763. * This function deprecated use libpff_record_entry_get_data_as_boolean instead
  1764. *
  1765. * Returns 1 if successful or -1 on error
  1766. */
  1767. LIBPFF_DEPRECATED \
  1768. LIBPFF_EXTERN \
  1769. int libpff_record_entry_get_value_boolean(
  1770. libpff_record_entry_t *record_entry,
  1771. uint8_t *value_boolean,
  1772. libpff_error_t **error );
  1773. /* Retrieves the 16-bit value
  1774. *
  1775. * This function deprecated use libpff_record_entry_get_data_as_16bit_integer instead
  1776. *
  1777. * Returns 1 if successful or -1 on error
  1778. */
  1779. LIBPFF_DEPRECATED \
  1780. LIBPFF_EXTERN \
  1781. int libpff_record_entry_get_value_16bit(
  1782. libpff_record_entry_t *record_entry,
  1783. uint16_t *value_16bit,
  1784. libpff_error_t **error );
  1785. /* Retrieves the 32-bit value
  1786. *
  1787. * This function deprecated use libpff_record_entry_get_data_as_32bit_integer instead
  1788. *
  1789. * Returns 1 if successful or -1 on error
  1790. */
  1791. LIBPFF_DEPRECATED \
  1792. LIBPFF_EXTERN \
  1793. int libpff_record_entry_get_value_32bit(
  1794. libpff_record_entry_t *record_entry,
  1795. uint32_t *value_32bit,
  1796. libpff_error_t **error );
  1797. /* Retrieves the 64-bit value
  1798. *
  1799. * This function deprecated use libpff_record_entry_get_data_as_64bit_integer instead
  1800. *
  1801. * Returns 1 if successful or -1 on error
  1802. */
  1803. LIBPFF_DEPRECATED \
  1804. LIBPFF_EXTERN \
  1805. int libpff_record_entry_get_value_64bit(
  1806. libpff_record_entry_t *record_entry,
  1807. uint64_t *value_64bit,
  1808. libpff_error_t **error );
  1809. /* Retrieves the 64-bit FILETIME value
  1810. *
  1811. * This function deprecated use libpff_record_entry_get_data_as_filetime instead
  1812. *
  1813. * Returns 1 if successful or -1 on error
  1814. */
  1815. LIBPFF_DEPRECATED \
  1816. LIBPFF_EXTERN \
  1817. int libpff_record_entry_get_value_filetime(
  1818. libpff_record_entry_t *record_entry,
  1819. uint64_t *value_64bit,
  1820. libpff_error_t **error );
  1821. /* Retrieves the size value
  1822. *
  1823. * This function deprecated use libpff_record_entry_get_data_as_size instead
  1824. *
  1825. * Returns 1 if successful or -1 on error
  1826. */
  1827. LIBPFF_DEPRECATED \
  1828. LIBPFF_EXTERN \
  1829. int libpff_record_entry_get_value_size(
  1830. libpff_record_entry_t *record_entry,
  1831. size_t *value_size,
  1832. libpff_error_t **error );
  1833. /* Retrieves the floating point value
  1834. *
  1835. * This function deprecated use libpff_record_entry_get_data_as_floating_point instead
  1836. *
  1837. * Returns 1 if successful or -1 on error
  1838. */
  1839. LIBPFF_DEPRECATED \
  1840. LIBPFF_EXTERN \
  1841. int libpff_record_entry_get_value_floating_point(
  1842. libpff_record_entry_t *record_entry,
  1843. double *value_floating_point,
  1844. libpff_error_t **error );
  1845. /* Retrieves the UTF-8 string size
  1846. * The returned size includes the end of string character
  1847. *
  1848. * This function deprecated use libpff_record_entry_get_data_as_utf8_string_size instead
  1849. *
  1850. * Returns 1 if successful or -1 on error
  1851. */
  1852. LIBPFF_DEPRECATED \
  1853. LIBPFF_EXTERN \
  1854. int libpff_record_entry_get_value_utf8_string_size(
  1855. libpff_record_entry_t *record_entry,
  1856. size_t *utf8_string_size,
  1857. libpff_error_t **error );
  1858. /* Retrieves the UTF-8 string value of a specific entry
  1859. * The function uses a codepage if necessary, it uses the codepage set for the library
  1860. * The size should include the end of string character
  1861. *
  1862. * This function deprecated use libpff_record_entry_get_data_as_utf8_string instead
  1863. *
  1864. * Returns 1 if successful or -1 on error
  1865. */
  1866. LIBPFF_DEPRECATED \
  1867. LIBPFF_EXTERN \
  1868. int libpff_record_entry_get_value_utf8_string(
  1869. libpff_record_entry_t *record_entry,
  1870. uint8_t *utf8_string,
  1871. size_t utf8_string_size,
  1872. libpff_error_t **error );
  1873. /* Retrieves the UTF-16 string size
  1874. * The returned size includes the end of string character
  1875. *
  1876. * This function deprecated use libpff_record_entry_get_data_as_utf16_string_size instead
  1877. *
  1878. * Returns 1 if successful or -1 on error
  1879. */
  1880. LIBPFF_DEPRECATED \
  1881. LIBPFF_EXTERN \
  1882. int libpff_record_entry_get_value_utf16_string_size(
  1883. libpff_record_entry_t *record_entry,
  1884. size_t *utf16_string_size,
  1885. libpff_error_t **error );
  1886. /* Retrieves the UTF-16 string value of a specific entry
  1887. * The function uses a codepage if necessary, it uses the codepage set for the library
  1888. * The size should include the end of string character
  1889. *
  1890. * This function deprecated use libpff_record_entry_get_data_as_utf16_string instead
  1891. *
  1892. * Returns 1 if successful or -1 on error
  1893. */
  1894. LIBPFF_DEPRECATED \
  1895. LIBPFF_EXTERN \
  1896. int libpff_record_entry_get_value_utf16_string(
  1897. libpff_record_entry_t *record_entry,
  1898. uint16_t *utf16_string,
  1899. size_t utf16_string_size,
  1900. libpff_error_t **error );
  1901. /* -------------------------------------------------------------------------
  1902. * Multi value functions
  1903. * ------------------------------------------------------------------------- */
  1904. /* Frees a multi value
  1905. * Returns 1 if successful or -1 on error
  1906. */
  1907. LIBPFF_EXTERN \
  1908. int libpff_multi_value_free(
  1909. libpff_multi_value_t **multi_value,
  1910. libpff_error_t **error );
  1911. /* Retrieves the number of values in a multi value
  1912. * Returns 1 if successful or -1 on error
  1913. */
  1914. LIBPFF_EXTERN \
  1915. int libpff_multi_value_get_number_of_values(
  1916. libpff_multi_value_t *multi_value,
  1917. int *number_of_values,
  1918. libpff_error_t **error );
  1919. /* Retrieves a specific value of the multi value
  1920. * Returns 1 if successful or -1 on error
  1921. */
  1922. LIBPFF_EXTERN \
  1923. int libpff_multi_value_get_value(
  1924. libpff_multi_value_t *multi_value,
  1925. int value_index,
  1926. uint32_t *value_type,
  1927. uint8_t **value_data,
  1928. size_t *value_data_size,
  1929. libpff_error_t **error );
  1930. /* Retrieves the 32-bit value of a specific value of the multi value
  1931. * Returns 1 if successful or -1 on error
  1932. */
  1933. LIBPFF_EXTERN \
  1934. int libpff_multi_value_get_value_32bit(
  1935. libpff_multi_value_t *multi_value,
  1936. int value_index,
  1937. uint32_t *value_32bit,
  1938. libpff_error_t **error );
  1939. /* Retrieves the 64-bit value of a specific value of the multi value
  1940. * Returns 1 if successful or -1 on error
  1941. */
  1942. LIBPFF_EXTERN \
  1943. int libpff_multi_value_get_value_64bit(
  1944. libpff_multi_value_t *multi_value,
  1945. int value_index,
  1946. uint64_t *value_64bit,
  1947. libpff_error_t **error );
  1948. /* Retrieves the 64-bit filetime value of a specific value of the multi value
  1949. * Returns 1 if successful or -1 on error
  1950. */
  1951. LIBPFF_EXTERN \
  1952. int libpff_multi_value_get_value_filetime(
  1953. libpff_multi_value_t *multi_value,
  1954. int value_index,
  1955. uint64_t *value_64bit,
  1956. libpff_error_t **error );
  1957. /* Retrieves the UTF-8 string size of a specific value of the multi value
  1958. * The returned size includes the end of string character
  1959. * Returns 1 if successful or -1 on error
  1960. */
  1961. LIBPFF_EXTERN \
  1962. int libpff_multi_value_get_value_utf8_string_size(
  1963. libpff_multi_value_t *multi_value,
  1964. int value_index,
  1965. size_t *utf8_string_size,
  1966. libpff_error_t **error );
  1967. /* Retrieves the UTF-8 string value of a specific value of the multi value
  1968. * The size should include the end of string character
  1969. * Returns 1 if successful or -1 on error
  1970. */
  1971. LIBPFF_EXTERN \
  1972. int libpff_multi_value_get_value_utf8_string(
  1973. libpff_multi_value_t *multi_value,
  1974. int value_index,
  1975. uint8_t *utf8_string,
  1976. size_t utf8_string_size,
  1977. libpff_error_t **error );
  1978. /* Retrieves the UTF-16 string size of a specific value of the multi value
  1979. * The returned size includes the end of string character
  1980. * Returns 1 if successful or -1 on error
  1981. */
  1982. LIBPFF_EXTERN \
  1983. int libpff_multi_value_get_value_utf16_string_size(
  1984. libpff_multi_value_t *multi_value,
  1985. int value_index,
  1986. size_t *utf16_string_size,
  1987. libpff_error_t **error );
  1988. /* Retrieves the UTF-16 string value of a specific value of the multi value
  1989. * The size should include the end of string character
  1990. * Returns 1 if successful or -1 on error
  1991. */
  1992. LIBPFF_EXTERN \
  1993. int libpff_multi_value_get_value_utf16_string(
  1994. libpff_multi_value_t *multi_value,
  1995. int value_index,
  1996. uint16_t *utf16_string,
  1997. size_t utf16_string_size,
  1998. libpff_error_t **error );
  1999. /* Retrieves the size of a binary data value of a specific value of the multi value
  2000. * Returns 1 if successful or -1 on error
  2001. */
  2002. LIBPFF_EXTERN \
  2003. int libpff_multi_value_get_value_binary_data_size(
  2004. libpff_multi_value_t *multi_value,
  2005. int value_index,
  2006. size_t *size,
  2007. libpff_error_t **error );
  2008. /* Retrieves the binary data value of a specific value of the multi value
  2009. * Returns 1 if successful or -1 on error
  2010. */
  2011. LIBPFF_EXTERN \
  2012. int libpff_multi_value_get_value_binary_data(
  2013. libpff_multi_value_t *multi_value,
  2014. int value_index,
  2015. uint8_t *binary_data,
  2016. size_t size,
  2017. libpff_error_t **error );
  2018. /* Retrieves the GUID value of a specific value of the multi value
  2019. * Returns 1 if successful or -1 on error
  2020. */
  2021. LIBPFF_EXTERN \
  2022. int libpff_multi_value_get_value_guid(
  2023. libpff_multi_value_t *multi_value,
  2024. int value_index,
  2025. uint8_t *guid,
  2026. size_t size,
  2027. libpff_error_t **error );
  2028. /* -------------------------------------------------------------------------
  2029. * Folder item functions
  2030. * ------------------------------------------------------------------------- */
  2031. /* Retrieves the folder type
  2032. * Returns 1 if successful or -1 on error
  2033. */
  2034. LIBPFF_EXTERN \
  2035. int libpff_folder_get_type(
  2036. libpff_item_t *folder,
  2037. uint8_t *type,
  2038. libpff_error_t **error );
  2039. /* Retrieves the size of the UTF-8 encoded name
  2040. * The size includes the end of string character
  2041. * Returns 1 if successful, 0 if value is not available or -1 on error
  2042. */
  2043. LIBPFF_EXTERN \
  2044. int libpff_folder_get_utf8_name_size(
  2045. libpff_item_t *folder,
  2046. size_t *utf8_string_size,
  2047. libpff_error_t **error );
  2048. /* Retrieves the UTF-8 encoded name
  2049. * The size should include the end of string character
  2050. * Returns 1 if successful, 0 if value is not available or -1 on error
  2051. */
  2052. LIBPFF_EXTERN \
  2053. int libpff_folder_get_utf8_name(
  2054. libpff_item_t *folder,
  2055. uint8_t *utf8_string,
  2056. size_t utf8_string_size,
  2057. libpff_error_t **error );
  2058. /* Retrieves the size of the UTF-16 encoded name
  2059. * The size includes the end of string character
  2060. * Returns 1 if successful, 0 if value is not available or -1 on error
  2061. */
  2062. LIBPFF_EXTERN \
  2063. int libpff_folder_get_utf16_name_size(
  2064. libpff_item_t *folder,
  2065. size_t *utf16_string_size,
  2066. libpff_error_t **error );
  2067. /* Retrieves the UTF-16 encoded name
  2068. * The size should include the end of string character
  2069. * Returns 1 if successful, 0 if value is not available or -1 on error
  2070. */
  2071. LIBPFF_EXTERN \
  2072. int libpff_folder_get_utf16_name(
  2073. libpff_item_t *folder,
  2074. uint16_t *utf16_string,
  2075. size_t utf16_string_size,
  2076. libpff_error_t **error );
  2077. /* Retrieves the number of sub folders from a folder
  2078. * Returns 1 if successful or -1 on error
  2079. */
  2080. LIBPFF_EXTERN \
  2081. int libpff_folder_get_number_of_sub_folders(
  2082. libpff_item_t *folder,
  2083. int *number_of_sub_folders,
  2084. libpff_error_t **error );
  2085. /* Retrieves the sub folder for the specific index from a folder
  2086. * Returns 1 if successful or -1 on error
  2087. */
  2088. LIBPFF_EXTERN \
  2089. int libpff_folder_get_sub_folder(
  2090. libpff_item_t *folder,
  2091. int sub_folder_index,
  2092. libpff_item_t **sub_folder,
  2093. libpff_error_t **error );
  2094. /* Retrieves the sub folder from a folder for the specific UTF-8 encoded name
  2095. * This function uses the PidTagDisplayName MAPI property as the name
  2096. * Returns 1 if successful, 0 if no such sub folder or -1 on error
  2097. */
  2098. LIBPFF_EXTERN \
  2099. int libpff_folder_get_sub_folder_by_utf8_name(
  2100. libpff_item_t *folder,
  2101. uint8_t *utf8_sub_folder_name,
  2102. size_t utf8_sub_folder_name_size,
  2103. libpff_item_t **sub_folder,
  2104. libpff_error_t **error );
  2105. /* Retrieves the sub folder from a folder for the specific UTF-16 encoded name
  2106. * This function uses the PidTagDisplayName MAPI property as the name
  2107. * Returns 1 if successful, 0 if no such sub folder or -1 on error
  2108. */
  2109. LIBPFF_EXTERN \
  2110. int libpff_folder_get_sub_folder_by_utf16_name(
  2111. libpff_item_t *folder,
  2112. uint16_t *utf16_sub_folder_name,
  2113. size_t utf16_sub_folder_name_size,
  2114. libpff_item_t **sub_folder,
  2115. libpff_error_t **error );
  2116. /* Retrieves the sub folders from a folder
  2117. * Returns 1 if successful, 0 if not available or -1 on error
  2118. */
  2119. LIBPFF_EXTERN \
  2120. int libpff_folder_get_sub_folders(
  2121. libpff_item_t *folder,
  2122. libpff_item_t **sub_folders,
  2123. libpff_error_t **error );
  2124. /* Retrieves the number of sub messages from a folder
  2125. * Returns 1 if successful or -1 on error
  2126. */
  2127. LIBPFF_EXTERN \
  2128. int libpff_folder_get_number_of_sub_messages(
  2129. libpff_item_t *folder,
  2130. int *number_of_sub_messages,
  2131. libpff_error_t **error );
  2132. /* Retrieves the sub message for the specific index from a folder
  2133. * Returns 1 if successful or -1 on error
  2134. */
  2135. LIBPFF_EXTERN \
  2136. int libpff_folder_get_sub_message(
  2137. libpff_item_t *folder,
  2138. int sub_message_index,
  2139. libpff_item_t **sub_message,
  2140. libpff_error_t **error );
  2141. /* Retrieves the sub message from a folder for the specific UTF-8 encoded name
  2142. * This function uses the PidTagDisplayName MAPI property as the name
  2143. * Returns 1 if successful, 0 if no such sub message or -1 on error
  2144. */
  2145. LIBPFF_EXTERN \
  2146. int libpff_folder_get_sub_message_by_utf8_name(
  2147. libpff_item_t *folder,
  2148. uint8_t *utf8_sub_message_name,
  2149. size_t utf8_sub_message_name_size,
  2150. libpff_item_t **sub_message,
  2151. libpff_error_t **error );
  2152. /* Retrieves the sub message from a folder for the specific UTF-16 encoded name
  2153. * This function uses the PidTagDisplayName MAPI property as the name
  2154. * Returns 1 if successful, 0 if no such sub message or -1 on error
  2155. */
  2156. LIBPFF_EXTERN \
  2157. int libpff_folder_get_sub_message_by_utf16_name(
  2158. libpff_item_t *folder,
  2159. uint16_t *utf16_sub_message_name,
  2160. size_t utf16_sub_message_name_size,
  2161. libpff_item_t **sub_message,
  2162. libpff_error_t **error );
  2163. /* Retrieves the sub messages from a folder
  2164. * Returns 1 if successful, 0 if not available or -1 on error
  2165. */
  2166. LIBPFF_EXTERN \
  2167. int libpff_folder_get_sub_messages(
  2168. libpff_item_t *folder,
  2169. libpff_item_t **sub_messages,
  2170. libpff_error_t **error );
  2171. /* Retrieves the number of sub associated contents from a folder
  2172. * Returns 1 if successful or -1 on error
  2173. */
  2174. LIBPFF_EXTERN \
  2175. int libpff_folder_get_number_of_sub_associated_contents(
  2176. libpff_item_t *folder,
  2177. int *number_of_sub_associated_contents,
  2178. libpff_error_t **error );
  2179. /* Retrieves the sub associated content for the specific index from a folder
  2180. * Returns 1 if successful or -1 on error
  2181. */
  2182. LIBPFF_EXTERN \
  2183. int libpff_folder_get_sub_associated_content(
  2184. libpff_item_t *folder,
  2185. int sub_associated_content_index,
  2186. libpff_item_t **sub_associated_content,
  2187. libpff_error_t **error );
  2188. /* Retrieves the sub associated contents from a folder
  2189. * Returns 1 if successful, 0 if not available or -1 on error
  2190. */
  2191. LIBPFF_EXTERN \
  2192. int libpff_folder_get_sub_associated_contents(
  2193. libpff_item_t *folder,
  2194. libpff_item_t **sub_associated_contents,
  2195. libpff_error_t **error );
  2196. /* NOTE that the following function is currently for debugging only */
  2197. /* Retrieves the unknowns from a folder
  2198. * Returns 1 if successful, 0 if not available or -1 on error
  2199. */
  2200. LIBPFF_EXTERN \
  2201. int libpff_folder_get_unknowns(
  2202. libpff_item_t *folder,
  2203. libpff_item_t **unknowns,
  2204. libpff_error_t **error );
  2205. /* -------------------------------------------------------------------------
  2206. * Message store functions - deprecated
  2207. * ------------------------------------------------------------------------- */
  2208. /* Retrieves the message store valid folder mask
  2209. * Returns 1 if successful, 0 if not available or -1 on error
  2210. */
  2211. #define libpff_message_store_get_valid_folder_mask( message_store, valid_folder_mask, error ) \
  2212. libpff_item_get_entry_value_32bit( message_store, 0, LIBPFF_ENTRY_TYPE_MESSAGE_STORE_VALID_FOLDER_MASK, valid_folder_mask, 0, error )
  2213. /* Retrieves the message store password checksum
  2214. * Returns 1 if successful, 0 if not available or -1 on error
  2215. */
  2216. #define libpff_message_store_get_password_checksum( message_store, password_checksum, error ) \
  2217. libpff_item_get_entry_value_32bit( message_store, 0, LIBPFF_ENTRY_TYPE_MESSAGE_STORE_PASSWORD_CHECKSUM, password_checksum, 0, error )
  2218. /* -------------------------------------------------------------------------
  2219. * Message item functions
  2220. * ------------------------------------------------------------------------- */
  2221. /* Retrieves the UTF-8 string size of a specific entry
  2222. * The returned size includes the end of string character
  2223. * Returns 1 if successful, 0 if not available or -1 on error
  2224. */
  2225. LIBPFF_EXTERN \
  2226. int libpff_message_get_entry_value_utf8_string_size(
  2227. libpff_item_t *message,
  2228. uint32_t entry_type,
  2229. size_t *utf8_string_size,
  2230. libpff_error_t **error );
  2231. /* Retrieves the UTF-8 string value of a specific entry
  2232. * The function uses a codepage if necessary, it tries to read PidTagMessageCodepage
  2233. * if not available it uses the codepage set for the library
  2234. * The size should include the end of string character
  2235. * Returns 1 if successful, 0 if not available or -1 on error
  2236. */
  2237. LIBPFF_EXTERN \
  2238. int libpff_message_get_entry_value_utf8_string(
  2239. libpff_item_t *message,
  2240. uint32_t entry_type,
  2241. uint8_t *utf8_string,
  2242. size_t utf8_string_size,
  2243. libpff_error_t **error );
  2244. /* Retrieves the UTF-16 string size of a specific entry
  2245. * The returned size includes the end of string character
  2246. * Returns 1 if successful, 0 if not available or -1 on error
  2247. */
  2248. LIBPFF_EXTERN \
  2249. int libpff_message_get_entry_value_utf16_string_size(
  2250. libpff_item_t *message,
  2251. uint32_t entry_type,
  2252. size_t *utf16_string_size,
  2253. libpff_error_t **error );
  2254. /* Retrieves the UTF-16 string value of a specific entry
  2255. * The function uses a codepage if necessary, it tries to read PidTagMessageCodepage
  2256. * if not available it uses the codepage set for the library
  2257. * The size should include the end of string character
  2258. * Returns 1 if successful, 0 if not available or -1 on error
  2259. */
  2260. LIBPFF_EXTERN \
  2261. int libpff_message_get_entry_value_utf16_string(
  2262. libpff_item_t *message,
  2263. uint32_t entry_type,
  2264. uint16_t *utf16_string,
  2265. size_t utf16_string_size,
  2266. libpff_error_t **error );
  2267. /* TODO add convenience functions for subject */
  2268. /* TODO add convenience functions for conversation_topic */
  2269. /* TODO add convenience functions for sender_name */
  2270. /* Retrieves the 64-bit FILETIME value containing message client submit time
  2271. * Returns 1 if successful, 0 if not available or -1 on error
  2272. */
  2273. LIBPFF_EXTERN \
  2274. int libpff_message_get_client_submit_time(
  2275. libpff_item_t *message,
  2276. uint64_t *filetime,
  2277. libpff_error_t **error );
  2278. /* Retrieves the 64-bit FILETIME value containing message delivery time
  2279. * Returns 1 if successful, 0 if not available or -1 on error
  2280. */
  2281. LIBPFF_EXTERN \
  2282. int libpff_message_get_delivery_time(
  2283. libpff_item_t *message,
  2284. uint64_t *filetime,
  2285. libpff_error_t **error );
  2286. /* Retrieves the 64-bit FILETIME value containing message creation time
  2287. * Returns 1 if successful, 0 if not available or -1 on error
  2288. */
  2289. LIBPFF_EXTERN \
  2290. int libpff_message_get_creation_time(
  2291. libpff_item_t *message,
  2292. uint64_t *filetime,
  2293. libpff_error_t **error );
  2294. /* Retrieves the 64-bit FILETIME value containing message modification time
  2295. * Returns 1 if successful, 0 if not available or -1 on error
  2296. */
  2297. LIBPFF_EXTERN \
  2298. int libpff_message_get_modification_time(
  2299. libpff_item_t *message,
  2300. uint64_t *filetime,
  2301. libpff_error_t **error );
  2302. /* Retrieves the number of attachment from a message item
  2303. * Returns 1 if successful or -1 on error
  2304. */
  2305. LIBPFF_EXTERN \
  2306. int libpff_message_get_number_of_attachments(
  2307. libpff_item_t *message,
  2308. int *number_of_attachments,
  2309. libpff_error_t **error );
  2310. /* Retrieves the attachment for the specific index from a message item
  2311. * Returns 1 if successful or -1 on error
  2312. */
  2313. LIBPFF_EXTERN \
  2314. int libpff_message_get_attachment(
  2315. libpff_item_t *message,
  2316. int attachment_index,
  2317. libpff_item_t **attachment,
  2318. libpff_error_t **error );
  2319. /* Retrieves the attachments from a message item
  2320. * Returns 1 if successful, 0 if not available or -1 on error
  2321. */
  2322. LIBPFF_EXTERN \
  2323. int libpff_message_get_attachments(
  2324. libpff_item_t *message,
  2325. libpff_item_t **attachments,
  2326. libpff_error_t **error );
  2327. /* Retrieves the recipients from a message item
  2328. * Returns 1 if successful, 0 if not available or -1 on error
  2329. */
  2330. LIBPFF_EXTERN \
  2331. int libpff_message_get_recipients(
  2332. libpff_item_t *message,
  2333. libpff_item_t **recipients,
  2334. libpff_error_t **error );
  2335. /* Retrieves the message plain text body size
  2336. * Size includes the end of string character
  2337. * Returns 1 if successful, 0 if not available or -1 on error
  2338. */
  2339. LIBPFF_EXTERN \
  2340. int libpff_message_get_plain_text_body_size(
  2341. libpff_item_t *message,
  2342. size_t *size,
  2343. libpff_error_t **error );
  2344. /* Retrieves the plain text message body
  2345. * The body is encoded in UTF-8
  2346. * The function uses a codepage if necessary, it tries to read PidTagInternetCodepage first,
  2347. * after that PidTagMessageCodepage and if not available it uses the codepage set for the library
  2348. * Size should include the end of string character
  2349. * Returns 1 if successful, 0 if not available or -1 on error
  2350. */
  2351. LIBPFF_EXTERN \
  2352. int libpff_message_get_plain_text_body(
  2353. libpff_item_t *message,
  2354. uint8_t *message_body,
  2355. size_t size,
  2356. libpff_error_t **error );
  2357. /* Retrieves the message RTF body size
  2358. * Size includes the end of string character
  2359. * Returns 1 if successful, 0 if not available or -1 on error
  2360. */
  2361. LIBPFF_EXTERN \
  2362. int libpff_message_get_rtf_body_size(
  2363. libpff_item_t *message,
  2364. size_t *size,
  2365. libpff_error_t **error );
  2366. /* Retrieves the RTF message body
  2367. * The body is encoded in UTF-8
  2368. * Size should include the end of string character
  2369. * Returns 1 if successful, 0 if not available or -1 on error
  2370. */
  2371. LIBPFF_EXTERN \
  2372. int libpff_message_get_rtf_body(
  2373. libpff_item_t *message,
  2374. uint8_t *message_body,
  2375. size_t size,
  2376. libpff_error_t **error );
  2377. /* Retrieves the message HTML body size
  2378. * Size includes the end of string character
  2379. * Returns 1 if successful, 0 if not available or -1 on error
  2380. */
  2381. LIBPFF_EXTERN \
  2382. int libpff_message_get_html_body_size(
  2383. libpff_item_t *message,
  2384. size_t *size,
  2385. libpff_error_t **error );
  2386. /* Retrieves the HTML message body
  2387. * Size should include the end of string character
  2388. * Returns 1 if successful, 0 if not available or -1 on error
  2389. */
  2390. LIBPFF_EXTERN \
  2391. int libpff_message_get_html_body(
  2392. libpff_item_t *message,
  2393. uint8_t *message_body,
  2394. size_t size,
  2395. libpff_error_t **error );
  2396. /* -------------------------------------------------------------------------
  2397. * Message functions - deprecated
  2398. * ------------------------------------------------------------------------- */
  2399. /* Retrieves the size of the UTF-8 encoded message class
  2400. * Size includes the end of string character
  2401. * Returns 1 if successful, 0 if not available or -1 on error
  2402. */
  2403. #define libpff_message_get_utf8_class_size( message, utf8_string_size, error ) \
  2404. libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_CLASS, utf8_string_size, error )
  2405. /* Retrieves the UTF-8 encoded message class
  2406. * Returns 1 if successful, 0 if not available or -1 on error
  2407. */
  2408. #define libpff_message_get_utf8_class( message, utf8_string, utf8_string_size, error ) \
  2409. libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_CLASS, utf8_string, utf8_string_size, error )
  2410. /* Retrieves the size of the UTF-16 encoded message class
  2411. * Size includes the end of string character
  2412. * Returns 1 if successful, 0 if not available or -1 on error
  2413. */
  2414. #define libpff_message_get_utf16_class_size( message, utf16_string_size, error ) \
  2415. libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_CLASS, utf16_string_size, error )
  2416. /* Retrieves the UTF-16 encoded message class
  2417. * Returns 1 if successful, 0 if not available or -1 on error
  2418. */
  2419. #define libpff_message_get_utf16_class( message, utf16_string, utf16_string_size, error ) \
  2420. libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_CLASS, utf16_string, utf16_string_size, error )
  2421. /* Retrieves the size of the UTF-8 encoded message subject
  2422. * Size includes the end of string character
  2423. * Returns 1 if successful, 0 if not available or -1 on error
  2424. */
  2425. #define libpff_message_get_utf8_subject_size( message, utf8_string_size, error ) \
  2426. libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SUBJECT, utf8_string_size, error )
  2427. /* Retrieves the UTF-8 encoded message subject
  2428. * Returns 1 if successful, 0 if not available or -1 on error
  2429. */
  2430. #define libpff_message_get_utf8_subject( message, utf8_string, utf8_string_size, error ) \
  2431. libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SUBJECT, utf8_string, utf8_string_size, error )
  2432. /* Retrieves the size of the UTF-16 encoded message subject
  2433. * Size includes the end of string character
  2434. * Returns 1 if successful, 0 if not available or -1 on error
  2435. */
  2436. #define libpff_message_get_utf16_subject_size( message, utf16_string_size, error ) \
  2437. libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SUBJECT, utf16_string_size, error )
  2438. /* Retrieves the UTF-16 encoded message subject
  2439. * Returns 1 if successful, 0 if not available or -1 on error
  2440. */
  2441. #define libpff_message_get_utf16_subject( message, utf16_string, utf16_string_size, error ) \
  2442. libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SUBJECT, utf16_string, utf16_string_size, error )
  2443. /* Retrieves the size of the UTF-8 encoded message conversation topic
  2444. * Size includes the end of string character
  2445. * Returns 1 if successful, 0 if not available or -1 on error
  2446. */
  2447. #define libpff_message_get_utf8_conversation_topic_size( message, utf8_string_size, error ) \
  2448. libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_TOPIC, utf8_string_size, error )
  2449. /* Retrieves the UTF-8 encoded message conversation topic
  2450. * Returns 1 if successful, 0 if not available or -1 on error
  2451. */
  2452. #define libpff_message_get_utf8_conversation_topic( message, utf8_string, utf8_string_size, error ) \
  2453. libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_TOPIC, utf8_string, utf8_string_size, error )
  2454. /* Retrieves the size of the UTF-16 encoded message conversation topic
  2455. * Size includes the end of string character
  2456. * Returns 1 if successful, 0 if not available or -1 on error
  2457. */
  2458. #define libpff_message_get_utf16_conversation_topic_size( message, utf16_string_size, error ) \
  2459. libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_TOPIC, utf16_string_size, error )
  2460. /* Retrieves the UTF-16 encoded message conversation topic
  2461. * Returns 1 if successful, 0 if not available or -1 on error
  2462. */
  2463. #define libpff_message_get_utf16_conversation_topic( message, utf16_string, utf16_string_size, error ) \
  2464. libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_TOPIC, utf16_string, utf16_string_size, error )
  2465. /* Retrieves the message conversation index size
  2466. * Returns 1 if successful, 0 if not available or -1 on error
  2467. */
  2468. #define libpff_message_get_conversation_index_size( message, size, error ) \
  2469. libpff_item_get_entry_value_binary_data_size( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_INDEX, size, 0, error )
  2470. /* Retrieves the message conversation index
  2471. * Returns 1 if successful, 0 if not available or -1 on error
  2472. */
  2473. #define libpff_message_get_conversation_index( message, conversation_index, size, error ) \
  2474. libpff_item_get_entry_value_binary_data( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_INDEX, conversation_index, size, 0, error )
  2475. /* Retrieves the size of the UTF-8 encoded message sender name
  2476. * Size includes the end of string character
  2477. * Returns 1 if successful, 0 if not available or -1 on error
  2478. */
  2479. #define libpff_message_get_utf8_sender_name_size( message, utf8_string_size, error ) \
  2480. libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_NAME, utf8_string_size, error )
  2481. /* Retrieves the UTF-8 encoded message sender name
  2482. * Returns 1 if successful, 0 if not available or -1 on error
  2483. */
  2484. #define libpff_message_get_utf8_sender_name( message, utf8_string, utf8_string_size, error ) \
  2485. libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_NAME, utf8_string, utf8_string_size, error )
  2486. /* Retrieves the size of the UTF-16 encoded message sender name
  2487. * Size includes the end of string character
  2488. * Returns 1 if successful, 0 if not available or -1 on error
  2489. */
  2490. #define libpff_message_get_utf16_sender_name_size( message, utf16_string_size, error ) \
  2491. libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_NAME, utf16_string_size, error )
  2492. /* Retrieves the UTF-16 encoded message sender name
  2493. * Returns 1 if successful, 0 if not available or -1 on error
  2494. */
  2495. #define libpff_message_get_utf16_sender_name( message, utf16_string, utf16_string_size, error ) \
  2496. libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_NAME, utf16_string, utf16_string_size, error )
  2497. /* Retrieves the size of the UTF-8 encoded message sender e-mail address
  2498. * Size includes the end of string character
  2499. * Returns 1 if successful, 0 if not available or -1 on error
  2500. */
  2501. #define libpff_message_get_utf8_sender_email_address_size( message, utf8_string_size, error ) \
  2502. libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_EMAIL_ADDRESS, utf8_string_size, error )
  2503. /* Retrieves the UTF-8 encoded message sender e-mail address
  2504. * Returns 1 if successful, 0 if not available or -1 on error
  2505. */
  2506. #define libpff_message_get_utf8_sender_email_address( message, utf8_string, utf8_string_size, error ) \
  2507. libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_EMAIL_ADDRESS, utf8_string, utf8_string_size, error )
  2508. /* Retrieves the size of the UTF-16 encoded message sender e-mail address
  2509. * Size includes the end of string character
  2510. * Returns 1 if successful, 0 if not available or -1 on error
  2511. */
  2512. #define libpff_message_get_utf16_sender_email_address_size( message, utf16_string_size, error ) \
  2513. libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_EMAIL_ADDRESS, utf16_string_size, error )
  2514. /* Retrieves the UTF-16 encoded message sender e-mail address
  2515. * Returns 1 if successful, 0 if not available or -1 on error
  2516. */
  2517. #define libpff_message_get_utf16_sender_email_address( message, utf16_string, utf16_string_size, error ) \
  2518. libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_EMAIL_ADDRESS, utf16_string, utf16_string_size, error )
  2519. /* Retrieves the size of the UTF-8 encoded message sent reprenting name
  2520. * Size includes the end of string character
  2521. * Returns 1 if successful, 0 if not available or -1 on error
  2522. */
  2523. #define libpff_message_get_utf8_sent_representing_name_size( message, utf8_string_size, error ) \
  2524. libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_NAME, utf8_string_size, error )
  2525. /* Retrieves the UTF-8 encoded message sent reprenting name
  2526. * Returns 1 if successful, 0 if not available or -1 on error
  2527. */
  2528. #define libpff_message_get_utf8_sent_representing_name( message, utf8_string, utf8_string_size, error ) \
  2529. libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_NAME, utf8_string, utf8_string_size, error )
  2530. /* Retrieves the size of the UTF-16 encoded message sent reprenting name
  2531. * Size includes the end of string character
  2532. * Returns 1 if successful, 0 if not available or -1 on error
  2533. */
  2534. #define libpff_message_get_utf16_sent_representing_name_size( message, utf16_string_size, error ) \
  2535. libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_NAME, utf16_string_size, error )
  2536. /* Retrieves the UTF-16 encoded message sent reprenting name
  2537. * Returns 1 if successful, 0 if not available or -1 on error
  2538. */
  2539. #define libpff_message_get_utf16_sent_representing_name( message, utf16_string, utf16_string_size, error ) \
  2540. libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_NAME, utf16_string, utf16_string_size, error )
  2541. /* Retrieves the size of the UTF-8 encoded message sent representing e-mail address
  2542. * Size includes the end of string character
  2543. * Returns 1 if successful, 0 if not available or -1 on error
  2544. */
  2545. #define libpff_message_get_utf8_sent_representing_email_address_size( message, utf8_string_size, error ) \
  2546. libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_EMAIL_ADDRESS, utf8_string_size, error )
  2547. /* Retrieves the UTF-8 encoded message sent representing e-mail address
  2548. * Returns 1 if successful, 0 if not available or -1 on error
  2549. */
  2550. #define libpff_message_get_utf8_sent_representing_email_address( message, utf8_string, utf8_string_size, error ) \
  2551. libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_EMAIL_ADDRESS, utf8_string, utf8_string_size, error )
  2552. /* Retrieves the size of the UTF-16 encoded message sent representing e-mail address
  2553. * Size includes the end of string character
  2554. * Returns 1 if successful, 0 if not available or -1 on error
  2555. */
  2556. #define libpff_message_get_utf16_sent_representing_email_address_size( message, utf16_string_size, error ) \
  2557. libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_EMAIL_ADDRESS, utf16_string_size, error )
  2558. /* Retrieves the UTF-16 encoded message sent representing e-mail address
  2559. * Returns 1 if successful, 0 if not available or -1 on error
  2560. */
  2561. #define libpff_message_get_utf16_sent_representing_email_address( message, utf16_string, utf16_string_size, error ) \
  2562. libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_EMAIL_ADDRESS, utf16_string, utf16_string_size, error )
  2563. /* Retrieves the size of the UTF-8 encoded message received by name
  2564. * Size includes the end of string character
  2565. * Returns 1 if successful, 0 if not available or -1 on error
  2566. */
  2567. #define libpff_message_get_utf8_received_by_name_size( message, utf8_string_size, error ) \
  2568. libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_NAME, utf8_string_size, error )
  2569. /* Retrieves the UTF-8 encoded message received by name
  2570. * Returns 1 if successful, 0 if not available or -1 on error
  2571. */
  2572. #define libpff_message_get_utf8_received_by_name( message, utf8_string, utf8_string_size, error ) \
  2573. libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_NAME, utf8_string, utf8_string_size, error )
  2574. /* Retrieves the size of the UTF-16 encoded message received by name
  2575. * Size includes the end of string character
  2576. * Returns 1 if successful, 0 if not available or -1 on error
  2577. */
  2578. #define libpff_message_get_utf16_received_by_name_size( message, utf16_string_size, error ) \
  2579. libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_NAME, utf16_string_size, error )
  2580. /* Retrieves the UTF-16 encoded message received by name
  2581. * Returns 1 if successful, 0 if not available or -1 on error
  2582. */
  2583. #define libpff_message_get_utf16_received_by_name( message, utf16_string, utf16_string_size, error ) \
  2584. libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_NAME, utf16_string, utf16_string_size, error )
  2585. /* Retrieves the size of the UTF-8 encoded message received by e-mail address
  2586. * Size includes the end of string character
  2587. * Returns 1 if successful, 0 if not available or -1 on error
  2588. */
  2589. #define libpff_message_get_utf8_received_by_email_address_size( message, utf8_string_size, error ) \
  2590. libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_EMAIL_ADDRESS, utf8_string_size, error )
  2591. /* Retrieves the UTF-8 encoded message received by e-mail address
  2592. * Returns 1 if successful, 0 if not available or -1 on error
  2593. */
  2594. #define libpff_message_get_utf8_received_by_email_address( message, utf8_string, utf8_string_size, error ) \
  2595. libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_EMAIL_ADDRESS, utf8_string, utf8_string_size, error )
  2596. /* Retrieves the size of the UTF-16 encoded message received by e-mail address
  2597. * Size includes the end of string character
  2598. * Returns 1 if successful, 0 if not available or -1 on error
  2599. */
  2600. #define libpff_message_get_utf16_received_by_email_address_size( message, utf16_string_size, error ) \
  2601. libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_EMAIL_ADDRESS, utf16_string_size, error )
  2602. /* Retrieves the UTF-16 encoded message received by e-mail address
  2603. * Returns 1 if successful, 0 if not available or -1 on error
  2604. */
  2605. #define libpff_message_get_utf16_received_by_email_address( message, utf16_string, utf16_string_size, error ) \
  2606. libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_EMAIL_ADDRESS, utf16_string, utf16_string_size, error )
  2607. /* Retrieves the size of the UTF-8 encoded message transport headers
  2608. * Size includes the end of string character
  2609. * Returns 1 if successful, 0 if not available or -1 on error
  2610. */
  2611. #define libpff_message_get_utf8_transport_headers_size( message, utf8_string_size, error ) \
  2612. libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_TRANSPORT_HEADERS, utf8_string_size, error )
  2613. /* Retrieves the UTF-8 encoded message transport headers
  2614. * Size should include the end of string character
  2615. * Returns 1 if successful, 0 if not available or -1 on error
  2616. */
  2617. #define libpff_message_get_utf8_transport_headers( message, utf8_string, utf8_string_size, error ) \
  2618. libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_TRANSPORT_HEADERS, utf8_string, utf8_string_size, error )
  2619. /* Retrieves the size of the UTF-16 encoded message transport headers
  2620. * Size includes the end of string character
  2621. * Returns 1 if successful, 0 if not available or -1 on error
  2622. */
  2623. #define libpff_message_get_utf16_transport_headers_size( message, utf16_string_size, error ) \
  2624. libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_TRANSPORT_HEADERS, utf16_string_size, error )
  2625. /* Retrieves the UTF-16 encoded message transport headers
  2626. * Size should include the end of string character
  2627. * Returns 1 if successful, 0 if not available or -1 on error
  2628. */
  2629. #define libpff_message_get_utf16_transport_headers( message, utf16_string, utf16_string_size, error ) \
  2630. libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_TRANSPORT_HEADERS, utf16_string, utf16_string_size, error )
  2631. /* Retrieves the message reminder time
  2632. * Returns 1 if successful, 0 if not available or -1 on error
  2633. */
  2634. #define libpff_message_get_reminder_time( message, reminder_time, error ) \
  2635. libpff_item_get_entry_value_filetime( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_REMINDER_TIME, reminder_time, 0, error )
  2636. /* Retrieves the value indicating if the message is a reminder
  2637. * Returns 1 if successful, 0 if not available or -1 on error
  2638. */
  2639. #define libpff_message_get_is_reminder( message, is_reminder, error ) \
  2640. libpff_item_get_entry_value_boolean( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_IS_REMINDER, is_reminder, 0, error )
  2641. /* Retrieves the value indicating if the message is private
  2642. * Returns 1 if successful, 0 if not available or -1 on error
  2643. */
  2644. #define libpff_message_get_is_private( message, is_private, error ) \
  2645. libpff_item_get_entry_value_boolean( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_IS_PRIVATE, is_private, 0, error )
  2646. /* Retrieves the message reminder signal time
  2647. * Returns 1 if successful, 0 if not available or -1 on error
  2648. */
  2649. #define libpff_message_get_reminder_signal_time( message, reminder_signal_time, error ) \
  2650. libpff_item_get_entry_value_filetime( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_REMINDER_SIGNAL_TIME, reminder_signal_time, 0, error )
  2651. /* Retrieves the message importance
  2652. * Returns 1 if successful, 0 if not available or -1 on error
  2653. */
  2654. #define libpff_message_get_importance( message, importance, error ) \
  2655. libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_IMPORTANCE, importance, 0, error )
  2656. /* Retrieves the message priority
  2657. * Returns 1 if successful, 0 if not available or -1 on error
  2658. */
  2659. #define libpff_message_get_priority( message, priority, error ) \
  2660. libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_PRIORITY, priority, 0, error )
  2661. /* Retrieves the message sensitivity
  2662. * Returns 1 if successful, 0 if not available or -1 on error
  2663. */
  2664. #define libpff_message_get_sensitivity( message, sensitivity, error ) \
  2665. libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_SENSITIVITY, sensitivity, 0, error )
  2666. /* Retrieves the message flags
  2667. * Returns 1 if successful, 0 if not available or -1 on error
  2668. */
  2669. #define libpff_message_get_flags( message, flags, error ) \
  2670. libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_FLAGS, flags, 0, error )
  2671. /* Retrieves the message size
  2672. * Returns 1 if successful, 0 if not available or -1 on error
  2673. */
  2674. #define libpff_message_get_size( message, size, error ) \
  2675. libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_SIZE, size, 0, error )
  2676. /* Retrieves the message status (flags)
  2677. * Returns 1 if successful, 0 if not available or -1 on error
  2678. */
  2679. #define libpff_message_get_status( message, status, error ) \
  2680. libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_STATUS, status, 0, error )
  2681. /* -------------------------------------------------------------------------
  2682. * Task functions - deprecated
  2683. * ------------------------------------------------------------------------- */
  2684. /* Retrieves the task percentage complete
  2685. * Returns 1 if successful, 0 if not available or -1 on error
  2686. */
  2687. #define libpff_task_get_percentage_complete( task, percentage_complete, error ) \
  2688. libpff_item_get_entry_value_floating_point( task, 0, LIBPFF_ENTRY_TYPE_TASK_PERCENTAGE_COMPLETE, percentage_complete, 0, error )
  2689. /* Retrieves the task start date
  2690. * Returns 1 if successful, 0 if not available or -1 on error
  2691. */
  2692. #define libpff_task_start_date( task, start_date, error ) \
  2693. libpff_item_get_entry_value_filetime( task, 0, LIBPFF_ENTRY_TYPE_TASK_START_DATE, start_date, 0, error )
  2694. /* Retrieves the task due date
  2695. * Returns 1 if successful, 0 if not available or -1 on error
  2696. */
  2697. #define libpff_task_due_date( task, due_date, error ) \
  2698. libpff_item_get_entry_value_filetime( task, 0, LIBPFF_ENTRY_TYPE_TASK_DUE_DATE, due_date, 0, error )
  2699. /* Retrieves the value indicating if the task is complete
  2700. * Returns 1 if successful, 0 if not available or -1 on error
  2701. */
  2702. #define libpff_task_get_is_complete( task, is_complete, error ) \
  2703. libpff_item_get_entry_value_boolean( task, 0, LIBPFF_ENTRY_TYPE_TASK_IS_COMPLETE, is_complete, 0, error )
  2704. /* Retrieves the value indicating if the task is recurring
  2705. * Returns 1 if successful, 0 if not available or -1 on error
  2706. */
  2707. #define libpff_task_get_is_recurring( task, is_recurring, error ) \
  2708. libpff_item_get_entry_value_boolean( task, 0, LIBPFF_ENTRY_TYPE_TASK_IS_RECURRING, is_recurring, 0, error )
  2709. /* Retrieves the task status
  2710. * Returns 1 if successful, 0 if not available or -1 on error
  2711. */
  2712. #define libpff_task_get_status( task, status, error ) \
  2713. libpff_item_get_entry_value_32bit( task, 0, LIBPFF_ENTRY_TYPE_TASK_STATUS, status, 0, error )
  2714. /* Retrieves the task actual effort in minutes
  2715. * Returns 1 if successful, 0 if not available or -1 on error
  2716. */
  2717. #define libpff_task_get_actual_effort( task, actual_effort, error ) \
  2718. libpff_item_get_entry_value_32bit( task, 0, LIBPFF_ENTRY_TYPE_TASK_ACTUAL_EFFORT, actual_effort, 0, error )
  2719. /* Retrieves the task total effort in minutes
  2720. * Returns 1 if successful, 0 if not available or -1 on error
  2721. */
  2722. #define libpff_task_get_total_effort( task, total_effort, error ) \
  2723. libpff_item_get_entry_value_32bit( task, 0, LIBPFF_ENTRY_TYPE_TASK_TOTAL_EFFORT, total_effort, 0, error )
  2724. /* Retrieves the task version
  2725. * Returns 1 if successful, 0 if not available or -1 on error
  2726. */
  2727. #define libpff_task_get_version( task, version, error ) \
  2728. libpff_item_get_entry_value_32bit( task, 0, LIBPFF_ENTRY_TYPE_TASK_VERSION, version, 0, error )
  2729. /* -------------------------------------------------------------------------
  2730. * Appointment functions - deprecated
  2731. * ------------------------------------------------------------------------- */
  2732. /* Retrieves the size of the UTF-8 encoded appointment location
  2733. * Size includes the end of string character
  2734. * Returns 1 if successful, 0 if not available or -1 on error
  2735. */
  2736. #define libpff_appointment_get_utf8_location_size( appointment, utf8_string_size, error ) \
  2737. libpff_message_get_entry_value_utf8_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_LOCATION, utf8_string_size, error )
  2738. /* Retrieves the UTF-8 encoded appointment location
  2739. * Returns 1 if successful, 0 if not available or -1 on error
  2740. */
  2741. #define libpff_appointment_get_utf8_location( appointment, utf8_string, utf8_string_size, error ) \
  2742. libpff_message_get_entry_value_utf8_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_LOCATION, utf8_string, utf8_string_size, error )
  2743. /* Retrieves the size of the UTF-16 encoded appointment location
  2744. * Size includes the end of string character
  2745. * Returns 1 if successful, 0 if not available or -1 on error
  2746. */
  2747. #define libpff_appointment_get_utf16_location_size( appointment, utf16_string_size, error ) \
  2748. libpff_message_get_entry_value_utf16_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_LOCATION, utf16_string_size, error )
  2749. /* Retrieves the UTF-16 encoded appointment location
  2750. * Returns 1 if successful, 0 if not available or -1 on error
  2751. */
  2752. #define libpff_appointment_get_utf16_location( appointment, utf16_string, utf16_string_size, error ) \
  2753. libpff_message_get_entry_value_utf16_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_LOCATION, utf16_string, utf16_string_size, error )
  2754. /* Retrieves the appointment start time
  2755. * Returns 1 if successful, 0 if not available or -1 on error
  2756. */
  2757. #define libpff_appointment_get_start_time( appointment, start_time, error ) \
  2758. libpff_item_get_entry_value_filetime( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_START_TIME, start_time, 0, error )
  2759. /* Retrieves the appointment end time
  2760. * Returns 1 if successful, 0 if not available or -1 on error
  2761. */
  2762. #define libpff_appointment_get_end_time( appointment, end_time, error ) \
  2763. libpff_item_get_entry_value_filetime( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_END_TIME, end_time, 0, error )
  2764. /* Retrieves the size of the UTF-8 encoded appointment recurrence pattern
  2765. * Size includes the end of string character
  2766. * Returns 1 if successful, 0 if not available or -1 on error
  2767. */
  2768. #define libpff_appointment_get_utf8_recurrence_pattern_size( appointment, utf8_string_size, error ) \
  2769. libpff_message_get_entry_value_utf8_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_RECURRENCE_PATTERN, utf8_string_size, error )
  2770. /* Retrieves the UTF-8 encoded appointment recurrence pattern
  2771. * Returns 1 if successful, 0 if not available or -1 on error
  2772. */
  2773. #define libpff_appointment_get_utf8_recurrence_pattern( appointment, utf8_string, utf8_string_size, error ) \
  2774. libpff_message_get_entry_value_utf8_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_RECURRENCE_PATTERN, utf8_string, utf8_string_size, error )
  2775. /* Retrieves the size of the UTF-16 encoded appointment recurrence pattern
  2776. * Size includes the end of string character
  2777. * Returns 1 if successful, 0 if not available or -1 on error
  2778. */
  2779. #define libpff_appointment_get_utf16_recurrence_pattern_size( appointment, utf16_string_size, error ) \
  2780. libpff_message_get_entry_value_utf16_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_RECURRENCE_PATTERN, utf16_string_size, error )
  2781. /* Retrieves the UTF-16 encoded appointment recurrence pattern
  2782. * Returns 1 if successful, 0 if not available or -1 on error
  2783. */
  2784. #define libpff_appointment_get_utf16_recurrence_pattern( appointment, utf16_string, utf16_string_size, error ) \
  2785. libpff_message_get_entry_value_utf16_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_RECURRENCE_PATTERN, utf16_string, utf16_string_size, error )
  2786. /* Retrieves the size of the UTF-8 encoded appointment timezone description
  2787. * Size includes the end of string character
  2788. * Returns 1 if successful, 0 if not available or -1 on error
  2789. */
  2790. #define libpff_appointment_get_utf8_timezone_description_size( appointment, utf8_string_size, error ) \
  2791. libpff_message_get_entry_value_utf8_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_TIMEZONE_DESCRIPTION, utf8_string_size, error )
  2792. /* Retrieves the UTF-8 encoded appointment timezone description
  2793. * Returns 1 if successful, 0 if not available or -1 on error
  2794. */
  2795. #define libpff_appointment_get_utf8_timezone_description( appointment, utf8_string, utf8_string_size, error ) \
  2796. libpff_message_get_entry_value_utf8_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_TIMEZONE_DESCRIPTION, utf8_string, utf8_string_size, error )
  2797. /* Retrieves the size of the UTF-16 encoded appointment timezone description
  2798. * Size includes the end of string character
  2799. * Returns 1 if successful, 0 if not available or -1 on error
  2800. */
  2801. #define libpff_appointment_get_utf16_timezone_description_size( appointment, utf16_string_size, error ) \
  2802. libpff_message_get_entry_value_utf16_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_TIMEZONE_DESCRIPTION, utf16_string_size, error )
  2803. /* Retrieves the UTF-16 encoded appointment timezone description
  2804. * Returns 1 if successful, 0 if not available or -1 on error
  2805. */
  2806. #define libpff_appointment_get_utf16_timezone_description( appointment, utf16_string, utf16_string_size, error ) \
  2807. libpff_message_get_entry_value_utf16_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_TIMEZONE_DESCRIPTION, utf16_string, utf16_string_size, error )
  2808. /* Retrieves the appointment first effective time
  2809. * Returns 1 if successful, 0 if not available or -1 on error
  2810. */
  2811. #define libpff_appointment_first_effective_time( appointment, first_effective_time, error ) \
  2812. libpff_item_get_entry_value_filetime( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_FIRST_EFFECTIVE_TIME, first_effective_time, 0, error )
  2813. /* Retrieves the appointment last effective time
  2814. * Returns 1 if successful, 0 if not available or -1 on error
  2815. */
  2816. #define libpff_appointment_last_effective_time( appointment, last_effective_time, error ) \
  2817. libpff_item_get_entry_value_filetime( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_LAST_EFFECTIVE_TIME, last_effective_time, 0, error )
  2818. /* Retrieves the appointment busy status
  2819. * Returns 1 if successful, 0 if not available or -1 on error
  2820. */
  2821. #define libpff_appointment_get_busy_status( appointment, busy_status, error ) \
  2822. libpff_item_get_entry_value_32bit( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_BUSY_STATUS, busy_status, 0, error )
  2823. /* Retrieves the appointment duration in minutes
  2824. * Returns 1 if successful, 0 if not available or -1 on error
  2825. */
  2826. #define libpff_appointment_get_duration( appointment, duration, error ) \
  2827. libpff_item_get_entry_value_32bit( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_DURATION, duration, 0, error )
  2828. /* -------------------------------------------------------------------------
  2829. * Address functions - deprecated
  2830. * ------------------------------------------------------------------------- */
  2831. /* Retrieves the size of the UTF-8 encoded address file under
  2832. * Size includes the end of string character
  2833. * Returns 1 if successful, 0 if not available or -1 on error
  2834. */
  2835. #define libpff_address_get_utf8_file_under_size( address, utf8_string_size, error ) \
  2836. libpff_message_get_entry_value_utf8_string_size( address, LIBPFF_ENTRY_TYPE_ADDRESS_FILE_UNDER, utf8_string_size, error )
  2837. /* Retrieves the UTF-8 encoded address file under
  2838. * Returns 1 if successful, 0 if not available or -1 on error
  2839. */
  2840. #define libpff_address_get_utf8_file_under( address, utf8_string, utf8_string_size, error ) \
  2841. libpff_message_get_entry_value_utf8_string( address, LIBPFF_ENTRY_TYPE_ADDRESS_FILE_UNDER, utf8_string, utf8_string_size, error )
  2842. /* Retrieves the size of the UTF-16 encoded address file under
  2843. * Size includes the end of string character
  2844. * Returns 1 if successful, 0 if not available or -1 on error
  2845. */
  2846. #define libpff_address_get_utf16_file_under_size( address, utf16_string_size, error ) \
  2847. libpff_message_get_entry_value_utf16_string_size( address, LIBPFF_ENTRY_TYPE_ADDRESS_FILE_UNDER, utf16_string_size, error )
  2848. /* Retrieves the UTF-16 encoded address file under
  2849. * Returns 1 if successful, 0 if not available or -1 on error
  2850. */
  2851. #define libpff_address_get_utf16_file_under( address, utf16_string, utf16_string_size, error ) \
  2852. libpff_message_get_entry_value_utf16_string( address, LIBPFF_ENTRY_TYPE_ADDRESS_FILE_UNDER, utf16_string, utf16_string_size, error )
  2853. /* -------------------------------------------------------------------------
  2854. * Contact functions - deprecated
  2855. * ------------------------------------------------------------------------- */
  2856. /* Retrieves the size of the UTF-8 encoded contact generational abbreviation
  2857. * Size includes the end of string character
  2858. * Returns 1 if successful, 0 if not available or -1 on error
  2859. */
  2860. #define libpff_contact_get_utf8_generational_abbreviation_size( contact, utf8_string_size, error ) \
  2861. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_GENERATIONAL_ABBREVIATION, utf8_string_size, error )
  2862. /* Retrieves the UTF-8 encoded contact generational abbreviation name
  2863. * Returns 1 if successful, 0 if not available or -1 on error
  2864. */
  2865. #define libpff_contact_get_utf8_generational_abbreviation( contact, utf8_string, utf8_string_size, error ) \
  2866. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_GENERATIONAL_ABBREVIATION, utf8_string, utf8_string_size, error )
  2867. /* Retrieves the size of the UTF-16 encoded contact generational abbreviation
  2868. * Size includes the end of string character
  2869. * Returns 1 if successful, 0 if not available or -1 on error
  2870. */
  2871. #define libpff_contact_get_utf16_generational_abbreviation_size( contact, utf16_string_size, error ) \
  2872. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_GENERATIONAL_ABBREVIATION, utf16_string_size, error )
  2873. /* Retrieves the UTF-16 encoded contact generational abbreviation name
  2874. * Returns 1 if successful, 0 if not available or -1 on error
  2875. */
  2876. #define libpff_contact_get_utf16_generational_abbreviation( contact, utf16_string, utf16_string_size, error ) \
  2877. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_GENERATIONAL_ABBREVIATION, utf16_string, utf16_string_size, error )
  2878. /* Retrieves the size of the UTF-8 encoded contact given name
  2879. * Size includes the end of string character
  2880. * Returns 1 if successful, 0 if not available or -1 on error
  2881. */
  2882. #define libpff_contact_get_utf8_given_name_size( contact, utf8_string_size, error ) \
  2883. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_GIVEN_NAME, utf8_string_size, error )
  2884. /* Retrieves the UTF-8 encoded contact given name
  2885. * Returns 1 if successful, 0 if not available or -1 on error
  2886. */
  2887. #define libpff_contact_get_utf8_given_name( contact, utf8_string, utf8_string_size, error ) \
  2888. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_GIVEN_NAME, utf8_string, utf8_string_size, error )
  2889. /* Retrieves the size of the UTF-16 encoded contact given name
  2890. * Size includes the end of string character
  2891. * Returns 1 if successful, 0 if not available or -1 on error
  2892. */
  2893. #define libpff_contact_get_utf16_given_name_size( contact, utf16_string_size, error ) \
  2894. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_GIVEN_NAME, utf16_string_size, error )
  2895. /* Retrieves the UTF-16 encoded contact given name
  2896. * Returns 1 if successful, 0 if not available or -1 on error
  2897. */
  2898. #define libpff_contact_get_utf16_given_name( contact, utf16_string, utf16_string_size, error ) \
  2899. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_GIVEN_NAME, utf16_string, utf16_string_size, error )
  2900. /* Retrieves the size of the UTF-8 encoded contact initials
  2901. * Size includes the end of string character
  2902. * Returns 1 if successful, 0 if not available or -1 on error
  2903. */
  2904. #define libpff_contact_get_utf8_initials_size( contact, utf8_string_size, error ) \
  2905. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_INITIALS, utf8_string_size, error )
  2906. /* Retrieves the UTF-8 encoded contact initials
  2907. * Returns 1 if successful, 0 if not available or -1 on error
  2908. */
  2909. #define libpff_contact_get_utf8_initials( contact, utf8_string, utf8_string_size, error ) \
  2910. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_INITIALS, utf8_string, utf8_string_size, error )
  2911. /* Retrieves the size of the UTF-16 encoded contact initials
  2912. * Size includes the end of string character
  2913. * Returns 1 if successful, 0 if not available or -1 on error
  2914. */
  2915. #define libpff_contact_get_utf16_initials_size( contact, utf16_string_size, error ) \
  2916. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_INITIALS, utf16_string_size, error )
  2917. /* Retrieves the UTF-16 encoded contact initials
  2918. * Returns 1 if successful, 0 if not available or -1 on error
  2919. */
  2920. #define libpff_contact_get_utf16_initials( contact, utf16_string, utf16_string_size, error ) \
  2921. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_INITIALS, utf16_string, utf16_string_size, error )
  2922. /* Retrieves the size of the UTF-8 encoded contact surname
  2923. * Size includes the end of string character
  2924. * Returns 1 if successful, 0 if not available or -1 on error
  2925. */
  2926. #define libpff_contact_get_utf8_surname_size( contact, utf8_string_size, error ) \
  2927. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_SURNAME, utf8_string_size, error )
  2928. /* Retrieves the UTF-8 encoded contact surname
  2929. * Returns 1 if successful, 0 if not available or -1 on error
  2930. */
  2931. #define libpff_contact_get_utf8_surname( contact, utf8_string, utf8_string_size, error ) \
  2932. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_SURNAME, utf8_string, utf8_string_size, error )
  2933. /* Retrieves the size of the UTF-16 encoded contact surname
  2934. * Size includes the end of string character
  2935. * Returns 1 if successful, 0 if not available or -1 on error
  2936. */
  2937. #define libpff_contact_get_utf16_surname_size( contact, utf16_string_size, error ) \
  2938. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_SURNAME, utf16_string_size, error )
  2939. /* Retrieves the UTF-16 encoded contact surname
  2940. * Returns 1 if successful, 0 if not available or -1 on error
  2941. */
  2942. #define libpff_contact_get_utf16_surname( contact, utf16_string, utf16_string_size, error ) \
  2943. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_SURNAME, utf16_string, utf16_string_size, error )
  2944. /* Retrieves the size of the UTF-8 encoded contact postal address
  2945. * Size includes the end of string character
  2946. * Returns 1 if successful, 0 if not available or -1 on error
  2947. */
  2948. #define libpff_contact_get_utf8_postal_address_size( contact, utf8_string_size, error ) \
  2949. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_POSTAL_ADDRESS, utf8_string_size, error )
  2950. /* Retrieves the UTF-8 encoded contact postal address
  2951. * Returns 1 if successful, 0 if not available or -1 on error
  2952. */
  2953. #define libpff_contact_get_utf8_postal_address( contact, utf8_string, utf8_string_size, error ) \
  2954. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_POSTAL_ADDRESS, utf8_string, utf8_string_size, error )
  2955. /* Retrieves the size of the UTF-16 encoded contact postal address
  2956. * Size includes the end of string character
  2957. * Returns 1 if successful, 0 if not available or -1 on error
  2958. */
  2959. #define libpff_contact_get_utf16_postal_address_size( contact, utf16_string_size, error ) \
  2960. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_POSTAL_ADDRESS, utf16_string_size, error )
  2961. /* Retrieves the UTF-16 encoded contact postal address
  2962. * Returns 1 if successful, 0 if not available or -1 on error
  2963. */
  2964. #define libpff_contact_get_utf16_postal_address( contact, utf16_string, utf16_string_size, error ) \
  2965. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_POSTAL_ADDRESS, utf16_string, utf16_string_size, error )
  2966. /* Retrieves the size of the UTF-8 encoded contact company name
  2967. * Size includes the end of string character
  2968. * Returns 1 if successful, 0 if not available or -1 on error
  2969. */
  2970. #define libpff_contact_get_utf8_company_name_size( contact, utf8_string_size, error ) \
  2971. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_COMPANY_NAME, utf8_string_size, error )
  2972. /* Retrieves the UTF-8 encoded contact company name
  2973. * Returns 1 if successful, 0 if not available or -1 on error
  2974. */
  2975. #define libpff_contact_get_utf8_company_name( contact, utf8_string, utf8_string_size, error ) \
  2976. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_COMPANY_NAME, utf8_string, utf8_string_size, error )
  2977. /* Retrieves the size of the UTF-16 encoded contact company name
  2978. * Size includes the end of string character
  2979. * Returns 1 if successful, 0 if not available or -1 on error
  2980. */
  2981. #define libpff_contact_get_utf16_company_name_size( contact, utf16_string_size, error ) \
  2982. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_COMPANY_NAME, utf16_string_size, error )
  2983. /* Retrieves the UTF-16 encoded contact company name
  2984. * Returns 1 if successful, 0 if not available or -1 on error
  2985. */
  2986. #define libpff_contact_get_utf16_company_name( contact, utf16_string, utf16_string_size, error ) \
  2987. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_COMPANY_NAME, utf16_string, utf16_string_size, error )
  2988. /* Retrieves the size of the UTF-8 encoded contact job title
  2989. * Size includes the end of string character
  2990. * Returns 1 if successful, 0 if not available or -1 on error
  2991. */
  2992. #define libpff_contact_get_utf8_job_title_size( contact, utf8_string_size, error ) \
  2993. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_JOB_TITLE, utf8_string_size, error )
  2994. /* Retrieves the UTF-8 encoded contact job title
  2995. * Returns 1 if successful, 0 if not available or -1 on error
  2996. */
  2997. #define libpff_contact_get_utf8_job_title( contact, utf8_string, utf8_string_size, error ) \
  2998. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_JOB_TITLE, utf8_string, utf8_string_size, error )
  2999. /* Retrieves the size of the UTF-16 encoded contact job title
  3000. * Size includes the end of string character
  3001. * Returns 1 if successful, 0 if not available or -1 on error
  3002. */
  3003. #define libpff_contact_get_utf16_job_title_size( contact, utf16_string_size, error ) \
  3004. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_JOB_TITLE, utf16_string_size, error )
  3005. /* Retrieves the UTF-16 encoded contact job title
  3006. * Returns 1 if successful, 0 if not available or -1 on error
  3007. */
  3008. #define libpff_contact_get_utf16_job_title( contact, utf16_string, utf16_string_size, error ) \
  3009. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_JOB_TITLE, utf16_string, utf16_string_size, error )
  3010. /* Retrieves the size of the UTF-8 encoded contact department name
  3011. * Size includes the end of string character
  3012. * Returns 1 if successful, 0 if not available or -1 on error
  3013. */
  3014. #define libpff_contact_get_utf8_department_name_size( contact, utf8_string_size, error ) \
  3015. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_DEPARTMENT_NAME, utf8_string_size, error )
  3016. /* Retrieves the UTF-8 encoded contact department name
  3017. * Returns 1 if successful, 0 if not available or -1 on error
  3018. */
  3019. #define libpff_contact_get_utf8_department_name( contact, utf8_string, utf8_string_size, error ) \
  3020. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_DEPARTMENT_NAME, utf8_string, utf8_string_size, error )
  3021. /* Retrieves the size of the UTF-16 encoded contact department name
  3022. * Size includes the end of string character
  3023. * Returns 1 if successful, 0 if not available or -1 on error
  3024. */
  3025. #define libpff_contact_get_utf16_department_name_size( contact, utf16_string_size, error ) \
  3026. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_DEPARTMENT_NAME, utf16_string_size, error )
  3027. /* Retrieves the UTF-16 encoded contact department name
  3028. * Returns 1 if successful, 0 if not available or -1 on error
  3029. */
  3030. #define libpff_contact_get_utf16_department_name( contact, utf16_string, utf16_string_size, error ) \
  3031. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_DEPARTMENT_NAME, utf16_string, utf16_string_size, error )
  3032. /* Retrieves the size of the UTF-8 encoded contact office location
  3033. * Size includes the end of string character
  3034. * Returns 1 if successful, 0 if not available or -1 on error
  3035. */
  3036. #define libpff_contact_get_utf8_office_location_size( contact, utf8_string_size, error ) \
  3037. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_OFFICE_LOCATION, utf8_string_size, error )
  3038. /* Retrieves the UTF-8 encoded contact office location
  3039. * Returns 1 if successful, 0 if not available or -1 on error
  3040. */
  3041. #define libpff_contact_get_utf8_office_location( contact, utf8_string, utf8_string_size, error ) \
  3042. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_OFFICE_LOCATION, utf8_string, utf8_string_size, error )
  3043. /* Retrieves the size of the UTF-16 encoded contact office location
  3044. * Size includes the end of string character
  3045. * Returns 1 if successful, 0 if not available or -1 on error
  3046. */
  3047. #define libpff_contact_get_utf16_office_location_size( contact, utf16_string_size, error ) \
  3048. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_OFFICE_LOCATION, utf16_string_size, error )
  3049. /* Retrieves the UTF-16 encoded contact office location
  3050. * Returns 1 if successful, 0 if not available or -1 on error
  3051. */
  3052. #define libpff_contact_get_utf16_office_location( contact, utf16_string, utf16_string_size, error ) \
  3053. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_OFFICE_LOCATION, utf16_string, utf16_string_size, error )
  3054. /* Retrieves the size of the UTF-8 encoded contact callback phone number
  3055. * Size includes the end of string character
  3056. * Returns 1 if successful, 0 if not available or -1 on error
  3057. */
  3058. #define libpff_contact_get_utf8_callback_phone_number_size( contact, utf8_string_size, error ) \
  3059. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_CALLBACK_PHONE_NUMBER, utf8_string_size, error )
  3060. /* Retrieves the UTF-8 encoded contact callback phone number
  3061. * Returns 1 if successful, 0 if not available or -1 on error
  3062. */
  3063. #define libpff_contact_get_utf8_callback_phone_number( contact, utf8_string, utf8_string_size, error ) \
  3064. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_CALLBACK_PHONE_NUMBER, utf8_string, utf8_string_size, error )
  3065. /* Retrieves the size of the UTF-16 encoded contact callback phone number
  3066. * Size includes the end of string character
  3067. * Returns 1 if successful, 0 if not available or -1 on error
  3068. */
  3069. #define libpff_contact_get_utf16_callback_phone_number_size( contact, utf16_string_size, error ) \
  3070. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_CALLBACK_PHONE_NUMBER, utf16_string_size, error )
  3071. /* Retrieves the UTF-16 encoded contact callback phone number
  3072. * Returns 1 if successful, 0 if not available or -1 on error
  3073. */
  3074. #define libpff_contact_get_utf16_callback_phone_number( contact, utf16_string, utf16_string_size, error ) \
  3075. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_CALLBACK_PHONE_NUMBER, utf16_string, utf16_string_size, error )
  3076. /* Retrieves the size of the UTF-8 encoded contact primary phone number
  3077. * Size includes the end of string character
  3078. * Returns 1 if successful, 0 if not available or -1 on error
  3079. */
  3080. #define libpff_contact_get_utf8_primary_phone_number_size( contact, utf8_string_size, error ) \
  3081. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_PRIMARY_PHONE_NUMBER, utf8_string_size, error )
  3082. /* Retrieves the UTF-8 encoded contact primary phone number
  3083. * Returns 1 if successful, 0 if not available or -1 on error
  3084. */
  3085. #define libpff_contact_get_utf8_primary_phone_number( contact, utf8_string, utf8_string_size, error ) \
  3086. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_PRIMARY_PHONE_NUMBER, utf8_string, utf8_string_size, error )
  3087. /* Retrieves the size of the UTF-16 encoded contact primary phone number
  3088. * Size includes the end of string character
  3089. * Returns 1 if successful, 0 if not available or -1 on error
  3090. */
  3091. #define libpff_contact_get_utf16_primary_phone_number_size( contact, utf16_string_size, error ) \
  3092. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_PRIMARY_PHONE_NUMBER, utf16_string_size, error )
  3093. /* Retrieves the UTF-16 encoded contact primary phone number
  3094. * Returns 1 if successful, 0 if not available or -1 on error
  3095. */
  3096. #define libpff_contact_get_utf16_primary_phone_number( contact, utf16_string, utf16_string_size, error ) \
  3097. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_PRIMARY_PHONE_NUMBER, utf16_string, utf16_string_size, error )
  3098. /* Retrieves the size of the UTF-8 encoded contact home phone number
  3099. * Size includes the end of string character
  3100. * Returns 1 if successful, 0 if not available or -1 on error
  3101. */
  3102. #define libpff_contact_get_utf8_home_phone_number_size( contact, utf8_string_size, error ) \
  3103. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_HOME_PHONE_NUMBER, utf8_string_size, error )
  3104. /* Retrieves the UTF-8 encoded contact home phone number
  3105. * Returns 1 if successful, 0 if not available or -1 on error
  3106. */
  3107. #define libpff_contact_get_utf8_home_phone_number( contact, utf8_string, utf8_string_size, error ) \
  3108. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_HOME_PHONE_NUMBER, utf8_string, utf8_string_size, error )
  3109. /* Retrieves the size of the UTF-16 encoded contact home phone number
  3110. * Size includes the end of string character
  3111. * Returns 1 if successful, 0 if not available or -1 on error
  3112. */
  3113. #define libpff_contact_get_utf16_home_phone_number_size( contact, utf16_string_size, error ) \
  3114. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_HOME_PHONE_NUMBER, utf16_string_size, error )
  3115. /* Retrieves the UTF-16 encoded contact home phone number
  3116. * Returns 1 if successful, 0 if not available or -1 on error
  3117. */
  3118. #define libpff_contact_get_utf16_home_phone_number( contact, utf16_string, utf16_string_size, error ) \
  3119. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_HOME_PHONE_NUMBER, utf16_string, utf16_string_size, error )
  3120. /* Retrieves the size of the UTF-8 encoded contact primary business phone number
  3121. * Size includes the end of string character
  3122. * Returns 1 if successful, 0 if not available or -1 on error
  3123. */
  3124. #define libpff_contact_get_utf8_business_phone_number_1_size( contact, utf8_string_size, error ) \
  3125. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_1, utf8_string_size, error )
  3126. /* Retrieves the UTF-8 encoded contact primary business phone number
  3127. * Returns 1 if successful, 0 if not available or -1 on error
  3128. */
  3129. #define libpff_contact_get_utf8_business_phone_number_1( contact, utf8_string, utf8_string_size, error ) \
  3130. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_1, utf8_string, utf8_string_size, error )
  3131. /* Retrieves the size of the UTF-16 encoded contact primary business phone number
  3132. * Size includes the end of string character
  3133. * Returns 1 if successful, 0 if not available or -1 on error
  3134. */
  3135. #define libpff_contact_get_utf16_business_phone_number_1_size( contact, utf16_string_size, error ) \
  3136. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_1, utf16_string_size, error )
  3137. /* Retrieves the UTF-16 encoded contact primary business phone number
  3138. * Returns 1 if successful, 0 if not available or -1 on error
  3139. */
  3140. #define libpff_contact_get_utf16_business_phone_number_1( contact, utf16_string, utf16_string_size, error ) \
  3141. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_1, utf16_string, utf16_string_size, error )
  3142. /* Retrieves the size of the UTF-8 encoded contact secondary business phone number
  3143. * Size includes the end of string character
  3144. * Returns 1 if successful, 0 if not available or -1 on error
  3145. */
  3146. #define libpff_contact_get_utf8_business_phone_number_2_size( contact, utf8_string_size, error ) \
  3147. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_2, utf8_string_size, error )
  3148. /* Retrieves the UTF-8 encoded contact secondary business phone number
  3149. * Returns 1 if successful, 0 if not available or -1 on error
  3150. */
  3151. #define libpff_contact_get_utf8_business_phone_number_2( contact, utf8_string, utf8_string_size, error ) \
  3152. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_2, utf8_string, utf8_string_size, error )
  3153. /* Retrieves the size of the UTF-16 encoded contact secondary business phone number
  3154. * Size includes the end of string character
  3155. * Returns 1 if successful, 0 if not available or -1 on error
  3156. */
  3157. #define libpff_contact_get_utf16_business_phone_number_2_size( contact, utf16_string_size, error ) \
  3158. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_2, utf16_string_size, error )
  3159. /* Retrieves the UTF-16 encoded contact secondary business phone number
  3160. * Returns 1 if successful, 0 if not available or -1 on error
  3161. */
  3162. #define libpff_contact_get_utf16_business_phone_number_2( contact, utf16_string, utf16_string_size, error ) \
  3163. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_2, utf16_string, utf16_string_size, error )
  3164. /* Retrieves the size of the UTF-8 encoded contact mobile phone number
  3165. * Size includes the end of string character
  3166. * Returns 1 if successful, 0 if not available or -1 on error
  3167. */
  3168. #define libpff_contact_get_utf8_mobile_phone_number_size( contact, utf8_string_size, error ) \
  3169. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_MOBILE_PHONE_NUMBER, utf8_string_size, error )
  3170. /* Retrieves the UTF-8 encoded contact mobile phone number
  3171. * Returns 1 if successful, 0 if not available or -1 on error
  3172. */
  3173. #define libpff_contact_get_utf8_mobile_phone_number( contact, utf8_string, utf8_string_size, error ) \
  3174. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_MOBILE_PHONE_NUMBER, utf8_string, utf8_string_size, error )
  3175. /* Retrieves the size of the UTF-16 encoded contact mobile phone number
  3176. * Size includes the end of string character
  3177. * Returns 1 if successful, 0 if not available or -1 on error
  3178. */
  3179. #define libpff_contact_get_utf16_mobile_phone_number_size( contact, utf16_string_size, error ) \
  3180. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_MOBILE_PHONE_NUMBER, utf16_string_size, error )
  3181. /* Retrieves the UTF-16 encoded contact mobile phone number
  3182. * Returns 1 if successful, 0 if not available or -1 on error
  3183. */
  3184. #define libpff_contact_get_utf16_mobile_phone_number( contact, utf16_string, utf16_string_size, error ) \
  3185. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_MOBILE_PHONE_NUMBER, utf16_string, utf16_string_size, error )
  3186. /* Retrieves the size of the UTF-8 encoded contact business fax number
  3187. * Size includes the end of string character
  3188. * Returns 1 if successful, 0 if not available or -1 on error
  3189. */
  3190. #define libpff_contact_get_utf8_business_fax_number_size( contact, utf8_string_size, error ) \
  3191. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_FAX_NUMBER, utf8_string_size, error )
  3192. /* Retrieves the UTF-8 encoded contact business fax number
  3193. * Returns 1 if successful, 0 if not available or -1 on error
  3194. */
  3195. #define libpff_contact_get_utf8_business_fax_number( contact, utf8_string, utf8_string_size, error ) \
  3196. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_FAX_NUMBER, utf8_string, utf8_string_size, error )
  3197. /* Retrieves the size of the UTF-16 encoded contact business fax number
  3198. * Size includes the end of string character
  3199. * Returns 1 if successful, 0 if not available or -1 on error
  3200. */
  3201. #define libpff_contact_get_utf16_business_fax_number_size( contact, utf16_string_size, error ) \
  3202. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_FAX_NUMBER, utf16_string_size, error )
  3203. /* Retrieves the UTF-16 encoded contact business fax number
  3204. * Returns 1 if successful, 0 if not available or -1 on error
  3205. */
  3206. #define libpff_contact_get_utf16_business_fax_number( contact, utf16_string, utf16_string_size, error ) \
  3207. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_FAX_NUMBER, utf16_string, utf16_string_size, error )
  3208. /* Retrieves the size of the UTF-8 encoded contact country
  3209. * Size includes the end of string character
  3210. * Returns 1 if successful, 0 if not available or -1 on error
  3211. */
  3212. #define libpff_contact_get_utf8_country_size( contact, utf8_string_size, error ) \
  3213. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_COUNTRY, utf8_string_size, error )
  3214. /* Retrieves the UTF-8 encoded contact country
  3215. * Returns 1 if successful, 0 if not available or -1 on error
  3216. */
  3217. #define libpff_contact_get_utf8_country( contact, utf8_string, utf8_string_size, error ) \
  3218. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_COUNTRY, utf8_string, utf8_string_size, error )
  3219. /* Retrieves the size of the UTF-16 encoded contact country
  3220. * Size includes the end of string character
  3221. * Returns 1 if successful, 0 if not available or -1 on error
  3222. */
  3223. #define libpff_contact_get_utf16_country_size( contact, utf16_string_size, error ) \
  3224. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_COUNTRY, utf16_string_size, error )
  3225. /* Retrieves the UTF-16 encoded contact country
  3226. * Returns 1 if successful, 0 if not available or -1 on error
  3227. */
  3228. #define libpff_contact_get_utf16_country( contact, utf16_string, utf16_string_size, error ) \
  3229. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_COUNTRY, utf16_string, utf16_string_size, error )
  3230. /* Retrieves the size of the UTF-8 encoded contact locality
  3231. * Size includes the end of string character
  3232. * Returns 1 if successful, 0 if not available or -1 on error
  3233. */
  3234. #define libpff_contact_get_utf8_locality_size( contact, utf8_string_size, error ) \
  3235. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_LOCALITY, utf8_string_size, error )
  3236. /* Retrieves the UTF-8 encoded contact locality
  3237. * Returns 1 if successful, 0 if not available or -1 on error
  3238. */
  3239. #define libpff_contact_get_utf8_locality( contact, utf8_string, utf8_string_size, error ) \
  3240. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_LOCALITY, utf8_string, utf8_string_size, error )
  3241. /* Retrieves the size of the UTF-16 encoded contact locality
  3242. * Size includes the end of string character
  3243. * Returns 1 if successful, 0 if not available or -1 on error
  3244. */
  3245. #define libpff_contact_get_utf16_locality_size( contact, utf16_string_size, error ) \
  3246. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_LOCALITY, utf16_string_size, error )
  3247. /* Retrieves the UTF-16 encoded contact locality
  3248. * Returns 1 if successful, 0 if not available or -1 on error
  3249. */
  3250. #define libpff_contact_get_utf16_locality( contact, utf16_string, utf16_string_size, error ) \
  3251. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_LOCALITY, utf16_string, utf16_string_size, error )
  3252. /* Retrieves the size of the UTF-8 encoded contact title
  3253. * Size includes the end of string character
  3254. * Returns 1 if successful, 0 if not available or -1 on error
  3255. */
  3256. #define libpff_contact_get_utf8_title_size( contact, utf8_string_size, error ) \
  3257. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_TITLE, utf8_string_size, error )
  3258. /* Retrieves the UTF-8 encoded contact title
  3259. * Returns 1 if successful, 0 if not available or -1 on error
  3260. */
  3261. #define libpff_contact_get_utf8_title( contact, utf8_string, utf8_string_size, error ) \
  3262. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_TITLE, utf8_string, utf8_string_size, error )
  3263. /* Retrieves the size of the UTF-16 encoded contact title
  3264. * Size includes the end of string character
  3265. * Returns 1 if successful, 0 if not available or -1 on error
  3266. */
  3267. #define libpff_contact_get_utf16_title_size( contact, utf16_string_size, error ) \
  3268. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_TITLE, utf16_string_size, error )
  3269. /* Retrieves the UTF-16 encoded contact title
  3270. * Returns 1 if successful, 0 if not available or -1 on error
  3271. */
  3272. #define libpff_contact_get_utf16_title( contact, utf16_string, utf16_string_size, error ) \
  3273. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_TITLE, utf16_string, utf16_string_size, error )
  3274. /* Retrieves the size of the UTF-8 encoded contact primary email address
  3275. * Size includes the end of string character
  3276. * Returns 1 if successful, 0 if not available or -1 on error
  3277. */
  3278. #define libpff_contact_get_utf8_email_address_1_size( contact, utf8_string_size, error ) \
  3279. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_1, utf8_string_size, error )
  3280. /* Retrieves the UTF-8 encoded contact primary email address
  3281. * Returns 1 if successful, 0 if not available or -1 on error
  3282. */
  3283. #define libpff_contact_get_utf8_email_address_1( contact, utf8_string, utf8_string_size, error ) \
  3284. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_1, utf8_string, utf8_string_size, error )
  3285. /* Retrieves the size of the UTF-16 encoded contact primary email address
  3286. * Size includes the end of string character
  3287. * Returns 1 if successful, 0 if not available or -1 on error
  3288. */
  3289. #define libpff_contact_get_utf16_email_address_1_size( contact, utf16_string_size, error ) \
  3290. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_1, utf16_string_size, error )
  3291. /* Retrieves the UTF-16 encoded contact primary email address
  3292. * Returns 1 if successful, 0 if not available or -1 on error
  3293. */
  3294. #define libpff_contact_get_utf16_email_address_1( contact, utf16_string, utf16_string_size, error ) \
  3295. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_1, utf16_string, utf16_string_size, error )
  3296. /* Retrieves the size of the UTF-8 encoded contact secondary email address
  3297. * Size includes the end of string character
  3298. * Returns 1 if successful, 0 if not available or -1 on error
  3299. */
  3300. #define libpff_contact_get_utf8_email_address_2_size( contact, utf8_string_size, error ) \
  3301. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_2, utf8_string_size, error )
  3302. /* Retrieves the UTF-8 encoded contact secondary email address
  3303. * Returns 1 if successful, 0 if not available or -1 on error
  3304. */
  3305. #define libpff_contact_get_utf8_email_address_2( contact, utf8_string, utf8_string_size, error ) \
  3306. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_2, utf8_string, utf8_string_size, error )
  3307. /* Retrieves the size of the UTF-16 encoded contact secondary email address
  3308. * Size includes the end of string character
  3309. * Returns 1 if successful, 0 if not available or -1 on error
  3310. */
  3311. #define libpff_contact_get_utf16_email_address_2_size( contact, utf16_string_size, error ) \
  3312. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_2, utf16_string_size, error )
  3313. /* Retrieves the UTF-16 encoded contact secondary email address
  3314. * Returns 1 if successful, 0 if not available or -1 on error
  3315. */
  3316. #define libpff_contact_get_utf16_email_address_2( contact, utf16_string, utf16_string_size, error ) \
  3317. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_2, utf16_string, utf16_string_size, error )
  3318. /* Retrieves the size of the UTF-8 encoded contact tertiary email address
  3319. * Size includes the end of string character
  3320. * Returns 1 if successful, 0 if not available or -1 on error
  3321. */
  3322. #define libpff_contact_get_utf8_email_address_3_size( contact, utf8_string_size, error ) \
  3323. libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_3, utf8_string_size, error )
  3324. /* Retrieves the UTF-8 encoded contact tertiary email address
  3325. * Returns 1 if successful, 0 if not available or -1 on error
  3326. */
  3327. #define libpff_contact_get_utf8_email_address_3( contact, utf8_string, utf8_string_size, error ) \
  3328. libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_3, utf8_string, utf8_string_size, error )
  3329. /* Retrieves the size of the UTF-16 encoded contact tertiary email address
  3330. * Size includes the end of string character
  3331. * Returns 1 if successful, 0 if not available or -1 on error
  3332. */
  3333. #define libpff_contact_get_utf16_email_address_3_size( contact, utf16_string_size, error ) \
  3334. libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_3, utf16_string_size, error )
  3335. /* Retrieves the UTF-16 encoded contact tertiary email address
  3336. * Returns 1 if successful, 0 if not available or -1 on error
  3337. */
  3338. #define libpff_contact_get_utf16_email_address_3( contact, utf16_string, utf16_string_size, error ) \
  3339. libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_3, utf16_string, utf16_string_size, error )
  3340. /* -------------------------------------------------------------------------
  3341. * Distribution list functions - deprecated
  3342. * ------------------------------------------------------------------------- */
  3343. /* Retrieves the size of the UTF-8 encoded distribution list name
  3344. * Size includes the end of string character
  3345. * Returns 1 if successful, 0 if not available or -1 on error
  3346. */
  3347. #define libpff_distribution_list_get_utf8_name_size( distribution_list, utf8_string_size, error ) \
  3348. libpff_message_get_entry_value_utf8_string_size( distribution_list, LIBPFF_ENTRY_TYPE_DISTRIBUTION_LIST_NAME, utf8_string_size, error )
  3349. /* Retrieves the UTF-8 encoded distribution list name
  3350. * Returns 1 if successful, 0 if not available or -1 on error
  3351. */
  3352. #define libpff_distribution_list_get_utf8_name( distribution_list, utf8_string, utf8_string_size, error ) \
  3353. libpff_message_get_entry_value_utf8_string( distribution_list, LIBPFF_ENTRY_TYPE_DISTRIBUTION_LIST_NAME, utf8_string, utf8_string_size, error )
  3354. /* Retrieves the size of the UTF-16 encoded distribution list name
  3355. * Size includes the end of string character
  3356. * Returns 1 if successful, 0 if not available or -1 on error
  3357. */
  3358. #define libpff_distribution_list_get_utf16_name_size( distribution_list, utf16_string_size, error ) \
  3359. libpff_message_get_entry_value_utf16_string_size( distribution_list, LIBPFF_ENTRY_TYPE_DISTRIBUTION_LIST_NAME, utf16_string_size, error )
  3360. /* Retrieves the UTF-16 encoded distribution list name
  3361. * Returns 1 if successful, 0 if not available or -1 on error
  3362. */
  3363. #define libpff_distribution_list_get_utf16_name( distribution_list, utf16_string, utf16_string_size, error ) \
  3364. libpff_message_get_entry_value_utf16_string( distribution_list, LIBPFF_ENTRY_TYPE_DISTRIBUTION_LIST_NAME, utf16_string, utf16_string_size, error )
  3365. /* -------------------------------------------------------------------------
  3366. * E-mail functions - deprecated
  3367. * ------------------------------------------------------------------------- */
  3368. /* Retrieves the size of the UTF-8 encoded e-mail filename
  3369. * Size includes the end of string character
  3370. * Returns 1 if successful, 0 if not available or -1 on error
  3371. */
  3372. #define libpff_email_get_utf8_filename_size( email, utf8_string_size, error ) \
  3373. libpff_message_get_entry_value_utf8_string_size( email, LIBPFF_ENTRY_TYPE_EMAIL_EML_FILENAME, utf8_string_size, error )
  3374. /* Retrieves the utf-8 encoded e-mail filename
  3375. * Returns 1 if successful, 0 if not available or -1 on error
  3376. */
  3377. #define libpff_email_get_utf8_filename( email, utf8_string, utf8_string_size, error ) \
  3378. libpff_message_get_entry_value_utf8_string( email, LIBPFF_ENTRY_TYPE_EMAIL_EML_FILENAME, utf8_string, utf8_string_size, error )
  3379. /* Retrieves the size of the UTF-16 encoded e-mail filename
  3380. * Size includes the end of string character
  3381. * Returns 1 if successful, 0 if not available or -1 on error
  3382. */
  3383. #define libpff_email_get_utf16_filename_size( email, utf16_string_size, error ) \
  3384. libpff_message_get_entry_value_utf16_string_size( email, LIBPFF_ENTRY_TYPE_EMAIL_EML_FILENAME, utf16_string_size, error )
  3385. /* Retrieves the utf-16 encoded e-mail filename
  3386. * Returns 1 if successful, 0 if not available or -1 on error
  3387. */
  3388. #define libpff_email_get_utf16_filename( email, utf16_string, utf16_string_size, error ) \
  3389. libpff_message_get_entry_value_utf16_string( email, LIBPFF_ENTRY_TYPE_EMAIL_EML_FILENAME, utf16_string, utf16_string_size, error )
  3390. /* -------------------------------------------------------------------------
  3391. * Attachment item functions
  3392. * ------------------------------------------------------------------------- */
  3393. /* Retrieves the attachment type
  3394. * Returns 1 if successful or -1 on error
  3395. */
  3396. LIBPFF_EXTERN \
  3397. int libpff_attachment_get_type(
  3398. libpff_item_t *attachment,
  3399. int *attachment_type,
  3400. libpff_error_t **error );
  3401. /* Retrieves the attachment data size
  3402. * Returns 1 if successful, 0 if not available or -1 on error
  3403. */
  3404. LIBPFF_EXTERN \
  3405. int libpff_attachment_get_data_size(
  3406. libpff_item_t *attachment,
  3407. size64_t *size,
  3408. libpff_error_t **error );
  3409. /* Reads attachment data from the current offset into a buffer
  3410. * Returns the amount of bytes read or -1 on error
  3411. */
  3412. LIBPFF_EXTERN \
  3413. ssize_t libpff_attachment_data_read_buffer(
  3414. libpff_item_t *attachment,
  3415. uint8_t *buffer,
  3416. size_t buffer_size,
  3417. libpff_error_t **error );
  3418. /* Seeks a certain offset of the attachment data
  3419. * Returns the offset if seek is successful or -1 on error
  3420. */
  3421. LIBPFF_EXTERN \
  3422. off64_t libpff_attachment_data_seek_offset(
  3423. libpff_item_t *attachment,
  3424. off64_t offset,
  3425. int whence,
  3426. libpff_error_t **error );
  3427. #if defined( LIBPFF_HAVE_BFIO )
  3428. /* Retrieves the attachment data file io handle
  3429. * Returns 1 if successful, 0 if not available or -1 on error
  3430. */
  3431. LIBPFF_EXTERN \
  3432. int libpff_attachment_get_data_file_io_handle(
  3433. libpff_item_t *attachment,
  3434. libbfio_handle_t **file_io_handle,
  3435. libpff_error_t **error );
  3436. #endif /* defined( LIBPFF_HAVE_BFIO ) */
  3437. /* Retrieves the attached item
  3438. * Returns 1 if successful, 0 if not available or -1 on error
  3439. */
  3440. LIBPFF_EXTERN \
  3441. int libpff_attachment_get_item(
  3442. libpff_item_t *attachment,
  3443. libpff_item_t **attached_item,
  3444. libpff_error_t **error );
  3445. /* -------------------------------------------------------------------------
  3446. * Attachment functions - deprecated
  3447. * ------------------------------------------------------------------------- */
  3448. /* Retrieves the size of the UTF-16 encoded attachment short filename
  3449. * Size includes the end of string character
  3450. * Returns 1 if successful, 0 if not available or -1 on error
  3451. */
  3452. #define libpff_attachment_get_utf16_short_filename_size( attachment, utf16_string_size, error ) \
  3453. libpff_item_get_entry_value_utf16_string_size( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_SHORT, utf16_string_size, 0, error )
  3454. /* Retrieves the UTF-16 encoded attachment short filename
  3455. * Returns 1 if successful, 0 if not available or -1 on error
  3456. */
  3457. #define libpff_attachment_get_utf16_short_filename( attachment, utf16_string, utf16_string_size, error ) \
  3458. libpff_item_get_entry_value_utf16_string( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_SHORT, utf16_string, utf16_string_size, 0, error )
  3459. /* Retrieves the size of the UTF-16 encoded attachment long filename
  3460. * Size includes the end of string character
  3461. * Returns 1 if successful, 0 if not available or -1 on error
  3462. */
  3463. #define libpff_attachment_get_utf16_long_filename_size( attachment, utf16_string_size, error ) \
  3464. libpff_item_get_entry_value_utf16_string_size( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_LONG, utf16_string_size, 0, error )
  3465. /* Retrieves the UTF-16 encoded attachment long filename
  3466. * Returns 1 if successful, 0 if not available or -1 on error
  3467. */
  3468. #define libpff_attachment_get_utf16_long_filename( attachment, utf16_string, utf16_string_size, error ) \
  3469. libpff_item_get_entry_value_utf16_string( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_LONG, utf16_string, utf16_string_size, 0, error )
  3470. /* Retrieves the size of the UTF-8 encoded attachment short filename
  3471. * Size includes the end of string character
  3472. * Returns 1 if successful, 0 if not available or -1 on error
  3473. */
  3474. #define libpff_attachment_get_utf8_short_filename_size( attachment, utf8_string_size, error ) \
  3475. libpff_item_get_entry_value_utf8_string_size( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_SHORT, utf8_string_size, 0, error )
  3476. /* Retrieves the size of the UTF-8 encoded attachment long filename
  3477. * Size includes the end of string character
  3478. * Returns 1 if successful, 0 if not available or -1 on error
  3479. */
  3480. #define libpff_attachment_get_utf8_long_filename_size( attachment, utf8_string_size, error ) \
  3481. libpff_item_get_entry_value_utf8_string_size( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_LONG, utf8_string_size, 0, error )
  3482. /* Retrieves the UTF-8 encoded attachment short filename
  3483. * Returns 1 if successful, 0 if not available or -1 on error
  3484. */
  3485. #define libpff_attachment_get_utf8_short_filename( attachment, utf8_string, utf8_string_size, error ) \
  3486. libpff_item_get_entry_value_utf8_string( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_SHORT, utf8_string, utf8_string_size, 0, error )
  3487. /* Retrieves the UTF-8 encoded attachment long filename
  3488. * Returns 1 if successful, 0 if not available or -1 on error
  3489. */
  3490. #define libpff_attachment_get_utf8_long_filename( attachment, utf8_string, utf8_string_size, error ) \
  3491. libpff_item_get_entry_value_utf8_string( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_LONG, utf8_string, utf8_string_size, 0, error )
  3492. /* -------------------------------------------------------------------------
  3493. * Recipients functions - deprecated
  3494. * ------------------------------------------------------------------------- */
  3495. /* Retrieves the recipient type
  3496. * Returns 1 if successful, 0 if not available or -1 on error
  3497. */
  3498. #define libpff_recipients_get_type( recipients, recipient_index, type, error ) \
  3499. libpff_item_get_entry_value_32bit( recipients, recipient_index, LIBPFF_ENTRY_TYPE_RECIPIENT_TYPE, type, 0, error )
  3500. /* Retrieves the size of the UTF-8 encoded display name
  3501. * Size includes the end of string character
  3502. * Returns 1 if successful, 0 if not available or -1 on error
  3503. */
  3504. #define libpff_recipients_get_utf8_display_name_size( recipients, recipient_index, utf8_string_size, error ) \
  3505. libpff_item_get_entry_value_utf8_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf8_string_size, 0, error )
  3506. /* Retrieves the size of the UTF-8 encoded address type
  3507. * Size includes the end of string character
  3508. * Returns 1 if successful, 0 if not available or -1 on error
  3509. */
  3510. #define libpff_recipients_get_utf8_address_type_size( recipients, recipient_index, utf8_string_size, error ) \
  3511. libpff_item_get_entry_value_utf8_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf8_string_size, 0, error )
  3512. /* Retrieves the size of the UTF-8 encoded email address
  3513. * Size includes the end of string character
  3514. * Returns 1 if successful, 0 if not available or -1 on error
  3515. */
  3516. #define libpff_recipients_get_utf8_email_address_size( recipients, recipient_index, utf8_string_size, error ) \
  3517. libpff_item_get_entry_value_utf8_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf8_string_size, 0, error )
  3518. /* Retrieves the size of the UTF-8 encoded recipient display name
  3519. * Size includes the end of string character
  3520. * Returns 1 if successful, 0 if not available or -1 on error
  3521. */
  3522. #define libpff_recipients_get_utf8_recipient_display_name_size( recipients, recipient_index, utf8_string_size, error ) \
  3523. libpff_item_get_entry_value_utf8_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_RECIPIENT_DISPLAY_NAME, utf8_string_size, 0, error )
  3524. /* Retrieves the UTF-8 encoded display name
  3525. * Returns 1 if successful, 0 if not available or -1 on error
  3526. */
  3527. #define libpff_recipients_get_utf8_display_name( recipients, recipient_index, utf8_string, utf8_string_size, error ) \
  3528. libpff_item_get_entry_value_utf8_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf8_string, utf8_string_size, 0, error )
  3529. /* Retrieves the UTF-8 encoded address type
  3530. * Returns 1 if successful, 0 if not available or -1 on error
  3531. */
  3532. #define libpff_recipients_get_utf8_address_type( recipients, recipient_index, utf8_string, utf8_string_size, error ) \
  3533. libpff_item_get_entry_value_utf8_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf8_string, utf8_string_size, 0, error )
  3534. /* Retrieves the UTF-8 encoded email address
  3535. * Returns 1 if successful, 0 if not available or -1 on error
  3536. */
  3537. #define libpff_recipients_get_utf8_email_address( recipients, recipient_index, utf8_string, utf8_string_size, error ) \
  3538. libpff_item_get_entry_value_utf8_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf8_string, utf8_string_size, 0, error )
  3539. /* Retrieves the UTF-8 encoded recipient display name
  3540. * Returns 1 if successful, 0 if not available or -1 on error
  3541. */
  3542. #define libpff_recipients_get_utf8_recipient_display_name( recipients, recipient_index, utf8_string, utf8_string_size, error ) \
  3543. libpff_item_get_entry_value_utf8_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_RECIPIENT_DISPLAY_NAME, utf8_string, utf8_string_size, 0, error )
  3544. /* Retrieves the size of the UTF-16 encoded display name
  3545. * Size includes the end of string character
  3546. * Returns 1 if successful, 0 if not available or -1 on error
  3547. */
  3548. #define libpff_recipients_get_utf16_display_name_size( recipients, recipient_index, utf16_string_size, error ) \
  3549. libpff_item_get_entry_value_utf16_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf16_string_size, 0, error )
  3550. /* Retrieves the UTF-16 encoded display name
  3551. * Returns 1 if successful, 0 if not available or -1 on error
  3552. */
  3553. #define libpff_recipients_get_utf16_display_name( recipients, recipient_index, utf16_string, utf16_string_size, error ) \
  3554. libpff_item_get_entry_value_utf16_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf16_string, utf16_string_size, 0, error )
  3555. /* Retrieves the size of the UTF-16 encoded address type
  3556. * Size includes the end of string character
  3557. * Returns 1 if successful, 0 if not available or -1 on error
  3558. */
  3559. #define libpff_recipients_get_utf16_address_type_size( recipients, recipient_index, utf16_string_size, error ) \
  3560. libpff_item_get_entry_value_utf16_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf16_string_size, 0, error )
  3561. /* Retrieves the UTF-16 encoded address type
  3562. * Returns 1 if successful, 0 if not available or -1 on error
  3563. */
  3564. #define libpff_recipients_get_utf16_address_type( recipients, recipient_index, utf16_string, utf16_string_size, error ) \
  3565. libpff_item_get_entry_value_utf16_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf16_string, utf16_string_size, 0, error )
  3566. /* Retrieves the size of the UTF-16 encoded email address
  3567. * Size includes the end of string character
  3568. * Returns 1 if successful, 0 if not available or -1 on error
  3569. */
  3570. #define libpff_recipients_get_utf16_email_address_size( recipients, recipient_index, utf16_string_size, error ) \
  3571. libpff_item_get_entry_value_utf16_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf16_string_size, 0, error )
  3572. /* Retrieves the UTF-16 encoded email address
  3573. * Returns 1 if successful, 0 if not available or -1 on error
  3574. */
  3575. #define libpff_recipients_get_utf16_email_address( recipients, recipient_index, utf16_string, utf16_string_size, error ) \
  3576. libpff_item_get_entry_value_utf16_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf16_string, utf16_string_size, 0, error )
  3577. /* Retrieves the size of the UTF-16 encoded recipient display name
  3578. * Size includes the end of string character
  3579. * Returns 1 if successful, 0 if not available or -1 on error
  3580. */
  3581. #define libpff_recipients_get_utf16_recipient_display_name_size( recipients, recipient_index, utf16_string_size, error ) \
  3582. libpff_item_get_entry_value_utf16_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_RECIPIENT_DISPLAY_NAME, utf16_string_size, 0, error )
  3583. /* Retrieves the UTF-16 encoded recipient display name
  3584. * Returns 1 if successful, 0 if not available or -1 on error
  3585. */
  3586. #define libpff_recipients_get_utf16_recipient_display_name( recipients, recipient_index, utf16_string, utf16_string_size, error ) \
  3587. libpff_item_get_entry_value_utf16_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_RECIPIENT_DISPLAY_NAME, utf16_string, utf16_string_size, 0, error )
  3588. #if defined( __cplusplus )
  3589. }
  3590. #endif
  3591. #endif /* !defined( _LIBPFF_H ) */