h224.h
Go to the documentation of this file.
/*
* h224.h
*
* H.224 PDU implementation for the OpenH323 Project.
*
* Copyright (c) 2006 Network for Educational Technology, ETH Zurich.
* Written by Hannes Friederich.
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* Contributor(s): ______________________________________.
*
* $Revision: 21862 $
* $Author: csoutheren $
* $Date: 2008-12-22 21:24:53 -0600 (Mon, 22 Dec 2008) $
*/
#ifndef OPAL_H224_H224_H
#define OPAL_H224_H224_H
#ifdef P_USE_PRAGMA
#pragma interface
#endif
#ifndef _PTLIB_H
#include <ptlib.h>
#endif
#include <opal/buildopts.h>
#include <opal/mediatype.h>
#include <opal/mediafmt.h>
#include <h224/q922.h>
#define H224_HEADER_SIZE 6
//
// declare a media type for H.224
//
class OpalH224MediaType : public OpalRTPAVPMediaType
{
public:
OpalH224MediaType();
static const OpalMediaType & MediaType();
#if OPAL_SIP
SDPMediaDescription * CreateSDPMediaDescription(const OpalTransportAddress & localAddress);
#endif
};
//
// H.224 Media Format
//
class OpalH224MediaFormat : public OpalMediaFormat
{
PCLASSINFO(OpalH224MediaFormat, OpalMediaFormat);
public:
OpalH224MediaFormat(
const char * fullName,
RTP_DataFrame::PayloadTypes rtpPayloadType
);
virtual PObject * Clone() const;
virtual PBoolean IsValidForProtocol(const PString & protocol) const;
};
extern const OpalMediaFormat & GetOpalH224_H323AnnexQ();
extern const OpalMediaFormat & GetOpalH224_HDLCTunneling();
#define OpalH224AnnexQ GetOpalH224_H323AnnexQ()
#define OpalH224Tunnelled GetOpalH224_HDLCTunneling()
class OpalH224Client;
class H224_Frame : public Q922_Frame
{
PCLASSINFO(H224_Frame, Q922_Frame);
public:
H224_Frame(PINDEX clientDataSize = 254);
H224_Frame(const OpalH224Client & h224Client, PINDEX clientDataSize = 254);
~H224_Frame();
PBoolean IsHighPriority() const { return (GetLowOrderAddressOctet() == 0x71); }
void SetHighPriority(PBoolean flag);
WORD GetDestinationTerminalAddress() const;
void SetDestinationTerminalAddress(WORD destination);
WORD GetSourceTerminalAddress() const;
void SetSourceTerminalAddress(WORD source);
void SetClient(const OpalH224Client & h224Client);
BYTE GetClientID() const;
void SetClientID(BYTE clientID);
BYTE GetExtendedClientID() const;
void SetExtendedClientID(BYTE extendedClientID);
BYTE GetCountryCode() const;
BYTE GetCountryCodeExtension() const;
WORD GetManufacturerCode() const;
BYTE GetManufacturerClientID() const;
void SetNonStandardClientInformation(BYTE countryCode,
BYTE countryCodeExtension,
WORD manufacturerCode,
BYTE manufacturerClientID);
PBoolean GetBS() const;
void SetBS(PBoolean bs);
PBoolean GetES() const;
void SetES(PBoolean es);
PBoolean GetC1() const;
void SetC1(PBoolean c1);
PBoolean GetC0() const;
void SetC0(PBoolean c0);
BYTE GetSegmentNumber() const;
void SetSegmentNumber(BYTE segmentNumber);
BYTE *GetClientDataPtr() const;
PINDEX GetClientDataSize() const;
void SetClientDataSize(PINDEX size);
PBoolean DecodeAnnexQ(const BYTE *data, PINDEX size);
PBoolean DecodeHDLC(const BYTE *data, PINDEX size);
private:
PINDEX GetHeaderSize() const;
};
#endif // OPAL_H224_H224_H
H224_Frame::~H224_Frame
~H224_Frame()
H224_Frame::DecodeHDLC
PBoolean DecodeHDLC(const BYTE *data, PINDEX size)
H224_Frame::GetManufacturerCode
WORD GetManufacturerCode() const
OpalH224MediaFormat::OpalH224MediaFormat
OpalH224MediaFormat(const char *fullName, RTP_DataFrame::PayloadTypes rtpPayloadType)
OpalH224MediaFormat::Clone
virtual PObject * Clone() const
H224_Frame::SetClient
void SetClient(const OpalH224Client &h224Client)
OpalH224Client
Definition: h224handler.h:47
OpalH224MediaType::OpalH224MediaType
OpalH224MediaType()
buildopts.h
H224_Frame::GetES
PBoolean GetES() const
Q922_Frame
Definition: q922.h:41
OpalH224MediaType
Definition: h224.h:50
OpalMediaType
Definition: mediatype.h:57
H224_Frame::GetClientID
BYTE GetClientID() const
H224_Frame::GetClientDataSize
PINDEX GetClientDataSize() const
H224_Frame::GetExtendedClientID
BYTE GetExtendedClientID() const
H224_Frame
Definition: h224.h:91
H224_Frame::GetBS
PBoolean GetBS() const
H224_Frame::GetClientDataPtr
BYTE * GetClientDataPtr() const
RTP_DataFrame::PayloadTypes
PayloadTypes
Definition: rtp.h:86
H224_Frame::SetClientID
void SetClientID(BYTE clientID)
H224_Frame::SetHighPriority
void SetHighPriority(PBoolean flag)
H224_Frame::GetCountryCode
BYTE GetCountryCode() const
H224_Frame::DecodeAnnexQ
PBoolean DecodeAnnexQ(const BYTE *data, PINDEX size)
GetOpalH224_HDLCTunneling
const OpalMediaFormat & GetOpalH224_HDLCTunneling()
OpalRTPAVPMediaType
Definition: mediatype.h:271
OpalMediaFormat
Definition: mediafmt.h:724
OpalH224MediaType::MediaType
static const OpalMediaType & MediaType()
SDPMediaDescription
Definition: sdp.h:119
mediatype.h
H224_Frame::SetES
void SetES(PBoolean es)
OpalH224MediaType::CreateSDPMediaDescription
SDPMediaDescription * CreateSDPMediaDescription(const OpalTransportAddress &localAddress)
H224_Frame::SetC1
void SetC1(PBoolean c1)
H224_Frame::GetDestinationTerminalAddress
WORD GetDestinationTerminalAddress() const
H224_Frame::SetDestinationTerminalAddress
void SetDestinationTerminalAddress(WORD destination)
H224_Frame::H224_Frame
H224_Frame(PINDEX clientDataSize=254)
mediafmt.h
OpalH224MediaFormat
Definition: h224.h:67
H224_Frame::IsHighPriority
PBoolean IsHighPriority() const
Definition: h224.h:101
H224_Frame::GetManufacturerClientID
BYTE GetManufacturerClientID() const
H224_Frame::GetSegmentNumber
BYTE GetSegmentNumber() const
H224_Frame::SetSourceTerminalAddress
void SetSourceTerminalAddress(WORD source)
H224_Frame::GetSourceTerminalAddress
WORD GetSourceTerminalAddress() const
Q922_Frame::GetLowOrderAddressOctet
BYTE GetLowOrderAddressOctet() const
Definition: q922.h:51
H224_Frame::SetExtendedClientID
void SetExtendedClientID(BYTE extendedClientID)
H224_Frame::SetNonStandardClientInformation
void SetNonStandardClientInformation(BYTE countryCode, BYTE countryCodeExtension, WORD manufacturerCode, BYTE manufacturerClientID)
H224_Frame::SetBS
void SetBS(PBoolean bs)
H224_Frame::SetSegmentNumber
void SetSegmentNumber(BYTE segmentNumber)
H224_Frame::SetC0
void SetC0(PBoolean c0)
OpalTransportAddress
Definition: transports.h:149
q922.h
H224_Frame::GetC1
PBoolean GetC1() const
GetOpalH224_H323AnnexQ
const OpalMediaFormat & GetOpalH224_H323AnnexQ()
H224_Frame::SetClientDataSize
void SetClientDataSize(PINDEX size)
H224_Frame::GetCountryCodeExtension
BYTE GetCountryCodeExtension() const
OpalH224MediaFormat::IsValidForProtocol
virtual PBoolean IsValidForProtocol(const PString &protocol) const
H224_Frame::GetC0
PBoolean GetC0() const