sjef
sjef-c.h
Go to the documentation of this file.
1 #ifndef SJEF_LIB_SJEF_C_H_
2 #define SJEF_LIB_SJEF_C_H_
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif // __cplusplus
7 #include <stddef.h>
8 int sjef_project_open(const char* project);
9 void sjef_project_close(const char* project);
10 int sjef_project_copy(const char* project, const char* destination_filename, int keep_hash, int keep_run_directories);
11 int sjef_project_move(const char* project, const char* destination_filename);
12 void sjef_project_erase(const char* project);
13 void sjef_project_property_erase(const char* project);
14 void sjef_project_clean(const char* project, int keep_run_directories);
15 int sjef_project_import(const char* project, const char* file);
16 int sjef_project_export(const char* project, const char* file);
17 int sjef_project_run_needed(const char* project);
18 int sjef_project_synchronize(const char* project, const char* backend, int verbosity);
19 int sjef_project_run(const char* project, const char* backend, int verbosity, int force, int wait);
20 int sjef_project_status(const char* project, int verbosity);
21 const char* sjef_project_status_message(const char* project, int verbosity);
22 int sjef_project_status_initiate(const char* project, int verbosity);
23 void sjef_project_kill(const char* project);
24 void sjef_project_property_set(const char* project, const char* key, const char* value);
25 void sjef_project_properties_set(const char* project, const char** key, const char** value);
26 char* sjef_project_property_get(const char* project, const char* key);
27 char** sjef_project_properties_get(const char* project, const char** key);
28 void sjef_project_property_delete(const char* project, const char* key);
29 char* sjef_project_filename(const char* project);
30 const char* sjef_project_backend_cache(const char* project);
41 char* sjef_project_filename_general(const char* project, const char* suffix, const char* name, int run);
42 char* sjef_project_name(const char* project);
43 size_t sjef_project_project_hash(const char* project);
44 size_t sjef_project_input_hash(const char* project);
45 int sjef_project_recent_find(const char* filename);
46 char* sjef_project_recent(int number, const char* suffix);
47 int sjef_project_change_backend(const char* project, const char* backend);
48 char* sjef_project_backend_parameter_get(const char* project, const char* backend, const char* parameter);
49 char* sjef_project_backend_parameter_expand(const char* project, const char* backend, const char* templ);
50 void sjef_project_backend_parameter_set(const char* project, const char* backend, const char* parameter,
51  const char* value);
52 void sjef_project_backend_parameter_delete(const char* project, const char* backend, const char* parameter);
60 char** sjef_project_backend_parameters(const char* project, const char* backend, int def);
61 char** sjef_project_backend_names(const char* project);
62 // char** sjef_global_backends();
63 char* sjef_expand_path(const char* path, const char* default_suffix);
69 
77 char* sjef_backend_value(const char* project, const char* backend, const char* key);
78 
79 char* sjef_project_backend_parameter_documentation(const char* project, const char* backend, const char* parameter);
80 
89 char* sjef_project_run_directory(const char* project, int run);
90 static inline char* sjef_project_run_directory_default(const char* project) {
91  return sjef_project_run_directory(project, 0);
92 }
98 void sjef_project_run_delete(const char* project, int run);
106 void sjef_project_take_run_files(const char* project, int run, const char* fromname, const char* toname);
113 void sjef_project_set_current_run(const char* project, unsigned int run);
119 unsigned int sjef_project_current_run(const char* project);
120 #ifdef __cplusplus
121 }
122 #endif // __cplusplus
123 
124 #endif // SJEF_LIB_SJEF_C_H_
void sjef_project_kill(const char *project)
int sjef_project_open(const char *project)
char ** sjef_project_backend_parameters(const char *project, const char *backend, int def)
Get all of the parameters referenced in the run_command of a backend.
void sjef_project_backend_parameter_set(const char *project, const char *backend, const char *parameter, const char *value)
char * sjef_project_recent(int number, const char *suffix)
char * sjef_project_property_get(const char *project, const char *key)
char * sjef_project_backend_parameter_documentation(const char *project, const char *backend, const char *parameter)
void sjef_project_property_delete(const char *project, const char *key)
unsigned int sjef_project_current_run(const char *project)
Get the focussed run directory.
void sjef_project_set_current_run(const char *project, unsigned int run)
Set the focussed run directory.
void sjef_project_clean(const char *project, int keep_run_directories)
int sjef_project_recent_find(const char *filename)
int sjef_project_status_initiate(const char *project, int verbosity)
int sjef_project_export(const char *project, const char *file)
char ** sjef_project_properties_get(const char *project, const char **key)
char * sjef_project_run_directory(const char *project, int run)
Obtain the path of a run directory.
char ** sjef_backend_keys()
Obtain a list of the names of the defined fields in a sjef::Backend.
void sjef_project_take_run_files(const char *project, int run, const char *fromname, const char *toname)
Copy files from a run directory to the main project.
const char * sjef_project_status_message(const char *project, int verbosity)
char ** sjef_project_backend_names(const char *project)
int sjef_project_status(const char *project, int verbosity)
int sjef_project_change_backend(const char *project, const char *backend)
void sjef_project_properties_set(const char *project, const char **key, const char **value)
size_t sjef_project_input_hash(const char *project)
int sjef_project_synchronize(const char *project, const char *backend, int verbosity)
size_t sjef_project_project_hash(const char *project)
void sjef_project_close(const char *project)
void sjef_project_backend_parameter_delete(const char *project, const char *backend, const char *parameter)
char * sjef_project_filename_general(const char *project, const char *suffix, const char *name, int run)
Get the file name of the bundle, or a primary file of particular type, or a general file in the bundl...
void sjef_project_erase(const char *project)
char * sjef_project_backend_parameter_get(const char *project, const char *backend, const char *parameter)
char * sjef_project_backend_parameter_expand(const char *project, const char *backend, const char *templ)
char * sjef_backend_value(const char *project, const char *backend, const char *key)
Obtain the value of a defined field in a backend belonging to a project.
char * sjef_expand_path(const char *path, const char *default_suffix)
void sjef_project_property_set(const char *project, const char *key, const char *value)
void sjef_project_property_erase(const char *project)
void sjef_project_run_delete(const char *project, int run)
Delete a run directory.
const char * sjef_project_backend_cache(const char *project)
int sjef_project_move(const char *project, const char *destination_filename)
char * sjef_project_filename(const char *project)
int sjef_project_run(const char *project, const char *backend, int verbosity, int force, int wait)
char * sjef_project_name(const char *project)
int sjef_project_run_needed(const char *project)
int sjef_project_copy(const char *project, const char *destination_filename, int keep_hash, int keep_run_directories)
int sjef_project_import(const char *project, const char *file)