Vreixo Formoso 40b27dbacc Initial support for low level ECMA-119 tree.
This only adds the tree creation functions, no sorting and name mangling 
yet. Only plain ECMA-119 supported for now, nor RR, relaxed 
restrictions, etc..

This also adds a little test program.
2007-12-15 16:55:44 +01:00

69 lines
1.6 KiB

* Copyright (c) 2007 Vreixo Formoso
* This file is part of the libisofs project; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. See COPYING file for details.
#ifndef LIBISO_ECMA119_TREE_H_
#define LIBISO_ECMA119_TREE_H_
#include "libisofs.h"
#include "ecma119.h"
enum ecma119_node_type {
* Struct with info about a node representing a tree
struct ecma119_dir_info {
/* Block where the directory entries will be written on image */
size_t block;
size_t nchildren;
Ecma119Node **children;
* A node for a tree containing all the information necessary for writing
* an ISO9660 volume.
struct ecma119_node
* Name in ASCII, conforming to selected ISO level.
* Version number is not include, it is added on the fly
char *iso_name;
// TODO mmm, is this needed?
// or should we compute charset translation on-the-fly?
//char *name; /**< full name, in output charset (UTF-8 for now) */
Ecma119Node *parent;
IsoNode *node; /*< reference to the iso node */
enum ecma119_node_type type; /**< file, symlink, directory or placeholder */
union {
IsoFileSrc *file;
struct ecma119_dir_info dir;
} info;
int ecma119_tree_create(Ecma119Image *img, IsoNode *iso, Ecma119Node **tree);
* Free an Ecma119Node, and its children if node is a dir
void ecma119_node_free(Ecma119Node *node);
#endif /*LIBISO_ECMA119_TREE_H_*/