Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright 2012 ZXing authors
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. @class ZXQRCodeVersion;
  17. /**
  18. * See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which
  19. * data can be encoded to bits in the QR code standard.
  20. */
  21. @interface ZXQRCodeMode : NSObject
  22. @property (nonatomic, assign, readonly) int bits;
  23. @property (nonatomic, copy, readonly) NSString *name;
  24. - (id)initWithCharacterCountBitsForVersions:(NSArray *)characterCountBitsForVersions bits:(int)bits name:(NSString *)name;
  25. /**
  26. * @param bits four bits encoding a QR Code data mode
  27. * @return Mode encoded by these bits or nil if bits do not correspond to a known mode
  28. */
  29. + (ZXQRCodeMode *)forBits:(int)bits;
  30. /**
  31. * @param version version in question
  32. * @return number of bits used, in this QR Code symbol {@link Version}, to encode the
  33. * count of characters that will follow encoded in this Mode
  34. */
  35. - (int)characterCountBits:(ZXQRCodeVersion *)version;
  36. + (ZXQRCodeMode *)terminatorMode; // Not really a mode...
  37. + (ZXQRCodeMode *)numericMode;
  38. + (ZXQRCodeMode *)alphanumericMode;
  39. + (ZXQRCodeMode *)structuredAppendMode; // Not supported
  40. + (ZXQRCodeMode *)byteMode;
  41. + (ZXQRCodeMode *)eciMode; // character counts don't apply
  42. + (ZXQRCodeMode *)kanjiMode;
  43. + (ZXQRCodeMode *)fnc1FirstPositionMode;
  44. + (ZXQRCodeMode *)fnc1SecondPositionMode;
  45. /** See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. */
  46. + (ZXQRCodeMode *)hanziMode;
  47. @end