Changeset 214 for trunk/include


Ignore:
Timestamp:
Feb 17, 2009, 10:54:26 PM (16 years ago)
Author:
katerina
Message:

Rewrite mail subsystem for more flexibility (closes ticket #141).

Location:
trunk/include
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/sh_fifo.h

    r1 r214  
    1010 *****************************************************/
    1111
    12 #define SH_FIFO_MAX 128
     12#define SH_FIFO_MAX 16384
    1313
    1414/*****************************************************
     
    2121  struct dlist * next;
    2222  char         * data;
     23  char         * s_xtra;
     24  int            i_xtra;
     25  int            transact;
    2326  struct dlist * prev;
    2427};
     
    4750 * Returns: -1 if the list is full, 0 on success
    4851 */
    49 int push_list (SH_FIFO * fifo, char * indat);
     52int push_list (SH_FIFO * fifo, char * indat, int in_i, const char * in_str);
    5053
    5154/* Push an item on the tail of the list.
     
    5356 * Returns: -1 if the list is full, 0 on success
    5457 */
    55 int push_tail_list (SH_FIFO * fifo, char * indat);
     58int push_tail_list (SH_FIFO * fifo, char * indat, int in_i, const char * in_str);
    5659
    5760/* pop an item from the tail of the list
     
    6265char * pop_list (SH_FIFO * fifo);
    6366
     67
     68sh_string * tag_list (SH_FIFO * fifo, char * tag,
     69                      int(*check)(int, const char*, const char*, const void*),
     70                      const void * info);
     71void rollback_list (SH_FIFO * fifo);
     72void mark_list (SH_FIFO * fifo);
     73void reset_list (SH_FIFO * fifo);
     74int commit_list (SH_FIFO * fifo);
     75
    6476#endif
  • trunk/include/sh_mail.h

    r22 r214  
    5252/* call if not urgent
    5353 */
    54 int sh_mail_pushstack (/*@null@*/char * msg);
    55 
    56 /* call if mail immediate
    57  */
    58 int sh_mail_msg (/*@null@*/char * message);
     54int sh_mail_pushstack (int severity, const char * msg, const char * alias);
    5955
    6056/* set sender of mail
  • trunk/include/sh_pthread.h

    r170 r214  
    3030
    3131#define SH_MUTEX_LOCK_UNSAFE(M) pthread_mutex_lock(&(M))
     32#define SH_MUTEX_TRYLOCK_UNSAFE(M) pthread_mutex_trylock(&(M))
    3233#define SH_MUTEX_UNLOCK_UNSAFE(M) pthread_mutex_unlock(&(M))
    3334
     
    140141#define SH_MUTEX_UNLOCK(M)                      ((void)0)
    141142#define SH_MUTEX_LOCK_UNSAFE(M)                 ((void)0)
     143#define SH_MUTEX_TRYLOCK_UNSAFE(M)              (0)
    142144#define SH_MUTEX_UNLOCK_UNSAFE(M)               ((void)0)
    143145
  • trunk/include/sh_utils.h

    r185 r214  
    4040  unsigned long   data_ulong;
    4141  long            data_long;
    42   /*@null@*/char *data_str;
     42  char          *data_str;
    4343} st_format;
    4444
     
    131131/* a simple compressor
    132132 */
    133 long sh_util_compress (char * dest, char * src, size_t dest_size);
     133size_t sh_util_compress (char * dest, char * src, size_t dest_size);
    134134
    135135/* an even simpler en-/decoder
  • trunk/include/slib.h

    r212 r214  
    203203   * strstr
    204204   */
    205   const char * sl_strstr (const char * haystack, const char * needle);
     205  char * sl_strstr (const char * haystack, const char * needle);
    206206
    207207  /*
Note: See TracChangeset for help on using the changeset viewer.