Changeset dc9797f for otr.h


Ignore:
Timestamp:
2008-02-16T13:24:44Z (12 years ago)
Author:
Sven Moritz Hallberg <sm@…>
Branches:
master
Children:
3064ea4
Parents:
27db433
Message:

keep track of which keys are queued for generation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • otr.h

    r27db433 rdc9797f  
    4949#include <libotr/privkey.h>
    5050
     51/* representing a keygen job */
     52typedef struct kg {
     53        const char *accountname;
     54        const char *protocol;
     55       
     56        struct kg *next;
     57} kg_t;
     58
     59/* struct to encapsulate our book keeping stuff */
     60typedef struct otr {
     61        OtrlUserState us;
     62        pid_t keygen;    /* pid of keygen slave (0 if none) */
     63        FILE *to;        /* pipe to keygen slave */
     64        FILE *from;      /* pipe from keygen slave */
     65       
     66        /* active keygen job (NULL if none) */
     67        const char *sent_accountname;
     68        const char *sent_protocol;
     69       
     70        /* keygen jobs waiting to be sent to slave */
     71        kg_t *todo;
     72} otr_t;
     73
    5174/* called from main() */
    5275void otr_init(void);
     76
     77/* called from irc_new()/irc_free() */
     78otr_t *otr_new();
     79void otr_free(otr_t *otr);
    5380
    5481/* called by storage_* functions */
     
    7198#else
    7299
    73 typedef void *OtrlUserState;
     100typedef void otr_t;
    74101typedef void *OtrlMessageAppOps;
    75102
    76 #define otrl_userstate_create() (NULL)
    77 #define otrl_userstate_free(us) {}
    78 
    79103#define otr_init() {}
     104#define otr_new() (NULL)
     105#define otr_free(otr) {}
    80106#define otr_load(irc) {}
    81107#define otr_save(irc) {}
Note: See TracChangeset for help on using the changeset viewer.