//Editor-Info: -*- C++ -*-
//
//Subject: TOVE-project / UNI-SSCF
//
//File: usscfprotocol.h
//
//Version: $Revision: 1.14 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/10/07 16:28:11 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications and Multimedia
//
//Author:
//      Vesa-Matti Puro 
//
//Description:
//	Contains the definition of the UNI-SSCF protocol.
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History: 
//


#ifndef __USSCFPROTOCOL_H__
#define __USSCFPROTOCOL_H__


#include "pf/protocol.h"
#include "pf/frame.h"

class saalUNIlink;


class usscfProtocol : public pfProtocol
{
    public:
        usscfProtocol(saalUNIlink *manager_);
        usscfProtocol(const usscfProtocol &other_, saalUNIlink *manager_);

        virtual ~usscfProtocol(void);

        // Methods for sending primitives to the UNI-SSCF user
        void sendUaalESTABLISHind(void);
        void sendUaalESTABLISHconf(void);
        void sendUaalRELEASEind(void);
        void sendUaalRELEASEconf(void);
        void sendUaalDATAind(const pfFrame &mu_);
        void sendUaalUNITDATAind(const pfFrame &mu_);

        // Methods for sending primitives to the AA layer 
        void sendAaESTABLISHreq(void);
        void sendAaESTABLISHresp(void);
        void sendAaRECOVERresp(void);
        void sendAaRELEASEreq(void);
        void sendAaDATAreq(const pfFrame &mu_);
        void sendAaRESYNCreq(void);
        void sendAaRESYNCresp(void);
        void sendAaUNITDATAreq(const pfFrame &mu_);

        // Methods for changing the state
        void toUsscfConnectionReleased_Idle(void);
        void toUsscfAwaitingEstablish_OutgoingConnectionPending(void);
        void toUsscfAwaitingEstablish_OutgoingResynchronizationPending(void);
        void toUsscfAwaitingRelease_OutgoingDisconnectionPending(void);
        void toUsscfConnectionEstablished_DataTransferReady(void);

    protected:
        void linkUp(void);
        void linkDown(void);

    private:
        // These constructors and operators not implemented
        usscfProtocol(void);
        usscfProtocol(const usscfProtocol &other_);
        const usscfProtocol &operator=(const usscfProtocol &other_);
        
    private:
        saalUNIlink *_manager;
};


#endif // __USSCFPROTOCOL_H__

