//Editor-Info: -*- C++ -*-
//
//Subject: TOVE project / IE
//
//File: partynumber.h
//
//Version: $Revision: 1.7 $
//
//State: $State: Exp $
//
//Date: $Date: 1999/03/10 15:01:36 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Sami Raatikainen
//
//Description:
//      IE can be used to represent different number IEs.
//      - Called (/ Calling) Party Number
//      - Called / Calling Party Subaddress
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History: 
//

#ifndef __IE_PARTYNUMBER_H__
#define __IE_PARTYNUMBER_H__

#include "informationelement.h"

class iePartyNumber : public ieInformationElement
{
    public:
        iePartyNumber(void);
        iePartyNumber(const iePartyNumber &other_);
        virtual ~iePartyNumber(void);
//        const iePartyNumber &operator=(const iePartyNumber &other_);

        pfIE *clone(void) const;
        static iePartyNumber *narrow(pfIE *ie_);
        
        enum type
        {
            unknownType         = B0000_0000, // used with NSAP
            internationalType   = B0000_0001,
            nationalType        = B0000_0010,
            networkSpecificType = B0000_0011,
            subscriberType      = B0000_0100,
            abbreviatedType     = B0000_0110,
            
            // Network type added for Transit Network Selection
            CCITT = B0001_0000
        };
        
        enum plan
        {
            unknownPlan       = B0000_0000,
            isdnPlan          = B0000_0001,
            nsapPlan          = B0000_0010,
            privatePlan       = B0000_1111,

            // added network plans for Transit Network Selection
            CIC         = B0001_0000,
            DNIC        = B0010_0000,
            public_DNIC = B0011_0000,
            public_MNIC = B0100_0000,
            national    = B1000_0000
        };
        
        pfByte getType(void) const;
        pfByte getPlan(void) const;
        
        void setNSAP(const string &number_);
        string getNSAP(void) const;

        void setInternationalISDN(const string &number_);
        void setNationalISDN(const string &number_);
        void setSubscriberISDN(const string &number_);

        string getISDN(void) const;
        
        void setPresentationIndicator(pfUlong value_);
        pfUlong getPresentationIndicator(void) const;
        void setScreeningIndicator(pfUlong value_);
        pfUlong getScreeningIndicator(void) const;        
        
    private:
        string _number;
        type _type;
        plan _plan;

        enum usedPlan
        {
            ISDN, NSAP, TNS, unspecified
        } _usedPlan;
        
        pfUlong _presentation;
        pfUlong _screening;        
};

#endif // __IE_PARTYNUMBER_H__
