archive_entry_locale.h 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. * $FreeBSD$
  26. */
  27. #ifndef __LIBARCHIVE_BUILD
  28. #error This header is only to be used internally to libarchive.
  29. #endif
  30. #ifndef ARCHIVE_ENTRY_LOCALE_H_INCLUDED
  31. #define ARCHIVE_ENTRY_LOCALE_H_INCLUDED
  32. struct archive_entry;
  33. struct archive_string_conv;
  34. /*
  35. * Utility functions to set and get entry attributes by translating
  36. * character-set. These are designed for use in format readers and writers.
  37. *
  38. * The return code and interface of these are quite different from other
  39. * functions for archive_entry defined in archive_entry.h.
  40. * Common return code are:
  41. * Return 0 if the string conversion succeeded.
  42. * Return -1 if the string conversion failed.
  43. */
  44. #define archive_entry_gname_l _archive_entry_gname_l
  45. int _archive_entry_gname_l(struct archive_entry *,
  46. const char **, size_t *, struct archive_string_conv *);
  47. #define archive_entry_hardlink_l _archive_entry_hardlink_l
  48. int _archive_entry_hardlink_l(struct archive_entry *,
  49. const char **, size_t *, struct archive_string_conv *);
  50. #define archive_entry_pathname_l _archive_entry_pathname_l
  51. int _archive_entry_pathname_l(struct archive_entry *,
  52. const char **, size_t *, struct archive_string_conv *);
  53. #define archive_entry_symlink_l _archive_entry_symlink_l
  54. int _archive_entry_symlink_l(struct archive_entry *,
  55. const char **, size_t *, struct archive_string_conv *);
  56. #define archive_entry_uname_l _archive_entry_uname_l
  57. int _archive_entry_uname_l(struct archive_entry *,
  58. const char **, size_t *, struct archive_string_conv *);
  59. #define archive_entry_acl_text_l _archive_entry_acl_text_l
  60. int _archive_entry_acl_text_l(struct archive_entry *, int,
  61. const char **, size_t *, struct archive_string_conv *) __LA_DEPRECATED;
  62. #define archive_entry_acl_to_text_l _archive_entry_acl_to_text_l
  63. char *_archive_entry_acl_to_text_l(struct archive_entry *, ssize_t *, int,
  64. struct archive_string_conv *);
  65. #define archive_entry_acl_from_text_l _archive_entry_acl_from_text_l
  66. int _archive_entry_acl_from_text_l(struct archive_entry *, const char* text,
  67. int type, struct archive_string_conv *);
  68. #define archive_entry_copy_gname_l _archive_entry_copy_gname_l
  69. int _archive_entry_copy_gname_l(struct archive_entry *,
  70. const char *, size_t, struct archive_string_conv *);
  71. #define archive_entry_copy_hardlink_l _archive_entry_copy_hardlink_l
  72. int _archive_entry_copy_hardlink_l(struct archive_entry *,
  73. const char *, size_t, struct archive_string_conv *);
  74. #define archive_entry_copy_link_l _archive_entry_copy_link_l
  75. int _archive_entry_copy_link_l(struct archive_entry *,
  76. const char *, size_t, struct archive_string_conv *);
  77. #define archive_entry_copy_pathname_l _archive_entry_copy_pathname_l
  78. int _archive_entry_copy_pathname_l(struct archive_entry *,
  79. const char *, size_t, struct archive_string_conv *);
  80. #define archive_entry_copy_symlink_l _archive_entry_copy_symlink_l
  81. int _archive_entry_copy_symlink_l(struct archive_entry *,
  82. const char *, size_t, struct archive_string_conv *);
  83. #define archive_entry_copy_uname_l _archive_entry_copy_uname_l
  84. int _archive_entry_copy_uname_l(struct archive_entry *,
  85. const char *, size_t, struct archive_string_conv *);
  86. #endif /* ARCHIVE_ENTRY_LOCALE_H_INCLUDED */