Back to index

courier  0.68.2
Functions | Variables
import.c File Reference
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include "gpg.h"
#include "gpglib.h"
#include "unicode/unicode.h"
#include "numlib/numlib.h"

Go to the source code of this file.

Functions

int libmail_gpg_import_start (const char *gpgdir, int secret)
int libmail_gpg_import_do (const char *p, size_t n, int(*dump_func)(const char *, size_t, void *), void *voidarg)
int libmail_gpg_import_finish (int(*dump_func)(const char *, size_t, void *), void *voidarg)

Variables

int libmail_gpg_stdin
int libmail_gpg_stdout
int libmail_gpg_stderr
pid_t libmail_gpg_pid

Function Documentation

int libmail_gpg_import_do ( const char *  p,
size_t  n,
int(*)(const char *, size_t, void *)  dump_func,
void *  voidarg 
)

Definition at line 52 of file import.c.

{
       if (libmail_gpg_write(p, n, dump_func, dump_func, NULL, 0, voidarg))
       {
              libmail_gpg_cleanup();
              return (-1);
       }
       return (0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int libmail_gpg_import_finish ( int(*)(const char *, size_t, void *)  dump_func,
void *  voidarg 
)

Definition at line 64 of file import.c.

{
       if (libmail_gpg_read(dump_func, dump_func, NULL, 0, voidarg))
              return (-1);
       return (libmail_gpg_cleanup());
}

Here is the call graph for this function:

Here is the caller graph for this function:

int libmail_gpg_import_start ( const char *  gpgdir,
int  secret 
)

Definition at line 30 of file import.c.

{
       char *argvec[5];

       argvec[0]="gpg";
       argvec[1]="--import";
       argvec[2]="--no-tty";
       argvec[3]=0;

#if GPG_HAS_ALLOW_SECRET_KEY_IMPORT
       if (secret)
       {
              argvec[3]="--allow-secret-key-import";
              argvec[4]=0;
       }
#endif

       if (libmail_gpg_fork(&libmail_gpg_stdin, &libmail_gpg_stdout, NULL, gpgdir, argvec) < 0)
              return (-1);
       return (0);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 34 of file libgpg.c.

Definition at line 33 of file libgpg.c.

Definition at line 32 of file libgpg.c.

Definition at line 32 of file libgpg.c.