/*****************************************************************************

 @(#) $Id: SCCP_Codec.H,v 1.3 2000/10/13 15:45:51 brian Exp $

 -----------------------------------------------------------------------------

 Copyright (C) 1997-2000  Brian Bidulock <bidulock@dallas.net>

 All Rights Reserved.

 This library is free software; you can redistribute it and/or modify it under
 the terms of the GNU Lesser General Public License as published by the Free
 Software Foundation; either version 2.1 of the License, or (at your option)
 any later version.
 
 This library is distributed in the hope that it will be useful, but WITHOUT
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 FOR A PARTICULAR PURPOSE.  See the GNU Lesser Public License for more
 details.
 
 You should have received a copy of the GNU Lesser General Public License
 along with this library; if not, write to the Free Software Foundation, Inc.,
 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

 Last Modified $Date: 2000/10/13 15:45:51 $ by $Author: brian $

 -----------------------------------------------------------------------------

 $Log: SCCP_Codec.H,v $
 Revision 1.3  2000/10/13 15:45:51  brian
 First public release.

 *****************************************************************************/

#ifndef __SS7_SCCP_CODEC_H__
#define __SS7_SCCP_CODEC_H__

#include "Codec.H"
#include "SS7_Codec.H"
#include <unistd.h>

class Codec_AP : public Content {
    public:
        OctetString*    PDU;
        Codec_AP(char*,char*);
    };

class Codec_SCMG : public Parameter {
    public:
        Set*        MTC;
        Set*        ASSN;
        Codec_PC*   APC;
        Set*        SMI;
        Codec_SCMG(char*,char*);
    };

class Codec_UPART : public ParameterPL {
    public:
        Field*          PTR;
        Field*          PL;
        Bra*            SSNI_B;
        Bra*            SSN_B;
        Codec_SCMG*     SCMG;
        Codec_AP*       ISUP;
        Codec_AP*       OMAP;
        Codec_AP*       MAP;
        Codec_AP*       HLR;
        Codec_AP*       VLR;
        Codec_AP*       MSC;
        Codec_AP*       EIR;
        Codec_AP*       AC;
        Codec_AP*       OGCMS;
        Codec_AP*       CMS;
        Codec_AP*       BNS;
        Codec_AP*       ACCS;
        Codec_AP*       INAP;
        Codec_AP*       TCAP;
        Codec_UPART(char*,char*,Codec*,Codec*);
    };

class Codec_DLR : public Parameter {
    public:
        Field*          DLR;
        Codec_DLR();
    };

class Codec_SLR : public Parameter {
    public:
        Field*          SLR;
        Codec_SLR();
    };

class Codec_PCL : public Parameter {
    public:
        Set*            PCL;
        Set*            OPT;
        Codec_PCL();
    };

class Codec_SEG : public Parameter {
    public:
        Set*            SEG;
        Codec_SEG();
    };

class Codec_PRN : public Parameter {
    public:
        Field*          PR0;
        Field*          PR;
        Codec_PRN();
    };

class Codec_SEQ : public Parameter {
    public:
        Field*          PS0;
        Field*          PS;
        Set*            MDI;
        Field*          PR;
        Codec_SEQ();
    };

class Codec_CREDIT : public Parameter {
    public:
        Field*          CREDIT;
        Codec_CREDIT();
    };

class Codec_RELC : public Parameter {
    public:
        Set*            RELC;
        Codec_RELC();
    };

class Codec_RETC : public Parameter {
    public:
        Set*            RETC;
        Codec_RETC();
    };

class Codec_RSTC : public Parameter {
    public:
        Set*            RSTC;
        Codec_RSTC();
    };

class Codec_ERRC : public Parameter {
    public:
        Set*            ERRC;
        Codec_ERRC();
    };

class Codec_REFC : public Parameter {
    public:
        Set*            REFC;
        Codec_REFC();
    };

class Codec_DATA : public Parameter {
    public:
        OctetString*    DATA;
        Codec_DATA();
    };

class Codec_SEGM : public Parameter {
    public:
        Field*          RSEG;
        Set*            C;
        Set*            F;
        Field*          LREF;
        Codec_SEGM();
    };

class Codec_SCCPHOP : public Parameter {
    public:
        Field*          SCCPHOP;
        Codec_SCCPHOP();
    };

class Codec_DATA_M : public ParameterPL {
    public:
        Field*      PTR;
        Field*      PL;
        Codec_DATA* DATA;
        Codec_DATA_M();
    };

class Codec_CGPA_M : public ParameterPL {
    public:
        Field*      PTR;
        Field*      PL;
        Codec_CPA*  CGPA;
        Codec_CGPA_M();
    };

class Codec_CDPA_M : public ParameterPL {
    public:
        Field*      PTR;
        Field*      PL;
        Codec_CPA*  CDPA;
        Codec_CDPA_M();
    };

class Codec_SOPARM : public ParameterNL {
    public:
        Field*          PNAM;
        Field*          PL;
        Bra*            PNAM_B;
        Codec_SOPARM(char*,char*,Codec**);
        Codec_SOPARM(const Codec_SOPARM&);
        Codec_SOPARM* copy();
    };

class Codec_SOPARMS : public ParameterP {
    public:
        Field*          PTR;
        Codec_SOPARM*   OPARM;
        Codec_DLR*      DLR;
        Codec_SLR*      SLR;
        Codec_CPA*      CDPA;
        Codec_CPA*      CGPA;
        Codec_PCL*      PCL;
        Codec_SEG*      SEG;
        Codec_PRN*      PRN;
        Codec_SEQ*      SEQ;
        Codec_CREDIT*   CREDIT;
        Codec_RELC*     RELC;
        Codec_RETC*     RETC;
        Codec_RSTC*     RSTC;
        Codec_ERRC*     ERRC;
        Codec_REFC*     REFC;
        Codec_DATA*     DATA;
        Codec_SEGM*     SEGM;
        Codec_SCCPHOP*  SCCPHOP;
        Codec_UREC*     UREC;
        Field*          PNAM;
        Field*          PL;
        Bra*            PNAM_B;
        Codec_SOPARMS(char*,char*);
    };

class Codec_SCCP : public Header {
    public:
        Field*  MT;
        Bra*    MT_B;
        ParameterG* CR;
        ParameterG* CC;
        ParameterG* CREF;
        ParameterG* RLSD;
        ParameterG* RLC;
        ParameterG* DT1;
        ParameterG* DT2;
        ParameterG* AK;
        ParameterG* UDT;
        ParameterG* UDTS;
        ParameterG* ED;
        ParameterG* EA;
        ParameterG* RSR;
        ParameterG* RSC;
        ParameterG* ERR;
        ParameterG* IT;
        ParameterG* XUDT;
        ParameterG* XUDS;

        Codec_DLR*      DLR;
        Codec_SLR*      SLR;
        Codec_CDPA_M*   CDPA;
        Codec_CGPA_M*   CGPA;
        Codec_PCL*      PCL;
        Codec_SEG*      SEG;
        Codec_PRN*      PRN;
        Codec_SEQ*      SEQ;
        Codec_CREDIT*   CREDIT;
        Codec_RELC*     RELC;
        Codec_RETC*     RETC;
        Codec_RSTC*     RSTC;
        Codec_ERRC*     ERRC;
        Codec_REFC*     REFC;
        Codec_DATA_M*   DATA;
        Codec_SCCPHOP*  SCCPHOP;
        Codec_UPART*    UPART;
        Codec_SOPARMS*  OPARMS;

        Codec_SCCP();
    };

#endif __SS7_SCCP_CODEC_H__
