"Fossies" - the Fresh Open Source Software Archive

Member "libisofs-1.5.4/libisofs/joliet.h" (8 Jul 2020, 1672 Bytes) of package /linux/misc/libisofs-1.5.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "joliet.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (c) 2007 Vreixo Formoso
    3  * Copyright (c) 2007 Mario Danic
    4  * 
    5  * This file is part of the libisofs project; you can redistribute it and/or 
    6  * modify it under the terms of the GNU General Public License version 2 
    7  * or later as published by the Free Software Foundation. 
    8  * See COPYING file for details.
    9  */
   10 
   11 /**
   12  * Declare Joliet related structures.
   13  */
   14 
   15 #ifndef LIBISO_JOLIET_H
   16 #define LIBISO_JOLIET_H
   17 
   18 #include "libisofs.h"
   19 #include "ecma119.h"
   20 
   21 /* was formerly 66 = 64 + 2. Now 105 = 103 + 2.
   22 */
   23 #define LIBISO_JOLIET_NAME_MAX 105
   24 
   25 enum joliet_node_type {
   26     JOLIET_FILE,
   27     JOLIET_DIR
   28 };
   29 
   30 struct joliet_dir_info {
   31     JolietNode **children;
   32     size_t nchildren;
   33     size_t len;
   34     size_t block;
   35 };
   36 
   37 struct joliet_node
   38 {
   39     uint16_t *name; /**< Name in UCS-2BE. */
   40 
   41     JolietNode *parent;
   42 
   43     IsoNode *node; /*< reference to the iso node */
   44 
   45     enum joliet_node_type type;
   46     union {
   47         IsoFileSrc *file;
   48         struct joliet_dir_info *dir;
   49     } info;
   50 };
   51 
   52 /**
   53  * Create a IsoWriter to deal with Joliet estructures, and add it to the given
   54  * target.
   55  * 
   56  * @return
   57  *      1 on success, < 0 on error
   58  */
   59 int joliet_writer_create(Ecma119Image *target);
   60 
   61 
   62 /* Not to be called but only for comparison with target->writers[i]
   63 */
   64 int joliet_writer_write_vol_desc(IsoImageWriter *writer);
   65 
   66 /**
   67  * Determine the Joliet name from node name.
   68  * @param flag   bit0=  Do not issue error messages
   69  */
   70 int iso_get_joliet_name(IsoWriteOpts *opts, char *input_charset, int imgid,
   71                         char *node_name, enum IsoNodeType node_type,
   72                         size_t *joliet_ucs2_failures,
   73                         uint16_t **name, int flag);
   74 
   75 #endif /* LIBISO_JOLIET_H */