split.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * qrencode - QR Code encoder
  3. *
  4. * Input data splitter.
  5. * Copyright (C) 2006-2017 Kentaro Fukuchi <kentaro@fukuchi.org>
  6. *
  7. * The following data / specifications are taken from
  8. * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004)
  9. * or
  10. * "Automatic identification and data capture techniques --
  11. * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006)
  12. *
  13. * This library is free software; you can redistribute it and/or
  14. * modify it under the terms of the GNU Lesser General Public
  15. * License as published by the Free Software Foundation; either
  16. * version 2.1 of the License, or any later version.
  17. *
  18. * This library is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  21. * Lesser General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU Lesser General Public
  24. * License along with this library; if not, write to the Free Software
  25. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  26. */
  27. #ifndef SPLIT_H
  28. #define SPLIT_H
  29. #include "qrencode.h"
  30. /**
  31. * Split the input string (null terminated) into QRinput.
  32. * @param string input string
  33. * @param hint give QR_MODE_KANJI if the input string contains Kanji character encoded in Shift-JIS. If not, give QR_MODE_8.
  34. * @param casesensitive 0 for case-insensitive encoding (all alphabet characters are replaced to UPPER-CASE CHARACTERS.
  35. * @retval 0 success.
  36. * @retval -1 an error occurred. errno is set to indicate the error. See
  37. * Exceptions for the details.
  38. * @throw EINVAL invalid input object.
  39. * @throw ENOMEM unable to allocate memory for input objects.
  40. */
  41. extern int Split_splitStringToQRinput(const char *string, QRinput *input,
  42. QRencodeMode hint, int casesensitive);
  43. #endif /* SPLIT_H */