Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm.h
diff options
context:
space:
mode:
authorRémy Oudompheng <remy@archlinux.org>2011-04-10 00:04:54 +0200
committerDan McGee <dan@archlinux.org>2011-04-15 18:37:10 -0500
commit4ffda3f05b034b55eb5159e0268a34c14b46e686 (patch)
tree5f10349a40b28ee42aee51a8075c85e46cd619a0 /lib/libalpm/alpm.h
parentdff2d916baac88b71dec0af81645ea2fe876cf6c (diff)
libalpm: consistently use int as return type for option setters
Currently the only error case then when handle == NULL. However several handle functions return -1 on this error, and a uniform API makes things simpler. Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r--lib/libalpm/alpm.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index b08191d0..82eb11e8 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -99,16 +99,16 @@ typedef int (*alpm_cb_fetch)(const char *url, const char *localpath,
*/
alpm_cb_log alpm_option_get_logcb(void);
-void alpm_option_set_logcb(alpm_cb_log cb);
+int alpm_option_set_logcb(alpm_cb_log cb);
alpm_cb_download alpm_option_get_dlcb(void);
-void alpm_option_set_dlcb(alpm_cb_download cb);
+int alpm_option_set_dlcb(alpm_cb_download cb);
alpm_cb_fetch alpm_option_get_fetchcb(void);
-void alpm_option_set_fetchcb(alpm_cb_fetch cb);
+int alpm_option_set_fetchcb(alpm_cb_fetch cb);
alpm_cb_totaldl alpm_option_get_totaldlcb(void);
-void alpm_option_set_totaldlcb(alpm_cb_totaldl cb);
+int alpm_option_set_totaldlcb(alpm_cb_totaldl cb);
const char *alpm_option_get_root(void);
int alpm_option_set_root(const char *root);
@@ -118,7 +118,7 @@ int alpm_option_set_dbpath(const char *dbpath);
alpm_list_t *alpm_option_get_cachedirs(void);
int alpm_option_add_cachedir(const char *cachedir);
-void alpm_option_set_cachedirs(alpm_list_t *cachedirs);
+int alpm_option_set_cachedirs(alpm_list_t *cachedirs);
int alpm_option_remove_cachedir(const char *cachedir);
const char *alpm_option_get_logfile(void);
@@ -131,36 +131,36 @@ const char *alpm_option_get_signaturedir(void);
int alpm_option_set_signaturedir(const char *signaturedir);
int alpm_option_get_usesyslog(void);
-void alpm_option_set_usesyslog(int usesyslog);
+int alpm_option_set_usesyslog(int usesyslog);
alpm_list_t *alpm_option_get_noupgrades(void);
-void alpm_option_add_noupgrade(const char *pkg);
-void alpm_option_set_noupgrades(alpm_list_t *noupgrade);
+int alpm_option_add_noupgrade(const char *pkg);
+int alpm_option_set_noupgrades(alpm_list_t *noupgrade);
int alpm_option_remove_noupgrade(const char *pkg);
alpm_list_t *alpm_option_get_noextracts(void);
-void alpm_option_add_noextract(const char *pkg);
-void alpm_option_set_noextracts(alpm_list_t *noextract);
+int alpm_option_add_noextract(const char *pkg);
+int alpm_option_set_noextracts(alpm_list_t *noextract);
int alpm_option_remove_noextract(const char *pkg);
alpm_list_t *alpm_option_get_ignorepkgs(void);
-void alpm_option_add_ignorepkg(const char *pkg);
-void alpm_option_set_ignorepkgs(alpm_list_t *ignorepkgs);
+int alpm_option_add_ignorepkg(const char *pkg);
+int alpm_option_set_ignorepkgs(alpm_list_t *ignorepkgs);
int alpm_option_remove_ignorepkg(const char *pkg);
alpm_list_t *alpm_option_get_ignoregrps(void);
-void alpm_option_add_ignoregrp(const char *grp);
-void alpm_option_set_ignoregrps(alpm_list_t *ignoregrps);
+int alpm_option_add_ignoregrp(const char *grp);
+int alpm_option_set_ignoregrps(alpm_list_t *ignoregrps);
int alpm_option_remove_ignoregrp(const char *grp);
const char *alpm_option_get_arch(void);
-void alpm_option_set_arch(const char *arch);
+int alpm_option_set_arch(const char *arch);
int alpm_option_get_usedelta(void);
-void alpm_option_set_usedelta(int usedelta);
+int alpm_option_set_usedelta(int usedelta);
int alpm_option_get_checkspace(void);
-void alpm_option_set_checkspace(int checkspace);
+int alpm_option_set_checkspace(int checkspace);
pmdb_t *alpm_option_get_localdb(void);
alpm_list_t *alpm_option_get_syncdbs(void);