Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2.     jbig2dec
  3.  
  4.     Copyright (C) 2003 Artifex Software, Inc.
  5.  
  6.     This software is distributed under license and may not
  7.     be copied, modified or distributed except as expressly
  8.     authorized under the terms of the license contained in
  9.     the file LICENSE in this distribution.
  10.  
  11.     For further licensing information refer to http://artifex.com/ or
  12.     contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
  13.     San Rafael, CA  94903, U.S.A., +1(415)492-9861.
  14. */
  15.  
  16.  
  17. #ifndef _JBIG2_METADATA_H
  18. #define _JBIG2_METADATA_H
  19.  
  20. /* metadata from extension segments */
  21.  
  22. /* these bits should be moved to jbig2.h for public access */
  23. typedef enum {
  24.     JBIG2_ENCODING_ASCII,
  25.     JBIG2_ENCODING_UCS16
  26. } Jbig2Encoding;
  27.  
  28. typedef struct _Jbig2Metadata Jbig2Metadata;
  29.  
  30. Jbig2Metadata *jbig2_metadata_new(Jbig2Ctx *ctx, Jbig2Encoding encoding);
  31. void jbig2_metadata_free(Jbig2Ctx *ctx, Jbig2Metadata *md);
  32. int jbig2_metadata_add(Jbig2Ctx *ctx, Jbig2Metadata *md,
  33.                         const char *key, const int key_length,
  34.                         const char *value, const int value_length);
  35.  
  36. struct _Jbig2Metadata {
  37.     Jbig2Encoding encoding;
  38.     char **keys, **values;
  39.     int entries, max_entries;
  40. };
  41.  
  42. /* these bits can go to jbig2_priv.h */
  43. int jbig2_comment_ascii(Jbig2Ctx *ctx, Jbig2Segment *segment,
  44.                                 const uint8_t *segment_data);
  45. int jbig2_comment_unicode(Jbig2Ctx *ctx, Jbig2Segment *segment,
  46.                                const uint8_t *segment_data);
  47.  
  48. #endif /* _JBIG2_METADATA_H */
  49.