---
name: "libalpm_options"
section: "3"
platform: "linux"
package: "pacman"
version: "7.1.0.r9.g54d9411-3"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libalpm_options"
---

# libalpm\_options(3)

Options - Libalpm option getters and setters

## NAME

libalpm\_options - Options

 \- Libalpm option getters and setters

## SYNOPSIS

### Accessors for callbacks

**alpm\_cb\_log** **alpm\_option\_get\_logcb** (**alpm\_handle\_t** \*handle)\
 Returns the callback used for logging.  void \* **alpm\_option\_get\_logcb\_ctx** (**alpm\_handle\_t** \*handle)\
 Returns the callback used for logging.  int **alpm\_option\_set\_logcb** (**alpm\_handle\_t** \*handle, **alpm\_cb\_log** cb, void \*ctx)\
 Sets the callback used for logging.  **alpm\_cb\_download** **alpm\_option\_get\_dlcb** (**alpm\_handle\_t** \*handle)\
 Returns the callback used to report download progress.  void \* **alpm\_option\_get\_dlcb\_ctx** (**alpm\_handle\_t** \*handle)\
 Returns the callback used to report download progress.  int **alpm\_option\_set\_dlcb** (**alpm\_handle\_t** \*handle, **alpm\_cb\_download** cb, void \*ctx)\
 Sets the callback used to report download progress.  **alpm\_cb\_fetch** **alpm\_option\_get\_fetchcb** (**alpm\_handle\_t** \*handle)\
 Returns the downloading callback.  void \* **alpm\_option\_get\_fetchcb\_ctx** (**alpm\_handle\_t** \*handle)\
 Returns the downloading callback.  int **alpm\_option\_set\_fetchcb** (**alpm\_handle\_t** \*handle, **alpm\_cb\_fetch** cb, void \*ctx)\
 Sets the downloading callback.  **alpm\_cb\_event** **alpm\_option\_get\_eventcb** (**alpm\_handle\_t** \*handle)\
 Returns the callback used for events.  void \* **alpm\_option\_get\_eventcb\_ctx** (**alpm\_handle\_t** \*handle)\
 Returns the callback used for events.  int **alpm\_option\_set\_eventcb** (**alpm\_handle\_t** \*handle, **alpm\_cb\_event** cb, void \*ctx)\
 Sets the callback used for events.  **alpm\_cb\_question** **alpm\_option\_get\_questioncb** (**alpm\_handle\_t** \*handle)\
 Returns the callback used for questions.  void \* **alpm\_option\_get\_questioncb\_ctx** (**alpm\_handle\_t** \*handle)\
 Returns the callback used for questions.  int **alpm\_option\_set\_questioncb** (**alpm\_handle\_t** \*handle, **alpm\_cb\_question** cb, void \*ctx)\
 Sets the callback used for questions.  **alpm\_cb\_progress** **alpm\_option\_get\_progresscb** (**alpm\_handle\_t** \*handle)\
 Returns the callback used for operation progress.  void \* **alpm\_option\_get\_progresscb\_ctx** (**alpm\_handle\_t** \*handle)\
 Returns the callback used for operation progress.  int **alpm\_option\_set\_progresscb** (**alpm\_handle\_t** \*handle, **alpm\_cb\_progress** cb, void \*ctx)\
 Sets the callback used for operation progress.

### Accessors to the root directory

The root directory is the prefix to which libalpm installs packages to.

Hooks and scriptlets will also be run in a chroot to ensure they behave correctly in alternative roots.  const char \* **alpm\_option\_get\_root** (**alpm\_handle\_t** \*handle)\
 Returns the root path.

### Accessors to the database path

The dbpath is where libalpm stores the local db and downloads sync databases.  const char \* **alpm\_option\_get\_dbpath** (**alpm\_handle\_t** \*handle)\
 Returns the path to the database directory.

### Accessors to the lockfile

The lockfile is used to ensure two instances of libalpm can not write to the database at the same time.

The lock file is created when committing a transaction and released when the transaction completes. Or when calling **alpm\_unlock**.  const char \* **alpm\_option\_get\_lockfile** (**alpm\_handle\_t** \*handle)\
 Get the name of the database lock file.

### Accessors to the list of package cache directories.

This is where libalpm will store downloaded packages.  **alpm\_list\_t** \* **alpm\_option\_get\_cachedirs** (**alpm\_handle\_t** \*handle)\
 Gets the currently configured cachedirs,.  int **alpm\_option\_set\_cachedirs** (**alpm\_handle\_t** \*handle, **alpm\_list\_t** \*cachedirs)\
 Sets the cachedirs.  int **alpm\_option\_add\_cachedir** (**alpm\_handle\_t** \*handle, const char \*cachedir)\
 Append a cachedir to the configured cachedirs.  int **alpm\_option\_remove\_cachedir** (**alpm\_handle\_t** \*handle, const char \*cachedir)\
 Remove a cachedir from the configured cachedirs.

### Accessors to the list of package hook directories.

libalpm will search these directories for hooks to run.

A hook in a later directory will override previous hooks if they have the same name.  **alpm\_list\_t** \* **alpm\_option\_get\_hookdirs** (**alpm\_handle\_t** \*handle)\
 Gets the currently configured hookdirs,.  int **alpm\_option\_set\_hookdirs** (**alpm\_handle\_t** \*handle, **alpm\_list\_t** \*hookdirs)\
 Sets the hookdirs.  int **alpm\_option\_add\_hookdir** (**alpm\_handle\_t** \*handle, const char \*hookdir)\
 Append a hookdir to the configured hookdirs.  int **alpm\_option\_remove\_hookdir** (**alpm\_handle\_t** \*handle, const char \*hookdir)\
 Remove a hookdir from the configured hookdirs.

### Accessors to the list of overwritable files.

Normally libalpm will refuse to install a package that owns files that are already on disk and not owned by that package.

If a conflicting file matches a glob in the overwrite\_files list, then no conflict will be raised and libalpm will simply overwrite the file.  **alpm\_list\_t** \* **alpm\_option\_get\_overwrite\_files** (**alpm\_handle\_t** \*handle)\
 Gets the currently configured overwritable files,.  int **alpm\_option\_set\_overwrite\_files** (**alpm\_handle\_t** \*handle, **alpm\_list\_t** \*globs)\
 Sets the overwritable files.  int **alpm\_option\_add\_overwrite\_file** (**alpm\_handle\_t** \*handle, const char \*glob)\
 Append an overwritable file to the configured overwritable files.  int **alpm\_option\_remove\_overwrite\_file** (**alpm\_handle\_t** \*handle, const char \*glob)\
 Remove a file glob from the configured overwritable files globs.

### Accessors to the log file

This controls where libalpm will save log output to.  const char \* **alpm\_option\_get\_logfile** (**alpm\_handle\_t** \*handle)\
 Gets the filepath to the currently set logfile.  int **alpm\_option\_set\_logfile** (**alpm\_handle\_t** \*handle, const char \*logfile)\
 Sets the logfile path.

### Accessors to the GPG directory

This controls where libalpm will store GnuPG's files.  const char \* **alpm\_option\_get\_gpgdir** (**alpm\_handle\_t** \*handle)\
 Returns the path to libalpm's GnuPG home directory.  int **alpm\_option\_set\_gpgdir** (**alpm\_handle\_t** \*handle, const char \*gpgdir)\
 Sets the path to libalpm's GnuPG home directory.

### Accessors for use sandboxuser

This controls the user that libalpm will use for sensitive operations like downloading files.  const char \* **alpm\_option\_get\_sandboxuser** (**alpm\_handle\_t** \*handle)\
 Returns the user to switch to for sensitive operations.  int **alpm\_option\_set\_sandboxuser** (**alpm\_handle\_t** \*handle, const char \*sandboxuser)\
 Sets the user to switch to for sensitive operations.

### Accessors for use syslog

This controls whether libalpm will also use the syslog.

Even if this option is enabled, libalpm will still try to log to its log file.  int **alpm\_option\_get\_usesyslog** (**alpm\_handle\_t** \*handle)\
 Returns whether to use syslog (0 is FALSE, TRUE otherwise).  int **alpm\_option\_set\_usesyslog** (**alpm\_handle\_t** \*handle, int usesyslog)\
 Sets whether to use syslog (0 is FALSE, TRUE otherwise).

### Accessors to the list of no-upgrade files.

These functions modify the list of files which should not be updated by package installation.  **alpm\_list\_t** \* **alpm\_option\_get\_noupgrades** (**alpm\_handle\_t** \*handle)\
 Get the list of no-upgrade files.  int **alpm\_option\_add\_noupgrade** (**alpm\_handle\_t** \*handle, const char \*path)\
 Add a file to the no-upgrade list.  int **alpm\_option\_set\_noupgrades** (**alpm\_handle\_t** \*handle, **alpm\_list\_t** \*noupgrade)\
 Sets the list of no-upgrade files.  int **alpm\_option\_remove\_noupgrade** (**alpm\_handle\_t** \*handle, const char \*path)\
 Remove an entry from the no-upgrade list.  int **alpm\_option\_match\_noupgrade** (**alpm\_handle\_t** \*handle, const char \*path)\
 Test if a path matches any of the globs in the no-upgrade list.

### Accessors to the list of no-extract files.

These functions modify the list of filenames which should be skipped packages which should not be upgraded by a sysupgrade operation.  **alpm\_list\_t** \* **alpm\_option\_get\_noextracts** (**alpm\_handle\_t** \*handle)\
 Get the list of no-extract files.  int **alpm\_option\_add\_noextract** (**alpm\_handle\_t** \*handle, const char \*path)\
 Add a file to the no-extract list.  int **alpm\_option\_set\_noextracts** (**alpm\_handle\_t** \*handle, **alpm\_list\_t** \*noextract)\
 Sets the list of no-extract files.  int **alpm\_option\_remove\_noextract** (**alpm\_handle\_t** \*handle, const char \*path)\
 Remove an entry from the no-extract list.  int **alpm\_option\_match\_noextract** (**alpm\_handle\_t** \*handle, const char \*path)\
 Test if a path matches any of the globs in the no-extract list.

### Accessors to the list of ignored packages.

These functions modify the list of packages that should be ignored by a sysupgrade.

Entries in this list may be globs and only match the package's name. Providers are not taken into account.  **alpm\_list\_t** \* **alpm\_option\_get\_ignorepkgs** (**alpm\_handle\_t** \*handle)\
 Get the list of ignored packages.  int **alpm\_option\_add\_ignorepkg** (**alpm\_handle\_t** \*handle, const char \*pkg)\
 Add a file to the ignored package list.  int **alpm\_option\_set\_ignorepkgs** (**alpm\_handle\_t** \*handle, **alpm\_list\_t** \*ignorepkgs)\
 Sets the list of packages to ignore.  int **alpm\_option\_remove\_ignorepkg** (**alpm\_handle\_t** \*handle, const char \*pkg)\
 Remove an entry from the ignorepkg list.

### Accessors to the list of ignored groups.

These functions modify the list of groups whose packages should be ignored by a sysupgrade.

Entries in this list may be globs.  **alpm\_list\_t** \* **alpm\_option\_get\_ignoregroups** (**alpm\_handle\_t** \*handle)\
 Get the list of ignored groups.  int **alpm\_option\_add\_ignoregroup** (**alpm\_handle\_t** \*handle, const char \*grp)\
 Add a file to the ignored group list.  int **alpm\_option\_set\_ignoregroups** (**alpm\_handle\_t** \*handle, **alpm\_list\_t** \*ignoregrps)\
 Sets the list of groups to ignore.  int **alpm\_option\_remove\_ignoregroup** (**alpm\_handle\_t** \*handle, const char \*grp)\
 Remove an entry from the ignoregroup list.

### Accessors to the list of ignored dependencies.

These functions modify the list of dependencies that should be ignored by a sysupgrade.

This is effectively a list of virtual providers that packages can use to satisfy their dependencies.  **alpm\_list\_t** \* **alpm\_option\_get\_assumeinstalled** (**alpm\_handle\_t** \*handle)\
 Gets the list of dependencies that are assumed to be met.  int **alpm\_option\_add\_assumeinstalled** (**alpm\_handle\_t** \*handle, const **alpm\_depend\_t** \*dep)\
 Add a depend to the assumed installed list.  int **alpm\_option\_set\_assumeinstalled** (**alpm\_handle\_t** \*handle, **alpm\_list\_t** \*deps)\
 Sets the list of dependencies that are assumed to be met.  int **alpm\_option\_remove\_assumeinstalled** (**alpm\_handle\_t** \*handle, const **alpm\_depend\_t** \*dep)\
 Remove an entry from the assume installed list.

### Accessors to the list of allowed architectures.

libalpm will only install packages that match one of the configured architectures.

The architectures do not need to match the physical architecture. They can just be treated as a label.  **alpm\_list\_t** \* **alpm\_option\_get\_architectures** (**alpm\_handle\_t** \*handle)\
 Returns the allowed package architecture.  int **alpm\_option\_add\_architecture** (**alpm\_handle\_t** \*handle, const char \*arch)\
 Adds an allowed package architecture.  int **alpm\_option\_set\_architectures** (**alpm\_handle\_t** \*handle, **alpm\_list\_t** \*arches)\
 Sets the allowed package architecture.  int **alpm\_option\_remove\_architecture** (**alpm\_handle\_t** \*handle, const char \*arch)\
 Removes an allowed package architecture.

### Accessors for check space.

This controls whether libalpm will check if there is sufficient before installing packages.  int **alpm\_option\_get\_checkspace** (**alpm\_handle\_t** \*handle)\
 Get whether or not checking for free space before installing packages is enabled.  int **alpm\_option\_set\_checkspace** (**alpm\_handle\_t** \*handle, int checkspace)\
 Enable/disable checking free space before installing packages.

### Accessors for the database extension

This controls the extension used for sync databases.

libalpm will use this extension to both lookup remote databases and as the name used when opening reading them.

This is useful for file databases. Seems as files can increase the size of a database by quite a lot, a server could hold a database without files under one extension, and another with files under another extension.

Which one is downloaded and used then depends on this setting.  const char \* **alpm\_option\_get\_dbext** (**alpm\_handle\_t** \*handle)\
 Gets the configured database extension.  int **alpm\_option\_set\_dbext** (**alpm\_handle\_t** \*handle, const char \*dbext)\
 Sets the database extension.

### Accessors for the signature levels

int **alpm\_option\_get\_default\_siglevel** (**alpm\_handle\_t** \*handle)\
 Get the default siglevel.  int **alpm\_option\_set\_default\_siglevel** (**alpm\_handle\_t** \*handle, int level)\
 Set the default siglevel.  int **alpm\_option\_get\_local\_file\_siglevel** (**alpm\_handle\_t** \*handle)\
 Get the configured local file siglevel.  int **alpm\_option\_set\_local\_file\_siglevel** (**alpm\_handle\_t** \*handle, int level)\
 Set the local file siglevel.  int **alpm\_option\_get\_remote\_file\_siglevel** (**alpm\_handle\_t** \*handle)\
 Get the configured remote file siglevel.  int **alpm\_option\_set\_remote\_file\_siglevel** (**alpm\_handle\_t** \*handle, int level)\
 Set the remote file siglevel.

### Accessors for download timeout

By default, libalpm will timeout if a download has been transferring less than 1 byte for 10 seconds.  int **alpm\_option\_get\_disable\_dl\_timeout** (**alpm\_handle\_t** \*handle)\
 Get the download timeout state.  int **alpm\_option\_set\_disable\_dl\_timeout** (**alpm\_handle\_t** \*handle, unsigned short disable\_dl\_timeout)\
 Enables/disables the download timeout.

### Accessors for parallel downloads

**alpm\_db\_update**, **alpm\_fetch\_pkgurl** and **alpm\_trans\_commit** can all download packages in parallel.

This setting configures how many packages can be downloaded in parallel,

By default this value is set to 1, meaning packages are downloading sequentially.  int **alpm\_option\_get\_parallel\_downloads** (**alpm\_handle\_t** \*handle)\
 Gets the number of parallel streams to download database and package files.  int **alpm\_option\_set\_parallel\_downloads** (**alpm\_handle\_t** \*handle, unsigned int num\_streams)\
 Sets number of parallel streams to download database and package files.

### Accessors for sandbox

By default, libalpm will sandbox the downloader process.  int **alpm\_option\_get\_disable\_sandbox** (**alpm\_handle\_t** \*handle)\
 Get the state of the sandbox.  int **alpm\_option\_set\_disable\_sandbox** (**alpm\_handle\_t** \*handle, unsigned short disable\_sandbox)\
 Enables/disables all components of the sandbox.  int **alpm\_option\_get\_disable\_sandbox\_filesystem** (**alpm\_handle\_t** \*handle)\
 Get the state of the filesystem part of the sandbox.  int **alpm\_option\_set\_disable\_sandbox\_filesystem** (**alpm\_handle\_t** \*handle, unsigned short disable\_sandbox\_filesystem)\
 Enables/disables the filesystem part of the sandbox.  int **alpm\_option\_get\_disable\_sandbox\_syscalls** (**alpm\_handle\_t** \*handle)\
 Get the state of the syscalls part of the sandbox.  int **alpm\_option\_set\_disable\_sandbox\_syscalls** (**alpm\_handle\_t** \*handle, unsigned short disable\_sandbox\_syscalls)\
 Enables/disables the syscalls part of the sandbox.

## Detailed Description

Libalpm option getters and setters

## Function Documentation

### int alpm\_option\_add\_architecture (alpm\_handle\_t \* handle, const char \* arch)

Adds an allowed package architecture.

**Parameters**

*handle* the context handle \
 *arch* the architecture to set

References **alpm\_option\_add\_architecture()**.

Referenced by **alpm\_option\_add\_architecture()**.

### int alpm\_option\_add\_assumeinstalled (alpm\_handle\_t \* handle, const alpm\_depend\_t \* dep)

Add a depend to the assumed installed list.

**Parameters**

*handle* the context handle \
 *dep* the dependency to add

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_add\_assumeinstalled()**.

Referenced by **alpm\_option\_add\_assumeinstalled()**.

### int alpm\_option\_add\_cachedir (alpm\_handle\_t \* handle, const char \* cachedir)

Append a cachedir to the configured cachedirs.

**Parameters**

*handle* the context handle \
 *cachedir* the cachedir to add

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_add\_cachedir()**.

Referenced by **alpm\_option\_add\_cachedir()**.

### int alpm\_option\_add\_hookdir (alpm\_handle\_t \* handle, const char \* hookdir)

Append a hookdir to the configured hookdirs.

**Parameters**

*handle* the context handle \
 *hookdir* the hookdir to add

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_add\_hookdir()**.

Referenced by **alpm\_option\_add\_hookdir()**.

### int alpm\_option\_add\_ignoregroup (alpm\_handle\_t \* handle, const char \* grp)

Add a file to the ignored group list.

**Parameters**

*handle* the context handle \
 *grp* the group to add

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_add\_ignoregroup()**.

Referenced by **alpm\_option\_add\_ignoregroup()**.

### int alpm\_option\_add\_ignorepkg (alpm\_handle\_t \* handle, const char \* pkg)

Add a file to the ignored package list.

**Parameters**

*handle* the context handle \
 *pkg* the package to add

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_add\_ignorepkg()**.

Referenced by **alpm\_option\_add\_ignorepkg()**.

### int alpm\_option\_add\_noextract (alpm\_handle\_t \* handle, const char \* path)

Add a file to the no-extract list.

**Parameters**

*handle* the context handle \
 *path* the path to add

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_add\_noextract()**.

Referenced by **alpm\_option\_add\_noextract()**.

### int alpm\_option\_add\_noupgrade (alpm\_handle\_t \* handle, const char \* path)

Add a file to the no-upgrade list.

**Parameters**

*handle* the context handle \
 *path* the path to add

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_add\_noupgrade()**.

Referenced by **alpm\_option\_add\_noupgrade()**.

### int alpm\_option\_add\_overwrite\_file (alpm\_handle\_t \* handle, const char \* glob)

Append an overwritable file to the configured overwritable files.

**Parameters**

*handle* the context handle \
 *glob* the file glob to add

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_add\_overwrite\_file()**.

Referenced by **alpm\_option\_add\_overwrite\_file()**.

### alpm\_list\_t \* alpm\_option\_get\_architectures (alpm\_handle\_t \* handle)

Returns the allowed package architecture.

**Parameters**

*handle* the context handle

**Returns**

the configured package architectures

References **alpm\_option\_get\_architectures()**.

Referenced by **alpm\_option\_get\_architectures()**.

### alpm\_list\_t \* alpm\_option\_get\_assumeinstalled (alpm\_handle\_t \* handle)

Gets the list of dependencies that are assumed to be met.

**Parameters**

*handle* the context handle

**Returns**

a list of alpm\_depend\_t\*

References **alpm\_option\_get\_assumeinstalled()**.

Referenced by **alpm\_option\_get\_assumeinstalled()**.

### alpm\_list\_t \* alpm\_option\_get\_cachedirs (alpm\_handle\_t \* handle)

Gets the currently configured cachedirs,.

**Parameters**

*handle* the context handle

**Returns**

a char\* list of cache directories

References **alpm\_option\_get\_cachedirs()**.

Referenced by **alpm\_option\_get\_cachedirs()**.

### int alpm\_option\_get\_checkspace (alpm\_handle\_t \* handle)

Get whether or not checking for free space before installing packages is enabled.

**Parameters**

*handle* the context handle

**Returns**

0 if disabled, 1 if enabled

References **alpm\_option\_get\_checkspace()**.

Referenced by **alpm\_option\_get\_checkspace()**.

### const char \* alpm\_option\_get\_dbext (alpm\_handle\_t \* handle)

Gets the configured database extension.

**Parameters**

*handle* the context handle

**Returns**

the configured database extension

References **alpm\_option\_get\_dbext()**.

Referenced by **alpm\_option\_get\_dbext()**.

### const char \* alpm\_option\_get\_dbpath (alpm\_handle\_t \* handle)

Returns the path to the database directory. Read-only.

**Parameters**

*handle* the context handle

References **alpm\_option\_get\_dbpath()**.

Referenced by **alpm\_option\_get\_dbpath()**.

### int alpm\_option\_get\_default\_siglevel (alpm\_handle\_t \* handle)

Get the default siglevel.

**Parameters**

*handle* the context handle

**Returns**

a **alpm\_siglevel\_t** bitfield of the siglevel

References **alpm\_option\_get\_default\_siglevel()**.

Referenced by **alpm\_option\_get\_default\_siglevel()**.

### int alpm\_option\_get\_disable\_dl\_timeout (alpm\_handle\_t \* handle)

Get the download timeout state.

**Parameters**

*handle* the context handle

**Returns**

0 for enabled, 1 for disabled

References **alpm\_option\_get\_disable\_dl\_timeout()**.

Referenced by **alpm\_option\_get\_disable\_dl\_timeout()**.

### int alpm\_option\_get\_disable\_sandbox (alpm\_handle\_t \* handle)

Get the state of the sandbox.

**Parameters**

*handle* the context handle

**Returns**

0 for enabled, 1 if any component is disabled, 2 if completely disabled

References **alpm\_option\_get\_disable\_sandbox()**.

Referenced by **alpm\_option\_get\_disable\_sandbox()**.

### int alpm\_option\_get\_disable\_sandbox\_filesystem (alpm\_handle\_t \* handle)

Get the state of the filesystem part of the sandbox.

**Parameters**

*handle* the context handle

**Returns**

0 for enabled, 1 for disabled

References **alpm\_option\_get\_disable\_sandbox\_filesystem()**.

Referenced by **alpm\_option\_get\_disable\_sandbox\_filesystem()**.

### int alpm\_option\_get\_disable\_sandbox\_syscalls (alpm\_handle\_t \* handle)

Get the state of the syscalls part of the sandbox.

**Parameters**

*handle* the context handle

**Returns**

0 for enabled, 1 for disabled

References **alpm\_option\_get\_disable\_sandbox\_syscalls()**.

Referenced by **alpm\_option\_get\_disable\_sandbox\_syscalls()**.

### alpm\_cb\_download alpm\_option\_get\_dlcb (alpm\_handle\_t \* handle)

Returns the callback used to report download progress.

**Parameters**

*handle* the context handle

**Returns**

the currently set download callback

References **alpm\_option\_get\_dlcb()**.

Referenced by **alpm\_option\_get\_dlcb()**.

### void \* alpm\_option\_get\_dlcb\_ctx (alpm\_handle\_t \* handle)

Returns the callback used to report download progress.

**Parameters**

*handle* the context handle

**Returns**

the currently set download callback context

References **alpm\_option\_get\_dlcb\_ctx()**.

Referenced by **alpm\_option\_get\_dlcb\_ctx()**.

### alpm\_cb\_event alpm\_option\_get\_eventcb (alpm\_handle\_t \* handle)

Returns the callback used for events.

**Parameters**

*handle* the context handle

**Returns**

the currently set event callback

References **alpm\_option\_get\_eventcb()**.

Referenced by **alpm\_option\_get\_eventcb()**.

### void \* alpm\_option\_get\_eventcb\_ctx (alpm\_handle\_t \* handle)

Returns the callback used for events.

**Parameters**

*handle* the context handle

**Returns**

the currently set event callback context

References **alpm\_option\_get\_eventcb\_ctx()**.

Referenced by **alpm\_option\_get\_eventcb\_ctx()**.

### alpm\_cb\_fetch alpm\_option\_get\_fetchcb (alpm\_handle\_t \* handle)

Returns the downloading callback.

**Parameters**

*handle* the context handle

**Returns**

the currently set fetch callback

References **alpm\_option\_get\_fetchcb()**.

Referenced by **alpm\_option\_get\_fetchcb()**.

### void \* alpm\_option\_get\_fetchcb\_ctx (alpm\_handle\_t \* handle)

Returns the downloading callback.

**Parameters**

*handle* the context handle

**Returns**

the currently set fetch callback context

References **alpm\_option\_get\_fetchcb\_ctx()**.

Referenced by **alpm\_option\_get\_fetchcb\_ctx()**.

### const char \* alpm\_option\_get\_gpgdir (alpm\_handle\_t \* handle)

Returns the path to libalpm's GnuPG home directory.

**Parameters**

*handle* the context handle

**Returns**

the path to libalpms's GnuPG home directory

References **alpm\_option\_get\_gpgdir()**.

Referenced by **alpm\_option\_get\_gpgdir()**.

### alpm\_list\_t \* alpm\_option\_get\_hookdirs (alpm\_handle\_t \* handle)

Gets the currently configured hookdirs,.

**Parameters**

*handle* the context handle

**Returns**

a char\* list of hook directories

References **alpm\_option\_get\_hookdirs()**.

Referenced by **alpm\_option\_get\_hookdirs()**.

### alpm\_list\_t \* alpm\_option\_get\_ignoregroups (alpm\_handle\_t \* handle)

Get the list of ignored groups.

**Parameters**

*handle* the context handle

**Returns**

the char\* list of ignored groups

References **alpm\_option\_get\_ignoregroups()**.

Referenced by **alpm\_option\_get\_ignoregroups()**.

### alpm\_list\_t \* alpm\_option\_get\_ignorepkgs (alpm\_handle\_t \* handle)

Get the list of ignored packages.

**Parameters**

*handle* the context handle

**Returns**

the char\* list of ignored packages

References **alpm\_option\_get\_ignorepkgs()**.

Referenced by **alpm\_option\_get\_ignorepkgs()**.

### int alpm\_option\_get\_local\_file\_siglevel (alpm\_handle\_t \* handle)

Get the configured local file siglevel.

**Parameters**

*handle* the context handle

**Returns**

a **alpm\_siglevel\_t** bitfield of the siglevel

References **alpm\_option\_get\_local\_file\_siglevel()**.

Referenced by **alpm\_option\_get\_local\_file\_siglevel()**.

### const char \* alpm\_option\_get\_lockfile (alpm\_handle\_t \* handle)

Get the name of the database lock file. Read-only. This is the name that the lockfile would have. It does not matter if the lockfile actually exists on disk.

**Parameters**

*handle* the context handle

References **alpm\_option\_get\_lockfile()**.

Referenced by **alpm\_option\_get\_lockfile()**.

### alpm\_cb\_log alpm\_option\_get\_logcb (alpm\_handle\_t \* handle)

Returns the callback used for logging.

**Parameters**

*handle* the context handle

**Returns**

the currently set log callback

References **alpm\_option\_get\_logcb()**.

Referenced by **alpm\_option\_get\_logcb()**.

### void \* alpm\_option\_get\_logcb\_ctx (alpm\_handle\_t \* handle)

Returns the callback used for logging.

**Parameters**

*handle* the context handle

**Returns**

the currently set log callback context

References **alpm\_option\_get\_logcb\_ctx()**.

Referenced by **alpm\_option\_get\_logcb\_ctx()**.

### const char \* alpm\_option\_get\_logfile (alpm\_handle\_t \* handle)

Gets the filepath to the currently set logfile.

**Parameters**

*handle* the context handle

**Returns**

the path to the logfile

References **alpm\_option\_get\_logfile()**.

Referenced by **alpm\_option\_get\_logfile()**.

### alpm\_list\_t \* alpm\_option\_get\_noextracts (alpm\_handle\_t \* handle)

Get the list of no-extract files.

**Parameters**

*handle* the context handle

**Returns**

the char\* list of no-extract files

References **alpm\_option\_get\_noextracts()**.

Referenced by **alpm\_option\_get\_noextracts()**.

### alpm\_list\_t \* alpm\_option\_get\_noupgrades (alpm\_handle\_t \* handle)

Get the list of no-upgrade files.

**Parameters**

*handle* the context handle

**Returns**

the char\* list of no-upgrade files

References **alpm\_option\_get\_noupgrades()**.

Referenced by **alpm\_option\_get\_noupgrades()**.

### alpm\_list\_t \* alpm\_option\_get\_overwrite\_files (alpm\_handle\_t \* handle)

Gets the currently configured overwritable files,.

**Parameters**

*handle* the context handle

**Returns**

a char\* list of overwritable file globs

References **alpm\_option\_get\_overwrite\_files()**.

Referenced by **alpm\_option\_get\_overwrite\_files()**.

### int alpm\_option\_get\_parallel\_downloads (alpm\_handle\_t \* handle)

Gets the number of parallel streams to download database and package files.

**Parameters**

*handle* the context handle

**Returns**

the number of parallel streams to download database and package files

References **alpm\_option\_get\_parallel\_downloads()**.

Referenced by **alpm\_option\_get\_parallel\_downloads()**.

### alpm\_cb\_progress alpm\_option\_get\_progresscb (alpm\_handle\_t \* handle)

Returns the callback used for operation progress.

**Parameters**

*handle* the context handle

**Returns**

the currently set progress callback

References **alpm\_option\_get\_progresscb()**.

Referenced by **alpm\_option\_get\_progresscb()**.

### void \* alpm\_option\_get\_progresscb\_ctx (alpm\_handle\_t \* handle)

Returns the callback used for operation progress.

**Parameters**

*handle* the context handle

**Returns**

the currently set progress callback context

References **alpm\_option\_get\_progresscb\_ctx()**.

Referenced by **alpm\_option\_get\_progresscb\_ctx()**.

### alpm\_cb\_question alpm\_option\_get\_questioncb (alpm\_handle\_t \* handle)

Returns the callback used for questions.

**Parameters**

*handle* the context handle

**Returns**

the currently set question callback

References **alpm\_option\_get\_questioncb()**.

Referenced by **alpm\_option\_get\_questioncb()**.

### void \* alpm\_option\_get\_questioncb\_ctx (alpm\_handle\_t \* handle)

Returns the callback used for questions.

**Parameters**

*handle* the context handle

**Returns**

the currently set question callback context

References **alpm\_option\_get\_questioncb\_ctx()**.

Referenced by **alpm\_option\_get\_questioncb\_ctx()**.

### int alpm\_option\_get\_remote\_file\_siglevel (alpm\_handle\_t \* handle)

Get the configured remote file siglevel.

**Parameters**

*handle* the context handle

**Returns**

a **alpm\_siglevel\_t** bitfield of the siglevel

References **alpm\_option\_get\_remote\_file\_siglevel()**.

Referenced by **alpm\_option\_get\_remote\_file\_siglevel()**.

### const char \* alpm\_option\_get\_root (alpm\_handle\_t \* handle)

Returns the root path. Read-only.

**Parameters**

*handle* the context handle

References **alpm\_option\_get\_root()**.

Referenced by **alpm\_option\_get\_root()**.

### const char \* alpm\_option\_get\_sandboxuser (alpm\_handle\_t \* handle)

Returns the user to switch to for sensitive operations.

**Returns**

the user name

References **alpm\_option\_get\_sandboxuser()**.

Referenced by **alpm\_option\_get\_sandboxuser()**.

### int alpm\_option\_get\_usesyslog (alpm\_handle\_t \* handle)

Returns whether to use syslog (0 is FALSE, TRUE otherwise).

**Parameters**

*handle* the context handle

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_get\_usesyslog()**.

Referenced by **alpm\_option\_get\_usesyslog()**.

### int alpm\_option\_match\_noextract (alpm\_handle\_t \* handle, const char \* path)

Test if a path matches any of the globs in the no-extract list.

**Parameters**

*handle* the context handle \
 *path* the path to test

**Returns**

0 is the path matches a glob, negative if there is no match and positive is the match was inverted

References **alpm\_option\_match\_noextract()**.

Referenced by **alpm\_option\_match\_noextract()**.

### int alpm\_option\_match\_noupgrade (alpm\_handle\_t \* handle, const char \* path)

Test if a path matches any of the globs in the no-upgrade list.

**Parameters**

*handle* the context handle \
 *path* the path to test

**Returns**

0 is the path matches a glob, negative if there is no match and positive is the match was inverted

References **alpm\_option\_match\_noupgrade()**.

Referenced by **alpm\_option\_match\_noupgrade()**.

### int alpm\_option\_remove\_architecture (alpm\_handle\_t \* handle, const char \* arch)

Removes an allowed package architecture.

**Parameters**

*handle* the context handle \
 *arch* the architecture to remove

References **alpm\_option\_remove\_architecture()**.

Referenced by **alpm\_option\_remove\_architecture()**.

### int alpm\_option\_remove\_assumeinstalled (alpm\_handle\_t \* handle, const alpm\_depend\_t \* dep)

Remove an entry from the assume installed list.

**Parameters**

*handle* the context handle \
 *dep* the dep to remove

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_remove\_assumeinstalled()**.

Referenced by **alpm\_option\_remove\_assumeinstalled()**.

### int alpm\_option\_remove\_cachedir (alpm\_handle\_t \* handle, const char \* cachedir)

Remove a cachedir from the configured cachedirs.

**Parameters**

*handle* the context handle \
 *cachedir* the cachedir to remove

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_remove\_cachedir()**.

Referenced by **alpm\_option\_remove\_cachedir()**.

### int alpm\_option\_remove\_hookdir (alpm\_handle\_t \* handle, const char \* hookdir)

Remove a hookdir from the configured hookdirs.

**Parameters**

*handle* the context handle \
 *hookdir* the hookdir to remove

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_remove\_hookdir()**.

Referenced by **alpm\_option\_remove\_hookdir()**.

### int alpm\_option\_remove\_ignoregroup (alpm\_handle\_t \* handle, const char \* grp)

Remove an entry from the ignoregroup list.

**Parameters**

*handle* the context handle \
 *grp* the group to remove

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_remove\_ignoregroup()**.

Referenced by **alpm\_option\_remove\_ignoregroup()**.

### int alpm\_option\_remove\_ignorepkg (alpm\_handle\_t \* handle, const char \* pkg)

Remove an entry from the ignorepkg list.

**Parameters**

*handle* the context handle \
 *pkg* the package to remove

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_remove\_ignorepkg()**.

Referenced by **alpm\_option\_remove\_ignorepkg()**.

### int alpm\_option\_remove\_noextract (alpm\_handle\_t \* handle, const char \* path)

Remove an entry from the no-extract list.

**Parameters**

*handle* the context handle \
 *path* the path to remove

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_remove\_noextract()**.

Referenced by **alpm\_option\_remove\_noextract()**.

### int alpm\_option\_remove\_noupgrade (alpm\_handle\_t \* handle, const char \* path)

Remove an entry from the no-upgrade list.

**Parameters**

*handle* the context handle \
 *path* the path to remove

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_remove\_noupgrade()**.

Referenced by **alpm\_option\_remove\_noupgrade()**.

### int alpm\_option\_remove\_overwrite\_file (alpm\_handle\_t \* handle, const char \* glob)

Remove a file glob from the configured overwritable files globs.

**Note**

The overwritable file list contains a list of globs. The glob to remove must exactly match the entry to remove. There is no glob expansion.

**Parameters**

*handle* the context handle \
 *glob* the file glob to remove

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_remove\_overwrite\_file()**.

Referenced by **alpm\_option\_remove\_overwrite\_file()**.

### int alpm\_option\_set\_architectures (alpm\_handle\_t \* handle, alpm\_list\_t \* arches)

Sets the allowed package architecture.

**Parameters**

*handle* the context handle \
 *arches* the architecture to set

References **alpm\_option\_set\_architectures()**.

Referenced by **alpm\_option\_set\_architectures()**.

### int alpm\_option\_set\_assumeinstalled (alpm\_handle\_t \* handle, alpm\_list\_t \* deps)

Sets the list of dependencies that are assumed to be met.

**Parameters**

*handle* the context handle \
 *deps* a list of \*alpm\_depend\_t The list will be duped and the original will still need to be freed by the caller.

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_assumeinstalled()**.

Referenced by **alpm\_option\_set\_assumeinstalled()**.

### int alpm\_option\_set\_cachedirs (alpm\_handle\_t \* handle, alpm\_list\_t \* cachedirs)

Sets the cachedirs.

**Parameters**

*handle* the context handle \
 *cachedirs* a char\* list of cachdirs. The list will be duped and the original will still need to be freed by the caller.

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_cachedirs()**.

Referenced by **alpm\_option\_set\_cachedirs()**.

### int alpm\_option\_set\_checkspace (alpm\_handle\_t \* handle, int checkspace)

Enable/disable checking free space before installing packages.

**Parameters**

*handle* the context handle \
 *checkspace* 0 for disabled, 1 for enabled

References **alpm\_option\_set\_checkspace()**.

Referenced by **alpm\_option\_set\_checkspace()**.

### int alpm\_option\_set\_dbext (alpm\_handle\_t \* handle, const char \* dbext)

Sets the database extension.

**Parameters**

*handle* the context handle \
 *dbext* the database extension to use

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_dbext()**.

Referenced by **alpm\_option\_set\_dbext()**.

### int alpm\_option\_set\_default\_siglevel (alpm\_handle\_t \* handle, int level)

Set the default siglevel.

**Parameters**

*handle* the context handle \
 *level* a **alpm\_siglevel\_t** bitfield of the level to set

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_default\_siglevel()**.

Referenced by **alpm\_option\_set\_default\_siglevel()**.

### int alpm\_option\_set\_disable\_dl\_timeout (alpm\_handle\_t \* handle, unsigned short disable\_dl\_timeout)

Enables/disables the download timeout.

**Parameters**

*handle* the context handle \
 *disable\_dl\_timeout* 0 for enabled, 1 for disabled

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_disable\_dl\_timeout()**.

Referenced by **alpm\_option\_set\_disable\_dl\_timeout()**.

### int alpm\_option\_set\_disable\_sandbox (alpm\_handle\_t \* handle, unsigned short disable\_sandbox)

Enables/disables all components of the sandbox.

**Parameters**

*handle* the context handle \
 *disable\_sandbox* 0 for enabled, 1 for disabled

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_disable\_sandbox()**.

Referenced by **alpm\_option\_set\_disable\_sandbox()**.

### int alpm\_option\_set\_disable\_sandbox\_filesystem (alpm\_handle\_t \* handle, unsigned short disable\_sandbox\_filesystem)

Enables/disables the filesystem part of the sandbox.

**Parameters**

*handle* the context handle \
 *disable\_sandbox\_filesystem* 0 for enabled, 1 for disabled

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_disable\_sandbox\_filesystem()**.

Referenced by **alpm\_option\_set\_disable\_sandbox\_filesystem()**.

### int alpm\_option\_set\_disable\_sandbox\_syscalls (alpm\_handle\_t \* handle, unsigned short disable\_sandbox\_syscalls)

Enables/disables the syscalls part of the sandbox.

**Parameters**

*handle* the context handle \
 *disable\_sandbox\_syscalls* 0 for enabled, 1 for disabled

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_disable\_sandbox\_syscalls()**.

Referenced by **alpm\_option\_set\_disable\_sandbox\_syscalls()**.

### int alpm\_option\_set\_dlcb (alpm\_handle\_t \* handle, alpm\_cb\_download cb, void \* ctx)

Sets the callback used to report download progress.

**Parameters**

*handle* the context handle \
 *cb* the cb to use \
 *ctx* user-provided context to pass to cb

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_dlcb()**.

Referenced by **alpm\_option\_set\_dlcb()**.

### int alpm\_option\_set\_eventcb (alpm\_handle\_t \* handle, alpm\_cb\_event cb, void \* ctx)

Sets the callback used for events.

**Parameters**

*handle* the context handle \
 *cb* the cb to use \
 *ctx* user-provided context to pass to cb

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_eventcb()**.

Referenced by **alpm\_option\_set\_eventcb()**.

### int alpm\_option\_set\_fetchcb (alpm\_handle\_t \* handle, alpm\_cb\_fetch cb, void \* ctx)

Sets the downloading callback.

**Parameters**

*handle* the context handle \
 *cb* the cb to use \
 *ctx* user-provided context to pass to cb

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_fetchcb()**.

Referenced by **alpm\_option\_set\_fetchcb()**.

### int alpm\_option\_set\_gpgdir (alpm\_handle\_t \* handle, const char \* gpgdir)

Sets the path to libalpm's GnuPG home directory.

**Parameters**

*handle* the context handle \
 *gpgdir* the gpgdir to set

References **alpm\_option\_set\_gpgdir()**.

Referenced by **alpm\_option\_set\_gpgdir()**.

### int alpm\_option\_set\_hookdirs (alpm\_handle\_t \* handle, alpm\_list\_t \* hookdirs)

Sets the hookdirs.

**Parameters**

*handle* the context handle \
 *hookdirs* a char\* list of hookdirs. The list will be duped and the original will still need to be freed by the caller.

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_hookdirs()**.

Referenced by **alpm\_option\_set\_hookdirs()**.

### int alpm\_option\_set\_ignoregroups (alpm\_handle\_t \* handle, alpm\_list\_t \* ignoregrps)

Sets the list of groups to ignore.

**Parameters**

*handle* the context handle \
 *ignoregrps* a char\* list of groups to ignore The list will be duped and the original will still need to be freed by the caller.

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_ignoregroups()**.

Referenced by **alpm\_option\_set\_ignoregroups()**.

### int alpm\_option\_set\_ignorepkgs (alpm\_handle\_t \* handle, alpm\_list\_t \* ignorepkgs)

Sets the list of packages to ignore.

**Parameters**

*handle* the context handle \
 *ignorepkgs* a char\* list of packages to ignore The list will be duped and the original will still need to be freed by the caller.

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_ignorepkgs()**.

Referenced by **alpm\_option\_set\_ignorepkgs()**.

### int alpm\_option\_set\_local\_file\_siglevel (alpm\_handle\_t \* handle, int level)

Set the local file siglevel.

**Parameters**

*handle* the context handle \
 *level* a **alpm\_siglevel\_t** bitfield of the level to set

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_local\_file\_siglevel()**.

Referenced by **alpm\_option\_set\_local\_file\_siglevel()**.

### int alpm\_option\_set\_logcb (alpm\_handle\_t \* handle, alpm\_cb\_log cb, void \* ctx)

Sets the callback used for logging.

**Parameters**

*handle* the context handle \
 *cb* the cb to use \
 *ctx* user-provided context to pass to cb

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_logcb()**.

Referenced by **alpm\_option\_set\_logcb()**.

### int alpm\_option\_set\_logfile (alpm\_handle\_t \* handle, const char \* logfile)

Sets the logfile path.

**Parameters**

*handle* the context handle \
 *logfile* path to the new location of the logfile

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_logfile()**.

Referenced by **alpm\_option\_set\_logfile()**.

### int alpm\_option\_set\_noextracts (alpm\_handle\_t \* handle, alpm\_list\_t \* noextract)

Sets the list of no-extract files.

**Parameters**

*handle* the context handle \
 *noextract* a char\* list of file to not extract. The list will be duped and the original will still need to be freed by the caller.

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_noextracts()**.

Referenced by **alpm\_option\_set\_noextracts()**.

### int alpm\_option\_set\_noupgrades (alpm\_handle\_t \* handle, alpm\_list\_t \* noupgrade)

Sets the list of no-upgrade files.

**Parameters**

*handle* the context handle \
 *noupgrade* a char\* list of file to not upgrade. The list will be duped and the original will still need to be freed by the caller.

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_noupgrades()**.

Referenced by **alpm\_option\_set\_noupgrades()**.

### int alpm\_option\_set\_overwrite\_files (alpm\_handle\_t \* handle, alpm\_list\_t \* globs)

Sets the overwritable files.

**Parameters**

*handle* the context handle \
 *globs* a char\* list of overwritable file globs. The list will be duped and the original will still need to be freed by the caller.

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_overwrite\_files()**.

Referenced by **alpm\_option\_set\_overwrite\_files()**.

### int alpm\_option\_set\_parallel\_downloads (alpm\_handle\_t \* handle, unsigned int num\_streams)

Sets number of parallel streams to download database and package files.

**Parameters**

*handle* the context handle \
 *num\_streams* number of parallel download streams

**Returns**

0 on success, -1 on error

References **alpm\_option\_set\_parallel\_downloads()**.

Referenced by **alpm\_option\_set\_parallel\_downloads()**.

### int alpm\_option\_set\_progresscb (alpm\_handle\_t \* handle, alpm\_cb\_progress cb, void \* ctx)

Sets the callback used for operation progress.

**Parameters**

*handle* the context handle \
 *cb* the cb to use \
 *ctx* user-provided context to pass to cb

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_progresscb()**.

Referenced by **alpm\_option\_set\_progresscb()**.

### int alpm\_option\_set\_questioncb (alpm\_handle\_t \* handle, alpm\_cb\_question cb, void \* ctx)

Sets the callback used for questions.

**Parameters**

*handle* the context handle \
 *cb* the cb to use \
 *ctx* user-provided context to pass to cb

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_questioncb()**.

Referenced by **alpm\_option\_set\_questioncb()**.

### int alpm\_option\_set\_remote\_file\_siglevel (alpm\_handle\_t \* handle, int level)

Set the remote file siglevel.

**Parameters**

*handle* the context handle \
 *level* a **alpm\_siglevel\_t** bitfield of the level to set

**Returns**

0 on success, -1 on error (pm\_errno is set accordingly)

References **alpm\_option\_set\_remote\_file\_siglevel()**.

Referenced by **alpm\_option\_set\_remote\_file\_siglevel()**.

### int alpm\_option\_set\_sandboxuser (alpm\_handle\_t \* handle, const char \* sandboxuser)

Sets the user to switch to for sensitive operations.

**Parameters**

*handle* the context handle \
 *sandboxuser* the user to set

References **alpm\_option\_set\_sandboxuser()**.

Referenced by **alpm\_option\_set\_sandboxuser()**.

### int alpm\_option\_set\_usesyslog (alpm\_handle\_t \* handle, int usesyslog)

Sets whether to use syslog (0 is FALSE, TRUE otherwise).

**Parameters**

*handle* the context handle \
 *usesyslog* whether to use the syslog (0 is FALSE, TRUE otherwise)

References **alpm\_option\_set\_usesyslog()**.

Referenced by **alpm\_option\_set\_usesyslog()**.

## Author

Generated automatically by Doxygen for libalpm from the source code.
