summaryrefslogtreecommitdiffstats
path: root/loader/modules.h
blob: f8a494014eebc362eb516f03524ef0ec56b6c532 (plain)
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
#ifndef H_MODULES
#define H_MODULES

typedef struct moduleList_s * moduleList;
typedef struct moduleDependency_s * moduleDeps;

struct loadedModuleInfo {
    char * name;
    char ** args;
    int weLoaded;
    char * path;
};

struct moduleList_s {
    struct loadedModuleInfo mods[50];
    int numModules;
};

int mlReadLoadedList(moduleList * list);
void mlFreeList(moduleList list);
int mlLoadDeps(moduleDeps * moduleDepList, const char * path);
moduleDeps mlNewDeps(void);
int mlLoadModule(char * modName, char * path, moduleList modLoaded,
	         moduleDeps modDeps, char ** args, int flags);
char ** mlGetDeps(moduleDeps modDeps, const char * modName);
int mlModuleInList(const char * modName, moduleList list);
int mlWriteConfModules(moduleList list, moduleInfoSet modInfo, int fd);

#endif