Organized ecdb source code in structure
This commit is contained in:
1
experimental/ecdb/trunk/AUTHORS
Normal file
1
experimental/ecdb/trunk/AUTHORS
Normal file
@ -0,0 +1 @@
|
||||
Jaime Thomas (avi.thomas@gmail.com)
|
0
experimental/ecdb/trunk/CONTRIBUTORS
Normal file
0
experimental/ecdb/trunk/CONTRIBUTORS
Normal file
280
experimental/ecdb/trunk/COPYING
Normal file
280
experimental/ecdb/trunk/COPYING
Normal file
@ -0,0 +1,280 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
16
experimental/ecdb/trunk/COPYRIGHT
Normal file
16
experimental/ecdb/trunk/COPYRIGHT
Normal file
@ -0,0 +1,16 @@
|
||||
Jaime Thomas <avi.thomas@gmail.com>
|
||||
Copyright (C) 2008 Jaime Thomas
|
||||
|
||||
|
||||
This program is free software; 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.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
1
experimental/ecdb/trunk/ChangeLog
Normal file
1
experimental/ecdb/trunk/ChangeLog
Normal file
@ -0,0 +1 @@
|
||||
First post
|
3
experimental/ecdb/trunk/INSTALL
Normal file
3
experimental/ecdb/trunk/INSTALL
Normal file
@ -0,0 +1,3 @@
|
||||
INSTALL
|
||||
|
||||
See README file for instructions.
|
11
experimental/ecdb/trunk/Makefile.am
Normal file
11
experimental/ecdb/trunk/Makefile.am
Normal file
@ -0,0 +1,11 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
SUBDIRS = src
|
||||
|
||||
EXTRA_DIST = \
|
||||
README AUTHORS COPYING
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.* \
|
||||
configure install-sh ltconfig ltmain.sh missing mkinstalldirs \
|
||||
stamp-h.in Makefile
|
||||
|
0
experimental/ecdb/trunk/NEWS
Normal file
0
experimental/ecdb/trunk/NEWS
Normal file
3
experimental/ecdb/trunk/README
Normal file
3
experimental/ecdb/trunk/README
Normal file
@ -0,0 +1,3 @@
|
||||
CD Burner
|
||||
|
||||
INFO++;
|
2
experimental/ecdb/trunk/TODO
Normal file
2
experimental/ecdb/trunk/TODO
Normal file
@ -0,0 +1,2 @@
|
||||
-> Detect if the media in a drive has changed and update the drive info (dbus?).
|
||||
-> Creating images is right now rather inflexible (no special/symlinks, etc) and have to do all file managment outside before creating image.
|
16
experimental/ecdb/trunk/autogen.sh
Executable file
16
experimental/ecdb/trunk/autogen.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm -rf autom4te.cache
|
||||
rm -f aclocal.m4 ltmain.sh
|
||||
|
||||
touch README
|
||||
|
||||
echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS || exit 1
|
||||
echo "Running autoheader..." ; autoheader || exit 1
|
||||
echo "Running autoconf..." ; autoconf || exit 1
|
||||
echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
|
||||
echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
|
||||
|
||||
if [ -z "$NOCONFIGURE" ]; then
|
||||
./configure "$@"
|
||||
fi
|
89
experimental/ecdb/trunk/configure.in
Normal file
89
experimental/ecdb/trunk/configure.in
Normal file
@ -0,0 +1,89 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
# get rid of that stupid cache mechanism
|
||||
rm -f config.cache
|
||||
|
||||
AC_INIT(configure.in)
|
||||
AM_INIT_AUTOMAKE(ecdb, 0.0.1)
|
||||
AM_CONFIG_HEADER(src/config.h)
|
||||
|
||||
AC_ISC_POSIX
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
AC_HEADER_STDC
|
||||
AC_C_CONST
|
||||
AM_ENABLE_SHARED
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
AM_WITH_DMALLOC
|
||||
|
||||
dnl Add the languages which your application supports here.
|
||||
ALL_LINGUAS=""
|
||||
|
||||
dnl Set PACKAGE_LOCALE_DIR in config.h.
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale", [Locale-specific data directory])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale", [Locale-specific data directory])
|
||||
fi
|
||||
|
||||
dnl Set PACKAGE_DATA_DIR in config.h.
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", [PACKAGE_DATA_DIR])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}", [PACKAGE_DATA_DIR])
|
||||
fi
|
||||
|
||||
dnl Set PACKAGE_BIN_DIR in config.h.
|
||||
if test "x${datadir}" = 'x${prefix}/bin'; then
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${ac_default_prefix}/bin", [Installation directory for user executables])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${prefix}/bin", [Installation directory for user executables])
|
||||
fi
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${bindir}", [Installation directory for user executables])
|
||||
fi
|
||||
|
||||
dnl Set PACKAGE_LIB_DIR in config.h.
|
||||
if test "x${datadir}" = 'x${prefix}/lib'; then
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${ac_default_prefix}/lib", [Installation directory for libraries])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${prefix}/lib", [Installation directory for libraries])
|
||||
fi
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${libdir}", [Installation directory for libraries])
|
||||
fi
|
||||
|
||||
dnl Set PACKAGE_SOURCE_DIR in config.h.
|
||||
packagesrcdir=`cd $srcdir && pwd`
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [Source code directory])
|
||||
|
||||
dnl Use -Wall if we have gcc.
|
||||
changequote(,)dnl
|
||||
if test "x$GCC" = "xyes"; then
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wall[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wall" ;;
|
||||
esac
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
LIBBURN_REQUIRED=0.4.2
|
||||
LIBISOFS_REQUIRED=0.6.2
|
||||
|
||||
PKG_CHECK_MODULES(ECDB, [
|
||||
libburn-1 >= $LIBBURN_REQUIRED
|
||||
libisofs-1 >= $LIBISOFS_REQUIRED
|
||||
ecore
|
||||
ewl
|
||||
edje
|
||||
efreet-mime
|
||||
])
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
])
|
||||
|
14
experimental/ecdb/trunk/src/Makefile.am
Normal file
14
experimental/ecdb/trunk/src/Makefile.am
Normal file
@ -0,0 +1,14 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
bin_PROGRAMS = ecdb
|
||||
|
||||
ecdb_SOURCES = \
|
||||
ecdb.c ecdb.h \
|
||||
ecdb_drives.c ecdb_drives.h \
|
||||
ecdb_image.c ecdb_image.h \
|
||||
ecdb_burn.c ecdb_burn.h \
|
||||
ecdb_misc.c ecdb_misc.h
|
||||
|
||||
ecdb_CFLAGS = @ECDB_CFLAGS@
|
||||
ecdb_LDADD = @ECDB_LIBS@
|
||||
|
60
experimental/ecdb/trunk/src/ecdb.c
Normal file
60
experimental/ecdb/trunk/src/ecdb.c
Normal file
@ -0,0 +1,60 @@
|
||||
#include "ecdb.h"
|
||||
|
||||
Ecdb_Main *em;
|
||||
int ecdb_setup();
|
||||
void ecdb_shutdown();
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
Ecdb_Project *proj;
|
||||
int i;
|
||||
|
||||
if (!ecdb_setup())
|
||||
{
|
||||
printf("Setup failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
ecdb_print_drive_info();
|
||||
ecdb_burn_init();
|
||||
|
||||
proj = ecdb_project_new();
|
||||
|
||||
i = 1;
|
||||
while ((i < argc) && (argv))
|
||||
{
|
||||
ecore_list_append(proj->files, strdup(argv[i]));
|
||||
i++;
|
||||
}
|
||||
proj->simulate = FALSE;
|
||||
proj->publisher_id = proj->data_preparer_id = proj->system_id =
|
||||
proj->application_id = proj->copywrite_id = proj->abstract_id =
|
||||
proj->biblio_id = "ecdb";
|
||||
ecdb_aquire_drive(proj, 0);
|
||||
ecdb_burn_project(proj);
|
||||
sleep(7000);
|
||||
|
||||
/* End testing */
|
||||
burn_finish();
|
||||
ecdb_shutdown();
|
||||
return 0;
|
||||
};
|
||||
|
||||
int
|
||||
ecdb_setup(void)
|
||||
{
|
||||
em = NULL;
|
||||
em = calloc(1, sizeof(Ecdb_Main));
|
||||
em->drives = NULL;
|
||||
em->projects = ecore_list_new();
|
||||
|
||||
if (!ecdb_aquire_drive_info())
|
||||
{
|
||||
printf("Aquiring drives failed!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
128
experimental/ecdb/trunk/src/ecdb.h
Normal file
128
experimental/ecdb/trunk/src/ecdb.h
Normal file
@ -0,0 +1,128 @@
|
||||
#ifndef ECDB_H
|
||||
#define ECDB_H
|
||||
|
||||
#include "config.h"
|
||||
#include <Ecore.h>
|
||||
#include <Ecore_Data.h>
|
||||
#include <Ecore_File.h>
|
||||
#include <Efreet_Mime.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <libgen.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
#include <libburn/libburn.h>
|
||||
#include <libisofs/libisofs.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#undef FREE
|
||||
#define FREE(dat) \
|
||||
{ \
|
||||
if (dat) { free(dat); dat = NULL; } \
|
||||
}
|
||||
|
||||
/* Typdefs */
|
||||
typedef struct burn_source BurnSource;
|
||||
typedef struct burn_disc BurnDisc;
|
||||
typedef struct burn_session BurnSession;
|
||||
typedef struct burn_write_opts BurnWriteOpts;
|
||||
typedef struct burn_track BurnTrack;
|
||||
typedef struct burn_progress BurnProgress;
|
||||
typedef struct burn_drive_info BurnDriveInfo;
|
||||
typedef enum burn_drive_status BurnDriveStatus;
|
||||
|
||||
/* ECDB Global Variables */
|
||||
typedef struct _Ecdb_Main Ecdb_Main;
|
||||
|
||||
struct _Ecdb_Main
|
||||
{
|
||||
Ecore_List *projects;
|
||||
Ecore_List *drives;
|
||||
};
|
||||
|
||||
extern Ecdb_Main *em;
|
||||
|
||||
typedef struct _Ecdb_Drive_Info Ecdb_Drive_Info;
|
||||
|
||||
struct _Ecdb_Drive_Info
|
||||
{
|
||||
/* Speeds */
|
||||
int *read_speeds;
|
||||
int *write_speeds;
|
||||
|
||||
/* Profiles */
|
||||
char *profile_name;
|
||||
int profile_loaded;
|
||||
|
||||
/* Drive info */
|
||||
char *vendor;
|
||||
char *product;
|
||||
char *revision;
|
||||
char *location;
|
||||
|
||||
unsigned char read_dvdram:1;
|
||||
unsigned char read_dvdr:1;
|
||||
unsigned char read_dvdrom:1;
|
||||
unsigned char read_cdr:1;
|
||||
unsigned char read_cdrw:1;
|
||||
unsigned char write_dvdram:1;
|
||||
unsigned char write_dvdr:1;
|
||||
unsigned char write_cdr:1;
|
||||
unsigned char write_simulate:1;
|
||||
|
||||
BurnDriveInfo *tangible;
|
||||
};
|
||||
|
||||
typedef struct _Ecdb_Project_Info Ecdb_Project;
|
||||
|
||||
struct _Ecdb_Project_Info
|
||||
{
|
||||
/* Files are important here */
|
||||
Ecore_List *files;
|
||||
|
||||
/* Ids */
|
||||
char *volume_id;
|
||||
char *publisher_id;
|
||||
char *data_preparer_id;
|
||||
char *system_id;
|
||||
char *application_id;
|
||||
char *copywrite_id;
|
||||
char *abstract_id;
|
||||
char *biblio_id;
|
||||
|
||||
/* iso options */
|
||||
unsigned char iso_level:1;
|
||||
unsigned char use_joliet:1;
|
||||
unsigned char use_rockridge:1;
|
||||
unsigned char follow_symlinks:1;
|
||||
unsigned char ignore_hidden:1;
|
||||
unsigned char ignore_special:1;
|
||||
unsigned char iso1990:1;
|
||||
|
||||
/* burn options */
|
||||
unsigned char opc:1;
|
||||
unsigned char multi:1;
|
||||
unsigned char simulate:1;
|
||||
unsigned char underrun_proof:1;
|
||||
int speed;
|
||||
|
||||
/* burn stuff */
|
||||
int fifo_chunksize;
|
||||
int fifo_chunks;
|
||||
int burn_mode;
|
||||
|
||||
/* The drive reference */
|
||||
Ecdb_Drive_Info *drive;
|
||||
BurnProgress progress;
|
||||
};
|
||||
|
||||
#include "ecdb_drives.h"
|
||||
#include "ecdb_image.h"
|
||||
#include "ecdb_burn.h"
|
||||
#include "ecdb_misc.h"
|
||||
|
||||
#endif
|
||||
|
158
experimental/ecdb/trunk/src/ecdb_burn.c
Normal file
158
experimental/ecdb/trunk/src/ecdb_burn.c
Normal file
@ -0,0 +1,158 @@
|
||||
#include "ecdb.h"
|
||||
|
||||
typedef struct Burn_Data Burn_Data;
|
||||
struct Burn_Data
|
||||
{
|
||||
BurnDisc *disc;
|
||||
BurnSession *session;
|
||||
Ecore_List *sources;
|
||||
Ecore_List *tracks;
|
||||
Ecdb_Project *proj;
|
||||
};
|
||||
|
||||
void *_progress_update(void *d);
|
||||
|
||||
/* Event handlers */
|
||||
int
|
||||
ecdb_burn_project(Ecdb_Project *proj)
|
||||
{
|
||||
char reasons[BURN_REASONS_LEN];
|
||||
int padding, i;
|
||||
Burn_Data *data;
|
||||
BurnTrack *track;
|
||||
BurnSource *source;
|
||||
BurnWriteOpts *opts;
|
||||
pthread_t progress_update;
|
||||
|
||||
i = 0;
|
||||
data = calloc(1, sizeof(Burn_Data));
|
||||
data->sources = ecore_list_new();
|
||||
data->tracks = ecore_list_new();
|
||||
data->proj = proj;
|
||||
|
||||
if (proj->burn_mode != BURN_AUDIO)
|
||||
padding = 300*1024;
|
||||
|
||||
data->disc = burn_disc_create();
|
||||
data->session = burn_session_create();
|
||||
burn_disc_add_session(data->disc, data->session, BURN_POS_END);
|
||||
|
||||
track = burn_track_create();
|
||||
burn_track_define_data(track, 0, padding, 1, proj->burn_mode);
|
||||
|
||||
while ((source = ecdb_image_project(proj)))
|
||||
{
|
||||
if (burn_track_set_source(track, source) != BURN_SOURCE_OK)
|
||||
{
|
||||
printf("Error: Cannot attach source object to track "
|
||||
"object!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
burn_session_add_track(data->session, track, BURN_POS_END);
|
||||
ecore_list_append(data->sources, source);
|
||||
ecore_list_append(data->tracks, track);
|
||||
i++;
|
||||
}
|
||||
|
||||
if (!i)
|
||||
{
|
||||
printf("Failed to add any files to burn disc!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
opts = burn_write_opts_new(proj->drive->tangible[0].drive);
|
||||
burn_write_opts_set_perform_opc(opts, proj->opc);
|
||||
burn_write_opts_set_multi(opts, proj->multi);
|
||||
if (proj->simulate)
|
||||
printf("simulating!\n");
|
||||
burn_write_opts_set_simulate(opts, proj->simulate);
|
||||
burn_drive_set_speed(proj->drive->tangible->drive, 0, proj->speed);
|
||||
burn_write_opts_set_underrun_proof(opts, proj->underrun_proof);
|
||||
|
||||
if (burn_write_opts_auto_write_type(opts, data->disc, reasons, 0)
|
||||
== BURN_WRITE_NONE)
|
||||
{
|
||||
printf("Error: Failed to find a suitable write mode for "
|
||||
"disc!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Not sure where to put this for now */
|
||||
burn_disc_write(opts, data->disc);
|
||||
burn_write_opts_free(opts);
|
||||
|
||||
pthread_create(&progress_update, NULL, _progress_update, data);
|
||||
pthread_detach(progress_update);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *
|
||||
_progress_update(void *d)
|
||||
{
|
||||
Burn_Data *data;
|
||||
BurnProgress p;
|
||||
BurnDriveStatus stat;
|
||||
struct burn_drive *drive;
|
||||
|
||||
data = d;
|
||||
|
||||
if (!data->proj->drive->tangible)
|
||||
{
|
||||
printf("No tangible drive!\n");
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
drive = data->proj->drive->tangible[0].drive;
|
||||
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
stat = burn_drive_get_status(drive, &p);
|
||||
if (stat == BURN_DRIVE_SPAWNING)
|
||||
{
|
||||
sleep(3);
|
||||
continue;
|
||||
}
|
||||
else if (stat == BURN_DRIVE_IDLE)
|
||||
{
|
||||
BurnTrack *track;
|
||||
BurnSource *source;
|
||||
|
||||
ecore_list_first_goto(data->sources);
|
||||
ecore_list_first_goto(data->tracks);
|
||||
|
||||
while ((source = ecore_list_remove(data->sources)))
|
||||
{
|
||||
burn_source_free(source);
|
||||
track = ecore_list_remove(data->tracks);
|
||||
burn_track_free(track);
|
||||
}
|
||||
|
||||
ecore_list_destroy(data->sources);
|
||||
ecore_list_destroy(data->tracks);
|
||||
burn_session_free(data->session);
|
||||
burn_disc_free(data->disc);
|
||||
burn_drive_release(drive, 0);
|
||||
burn_drive_info_free(data->proj->drive->tangible);
|
||||
|
||||
/* Don't keep in here */
|
||||
printf("fail\n");
|
||||
ecore_list_destroy(data->proj->files);
|
||||
FREE(data->proj);
|
||||
|
||||
/* End testing */
|
||||
printf("here\n");
|
||||
FREE(data);
|
||||
|
||||
pthread_exit(NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
//printf("Total sectors: %d, on sector: %d\n", p.sectors,
|
||||
// p.sector);
|
||||
data->proj->progress = p;
|
||||
sleep(5);
|
||||
}
|
||||
}
|
||||
|
6
experimental/ecdb/trunk/src/ecdb_burn.h
Normal file
6
experimental/ecdb/trunk/src/ecdb_burn.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef ECDB_BURN_H
|
||||
#define ECDB_BURN_H
|
||||
|
||||
int ecdb_burn_project(Ecdb_Project *proj);
|
||||
|
||||
#endif
|
163
experimental/ecdb/trunk/src/ecdb_drives.c
Normal file
163
experimental/ecdb/trunk/src/ecdb_drives.c
Normal file
@ -0,0 +1,163 @@
|
||||
#include "ecdb.h"
|
||||
|
||||
void ecdb_drive_info_free_cb(void *data);
|
||||
|
||||
int
|
||||
ecdb_aquire_drive_info(void)
|
||||
{
|
||||
int ret, i;
|
||||
unsigned int drive_num;
|
||||
struct burn_drive_info *drives_current;
|
||||
struct burn_speed_descriptor *speeds;
|
||||
|
||||
ecdb_burn_init();
|
||||
|
||||
ret = 0;
|
||||
if (em->drives)
|
||||
ecore_list_destroy(em->drives);
|
||||
|
||||
em->drives = ecore_list_new();
|
||||
ecore_list_free_cb_set(em->drives, ecdb_drive_info_free_cb);
|
||||
|
||||
while (!ret)
|
||||
ret = burn_drive_scan(&drives_current, &drive_num);
|
||||
|
||||
for (i = 0; i < drive_num; i++)
|
||||
{
|
||||
Ecdb_Drive_Info *drive;
|
||||
|
||||
drive = calloc(1, sizeof(Ecdb_Drive_Info));
|
||||
|
||||
/* It would be nice if there was an easier way to do this */
|
||||
drive->product = strdup(drives_current[i].product);
|
||||
drive->vendor = strdup(drives_current[i].vendor);
|
||||
drive->revision = strdup(drives_current[i].revision);
|
||||
drive->location = strdup(drives_current[i].location);
|
||||
drive->read_dvdram = drives_current[i].read_dvdram;
|
||||
drive->read_dvdr = drives_current[i].read_dvdr;
|
||||
drive->read_dvdrom = drives_current[i].read_dvdrom;
|
||||
drive->read_cdr = drives_current[i].read_cdr;
|
||||
drive->read_cdrw = drives_current[i].read_cdrw;
|
||||
drive->write_dvdram = drives_current[i].write_dvdram;
|
||||
drive->write_dvdr = drives_current[i].write_dvdr;
|
||||
drive->write_cdr = drives_current[i].write_cdr;
|
||||
drive->write_simulate = drives_current[i].write_simulate;
|
||||
|
||||
burn_drive_get_speedlist(drives_current[i].drive, &speeds);
|
||||
|
||||
drive->profile_name = strdup(speeds->profile_name);
|
||||
drive->profile_loaded = speeds->profile_loaded;
|
||||
|
||||
while (speeds->next)
|
||||
{
|
||||
i++;
|
||||
speeds = speeds->next;
|
||||
}
|
||||
|
||||
drive->read_speeds = calloc(i + 2, sizeof(int));
|
||||
drive->write_speeds = calloc(i + 2, sizeof(int));
|
||||
|
||||
drive->read_speeds[0] = i + 1;
|
||||
drive->write_speeds[0] = i + 1;
|
||||
|
||||
for (ret = 1; ret <= i; ret++)
|
||||
{
|
||||
drive->write_speeds[ret] = speeds->write_speed;
|
||||
drive->read_speeds[ret] = speeds->read_speed;
|
||||
speeds = speeds->prev;
|
||||
}
|
||||
|
||||
burn_drive_free_speedlist(&speeds);
|
||||
ecore_list_append(em->drives, drive);
|
||||
}
|
||||
|
||||
burn_drive_info_free(drives_current);
|
||||
burn_finish();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
ecdb_drive_info_free_cb(void *data)
|
||||
{
|
||||
Ecdb_Drive_Info *info;
|
||||
|
||||
info = data;
|
||||
|
||||
FREE(info->read_speeds);
|
||||
FREE(info->write_speeds);
|
||||
FREE(info->vendor);
|
||||
FREE(info->product);
|
||||
FREE(info->revision);
|
||||
FREE(info->location);
|
||||
FREE(info->profile_name);
|
||||
FREE(info);
|
||||
}
|
||||
|
||||
void
|
||||
ecdb_print_drive_info(void)
|
||||
{
|
||||
Ecdb_Drive_Info *drive;
|
||||
int j, i, h;
|
||||
|
||||
ecore_list_first_goto(em->drives);
|
||||
while ((drive = ecore_list_next(em->drives)))
|
||||
{
|
||||
printf("Vendor: %s, Product: %s, Revision: %s, "
|
||||
"Location: %s\n",
|
||||
drive->vendor, drive->product,
|
||||
drive->revision, drive->location);
|
||||
printf("Profile name: %s, Loaded: %d\n",
|
||||
drive->profile_name,
|
||||
drive->profile_loaded);
|
||||
printf("Read DVDRAM: %d, Read DVDR: %d, Read DVDROM: %d, "
|
||||
"Read CDR: %d, Read CDRW: %d\n",
|
||||
drive->read_dvdram,
|
||||
drive->read_dvdr,
|
||||
drive->read_dvdrom,
|
||||
drive->read_cdr,
|
||||
drive->read_cdrw);
|
||||
printf("Write DVDRAM: %d, Write DVDR: %d, Write CDR: %d, "
|
||||
"Write Simulate: %d\n",
|
||||
drive->write_dvdram,
|
||||
drive->write_dvdr,
|
||||
drive->write_cdr,
|
||||
drive->write_simulate);
|
||||
|
||||
j = drive->read_speeds[0];
|
||||
|
||||
for (i = 1; i < j; i ++)
|
||||
{
|
||||
if ((h = drive->write_speeds[i]))
|
||||
printf("Write: %d\n", h);
|
||||
if ((h = drive->read_speeds[i]))
|
||||
printf("Read: %d\n", h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
ecdb_aquire_drive(Ecdb_Project *proj, unsigned int idx)
|
||||
{
|
||||
Ecdb_Drive_Info *info;
|
||||
char adr[BURN_DRIVE_ADR_LEN];
|
||||
|
||||
info = ecore_list_index_goto(em->drives, idx);
|
||||
if (burn_drive_convert_fs_adr(info->location, adr) <= 0)
|
||||
{
|
||||
printf("Error: Address doesn't provide cd burner!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (burn_drive_scan_and_grab(&info->tangible, adr, 1) > 0)
|
||||
{
|
||||
proj->drive = info;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
info->tangible = NULL;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
8
experimental/ecdb/trunk/src/ecdb_drives.h
Normal file
8
experimental/ecdb/trunk/src/ecdb_drives.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef ECDB_DRIVES_H
|
||||
#define ECDB_DRIVES_H
|
||||
|
||||
int ecdb_aquire_drive_info(void);
|
||||
void ecdb_print_drive_info(void);
|
||||
int ecdb_aquire_drive(Ecdb_Project *proj, unsigned int idx);
|
||||
|
||||
#endif
|
128
experimental/ecdb/trunk/src/ecdb_image.c
Normal file
128
experimental/ecdb/trunk/src/ecdb_image.c
Normal file
@ -0,0 +1,128 @@
|
||||
#include "ecdb.h"
|
||||
|
||||
/* Some limitations here need to be worked out
|
||||
* Handle: audio, etc */
|
||||
BurnSource *
|
||||
ecdb_image_project(Ecdb_Project *proj)
|
||||
{
|
||||
IsoImage *image;
|
||||
IsoDir *root;
|
||||
IsoWriteOpts *opts;
|
||||
BurnSource *data_src, *fifo_src;
|
||||
char *path;
|
||||
int ret;
|
||||
|
||||
efreet_mime_init();
|
||||
|
||||
if ((!proj->files) || (ecore_list_empty_is(proj->files)))
|
||||
return NULL;
|
||||
else if (ecore_list_count(proj->files) == 1)
|
||||
{
|
||||
path = ecore_list_first(proj->files);
|
||||
if ((path) && (!ecore_file_is_dir(path)) &&
|
||||
(!strcmp(efreet_mime_type_get(path),
|
||||
"application/x-cd-image")))
|
||||
{
|
||||
path = ecore_list_first_remove(proj->files);
|
||||
data_src = burn_file_source_new(path, NULL);
|
||||
FREE(path);
|
||||
goto FIFO_CREATE;
|
||||
}
|
||||
}
|
||||
|
||||
ecdb_image_init();
|
||||
|
||||
ret = iso_image_new(proj->volume_id, &image);
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
printf("Failed to create an iso image!\n");
|
||||
iso_finish();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Disk ids */
|
||||
if (proj->publisher_id)
|
||||
iso_image_set_publisher_id(image, proj->publisher_id);
|
||||
if (proj->data_preparer_id)
|
||||
iso_image_set_data_preparer_id(image,
|
||||
proj->data_preparer_id);
|
||||
if (proj->system_id)
|
||||
iso_image_set_system_id(image, proj->system_id);
|
||||
if (proj->application_id)
|
||||
iso_image_set_application_id(image, proj->application_id);
|
||||
if (proj->copywrite_id)
|
||||
iso_image_set_copyright_file_id(image, proj->copywrite_id);
|
||||
if (proj->abstract_id)
|
||||
iso_image_set_abstract_file_id(image, proj->abstract_id);
|
||||
if (proj->biblio_id)
|
||||
iso_image_set_biblio_file_id(image, proj->biblio_id);
|
||||
|
||||
/* Write Options - default to distribution for now */
|
||||
ret = iso_write_opts_new(&opts, 2);
|
||||
if (!ret)
|
||||
{
|
||||
printf("Failed to create writing options!\n");
|
||||
iso_image_unref(image);
|
||||
iso_finish();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Most set by default with 2 ^ */
|
||||
iso_write_opts_set_iso_level(opts, proj->iso_level);
|
||||
iso_write_opts_set_joliet(opts, proj->use_joliet);
|
||||
iso_write_opts_set_rockridge(opts, proj->use_rockridge);
|
||||
iso_write_opts_set_iso1999(opts, proj->iso1990);
|
||||
//iso_write_opts_set_appendable(opts, proj->appendable);
|
||||
|
||||
iso_tree_set_follow_symlinks(image, proj->follow_symlinks);
|
||||
iso_tree_set_ignore_hidden(image, proj->ignore_hidden);
|
||||
iso_tree_set_ignore_special(image, proj->ignore_special);
|
||||
|
||||
root = iso_image_get_root(image);
|
||||
ecore_list_first_goto(proj->files);
|
||||
|
||||
ret = 0;
|
||||
while ((path = ecore_list_remove(proj->files)))
|
||||
{
|
||||
/* For now just this, in future special, symlink */
|
||||
if (ecore_file_is_dir(path))
|
||||
iso_tree_add_dir_rec(image, root, path);
|
||||
else if (ecore_file_exists(path))
|
||||
iso_tree_add_node(image, root, path, NULL);
|
||||
else
|
||||
{
|
||||
FREE(path);
|
||||
continue;
|
||||
}
|
||||
FREE(path);
|
||||
ret++;
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
printf("No files appended to image!\n");
|
||||
iso_image_unref(image);
|
||||
iso_write_opts_free(opts);
|
||||
iso_finish();
|
||||
}
|
||||
|
||||
/* Valgrind segfaults around here for some reason, otherwise not
|
||||
* strange
|
||||
*/
|
||||
iso_image_create_burn_source(image, opts, &data_src);
|
||||
iso_write_opts_free(opts);
|
||||
|
||||
/* unref here? not sure from docs */
|
||||
iso_image_unref(image);
|
||||
|
||||
FIFO_CREATE:
|
||||
fifo_src = burn_fifo_source_new(data_src,
|
||||
proj->fifo_chunksize, proj->fifo_chunks, 0);
|
||||
burn_source_free(data_src);
|
||||
iso_finish();
|
||||
efreet_mime_shutdown();
|
||||
|
||||
return fifo_src;
|
||||
}
|
||||
|
7
experimental/ecdb/trunk/src/ecdb_image.h
Normal file
7
experimental/ecdb/trunk/src/ecdb_image.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef ECDB_IMAGE_H
|
||||
#define ECDB_IMAGE_H
|
||||
|
||||
BurnSource *ecdb_image_project(Ecdb_Project *proj);
|
||||
|
||||
#endif
|
||||
|
44
experimental/ecdb/trunk/src/ecdb_misc.c
Normal file
44
experimental/ecdb/trunk/src/ecdb_misc.c
Normal file
@ -0,0 +1,44 @@
|
||||
#include "ecdb.h"
|
||||
|
||||
Ecdb_Project *
|
||||
ecdb_project_new(void)
|
||||
{
|
||||
Ecdb_Project *proj;
|
||||
|
||||
proj = calloc(1, sizeof(Ecdb_Project));
|
||||
proj->files = ecore_list_new();
|
||||
ecore_list_append(em->projects, proj);
|
||||
|
||||
/* Create some sane defaults */
|
||||
proj->burn_mode = BURN_MODE1;
|
||||
proj->fifo_chunksize = 2048;
|
||||
proj->fifo_chunks = 2048;
|
||||
|
||||
return proj;
|
||||
}
|
||||
|
||||
void
|
||||
ecdb_shutdown(void)
|
||||
{
|
||||
if (em->projects)
|
||||
ecore_list_destroy(em->projects);
|
||||
if (em->drives)
|
||||
ecore_list_destroy(em->drives);
|
||||
free(em);
|
||||
}
|
||||
|
||||
void
|
||||
ecdb_burn_init(void)
|
||||
{
|
||||
burn_initialize();
|
||||
burn_msgs_set_severities("NEVER", "SORRY", "ecdb: ");
|
||||
burn_set_signal_handling("ecdb: ", NULL, 0);
|
||||
}
|
||||
|
||||
void
|
||||
ecdb_image_init(void)
|
||||
{
|
||||
iso_init();
|
||||
iso_set_msgs_severities("NEVER", "SORRY", "ecdb: ");
|
||||
}
|
||||
|
9
experimental/ecdb/trunk/src/ecdb_misc.h
Normal file
9
experimental/ecdb/trunk/src/ecdb_misc.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef ECDB_MISC_H
|
||||
#define ECDB_MISC_H
|
||||
|
||||
Ecdb_Project *ecdb_project_new(void);
|
||||
void ecdb_shutdown(void);
|
||||
void ecdb_burn_init(void);
|
||||
void ecdb_image_init(void);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user