Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * Copyright 2006 Rob Kendrick <rjek@rjek.com>
  3.  *
  4.  * This file is part of NetSurf, http://www.netsurf-browser.org/
  5.  *
  6.  * NetSurf is free software; you can redistribute it and/or modify
  7.  * it under the terms of the GNU General Public License as published by
  8.  * the Free Software Foundation; version 2 of the License.
  9.  *
  10.  * NetSurf is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  * GNU General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU General Public License
  16.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  17.  */
  18.  
  19. /** \file
  20.  * Container format handling for themes etc. */
  21.  
  22. #ifndef __CONTAINER_H__
  23. #define __CONTAINER_H__
  24.  
  25. #include <sys/types.h>
  26.  
  27. struct container_ctx;
  28.  
  29. /* reading interface */
  30. struct container_ctx *container_open(const char *filename);
  31. const unsigned char *container_get(struct container_ctx *ctx,
  32.                                         const unsigned char *entryname,
  33.                                         u_int32_t *size);
  34. const unsigned char *container_get_name(struct container_ctx *ctx);
  35. const unsigned char *container_get_author(struct container_ctx *ctx);
  36. const unsigned char *container_iterate(struct container_ctx *ctx,
  37.                                         int *state);
  38.  
  39. /* creating interface */
  40. struct container_ctx *container_create(const char *filename,
  41.                                         const unsigned char *name,
  42.                                         const unsigned char *author);
  43. void container_add(struct container_ctx *ctx, const unsigned char *entryname,
  44.                                         const unsigned char *data,
  45.                                         const u_int32_t datalen);
  46.  
  47. /* common interface */
  48. void container_close(struct container_ctx *ctx);
  49.  
  50. #ifdef WITH_THEME_INSTALL
  51. char *container_extract_theme(const char *themefile, const char *dirbasename);
  52. #endif
  53. #endif /* __CONTAINER_H__ */
  54.