Navigation



Ignore:
Timestamp:
Dec 3, 2010, 6:29:51 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Attempting to improve python wrapper usability (work in progress)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/freeDiameter/freeDiameter.h

    r578 r618  
    4747#endif /* GNUTLS_VERSION */
    4848
     49#ifndef SWIG
    4950/* GNUTLS calls debug level */
    5051#ifndef GNUTLS_DBG_LEVEL
     
    6869        (__call__);                                                     \
    6970}
    70 
     71#endif /* !SWIG */
    7172
    7273/* Structure to hold the configuration of the freeDiameter daemon */
     
    127128        struct fifo       *cnf_main_ev; /* events for the daemon's main (struct fd_event items) */
    128129};
     130#ifdef SWIG
     131%immutable;
     132#endif /* SWIG */
    129133extern struct fd_config *fd_g_config; /* The pointer to access the global configuration, initalized in main */
     134#ifdef SWIG
     135%mutable;
     136#endif /* SWIG */
    130137
    131138
     
    175182        , "STATE_ZOMBIE"                \
    176183        };
     184#ifndef SWIG
    177185extern const char *peer_state_str[];
     186#else /* SWIG */
     187%immutable;
     188extern const char **peer_state_str;
     189%mutable;
     190#endif /* !SWIG */
    178191#define STATE_STR(state) \
    179192        (((unsigned)(state)) <= STATE_MAX ? peer_state_str[((unsigned)(state)) ] : "<Invalid>")
     
    314327 * !0   : An error occurred.
    315328 */
    316 int fd_peer_getbyid( char * diamid, struct peer_hdr ** peer );
     329int fd_peer_getbyid( char * diamid, struct peer_hdr ** S_OUT(peer) );
    317330
    318331/*
     
    537550 *  ENOMEM      : Not enough memory to complete the operation
    538551 */
    539 int fd_rt_fwd_register ( int (*rt_fwd_cb)(void * cbdata, struct msg ** msg), void * cbdata, enum fd_rt_fwd_dir dir, struct fd_rt_fwd_hdl ** handler );
     552int fd_rt_fwd_register ( int (*rt_fwd_cb)(void * cbdata, struct msg ** msg), void * cbdata, enum fd_rt_fwd_dir dir, struct fd_rt_fwd_hdl ** S_OUT(handler) );
    540553/*
    541554 * CALLBACK:    rt_fwd_cb
     
    611624 *  ENOMEM      : Not enough memory to complete the operation
    612625 */
    613 int fd_rt_out_register ( int (*rt_out_cb)(void * cbdata, struct msg * msg, struct fd_list * candidates), void * cbdata, int priority, struct fd_rt_out_hdl ** handler );
     626int fd_rt_out_register ( int (*rt_out_cb)(void * cbdata, struct msg * msg, struct fd_list * candidates), void * cbdata, int priority, struct fd_rt_out_hdl ** S_OUT(handler) );
    614627/*
    615628 * CALLBACK:    rt_out_cb
     
    671684
    672685int fd_event_send(struct fifo *queue, int code, size_t datasz, void * data);
    673 int fd_event_get(struct fifo *queue, int *code, size_t *datasz, void ** data);
    674 int fd_event_timedget(struct fifo *queue, struct timespec * timeout, int timeoutcode, int *code, size_t *datasz, void ** data);
     686int fd_event_get(struct fifo *queue, int * S_OUT(code), size_t * S_OUT(datasz), void ** S_OUT(data));
     687int fd_event_timedget(struct fifo *queue, struct timespec * timeout, int timeoutcode, int * S_OUT(code), size_t * S_OUT(datasz), void ** S_OUT(data));
    675688void fd_event_destroy(struct fifo **queue, void (*free_cb)(void * data));
    676689const char * fd_ev_str(int event);
     
    684697        struct fd_list  chain;  /* link in cnf_endpoints list */
    685698       
     699#ifndef SWIG
    686700        union {
    687701                sSS             ss;     /* the socket information. List is always ordered by ss value (memcmp) -- see fd_ep_add_merge */
     
    690704                sSA             sa;
    691705        };
     706#else /* !SWIG */
     707        /* SWIG does not support unions inside struct, we only define sa in this case */
     708        sSA             sa;
     709#endif /* !SWIG */
    692710       
    693711#define EP_FL_CONF      (1 << 0)        /* This endpoint is statically configured in a configuration file */
     
    726744int fd_app_merge(struct fd_list * list, application_id_t aid, vendor_id_t vid, int auth, int acct);
    727745int fd_app_check(struct fd_list * list, application_id_t aid, struct fd_app **detail);
    728 int fd_app_check_common(struct fd_list * list1, struct fd_list * list2, int * common_found);
     746int fd_app_check_common(struct fd_list * list1, struct fd_list * list2, int * S_OUT(common_found));
    729747int fd_app_empty(struct fd_list * list);
    730748
Note: See TracChangeset for help on using the changeset viewer.