diff options
Diffstat (limited to 'src/laymanapi.h')
-rw-r--r-- | src/laymanapi.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/laymanapi.h b/src/laymanapi.h new file mode 100644 index 0000000..42c0058 --- /dev/null +++ b/src/laymanapi.h @@ -0,0 +1,47 @@ +#ifndef LAYMAN_API_H +#define LAYMAN_API_H + +#include "config.h" +#include "stringlist.h" + +typedef struct LaymanAPI LaymanAPI; + +typedef enum OverlayType {Svn = 0, Git, Bzr} OverlayType; +typedef enum OverlayQuality {Experimental = 0, Stable, Testing} OverlayQuality; +typedef struct OverlayInfo +{ + char *name; + char *source; + char *contact; + OverlayType type; + int priority; + OverlayQuality quality; + char *description; + char *link; + char *feed; + int official; + int supported; +} OverlayInfo; + + +LaymanAPI* laymanAPICreate(Config*, int, int); +StringList* laymanAPIGetAvailable(LaymanAPI*); +StringList* laymanAPIGetInstalled(LaymanAPI*); + +/* + * The Python API returns a list of warnings/sucesses/errors + * In here, a boolean value is returned. + * Warnings can be retreived with + * laymanAPIWarnings() + * laymanAPIErrors() + * As there's only one argument here, there's need to have success results. + * + * The reason it's done this way is that the Python way of doing things is not the same as the Python way. + * + * FIXME:is it a good idea to have different APIs for different languages ? + */ +int laymanAPISync(LaymanAPI*, const char*); +int laymanAPIFetchRemoteList(LaymanAPI*); +const char* laymanAPIGetInfo(LaymanAPI*, const char*); + +#endif |