2008-01-06 16:38:31 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2007 Vreixo Formoso
|
|
|
|
* Copyright (c) 2007 Mario Danic
|
|
|
|
*
|
|
|
|
* This file is part of the libisofs project; you can redistribute it and/or
|
2010-01-27 05:48:59 +00:00
|
|
|
* modify it under the terms of the GNU General Public License version 2
|
|
|
|
* or later as published by the Free Software Foundation.
|
|
|
|
* See COPYING file for details.
|
2008-01-06 16:38:31 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Declare Joliet related structures.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LIBISO_JOLIET_H
|
|
|
|
#define LIBISO_JOLIET_H
|
|
|
|
|
|
|
|
#include "libisofs.h"
|
|
|
|
#include "ecma119.h"
|
|
|
|
|
2011-03-26 14:38:08 +00:00
|
|
|
/* was formerly 66 = 64 + 2. Now 105 = 103 + 2.
|
|
|
|
*/
|
|
|
|
#define LIBISO_JOLIET_NAME_MAX 105
|
|
|
|
|
2008-01-06 16:38:31 +00:00
|
|
|
enum joliet_node_type {
|
|
|
|
JOLIET_FILE,
|
|
|
|
JOLIET_DIR
|
|
|
|
};
|
|
|
|
|
|
|
|
struct joliet_dir_info {
|
|
|
|
JolietNode **children;
|
|
|
|
size_t nchildren;
|
|
|
|
size_t len;
|
|
|
|
size_t block;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct joliet_node
|
|
|
|
{
|
|
|
|
uint16_t *name; /**< Name in UCS-2BE. */
|
|
|
|
|
|
|
|
JolietNode *parent;
|
|
|
|
|
|
|
|
IsoNode *node; /*< reference to the iso node */
|
|
|
|
|
|
|
|
enum joliet_node_type type;
|
|
|
|
union {
|
|
|
|
IsoFileSrc *file;
|
2008-01-16 19:16:08 +00:00
|
|
|
struct joliet_dir_info *dir;
|
2008-01-06 16:38:31 +00:00
|
|
|
} info;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a IsoWriter to deal with Joliet estructures, and add it to the given
|
|
|
|
* target.
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
* 1 on success, < 0 on error
|
|
|
|
*/
|
|
|
|
int joliet_writer_create(Ecma119Image *target);
|
|
|
|
|
2010-09-05 10:43:48 +00:00
|
|
|
|
2010-09-11 11:25:51 +00:00
|
|
|
/* Not to be called but only for comparison with target->writers[i]
|
2010-09-05 10:43:48 +00:00
|
|
|
*/
|
|
|
|
int joliet_writer_write_vol_desc(IsoImageWriter *writer);
|
|
|
|
|
2013-12-28 14:36:33 +00:00
|
|
|
/**
|
|
|
|
* Determine the Joliet name from node name.
|
|
|
|
* @param flag bit0= Do not issue error messages
|
|
|
|
*/
|
|
|
|
int iso_get_joliet_name(IsoWriteOpts *opts, char *input_charset, int imgid,
|
|
|
|
char *node_name, enum IsoNodeType node_type,
|
|
|
|
size_t *joliet_ucs2_failures,
|
|
|
|
uint16_t **name, int flag);
|
2010-09-05 10:43:48 +00:00
|
|
|
|
2008-01-06 16:38:31 +00:00
|
|
|
#endif /* LIBISO_JOLIET_H */
|