/**
 * @file i4bcmgr_nccism.h
 *
 * I4BCMgr-NcciSM - Interface of the NCCI state machine.
 *
 * Copyright: 2000-2003 Thomas Wintergerst. All rights reserved.
 *
 * $FreeBSD$
 * $Id: i4bcmgr_nccism.h,v 1.1.2.1 2006/02/28 21:35:29 thomas Exp $
 * Project  CAPI for BSD
 * Target   i4bcapimgr - The I4B driver for CAPI manager driven controllers
 * @date    01.01.2000
 * @author  "Thomas Wintergerst" <twinterg@gmx.de>
 * <p>
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 * </p>
 */

#ifndef __I4BCMGR_NCCISM_H
#define __I4BCMGR_NCCISM_H

#include <i4b/i4bcapimgr/i4bcmgr_var.h>





/* === public declarations =============================================== */





/* === prototypes of interface functions ================================= */





/* --- entries for the NCCI state machine from the i4b layer 4 handler --- */

/* start a new outgoing connection */
extern void I4bCmgr_NcciConnectReq
   (I4bCapiConnectionData_t *pConnData);

/* acknowledge a new incoming connection */
extern void I4bCmgr_NcciConnectResp
   (I4bCapiConnectionData_t *pConnData,
    I4bCapiEventData_t      *pEventData);

/* terminate a connection */
extern void I4bCmgr_NcciDisconnectReq
   (I4bCapiConnectionData_t *pConnData,
    I4bCapiEventData_t      *pEventData);

/* do not let a new incoming connection expire */
extern void I4bCmgr_NcciAlertReq
   (I4bCapiConnectionData_t *pConnData);

/* set the B-channel protocol configuration */
extern void I4bCmgr_NcciBChConfigUp
   (I4bCapiConnectionData_t *pConnData,
    I4bCapiEventData_t      *pEventData);

/* tear down the B-channel connection */
extern void I4bCmgr_NcciBChConfigDown
   (I4bCapiConnectionData_t *pConnData);

/* start sending out data */
extern void I4bCmgr_NcciTxStart
   (I4bCapiConnectionData_t *pConnData);

/* handle timeout for the NCCI layer */
extern void I4bCmgr_NcciTimeout
   (I4bCapiConnectionData_t *pConnData);



/* --- entries for the NCCI state machine from the PLCI layer --- */

/* receive signaling of a new incoming connection */
extern void I4bCmgr_NcciReceiveConnectInd
   (I4bCapiConnectionData_t *pConnData);

/* receive signalling of connected B-channel */
extern void I4bCmgr_NcciReceiveConnectionUp
   (I4bCapiConnectionData_t *pConnData);

/* receive signalling of disconnected B-channel */
extern void I4bCmgr_NcciReceiveConnectionDown
   (I4bCapiConnectionData_t *pConnData);

/* handle an incoming CAPI message */
extern void I4bCmgr_NcciReceiveCapiMessage
   (I4bCapiConnectionData_t *pConnData,
    CAPIMsg_t               *pCapiMsg);





/* === definition of inline functions ==================================== */





#endif /* __I4BCMGR_NCCISM_H */
