add formatting trailer for emacs
[cinelerra_cv/ct.git] / cinelerra / assets.h
blobb7482546d181f96dd34307db3959153323acc5a0
1 #ifndef ASSETS_H
2 #define ASSETS_H
4 #include <stdio.h>
5 #include <stdint.h>
7 #include "arraylist.h"
8 #include "asset.inc"
9 #include "assets.inc"
10 #include "batch.inc"
11 #include "bchash.inc"
12 #include "edl.inc"
13 #include "filexml.inc"
14 #include "guicast.h"
15 #include "pluginserver.inc"
16 #include "sharedlocation.h"
18 #include <list>
20 class Assets
22 Assets_list assets;
23 public:
24 // expose some lists interface with inline functions
25 Assets_list::size_type size()
26 { return assets.size();}
27 Assets_list::iterator begin()
28 { return assets.begin();}
29 Assets_list::iterator end()
30 { return assets.end();}
31 Assets_list::const_iterator begin() const
32 { return assets.begin();}
33 Assets_list::const_iterator end() const
34 { return assets.end();}
36 Assets(EDL *edl);
37 virtual ~Assets();
39 int load(ArrayList<PluginServer*> *plugindb,
40 FileXML *xml,
41 uint32_t load_flags);
42 int save(ArrayList<PluginServer*> *plugindb,
43 FileXML *xml,
44 char *output_path);
45 Assets& operator=(const Assets &assets);
46 void copy_from(const Assets &assets);
48 // Enter a new asset into the table.
49 // If the asset already exists return the asset which exists.
50 // If the asset doesn't exist, store a copy of the argument and return the copy.
51 Asset_GC update(Asset_GC asset);
52 // Update the index information for assets with the same path
53 void update_index(Asset &asset);
56 // Parent EDL
57 EDL *edl;
60 int delete_all();
61 int dump();
63 // return the asset containing this path or create a new asset containing this path
64 Asset_GC update(const char *path);
66 // Insert the asset into the list if it doesn't exist already but
67 // don't create a new asset.
68 void update_ptr(Asset_GC asset);
70 // return the asset containing this path or 0 if not found
71 Asset_GC get_asset(const char *filename);
72 // remove asset from table
73 void remove_asset(Asset_GC asset);
75 // return number of the asset
76 int number_of(Asset_GC asset);
77 Asset_GC asset_number(int number);
79 int update_old_filename(char *old_filename, char *new_filename);
85 #endif
87 // Local Variables:
88 // mode: C++
89 // c-file-style: "linux"
90 // End: