Changeset 639:95a784729cac in freeDiameter for include/freeDiameter/libfreeDiameter.h
- Timestamp:
- Dec 20, 2010, 1:07:06 PM (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/libfreeDiameter.h
r638 r639 1559 1559 * handler : location where the new handler must be stored. 1560 1560 * cleanup : a callback function that must be called when the session with associated data is destroyed. 1561 * opaque : A pointer that is passed to the cleanup callback -- the content is never examined by the framework. 1561 1562 * 1562 1563 * DESCRIPTION: … … 1570 1571 * ENOMEM : Not enough memory to complete the operation 1571 1572 */ 1572 int fd_sess_handler_create_internal ( struct session_handler ** handler, void (*cleanup)(session_state * state, char * sid ));1573 int fd_sess_handler_create_internal ( struct session_handler ** handler, void (*cleanup)(session_state * state, char * sid, void * opaque), void * opaque ); 1573 1574 /* Macro to avoid casting everywhere */ 1574 #define fd_sess_handler_create( _handler, _cleanup ) \1575 fd_sess_handler_create_internal( (_handler), (void (*)(session_state *, char * ))(_cleanup) )1575 #define fd_sess_handler_create( _handler, _cleanup, _opaque ) \ 1576 fd_sess_handler_create_internal( (_handler), (void (*)(session_state *, char *, void *))(_cleanup), (void *)(_opaque) ) 1576 1577 1577 1578 … … 1581 1582 * PARAMETERS: 1582 1583 * handler : location of an handler created by fd_sess_handler_create. 1584 * opaque : the opaque pointer registered with the callback is restored here (if ! NULL). 1583 1585 * 1584 1586 * DESCRIPTION: … … 1591 1593 * ENOMEM : Not enough memory to complete the operation 1592 1594 */ 1593 int fd_sess_handler_destroy ( struct session_handler ** handler );1595 int fd_sess_handler_destroy ( struct session_handler ** handler, void **opaque ); 1594 1596 1595 1597 … … 2526 2528 * avp : for callbacks registered with DISP_HOW_AVP or DISP_HOW_AVP_ENUMVAL, direct link to the triggering AVP. 2527 2529 * session : if the message contains a Session-Id AVP, the corresponding session object, NULL otherwise. 2530 * opaque : An opaque pointer that is registered along the session handler. 2528 2531 * action : upon return, this tells the daemon what to do next. 2529 2532 * … … 2557 2560 * how : How the callback must be registered. 2558 2561 * when : Values that must match, depending on the how argument. 2562 * opaque : A pointer that is passed back to the handler. The content is not interpreted by the framework. 2559 2563 * handle : On success, a handler to the registered callback is stored here if not NULL. 2560 2564 * This handler can be used to unregister the cb. … … 2568 2572 * ENOMEM : Not enough memory to complete the operation 2569 2573 */ 2570 int fd_disp_register ( int (*cb)( struct msg **, struct avp *, struct session *, enum disp_action *),2571 enum disp_how how, struct disp_when * when, struct disp_hdl ** handle );2574 int fd_disp_register ( int (*cb)( struct msg **, struct avp *, struct session *, void *, enum disp_action *), 2575 enum disp_how how, struct disp_when * when, void * opaque, struct disp_hdl ** handle ); 2572 2576 2573 2577 /* … … 2576 2580 * PARAMETERS: 2577 2581 * handle : Location of the handle of the callback that must be unregistered. 2582 * opaque : If not NULL, the opaque data that was registered is restored here. 2578 2583 * 2579 2584 * DESCRIPTION: … … 2584 2589 * EINVAL : A parameter is invalid. 2585 2590 */ 2586 int fd_disp_unregister ( struct disp_hdl ** handle );2591 int fd_disp_unregister ( struct disp_hdl ** handle, void ** opaque ); 2587 2592 2588 2593 /* Destroy all handlers */
Note: See TracChangeset
for help on using the changeset viewer.