archive_entry_locale.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*-
  2. * Copyright (c) 2011 Michihiro NAKAJIMA
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. *
  14. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
  15. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  16. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  17. * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
  18. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  19. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  20. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  21. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  22. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  23. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24. */
  25. #ifndef ARCHIVE_ENTRY_LOCALE_H_INCLUDED
  26. #define ARCHIVE_ENTRY_LOCALE_H_INCLUDED
  27. #ifndef __LIBARCHIVE_BUILD
  28. #error This header is only to be used internally to libarchive.
  29. #endif
  30. struct archive_entry;
  31. struct archive_string_conv;
  32. /*
  33. * Utility functions to set and get entry attributes by translating
  34. * character-set. These are designed for use in format readers and writers.
  35. *
  36. * The return code and interface of these are quite different from other
  37. * functions for archive_entry defined in archive_entry.h.
  38. * Common return code are:
  39. * Return 0 if the string conversion succeeded.
  40. * Return -1 if the string conversion failed.
  41. */
  42. #define archive_entry_gname_l _archive_entry_gname_l
  43. int _archive_entry_gname_l(struct archive_entry *,
  44. const char **, size_t *, struct archive_string_conv *);
  45. #define archive_entry_hardlink_l _archive_entry_hardlink_l
  46. int _archive_entry_hardlink_l(struct archive_entry *,
  47. const char **, size_t *, struct archive_string_conv *);
  48. #define archive_entry_pathname_l _archive_entry_pathname_l
  49. int _archive_entry_pathname_l(struct archive_entry *,
  50. const char **, size_t *, struct archive_string_conv *);
  51. #define archive_entry_symlink_l _archive_entry_symlink_l
  52. int _archive_entry_symlink_l(struct archive_entry *,
  53. const char **, size_t *, struct archive_string_conv *);
  54. #define archive_entry_uname_l _archive_entry_uname_l
  55. int _archive_entry_uname_l(struct archive_entry *,
  56. const char **, size_t *, struct archive_string_conv *);
  57. #define archive_entry_acl_text_l _archive_entry_acl_text_l
  58. int _archive_entry_acl_text_l(struct archive_entry *, int,
  59. const char **, size_t *, struct archive_string_conv *) __LA_DEPRECATED;
  60. #define archive_entry_acl_to_text_l _archive_entry_acl_to_text_l
  61. char *_archive_entry_acl_to_text_l(struct archive_entry *, ssize_t *, int,
  62. struct archive_string_conv *);
  63. #define archive_entry_acl_from_text_l _archive_entry_acl_from_text_l
  64. int _archive_entry_acl_from_text_l(struct archive_entry *, const char* text,
  65. int type, struct archive_string_conv *);
  66. #define archive_entry_copy_gname_l _archive_entry_copy_gname_l
  67. int _archive_entry_copy_gname_l(struct archive_entry *,
  68. const char *, size_t, struct archive_string_conv *);
  69. #define archive_entry_copy_hardlink_l _archive_entry_copy_hardlink_l
  70. int _archive_entry_copy_hardlink_l(struct archive_entry *,
  71. const char *, size_t, struct archive_string_conv *);
  72. #define archive_entry_copy_link_l _archive_entry_copy_link_l
  73. int _archive_entry_copy_link_l(struct archive_entry *,
  74. const char *, size_t, struct archive_string_conv *);
  75. #define archive_entry_copy_pathname_l _archive_entry_copy_pathname_l
  76. int _archive_entry_copy_pathname_l(struct archive_entry *,
  77. const char *, size_t, struct archive_string_conv *);
  78. #define archive_entry_copy_symlink_l _archive_entry_copy_symlink_l
  79. int _archive_entry_copy_symlink_l(struct archive_entry *,
  80. const char *, size_t, struct archive_string_conv *);
  81. #define archive_entry_copy_uname_l _archive_entry_copy_uname_l
  82. int _archive_entry_copy_uname_l(struct archive_entry *,
  83. const char *, size_t, struct archive_string_conv *);
  84. #endif /* !ARCHIVE_ENTRY_LOCALE_H_INCLUDED */