Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/handle.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/handle.h')
-rw-r--r--lib/libalpm/handle.h49
1 files changed, 32 insertions, 17 deletions
diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h
index 2d962fe6..9e038581 100644
--- a/lib/libalpm/handle.h
+++ b/lib/libalpm/handle.h
@@ -24,18 +24,25 @@
#include <sys/types.h>
#include "alpm_list.h"
-#include "db.h"
-#include "log.h"
#include "alpm.h"
-#include "trans.h"
-typedef struct _pmhandle_t {
+#ifdef HAVE_LIBCURL
+#include <curl/curl.h>
+#endif
+
+struct __alpm_handle_t {
/* internal usage */
- pmdb_t *db_local; /* local db pointer */
- alpm_list_t *dbs_sync; /* List of (pmdb_t *) */
+ alpm_db_t *db_local; /* local db pointer */
+ alpm_list_t *dbs_sync; /* List of (alpm_db_t *) */
FILE *logstream; /* log file stream pointer */
FILE *lckstream; /* lock file stream pointer if one exists */
- pmtrans_t *trans;
+ alpm_trans_t *trans;
+
+#ifdef HAVE_LIBCURL
+ /* libcurl handle */
+ CURL *curl; /* reusable curl_easy handle */
+ CURLcode curlerr; /* last error produced by curl */
+#endif
/* callback functions */
alpm_cb_log logcb; /* Log callback function */
@@ -48,26 +55,34 @@ typedef struct _pmhandle_t {
char *dbpath; /* Base path to pacman's DBs */
char *logfile; /* Name of the log file */
char *lockfile; /* Name of the lock file */
+ char *gpgdir; /* Directory where GnuPG files are stored */
alpm_list_t *cachedirs; /* Paths to pacman cache directories */
/* package lists */
alpm_list_t *noupgrade; /* List of packages NOT to be upgraded */
alpm_list_t *noextract; /* List of files NOT to extract */
alpm_list_t *ignorepkg; /* List of packages to ignore */
- alpm_list_t *ignoregrp; /* List of groups to ignore */
+ alpm_list_t *ignoregroup; /* List of groups to ignore */
/* options */
- int usesyslog; /* Use syslog instead of logfile? */ /* TODO move to frontend */
- char *arch; /* Architecture of packages we should allow */
- int usedelta; /* Download deltas if possible */
- int checkspace; /* Check disk space before installing */
-} pmhandle_t;
+ int usesyslog; /* Use syslog instead of logfile? */ /* TODO move to frontend */
+ char *arch; /* Architecture of packages we should allow */
+ int usedelta; /* Download deltas if possible */
+ int checkspace; /* Check disk space before installing */
+ alpm_siglevel_t siglevel; /* Default signature verification level */
+
+ /* error code */
+ enum _alpm_errno_t pm_errno;
+};
+
+alpm_handle_t *_alpm_handle_new(void);
+void _alpm_handle_free(alpm_handle_t *handle);
-/* global handle variable */
-extern pmhandle_t *handle;
+int _alpm_handle_lock(alpm_handle_t *handle);
+int _alpm_handle_unlock(alpm_handle_t *handle);
-pmhandle_t *_alpm_handle_new(void);
-void _alpm_handle_free(pmhandle_t *handle);
+enum _alpm_errno_t _alpm_set_directory_option(const char *value,
+ char **storage, int must_exist);
#endif /* _ALPM_HANDLE_H */