~ubuntu-branches/ubuntu/utopic/file-roller/utopic

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Roadmap
-------

  *) src/fr-archive.c: here is defined the base class that needs to be
     specialized to add support for an archive format.

  *) src/fr-archive-libarchive.c:  defines a FrArchive sub-class that adds
     support for archives that can be read and/or written by the libarchive
     library.

  *) src/fr-command.c: defines the FrCommand class which is the base for
     classes that require an external command to add support for an archive
     format. For example  fr-command-tar.c adds support for tar archives using
     the 'tar' utility.
     FRCommand implements the options that the external utility doesn't support.
     For example,  you can  extract files from a tar archive without recreating
     the path even if the 'tar' command does not support this feature.  If an
     option is supported natively, the command line option is used instead.
     FrCommand uses a FrProcess object to execute commands.

  *) src/fr-process.c: defines a class that lets you execute a series of
     commands.  A command can be defined as 'sticky' if it must be executed
     even if a previous command has failed.


Adding support for an archive format
------------------------------------

To add support for an archive format using an external command create a
subclass of FrCommand and implement its virtual functions, as done in all the
fr-command-* files.

If the format will be supported without using an external utility you need to
create a FrArchive subclass and implement all of its virtual functions as done
for example in fr-archive-libarchive.c.

After creating the new class, modify fr-init.c this way:

 *) register the new archive type in register_archives(), in doing so
    pay attention to the registration order as described in the comment;
 *) if you are adding support for a new mime type, add the required entries
    in mime_type_desc and file_ext_type .