Search is not available for this dataset
repo
stringlengths 2
152
⌀ | file
stringlengths 15
239
| code
stringlengths 0
58.4M
| file_length
int64 0
58.4M
| avg_line_length
float64 0
1.81M
| max_line_length
int64 0
12.7M
| extension_type
stringclasses 364
values |
---|---|---|---|---|---|---|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Adaptation/ManualAdaptation.cpp
|
/*
* ManualAdaptation.cpp
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "ManualAdaptation.h"
using namespace dash::mpd;
using namespace libdash::framework::adaptation;
using namespace libdash::framework::input;
using namespace libdash::framework::mpd;
ManualAdaptation::ManualAdaptation (IMPD *mpd, IPeriod *period, IAdaptationSet *adaptationSet, bool isVid) :
AbstractAdaptationLogic (mpd, period, adaptationSet, isVid)
{
}
ManualAdaptation::~ManualAdaptation ()
{
}
LogicType ManualAdaptation::GetType ()
{
return adaptation::Manual;
}
bool ManualAdaptation::IsUserDependent ()
{
return true;
}
bool ManualAdaptation::IsRateBased ()
{
return false;
}
bool ManualAdaptation::IsBufferBased ()
{
return false;
}
void ManualAdaptation::BitrateUpdate (uint64_t bps)
{
}
void ManualAdaptation::SegmentPositionUpdate (uint32_t qualitybps)
{
}
void ManualAdaptation::DLTimeUpdate (double time)
{
}
void ManualAdaptation::BufferUpdate (uint32_t bufferfill)
{
}
void ManualAdaptation::OnEOS (bool value)
{
}
void ManualAdaptation::OnSegmentDownloaded (double bufferFillPct, int segNum, int quality, std::vector<int> rttVec, std::vector<int> numHopsVec)
{
}
void ManualAdaptation::CheckedByDASHReceiver ()
{
}
void ManualAdaptation::SetMultimediaManager (sampleplayer::managers::IMultimediaManagerBase *mmM)
{
}
| 1,803 | 23.378378 | 155 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Adaptation/BufferBasedAdaptation.h
|
/*
* RateBasedAdaptation.h
*****************************************************************************
* Copyright (C) 2016,
* Jacques Samain <[email protected]>
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_ADAPTATION_BUFFERBASEDADAPTATION_H_
#define LIBDASH_FRAMEWORK_ADAPTATION_BUFFERBASEDADAPTATION_H_
#include "AbstractAdaptationLogic.h"
#include "../MPD/AdaptationSetStream.h"
#include "../Input/IDASHReceiverObserver.h"
namespace libdash
{
namespace framework
{
namespace adaptation
{
class BufferBasedAdaptation : public AbstractAdaptationLogic
{
public:
BufferBasedAdaptation (dash::mpd::IMPD *mpd, dash::mpd::IPeriod *period, dash::mpd::IAdaptationSet *adaptationSet, bool isVid, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6);
virtual ~BufferBasedAdaptation ();
virtual LogicType GetType ();
virtual bool IsUserDependent ();
virtual bool IsRateBased ();
virtual bool IsBufferBased ();
virtual void BitrateUpdate (uint64_t bps);
virtual void SegmentPositionUpdate(uint32_t qualitybps);
virtual void DLTimeUpdate (double time);
virtual void BufferUpdate (uint32_t bufferFill);
void SetBitrate (uint32_t bufferFill);
uint64_t GetBitrate ();
virtual void SetMultimediaManager (sampleplayer::managers::IMultimediaManagerBase *_mmManager);
void NotifyBitrateChange ();
void OnEOS (bool value);
virtual void OnSegmentDownloaded (double bufferFillPct, int segNum, int quality, std::vector<int> rttVec, std::vector<int> numHopsVec);
void CheckedByDASHReceiver();
private:
uint64_t currentBitrate;
std::vector<uint64_t> availableBitrates;
sampleplayer::managers::IMultimediaManagerBase *multimediaManager;
dash::mpd::IRepresentation *representation;
uint32_t reservoirThreshold;
uint32_t maxThreshold;
uint32_t lastBufferFill;
bool bufferEOS;
bool shouldAbort;
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_ADAPTATION_BUFFERBASEDADAPTATION_H_ */
| 2,885 | 45.548387 | 236 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/IDASHReceiverObserver.h
|
/*
* IDASHReceiverObserver.h
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_INPUT_IDASHRECEIVEROBSERVER_H_
#define LIBDASH_FRAMEWORK_INPUT_IDASHRECEIVEROBSERVER_H_
namespace libdash
{
namespace framework
{
namespace input
{
class IDASHReceiverObserver
{
public:
virtual ~IDASHReceiverObserver () {}
virtual void OnSegmentDownloaded () = 0;
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_INPUT_IDASHRECEIVEROBSERVER_H_ */
| 938 | 28.34375 | 79 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/MediaObjectDecoder.h
|
/*
* MediaObjectDecoder.h
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_INPUT_MEDIAOBJECTDECODER_H_
#define LIBDASH_FRAMEWORK_INPUT_MEDIAOBJECTDECODER_H_
#include "../Portable/MultiThreading.h"
#include "../Input/IDataReceiver.h"
#include "../Input/IMediaObjectDecoderObserver.h"
#include "../../Decoder/IAudioObserver.h"
#include "../../Decoder/IVideoObserver.h"
#include "../../Decoder/LibavDecoder.h"
#include "MediaObject.h"
namespace libdash
{
namespace framework
{
namespace input
{
class MediaObjectDecoder : public IDataReceiver, public sampleplayer::decoder::IAudioObserver, public sampleplayer::decoder::IVideoObserver
{
public:
MediaObjectDecoder (MediaObject *initSeg, MediaObject *mediaSeg, IMediaObjectDecoderObserver *observer, bool nodecoding);
virtual ~MediaObjectDecoder ();
bool Start ();
void Stop ();
void WaitForDelete ();
virtual int Read (uint8_t *buf, int buf_size);
virtual void OnVideoDataAvailable (const uint8_t **data, sampleplayer::decoder::videoFrameProperties* props);
virtual void OnAudioDataAvailable (const uint8_t **data, sampleplayer::decoder::audioFrameProperties* props);
virtual bool IsAudio ();
private:
THREAD_HANDLE threadHandle;
IMediaObjectDecoderObserver *observer;
sampleplayer::decoder::LibavDecoder *decoder;
MediaObject *initSegment;
MediaObject *mediaSegment;
bool run;
bool decoderInitialized;
size_t initSegmentOffset;
bool noDecoding;
static void* Decode (void *data);
static void* No_Decode (void *data);
void Notify ();
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_INPUT_MEDIAOBJECTDECODER_H_ */
| 2,785 | 42.53125 | 151 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/DASHReceiver.cpp
|
/*
* DASHReceiver.cpp
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "DASHReceiver.h"
#include <stdio.h>
#include <boost/bind.hpp>
#include <iostream>
using namespace libdash::framework::input;
using namespace libdash::framework::buffer;
using namespace libdash::framework::mpd;
using namespace dash::mpd;
using duration_in_seconds = std::chrono::duration<double, std::ratio<1, 1> >;
DASHReceiver::DASHReceiver (IMPD *mpd, IDASHReceiverObserver *obs, MediaObjectBuffer *buffer, uint32_t bufferSize, bool ndnEnabled, double ndnAlpha, bool chunkGranularityEnabled, int sample) :
mpd (mpd),
period (NULL),
adaptationSet (NULL),
representation (NULL),
adaptationSetStream (NULL),
representationStream (NULL),
segmentNumber (0),
observer (obs),
buffer (buffer),
bufferSize (bufferSize),
isBuffering (false),
withFeedBack (false),
isNDN (ndnEnabled),
ndnAlpha (ndnAlpha),
previousQuality (0),
isPaused (false),
threadComplete (false),
isScheduledPaced (false),
targetDownload (0.0),
downloadingTime (0.0),
chunkGranularity (chunkGranularityEnabled),
samplesize (sample)
{
this->period = this->mpd->GetPeriods().at(0);
this->adaptationSet = this->period->GetAdaptationSets().at(0);
this->representation = this->adaptationSet->GetRepresentation().at(0);
this->adaptationSetStream = new AdaptationSetStream(mpd, period, adaptationSet);
this->representationStream = adaptationSetStream->GetRepresentationStream(this->representation);
this->segmentOffset = CalculateSegmentOffset();
this->conn = NULL;
this->initConn = NULL;
if(isNDN)
{
#ifdef NDNICPDOWNLOAD
this->chunktimeObs = new ChunktimeObserver(this->samplesize);
this->chunktimeObs->addThroughputSignal(boost::bind(&DASHReceiver::NotifybpsChunk, this, _1)); //pass the function to register as a Slot at ChunktimeObserver-Signal
this->chunktimeObs->addContextSignal(boost::bind(&DASHReceiver::NotifyContextChunk, this, _1, _2));
this->conn = new NDNConnection(this->ndnAlpha, this->chunktimeObs);
this->initConn = new NDNConnection(this->ndnAlpha, this->chunktimeObs);
#else
this->conn = new NDNConnectionConsumerApi(this->ndnAlpha);
this->initConn = new NDNConnectionConsumerApi(this->ndnAlpha);
#endif
}
InitializeCriticalSection(&this->monitorMutex);
InitializeCriticalSection(&this->monitorPausedMutex);
InitializeConditionVariable(&this->paused);
}
DASHReceiver::~DASHReceiver ()
{
delete this->adaptationSetStream;
DeleteCriticalSection(&this->monitorMutex);
DeleteCriticalSection(&this->monitorPausedMutex);
DeleteConditionVariable(&this->paused);
}
void DASHReceiver::SetAdaptationLogic(adaptation::IAdaptationLogic *_adaptationLogic)
{
this->adaptationLogic = _adaptationLogic;
this->withFeedBack = this->adaptationLogic->IsRateBased();
}
bool DASHReceiver::Start ()
{
if(this->isBuffering)
return false;
this->isBuffering = true;
this->bufferingThread = CreateThreadPortable (DoBuffering, this);
if(this->bufferingThread == NULL)
{
this->isBuffering = false;
return false;
}
return true;
}
void DASHReceiver::Stop ()
{
if(!this->isBuffering)
return;
this->isBuffering = false;
this->buffer->SetEOS(true);
if(this->bufferingThread != NULL)
{
JoinThread(this->bufferingThread);
DestroyThreadPortable(this->bufferingThread);
}
}
MediaObject* DASHReceiver::GetNextSegment ()
{
ISegment *seg = NULL;
EnterCriticalSection(&this->monitorPausedMutex);
while(this->isPaused)
SleepConditionVariableCS(&this->paused, &this->monitorPausedMutex, INFINITE);
if(this->segmentNumber >= this->representationStream->GetSize())
{
LeaveCriticalSection(&this->monitorPausedMutex);
return NULL;
}
seg = this->representationStream->GetMediaSegment(this->segmentNumber + this->segmentOffset);
if (seg != NULL)
{
std::vector<IRepresentation *> rep = this->adaptationSet->GetRepresentation();
int quality = 0;
while(quality != rep.size() - 1)
{
if(rep.at(quality) == this->representation)
break;
quality++;
}
Debug("DASH receiver: Next segment is: %s / %s\n",((dash::network::IChunk*)seg)->Host().c_str(),((dash::network::IChunk*)seg)->Path().c_str());
int realBPS = rep.at(quality)->GetSpecificSegmentSize(std::to_string(segmentNumber+1));
L("DASH_Receiver:\t%s\t%d\t%u\tRealBPS: %u\n", ((dash::network::IChunk*)seg)->Path().c_str() ,quality, rep.at(quality)->GetBandwidth(), realBPS);
if(quality != previousQuality)
{
L("DASH_Receiver:\tQUALITY_SWITCH\t%s\t%d\t%d\n", (quality > previousQuality) ?"UP" : "DOWN", previousQuality, quality);
previousQuality = quality;
}
//TODO: Somewhere after this point there is an delay
MediaObject *media = new MediaObject(seg, this->representation,this->withFeedBack);
this->segmentNumber++;
this->adaptationLogic->SegmentPositionUpdate(rep.at(quality)->GetBandwidth());
LeaveCriticalSection(&this->monitorPausedMutex);
return media;
}
LeaveCriticalSection(&this->monitorPausedMutex);
return NULL;
}
MediaObject* DASHReceiver::GetSegment (uint32_t segNum)
{
ISegment *seg = NULL;
if(segNum >= this->representationStream->GetSize())
return NULL;
seg = this->representationStream->GetMediaSegment(segNum + segmentOffset);
if (seg != NULL)
{
MediaObject *media = new MediaObject(seg, this->representation);
return media;
}
return NULL;
}
MediaObject* DASHReceiver::GetInitSegment ()
{
ISegment *seg = NULL;
seg = this->representationStream->GetInitializationSegment();
if (seg != NULL)
{
MediaObject *media = new MediaObject(seg, this->representation);
return media;
}
return NULL;
}
MediaObject* DASHReceiver::FindInitSegment (dash::mpd::IRepresentation *representation)
{
if (!this->InitSegmentExists(representation))
return NULL;
return this->initSegments[representation];
}
uint32_t DASHReceiver::GetPosition ()
{
return this->segmentNumber;
}
void DASHReceiver::SetPosition (uint32_t segmentNumber)
{
// some logic here
this->segmentNumber = segmentNumber;
}
void DASHReceiver::SetPositionInMsecs (uint32_t milliSecs)
{
// some logic here
this->positionInMsecs = milliSecs;
}
void DASHReceiver::SetRepresentation (IPeriod *period, IAdaptationSet *adaptationSet, IRepresentation *representation)
{
EnterCriticalSection(&this->monitorMutex);
bool periodChanged = false;
if (this->representation == representation)
{
LeaveCriticalSection(&this->monitorMutex);
return;
}
this->representation = representation;
if (this->adaptationSet != adaptationSet)
{
this->adaptationSet = adaptationSet;
if (this->period != period)
{
this->period = period;
periodChanged = true;
}
delete this->adaptationSetStream;
this->adaptationSetStream = NULL;
this->adaptationSetStream = new AdaptationSetStream(this->mpd, this->period, this->adaptationSet);
}
this->representationStream = this->adaptationSetStream->GetRepresentationStream(this->representation);
this->DownloadInitSegment(this->representation);
if (periodChanged)
{
this->segmentNumber = 0;
this->CalculateSegmentOffset();
}
LeaveCriticalSection(&this->monitorMutex);
}
libdash::framework::adaptation::IAdaptationLogic* DASHReceiver::GetAdaptationLogic ()
{
return this->adaptationLogic;
}
dash::mpd::IRepresentation* DASHReceiver::GetRepresentation ()
{
return this->representation;
}
uint32_t DASHReceiver::CalculateSegmentOffset ()
{
if (mpd->GetType() == "static")
return 0;
uint32_t firstSegNum = this->representationStream->GetFirstSegmentNumber();
uint32_t currSegNum = this->representationStream->GetCurrentSegmentNumber();
uint32_t startSegNum = currSegNum - 2*bufferSize;
return (startSegNum > firstSegNum) ? startSegNum : firstSegNum;
}
void DASHReceiver::NotifySegmentDownloaded (double bufferFillPct, int segNum, int quality)
{
this->observer->OnSegmentDownloaded();
std::vector<int> rttVec = this->rttMap[quality];
std::vector<int> numHopsVec = this->numHopsMap[quality];
this->adaptationLogic->OnSegmentDownloaded(bufferFillPct, segNum, quality, rttVec, numHopsVec);
this->rttMap[quality].clear();
this->numHopsMap[quality].clear();
}
void DASHReceiver::NotifyBitrateChange(dash::mpd::IRepresentation *representation)
{
if(this->representation != representation)
{
this->representation = representation;
this->SetRepresentation(this->period,this->adaptationSet,this->representation);
}
}
void DASHReceiver::DownloadInitSegment (IRepresentation* rep)
{
if (this->InitSegmentExists(rep))
return;
MediaObject *initSeg = NULL;
initSeg = this->GetInitSegment();
if (initSeg)
{
initSeg->StartDownload(this->initConn);
this->initSegments[rep] = initSeg;
initSeg->WaitFinished(true);
}
}
bool DASHReceiver::InitSegmentExists (IRepresentation* rep)
{
if (this->initSegments.find(rep) != this->initSegments.end())
return true;
return false;
}
void DASHReceiver::Notifybps (uint64_t bps)
{
if(this)
{
if(this->adaptationLogic)
{
if(this->withFeedBack)
{
this->adaptationLogic->BitrateUpdate(bps);
}
}
}
}
void DASHReceiver::NotifybpsSegment (uint64_t bps) //segment-based feedback enabled
{
if(!chunkGranularity)
this->Notifybps(bps);
}
void DASHReceiver::NotifybpsChunk (uint64_t bps) //chunk-based feedback enabled
{
if(chunkGranularity)
this->Notifybps(bps);
}
void DASHReceiver::NotifyContextChunk (uint64_t rtt, uint64_t numHops)
{
int rttSeconds = (int)(rtt / (uint64_t)1000); // actually milliseconds?
std::vector<IRepresentation *> rep = this->adaptationSet->GetRepresentation();
int quality = 0;
while(quality != rep.size() - 1)
{
if(rep.at(quality) == this->representation)
break;
quality++;
}
this->rttMap[quality].push_back(rttSeconds);
this->numHopsMap[quality].push_back((int)numHops);
}
void DASHReceiver::NotifyDlTime (double time)
{
if(this)
{
if(this->adaptationLogic)
{
if(this->withFeedBack)
{
//std::cout << "DASHReceiver::NotifyDlTime call " << time << "seconds \n";
this->adaptationLogic->DLTimeUpdate(time);
}
}
}
}
void DASHReceiver::NotifyCheckedAdaptationLogic()
{
this->adaptationLogic->CheckedByDASHReceiver();
}
//Is only called when this->adaptationLogic->IsBufferBased
void DASHReceiver::OnSegmentBufferStateChanged(uint32_t fillstateInPercent)
{
this->adaptationLogic->BufferUpdate(fillstateInPercent);
}
void DASHReceiver::OnEOS(bool value)
{
this->adaptationLogic->OnEOS(value);
}
/* Thread that does the buffering of segments */
void* DASHReceiver::DoBuffering (void *receiver)
{
DASHReceiver *dashReceiver = (DASHReceiver *) receiver;
dashReceiver->DownloadInitSegment(dashReceiver->GetRepresentation());
MediaObject *media = dashReceiver->GetNextSegment();
dashReceiver->NotifyCheckedAdaptationLogic();
media->SetDASHReceiver(dashReceiver);
std::chrono::time_point<std::chrono::system_clock> m_start_time = std::chrono::system_clock::now();
while(media != NULL && dashReceiver->isBuffering)
{
if(dashReceiver->isScheduledPaced)
{
double delay = std::chrono::duration_cast<duration_in_seconds>(std::chrono::system_clock::now() - m_start_time).count();
L("-DASH-Reciever: Waiting for next Download in DoBufferung %f, targetdownload: %f, delay: %f\n", dashReceiver->targetDownload - delay, dashReceiver->targetDownload, delay);
//Only wait when buffer if more than 80 percent full
if(delay < dashReceiver->targetDownload && ((double) dashReceiver->buffer->Length()/(double) dashReceiver->buffer->Capacity()) > 0.9)
{
sleep(dashReceiver->targetDownload - delay);
}
}
m_start_time = std::chrono::system_clock::now();
media->StartDownload(dashReceiver->conn);
media->WaitFinished(false);
if (!dashReceiver->buffer->PushBack(media))
{
dashReceiver->threadComplete = true;
return NULL;
}
// Get the quality so we can notify the adaptation logic
std::vector<IRepresentation *> rep = dashReceiver->adaptationSet->GetRepresentation();
int quality = 0;
while(quality != rep.size() - 1)
{
if(rep.at(quality) == dashReceiver->representation)
break;
quality++;
}
double bufferFillPct = (double) dashReceiver->buffer->Length()/(double) dashReceiver->buffer->Capacity();
dashReceiver->NotifySegmentDownloaded(bufferFillPct, dashReceiver->segmentNumber, quality);
media = dashReceiver->GetNextSegment();
dashReceiver->NotifyCheckedAdaptationLogic();
if(media)
media->SetDASHReceiver(dashReceiver);
}
dashReceiver->buffer->SetEOS(true);
dashReceiver->threadComplete = true;
return NULL;
}
void DASHReceiver::ShouldAbort ()
{
Debug("DASH RECEIVER SEGMENT --\n");
this->segmentNumber--;
Debug("DASH RECEIVER ABORT REQUEST\n");
this->buffer->ShouldAbort();
}
void DASHReceiver::Seeking (int offset)
{
EnterCriticalSection(&this->monitorPausedMutex);
this->isPaused = true;
this->ShouldAbort();
this->buffer->Clear();
this->segmentNumber = this->segmentNumber + offset;
if((int)this->segmentNumber < 0)
this->segmentNumber = 0;
this->isPaused = false;
WakeAllConditionVariable(&this->paused);
LeaveCriticalSection(&this->monitorPausedMutex);
}
void DASHReceiver::FastForward ()
{
//Seeking 30s in the future (15 segments = 2 x 15 seconds)
this->Seeking(15);
}
void DASHReceiver::FastRewind ()
{
this->Seeking(-15);
if(this->threadComplete)
{
this->buffer->SetEOS(false);
this->isBuffering = true;
this->bufferingThread = CreateThreadPortable (DoBuffering, this);
this->threadComplete = false;
}
}
void DASHReceiver::SetTargetDownloadingTime (double target)
{
this->isScheduledPaced = true;
this->targetDownload = target;
}
| 15,595 | 31.356846 | 201 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/NDNConnection.h
|
/*
* NDNConnection.h
*****************************************************************************
* Header file for NDNx input module for libdash
*
* Author: Qian Li <[email protected]>
* Jacques Samain <[email protected]>
*
* Copyright (C) 2016 IRT SystemX
*
* Based on NDNx input module for VLC by Jordan Augé
* Portions Copyright (C) 2015 Cisco Systems
* Based on CCNx input module for libdash by
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
* Based on the NDNx input module by UCLA
* Portions Copyright (C) 2013 Regents of the University of California.
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
* This work is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the
* Free Software Foundation.
*****************************************************************************/
#ifndef NDNCONNECTION_H_
#define NDNCONNECTION_H_
#include "../libdash/source/portable/Networking.h"
#include "INDNConnection.h"
#include "../../debug.h"
#include "log/log.h"
#include <string>
#include <stdint.h>
#include <iostream>
#include <sstream>
#include <chrono>
#include <inttypes.h>
#include <stdlib.h>
#include <stdarg.h>
#include <algorithm>
#include<ndn-icp-download.hpp>
#include <ndn-cxx/face.hpp>
#include <ndn-cxx/security/key-chain.hpp>
#include <ndn-cxx/util/command-interest-generator.hpp>
#include <inttypes.h>
#include <time.h>
#include <limits.h>
#include <errno.h>
#include <boost/exception/diagnostic_information.hpp>
//logging purpose
#include <chrono>
#include <stdarg.h>
#define DEFAULT_LIFETIME 250
#define RETRY_TIMEOUT 25
//typedef struct {
// volatile uint64_t i_pos;
// volatile int eof;
//} ndn_cxx_libdash_data_t;
typedef struct {
uint8_t data[10000];
uint64_t start_offset;
uint64_t size;
} buffer_t;
namespace libdash {
namespace framework {
namespace input {
class NDNConnection : public INDNConnection, public ndn::NdnIcpDownloadObserver {
public:
NDNConnection(double alpha);
NDNConnection(double alpha, ChunktimeObserver* c_obs);
~NDNConnection();
virtual void Init(dash::network::IChunk *chunk);
void InitForMPD(const std::string& url);
virtual int Read(uint8_t *data, size_t len, dash::network::IChunk *chunk);
virtual int ReadStopAndWait(uint8_t *data, size_t len, dash::network::IChunk *chunk);
virtual int ReadBetter(uint8_t *data, size_t len, dash::network::IChunk *chunk);
virtual int ReadFull(uint8_t *data, size_t len, dash::network::IChunk *chunk);
int Read(uint8_t *data, size_t len);
virtual int Peek(uint8_t *data, size_t len, dash::network::IChunk *chunk);
virtual double GetAverageDownloadingSpeed();
virtual double GetDownloadingTime();
virtual void doFetch();
virtual void onData(const ndn::Interest &interest, const ndn::Data &data);
virtual void onTimeout(const ndn::Interest &interest);
/*
* IDASHMetrics
* Can't be deleted...
*/
const std::vector<dash::metrics::ITCPConnection *> &GetTCPConnectionList() const;
const std::vector<dash::metrics::IHTTPTransaction *> &GetHTTPTransactionList() const;
/*
* NdnIcpDownloadObserver
*/
virtual void notifyStats(double WinSize, double RTT);
virtual void notifyChunkStats(std::string chunkName, double chunkThroughput); //for measurements on chunk-level
private:
uint64_t i_chunksize;
int i_lifetime;
int i_missed_co;
/**< number of content objects we missed in NDNBlock */
buffer_t m_buffer;
std::string m_name;
ndn::Name m_recv_name;
ndn::Face m_face;
int m_first;
bool m_isFinished;
uint64_t m_nextSeg;
double ndnAlpha;
bool ndnRateBased;
bool allow_stale;
int sysTimeout;
unsigned InitialMaxwindow;
unsigned int timer;
double drop_factor;
double p_min;
double beta;
unsigned int gamma;
unsigned int samples;
unsigned int nchunks; // XXX chunks=-1 means: download the whole file!
bool output;
bool report_path;
ndn::NdnIcpDownload *ndnicpdownload;
bool res;
std::vector<char> mdata;
char* deezData;
int datSize;
int dataPos;
int firstChunk;
double speed; // in bps
double dnltime; //in secs
uint64_t sizeDownloaded;
std::chrono::time_point<std::chrono::system_clock> m_start_time;
std::vector<dash::metrics::ITCPConnection *> tcpConnections;
std::vector<dash::metrics::IHTTPTransaction *> httpTransactions;
uint64_t cumulativeBytesReceived;
double dnltime_chunk;
double speed_chunk;
std::chrono::time_point<std::chrono::system_clock> m_last_fetch_chunk;
};
}
}
}
#endif /* NDNCONNECTION_H_ */
| 5,780 | 31.116667 | 127 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/NDNConnection.cpp
|
/*
* NDNConnection.cpp
*****************************************************************************
* NDNx input module for libdash
*
* Author: Qian Li <[email protected]>
* Jacques Samain <[email protected]>
*
* Copyright (C) 2016 IRT SystemX, Cisco
*
* Based on NDNx input module for VLC by Jordan Augé
* Portions Copyright (C) 2015 Cisco Systems
* Based on CCNx input module for libdash by
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
* Based on the NDNx input module by UCLA
* Portions Copyright (C) 2013 Regents of the University of California.
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
* This work is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the
* Free Software Foundation.
*****************************************************************************/
#ifdef NDNICPDOWNLOAD
#include "NDNConnection.h"
#include <iostream>
#define BOOST_THREAD_PROVIDES_FUTURE
#include <boost/thread.hpp>
#include <boost/thread/future.hpp>
#include <iostream>
#include <boost/bind.hpp>
/*****************************************************************************
* Module descriptor
*****************************************************************************/
using namespace libdash::framework::input;
using namespace dash;
using namespace dash::network;
using namespace dash::metrics;
using std::bind;
using std::placeholders::_1;
using std::placeholders::_2;
using duration_in_seconds = std::chrono::duration<double, std::ratio<1, 1> >;
NDNConnection::NDNConnection(double alpha, ChunktimeObserver* c_obs) :
m_recv_name(std::string()),
m_first(1),
m_isFinished(false),
cumulativeBytesReceived(0),
ndnAlpha(alpha)
{
i_chunksize = -1;
i_missed_co = 0;
i_lifetime = DEFAULT_LIFETIME;
allow_stale = false;
InitialMaxwindow = RECEPTION_BUFFER - 1; // Constants declared inside ndn-icp-download.hpp
double InitialWindow = 50;
timer = DEFAULT_INTEREST_TIMEOUT;
drop_factor = 0.96;
p_min = P_MIN;
beta = 0.97; //Packet loss occurs burst so e.g. 250*0,95^10 was 0.05 decrease factor
gamma = 2.5; //growth factor, was 1 increase to 5
samples = SAMPLES;
output = false;
report_path = false;
this->firstChunk = -1;
output = false;
report_path = false;
this->ndnicpdownload = new ndn::NdnIcpDownload(this->InitialMaxwindow,InitialWindow, this->gamma, this->beta, this->allow_stale, 1000);
this->ndnicpdownload->setAlpha(ndnAlpha);
ndnicpdownload->addObserver(this); //ALWAYS OBSERVE
if(c_obs != NULL)
ndnicpdownload->addObserver(c_obs);
std::shared_ptr<ndn::DataPath> initPath = std::make_shared<ndn::DataPath>(drop_factor, p_min, timer, samples);
initPath->setAlpha(ndnAlpha);
ndnicpdownload->insertToPathTable(DEFAULT_PATH_ID, initPath);
ndnicpdownload->setCurrentPath(initPath);
ndnicpdownload->setStartTimeToNow();
ndnicpdownload->setLastTimeOutToNow();
ndnicpdownload->setUnversioned(true);
if (output)
ndnicpdownload->enableOutput();
if (report_path)
ndnicpdownload->enablePathReport();
Debug("NDN class created\n");
}
NDNConnection::~NDNConnection() {
delete ndnicpdownload;
}
void NDNConnection::Init(IChunk *chunk) {
Debug("NDN Connection: STARTING\n");
m_first = 1;
m_buffer.size = 0;
sizeDownloaded = 0;
m_name = "ndn:/" + chunk->Host() + chunk->Path();
m_nextSeg = 0;
m_isFinished = false;
res = false;
dataPos = 0;
datSize = 0;
deezData = NULL;
Debug("NDN_Connection:\tINTIATED_to_name %s\n", m_name.c_str());
L("NDN_Connection:\tSTARTING DOWNLOAD %s\n", m_name.c_str());
}
void NDNConnection::InitForMPD(const std::string& url)
{
m_first = 1;
m_buffer.size = 0;
sizeDownloaded = 0;
if(url.find("//") != std::string::npos)
{
int pos = url.find("//");
char* myName = (char*)malloc(strlen(url.c_str()) - 1);
strncpy(myName, url.c_str(), pos + 1);
strncpy(myName + pos + 1, url.c_str() + pos + 2, strlen(url.c_str()) - pos - 2);
m_name = std::string(myName);
}
else
{
m_name = url;
}
m_nextSeg = 0;
m_isFinished = false;
res = false;
dataPos = 0;
datSize = 0;
deezData = NULL;
Debug("NDN_Connection:\tINTIATED_for_mpd %s\n", m_name.c_str());
L("NDN_Connection:\tSTARTING DOWNLOAD %s\n", m_name.c_str());
}
int NDNConnection::Peek(uint8_t *data, size_t len, IChunk *chunk) {
return -1;
}
void NDNConnection::doFetch() {
ndn::Name name(m_name);
if (m_first == 0)
{
name.append(m_recv_name[-2]).appendSegment(m_nextSeg);
}
ndn::Interest interest(name, ndn::time::milliseconds(i_lifetime));
Debug("fetching %s\n", m_name.c_str());
if (m_first == 1)
{
m_start_time = std::chrono::system_clock::now();
m_last_fetch_chunk = std::chrono::system_clock::now();
interest.setMustBeFresh(true);
#ifdef FRESH
} else {
interest.setMustBeFresh(true);
#endif // FRESH
}
Debug("NDN_Init_CHUNK:\n" );
L("NDN_Init_CHUNK:\n" );
m_face.expressInterest(interest, bind(&NDNConnection::onData, this, _1, _2),
bind(&NDNConnection::onTimeout, this, _1));
}
/*****************************************************************************
* CALLBACKS
*****************************************************************************/
void NDNConnection::onData(const ndn::Interest &interest, const ndn::Data &data) {
m_nextSeg++;
if (m_isFinished)
{
return;
}
if (m_first == 1) {
m_recv_name = data.getName();
i_chunksize = data.getContent().value_size();
m_first = 0;
}
if (true) {
dnltime_chunk = std::chrono::duration_cast<duration_in_seconds>(std::chrono::system_clock::now() - m_last_fetch_chunk).count();
speed_chunk = (double) (i_chunksize * 8/ dnltime_chunk);
L("NDNConnection::onData\n");
Debug("NDN_Connection_SEGMENT:\tonData %s, Average_DL: %f\n", m_name.c_str(), speed_chunk);
L("NDN_Connection_SEGMENT:\tonData %s, Average_DL: %f\n", m_name.c_str(), speed_chunk);
m_last_fetch_chunk = std::chrono::system_clock::now();
}
const ndn::Block &content = data.getContent();
memcpy(m_buffer.data, reinterpret_cast<const char *>(content.value()), content.value_size());
m_buffer.size = content.value_size();
m_buffer.start_offset = 0;
sizeDownloaded += m_buffer.size;
const ndn::name::Component& finalBlockId = data.getMetaInfo().getFinalBlockId();
if (finalBlockId == data.getName()[-1])
{
//Stopping ReadStopAndWait when last segment was fetched in this method
m_isFinished = true;
}
}
void NDNConnection::onTimeout(const ndn::Interest &interest) {
//TODO What do we do on timeouts?
/* m_buffer.size = 0;
m_buffer.start_offset = 0;
if (!m_first && interest.getName()[-1].toSegment() == m_cid_timing_out) {
m_timeout_counter = (m_timeout_counter + 1) % (i_retrytimeout + 2);
if (m_timeout_counter > NDN_MAX_NDN_GET_TRYS) {
b_last = true;
}
}
else {
m_cid_timing_out = m_first ? 0 : interest.getName()[-1].toSegment();
m_timeout_counter = 1;
if (m_timeout_counter > NDN_MAX_NDN_GET_TRYS) {
Debug("Abort, abort\n\n");
b_last = true;
}
}
*/
}
int NDNConnection::ReadStopAndWait(uint8_t *data, size_t len, IChunk *chunk) {
while (true) {
if (m_isFinished)
{
this->dnltime = std::chrono::duration_cast<duration_in_seconds>(std::chrono::system_clock::now() - m_start_time).count();
speed = (double) (sizeDownloaded * 8/ this->dnltime);
cumulativeBytesReceived += sizeDownloaded;
L("NDN_Connection:\tFINISHED DOWNLOADING %s, Average_DL: %f, size: %lu, cumulative: %lu\n", m_name.c_str(), speed, sizeDownloaded, cumulativeBytesReceived);
return 0;
}
doFetch();
try {
m_face.processEvents();
} catch (...) {
std::cerr << "Unexpected exception during the fetching, diagnostic informations:\n" <<
boost::current_exception_diagnostic_information();
return 0;
}
if (m_buffer.size <= 0) {
i_missed_co++;
//i_missed_co is the number of timeouts we have during the DL of one chunk
continue;
}
memcpy(data, m_buffer.data, m_buffer.size);
if (m_buffer.size > 0) {
return m_buffer.size;
}
}
}
int NDNConnection::ReadBetter(uint8_t *data, size_t len, IChunk *chunk) {
if(this->firstChunk == -1) //this means that we start the DL, thus the timer is launched.
m_start_time = std::chrono::system_clock::now();
if(res)
{
this->dnltime = std::chrono::duration_cast<duration_in_seconds>(std::chrono::system_clock::now() - m_start_time).count();
speed = (double) (sizeDownloaded * 8 / this->dnltime);
cumulativeBytesReceived += sizeDownloaded;
L("NDN_Connection:\tFINISHED DOWNLOADING %s Average_DL: %f size: %lu cumulative: %lu \n", m_name.c_str(), speed, sizeDownloaded, cumulativeBytesReceived);
return 0;
}
this->mdata.clear();
nchunks = len / 1000; //TODO how to know in advance the chunksize, ie: 1000?
this->res = this->ndnicpdownload->download(this->m_name, &(this->mdata), this->firstChunk, nchunks);
int size = this->mdata.size();
int i = 0;
for(std::vector<char>::const_iterator it = this->mdata.begin(); it != this->mdata.end(); it++)
{
data[i] = *it;
i++;
}
if(this->firstChunk == -1)
this->firstChunk = 0;
this->firstChunk += nchunks;
sizeDownloaded += size;
return size;
}
int NDNConnection::ReadFull(uint8_t *data, size_t len, IChunk *chunk) {
if(!res)
{
L("NDNConnection::ReadFull-Init\n");
m_start_time = std::chrono::system_clock::now();
}
if(res)
{
if(this->dataPos == this->datSize)
{
this->dnltime = std::chrono::duration_cast<duration_in_seconds>(std::chrono::system_clock::now() - m_start_time).count();
if(!this->ndnRateBased)
speed = (double) (sizeDownloaded * 8 / this->dnltime);
cumulativeBytesReceived += sizeDownloaded;
L("NDN_Connection:\tFINISHED DOWNLOADING %s Average_DL: %f size: %lu cumulative: %lu Throughput: %f\n", m_name.c_str(), speed, sizeDownloaded, cumulativeBytesReceived, (double) (sizeDownloaded * 8 / this->dnltime));
free(this->deezData);
this->deezData = NULL;
return 0;
}
if((this->datSize - this->dataPos) > (int)len)
{
memcpy(data, this->deezData + this->dataPos, len);
this->dataPos += len;
sizeDownloaded += len;
return len;
}
else
{
assert(this->datSize - this->dataPos > 0);
memcpy(data, this->deezData + this->dataPos, this->datSize - this->dataPos);
int temp = this->datSize - this->dataPos;
this->dataPos += this->datSize - this->dataPos;
sizeDownloaded += temp;
return temp;
}
}
this->mdata.clear();
L("NDN_Connection:\tSTARTINF ICP DOWNLOAD\n");
boost::future<bool> f = boost::async(boost::bind(&ndn::NdnIcpDownload::download, this->ndnicpdownload, this->m_name, &(this->mdata), this->firstChunk, -1));
this->res = f.get();
this->datSize = this->mdata.size();
this->deezData = (char *)malloc(this->datSize);
int i = 0;
std::copy(this->mdata.begin(), this->mdata.end(), this->deezData);
/* for(std::vector<char>::const_iterator it = this->mdata.begin(); it != this->mdata.end(); it++)
{
deezData[i] = *it;
i++;
}
*/
if(this->datSize > (int)len)
{
memcpy(data, this->deezData, len);
this->dataPos += len;
sizeDownloaded += len;
return len;
}
else
{
memcpy(data, this->deezData, this->datSize);
this->dataPos += this->datSize;
sizeDownloaded += this->datSize;
return this->datSize;
}
}
int NDNConnection::Read(uint8_t *data, size_t len, IChunk *chunk) {
//return ReadStopAndWait(data, len, chunk);
//return ReadBetter(data, len, chunk);
return ReadFull(data, len, chunk);
}
int NDNConnection::Read(uint8_t *data, size_t len) { //method to read the mpd file
if(!res)
m_start_time = std::chrono::system_clock::now();
if(res)
{
if(this->dataPos == this->datSize)
{
this->dnltime = std::chrono::duration_cast<duration_in_seconds>(std::chrono::system_clock::now() - m_start_time).count();
speed = (double) (sizeDownloaded * 8 / this->dnltime);
cumulativeBytesReceived += sizeDownloaded;
L("NDN_Connection:\tFINISHED DOWNLOADING %s, Average_DL: %f, size: %lu, cumulative: %lu\n", m_name.c_str(), speed, sizeDownloaded, cumulativeBytesReceived);
return 0;
}
if((this->datSize - this->dataPos) > len)
{
memcpy(data, this->deezData + this->dataPos, len);
this->dataPos += len;
sizeDownloaded += len;
return len;
}
else
{
memcpy(data, this->deezData + this->dataPos, this->datSize - this->dataPos);
int temp = this->datSize - this->dataPos;
this->dataPos += this->datSize - this->dataPos;
sizeDownloaded += temp;
return temp;
}
}
this->mdata.clear();
this->res = this->ndnicpdownload->download(this->m_name, &(this->mdata), this->firstChunk, -1);
this->datSize = this->mdata.size();
this->deezData = (char *)malloc(this->datSize);
int i = 0;
for(std::vector<char>::const_iterator it = this->mdata.begin(); it != this->mdata.end(); it++)
{
deezData[i] = *it;
i++;
}
if(this->datSize > len)
{
memcpy(data, this->deezData, len);
this->dataPos += len;
sizeDownloaded += len;
return len;
}
else
{
memcpy(data, this->deezData, this->datSize);
this->dataPos += this->datSize;
sizeDownloaded += this->datSize;
return this->datSize;
}
}
double NDNConnection::GetAverageDownloadingSpeed()
{
Debug("NDNConnection: DL speed is %f\n", this->speed);
return this->speed;
}
double NDNConnection::GetDownloadingTime()
{
L("NDNConnection: DL time is %f\n", this->dnltime);
return this->dnltime;
}
const std::vector<ITCPConnection *> &NDNConnection::GetTCPConnectionList() const {
return tcpConnections;
}
const std::vector<IHTTPTransaction *> &NDNConnection::GetHTTPTransactionList() const {
return httpTransactions;
}
void NDNConnection::notifyStats(double winSize, double RTT)
{
this->speed = (winSize); // * 1000000 * 1400 * 8;
L("NDNConnection:\tNotificationICPDL\t%f\t%f\t%f\n", winSize, RTT, speed);
}
void NDNConnection::notifyChunkStats(std::string chunkName, double chunkThroughput)
{
L("NDNConnection:\tChunk-Download\t Chunk-Name: %s\t single Chunk-Throughput: %f\n", chunkName.c_str(), chunkThroughput);
}
#endif
| 14,712 | 29.026531 | 218 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/NDNConnectionConsumerApi.h
|
/*
* NDNConnectionConsumerApi.h
*
****************************************
*
* Copyright (c) Cisco Systems 2016
* Author: Jacques Samain <[email protected]>
*
* NDN Connection class based on the Consumer/Producer API.
*
****************************************
*/
#ifndef QTSAMPLEPLAYER_LIBDASHFRAMEWORK_INPUT_NDNCONNECTIONCONSUMERAPI_H_
#define QTSAMPLEPLAYER_LIBDASHFRAMEWORK_INPUT_NDNCONNECTIONCONSUMERAPI_H_
#include "../libdash/source/portable/Networking.h"
#include "INDNConnection.h"
#include "../../debug.h"
#include "log/log.h"
#include <sys/types.h>
#include <string>
#include <stdint.h>
#include <iostream>
#include <sstream>
#include <chrono>
#include <inttypes.h>
#include <stdlib.h>
#include <stdarg.h>
#include <algorithm>
#include <ndn-cxx/security/validator.hpp>
#include <ndn-cxx/security/key-chain.hpp>
#include "Consumer-Producer-API/consumer-context.hpp"
#include "Consumer-Producer-API/manifest.hpp"
#include "Consumer-Producer-API/download-observer.hpp"
#include <future>
#include <inttypes.h>
#include <time.h>
#include <limits.h>
#include <errno.h>
#include "../libdashframework/Portable/MultiThreading.h"
#include <boost/exception/diagnostic_information.hpp>
//logging purpose
#include <chrono>
#include <stdarg.h>
namespace libdash {
namespace framework {
namespace input {
class NDNConnectionConsumerApi : public INDNConnection, public ndn::NdnObserver {
public:
NDNConnectionConsumerApi(double alpha);
virtual ~NDNConnectionConsumerApi();
virtual void Init(dash::network::IChunk *chunk);
void InitForMPD(const std::string& url);
virtual int Read(uint8_t *data, size_t len, dash::network::IChunk *chunk);
int Read(uint8_t *data, size_t len);
virtual int Peek(uint8_t *data, size_t len, dash::network::IChunk *chunk);
virtual double GetAverageDownloadingSpeed();
virtual double GetDownloadingTime();
void processPayload(ndn::Consumer& , const uint8_t*, size_t);
bool onPacket(ndn::Consumer& , const ndn::Data&);
// virtual void onData(const ndn::Interest &interest, const ndn::Data &data);
// virtual void onTimeout(const ndn::Interest &interest);
/*
* IDASHMetrics
* Can't be deleted...
*/
const std::vector<dash::metrics::ITCPConnection *> &GetTCPConnectionList() const;
const std::vector<dash::metrics::IHTTPTransaction *> &GetHTTPTransactionList() const;
/*
* NdnObserver
*/
virtual void notifyStats(double throughput);
virtual void notifyChunkStats(std::string chunkName, double chunkThroughput); //for measurement on chunk-level
private:
uint64_t i_chunksize;
int i_lifetime;
int i_missed_co;
/**< number of content objects we missed in NDNBlock */
std::string m_name;
ndn::Name m_recv_name;
ndn::Face m_face;
int m_first;
bool m_isFinished;
uint64_t m_nextSeg;
double ndnAlpha;
bool ndnRateBased;
bool allow_stale;
int sysTimeout;
unsigned InitialMaxwindow;
unsigned int timer;
double drop_factor;
double p_min;
double beta;
unsigned int gamma;
unsigned int samples;
unsigned int nchunks; // XXX chunks=-1 means: download the whole file!
bool output;
bool report_path;
ndn::Consumer* myConsumer;
bool res;
std::vector<char> mdata;
char* deezData;
int datSize;
int dataPos;
int firstChunk;
double speed; // in bps
double dnltime; //in seconds
uint64_t sizeDownloaded;
std::chrono::time_point<std::chrono::system_clock> m_start_time;
std::vector<dash::metrics::ITCPConnection *> tcpConnections;
std::vector<dash::metrics::IHTTPTransaction *> httpTransactions;
uint64_t cumulativeBytesReceived;
mutable CRITICAL_SECTION monitorMutex;
mutable CONDITION_VARIABLE contentRetrieved;
};
} /* namespace input */
} /* namespace framework */
} /* namespace libdash */
#endif /* QTSAMPLEPLAYER_LIBDASHFRAMEWORK_INPUT_NDNCONNECTIONCONSUMERAPI_H_ */
| 4,732 | 30.138158 | 126 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/NDNConnectionConsumerApi.cpp
|
/*
* NDNConnectionConsumerApi.h
*
****************************************
*
* Copyright (c) Cisco Systems 2016
* Author: Jacques Samain <[email protected]>
*
* NDN Connection class based on the Consumer/Producer API.
*
****************************************
*/
#ifndef NDNICPDOWNLOAD
#include "NDNConnectionConsumerApi.h"
#define DEFAULT_LIFETIME 250
#define RETRY_TIMEOUTS 5
using namespace dash;
using namespace dash::network;
using namespace dash::metrics;
using namespace ndn;
using std::bind;
using std::placeholders::_1;
using std::placeholders::_2;
using std::placeholders::_3;
using duration_in_seconds = std::chrono::duration<double, std::ratio<1, 1> >;
namespace libdash {
namespace framework {
namespace input {
NDNConnectionConsumerApi::NDNConnectionConsumerApi(double alpha) :
m_recv_name(std::string()),
m_first(1),
m_isFinished(false),
sizeDownloaded (0),
cumulativeBytesReceived(0),
ndnAlpha(alpha)
{
drop_factor = 0.95;
beta = 0.05;
gamma = 1;
this->speed = 0.0;
this->dnltime = 0.0;
this->deezData = NULL;
this->datSize = 0;
this->dataPos = 0;
InitializeConditionVariable (&this->contentRetrieved);
InitializeCriticalSection (&this->monitorMutex);
this->myConsumer = new Consumer(Name(""), RAAQMDR);
this->myConsumer->setContextOption(INTEREST_LIFETIME, DEFAULT_LIFETIME);
this->myConsumer->setContextOption(INTEREST_RETX, RETRY_TIMEOUTS);
this->myConsumer->setContextOption(BETA_VALUE, beta);
this->myConsumer->setContextOption(GAMMA_VALUE, (int)gamma);
this->myConsumer->setContextOption(DROP_FACTOR, drop_factor);
this->myConsumer->setContextOption(RATE_ESTIMATION_ALPHA, this->ndnAlpha);
this->myConsumer->setContextOption(RATE_ESTIMATION_OBSERVER, this);
this->myConsumer->setContextOption(CONTENT_RETRIEVED, (ConsumerContentCallback) bind(&NDNConnectionConsumerApi::processPayload, this, _1, _2, _3));
this->myConsumer->setContextOption(DATA_TO_VERIFY, (ConsumerDataVerificationCallback)bind(&NDNConnectionConsumerApi::onPacket, this, _1, _2));
#ifdef NO_GUI
if(this->ndnAlpha != 20)
this->ndnRateBased = true;
#else
this->ndnRateBased = true;
#endif
Debug("NDN class created\n");
}
NDNConnectionConsumerApi::~NDNConnectionConsumerApi() {
delete this->myConsumer;
if(this->deezData)
{
free(this->deezData);
this->deezData = NULL;
}
DeleteConditionVariable (&this->contentRetrieved);
DeleteCriticalSection (&this->monitorMutex);
}
void NDNConnectionConsumerApi::Init(IChunk *chunk) {
Debug("NDN Connection: STARTING\n");
m_first = 1;
sizeDownloaded = 0;
m_name = "ndn:/" + chunk->Host() + chunk->Path();
m_isFinished = false;
res = false;
dataPos = 0;
datSize = 0;
if(this->deezData)
{
free(this->deezData);
deezData = NULL;
}
Debug("API_NDN_Connection:\tINTIATED_to_name %s\n", m_name.c_str());
L("API_NDN_Connection:\tSTARTING DOWNLOAD %s\n", m_name.c_str());
}
void NDNConnectionConsumerApi::InitForMPD(const std::string& url)
{
m_first = 1;
sizeDownloaded = 0;
if(url.find("//") != std::string::npos)
{
int pos = url.find("//");
char* myName = (char*)malloc(strlen(url.c_str()) - 1);
strncpy(myName, url.c_str(), pos + 1);
strncpy(myName + pos + 1, url.c_str() + pos + 2, strlen(url.c_str()) - pos - 2);
m_name = std::string(myName);
}
else
{
m_name = url;
}
m_isFinished = false;
res = false;
dataPos = 0;
datSize = 0;
if(this->deezData)
{
free(this->deezData);
deezData = NULL;
}
Debug("API_NDN_Connection:\tINTIATED_for_mpd %s\n", m_name.c_str());
L("API_NDN_Connection:\tSTARTING DOWNLOAD %s\n", m_name.c_str());
}
int NDNConnectionConsumerApi::Read(uint8_t* data, size_t len, IChunk *chunk)
{
return this->Read(data, len);
}
int NDNConnectionConsumerApi::Read(uint8_t *data, size_t len)
{
if(!res)
m_start_time = std::chrono::system_clock::now();
if(res)
{
if(this->dataPos == this->datSize)
{
this->dnltime = std::chrono::duration_cast<duration_in_seconds>(std::chrono::system_clock::now() - m_start_time).count();
if(speed == 0 || !this->ndnRateBased)
speed = (double) (sizeDownloaded * 8 / this->dnltime);
cumulativeBytesReceived += sizeDownloaded;
L("API_NDN_Connection:\tFINISHED DOWNLOADING %s Average_DL: %f size: %lu cumulative: %lu Throughput: %f\n", m_name.c_str(), speed, sizeDownloaded, cumulativeBytesReceived, (double) (sizeDownloaded * 8 / this->dnltime));
free(this->deezData);
this->deezData = NULL;
return 0;
}
if((this->datSize - this->dataPos) > (int)len)
{
memcpy(data, this->deezData + this->dataPos, len);
this->dataPos += len;
sizeDownloaded += len;
return len;
}
else
{
assert(this->datSize - this->dataPos > 0);
memcpy(data, this->deezData + this->dataPos, this->datSize - this->dataPos);
int temp = this->datSize - this->dataPos;
this->dataPos += this->datSize - this->dataPos;
sizeDownloaded += temp;
return temp;
}
}
this->myConsumer->consume(Name(m_name));
EnterCriticalSection(&this->monitorMutex);
while(this->m_isFinished == false)
SleepConditionVariableCS(&this->contentRetrieved, &this->monitorMutex, INFINITE);
assert(this->datSize != 0);
this->res = true;
LeaveCriticalSection(&this->monitorMutex);
if(this->datSize > (int)len)
{
memcpy(data, this->deezData, len);
this->dataPos += len;
sizeDownloaded += len;
return len;
}
else
{
memcpy(data, this->deezData, this->datSize);
this->dataPos += this->datSize;
sizeDownloaded += this->datSize;
return this->datSize;
}
}
int NDNConnectionConsumerApi::Peek(uint8_t *data, size_t len, IChunk *chunk) {
return -1;
}
bool NDNConnectionConsumerApi::onPacket(Consumer& c, const Data& data)
{
return true;
}
void NDNConnectionConsumerApi::processPayload(Consumer& c, const uint8_t* buffer, size_t bufferSize)
{
EnterCriticalSection(&this->monitorMutex);
this->deezData = (char *)malloc(bufferSize*sizeof(uint8_t));
memcpy(this->deezData, buffer, bufferSize*sizeof(uint8_t));
this->m_isFinished = true;
this->datSize = (int) bufferSize;
WakeAllConditionVariable(&this->contentRetrieved);
LeaveCriticalSection(&this->monitorMutex);
}
double NDNConnectionConsumerApi::GetAverageDownloadingSpeed()
{
Debug("NDNConnection: DL speed is %f\n", this->speed);
return this->speed;
}
double NDNConnectionConsumerApi::GetDownloadingTime()
{
Debug("NDNConnection: DL time is %f\n", this->dnltime);
return this->dnltime;
}
const std::vector<ITCPConnection *> &NDNConnectionConsumerApi::GetTCPConnectionList() const {
return tcpConnections;
}
const std::vector<IHTTPTransaction *> &NDNConnectionConsumerApi::GetHTTPTransactionList() const {
return httpTransactions;
}
void NDNConnectionConsumerApi::notifyStats(double winSize)
{
this->speed = (winSize); // * 1000000 * 1400 * 8;
L("API_NDNConnection:\tNotificationICPDL\t%f\t%f\n", winSize, speed);
}
void NDNConnectionConsumerApi::notifyChunkStats(std::string chunkName, double chunkThroughput) //for measurement on chunk-level
{
L("API_NDNConnection:\tChunk-Information(API)\t%s\t%f\n", chunkName.c_str(), chunkThroughput);
}
} /* namespace input */
} /* namespace framework */
} /* namespace libdash */
#endif //NDEF NDNICPDOWNLOAD
| 7,692 | 27.812734 | 224 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/MediaObject.cpp
|
/*
* MediaObject.cpp
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "MediaObject.h"
#include <inttypes.h>
#include<stdio.h>
using namespace libdash::framework::input;
using namespace dash::mpd;
using namespace dash::network;
using namespace dash::metrics;
MediaObject::MediaObject (ISegment *segment, IRepresentation *rep, bool withFeedBack) :
segment (segment),
rep (rep),
withFeedBack (withFeedBack)
{
InitializeConditionVariable (&this->stateChanged);
InitializeCriticalSection (&this->stateLock);
}
MediaObject::~MediaObject ()
{
if(this->state == IN_PROGRESS)
{
this->segment->AbortDownload();
this->OnDownloadStateChanged(ABORTED);
}
this->segment->DetachDownloadObserver(this);
this->WaitFinished();
DeleteConditionVariable (&this->stateChanged);
DeleteCriticalSection (&this->stateLock);
delete this->segment;
this->segment = NULL;
}
void MediaObject::SetFeedBack(bool flag)
{
this->withFeedBack = flag;
}
bool MediaObject::StartDownload ()
{
this->segment->AttachDownloadObserver(this);
return this->segment->StartDownload();
}
bool MediaObject::StartDownload (INDNConnection* conn)
{
//L("Media_object:\tSTARTING DOWNLOAD %s\n", ((IChunk*)this->segment)->Path().c_str());
if(conn == NULL)
return this->StartDownload();
conn->Init(this->segment);
this->segment->AttachDownloadObserver(this);
return this->segment->StartDownload(conn);
}
const char* MediaObject::GetPath ()
{
return ((IChunk*)this->segment)->Path().c_str();
}
void MediaObject::AbortDownload ()
{
this->segment->AbortDownload();
// L("Media_object:\tABORTED DOWNLOAD %s\n", ((IChunk*)this->segment)->Path().c_str());
this->OnDownloadStateChanged(ABORTED);
}
void MediaObject::WaitFinished (bool isInit)
{
EnterCriticalSection(&this->stateLock);
while(this->state != COMPLETED && this->state != ABORTED){
SleepConditionVariableCS(&this->stateChanged, &this->stateLock, INFINITE);
}
LeaveCriticalSection(&this->stateLock);
if(this->state != ABORTED)
{
if(this->withFeedBack && !isInit)
{
this->dashReceiver->NotifybpsSegment(this->bps); //done by ChunktimeObserver "after every sample" instead of "after every segment"
this->dashReceiver->NotifyDlTime(this->dnltime); //DL time needed to
}
// L("Media_object:\tFINISHED DOWNLOAD %s\n", ((IChunk*)this->segment)->Path().c_str());
}
}
int MediaObject::Read (uint8_t *data, size_t len)
{
return this->segment->Read(data, len);
}
int MediaObject::Peek (uint8_t *data, size_t len)
{
return this->segment->Peek(data, len);
}
int MediaObject::Peek (uint8_t *data, size_t len, size_t offset)
{
return this->segment->Peek(data, len, offset);
}
IRepresentation* MediaObject::GetRepresentation ()
{
return this->rep;
}
void MediaObject::OnDownloadStateChanged (DownloadState state)
{
EnterCriticalSection(&this->stateLock);
this->state = state;
WakeAllConditionVariable(&this->stateChanged);
LeaveCriticalSection(&this->stateLock);
}
void MediaObject::OnDownloadRateChanged (uint64_t bitsPerSecond)
{
this->bps = bitsPerSecond;
}
void MediaObject::OnDownloadTimeChanged (double dnltime)
{
this->dnltime = dnltime;
}
void MediaObject::SetDASHReceiver(input::DASHReceiver *_dashReceiver)
{
this->dashReceiver = _dashReceiver;
}
void MediaObject::SetAdaptationLogic(adaptation::IAdaptationLogic *_adaptationLogic)
{
this->adaptationLogic = _adaptationLogic;
}
const std::vector<ITCPConnection *>& MediaObject::GetTCPConnectionList () const
{
return this->segment->GetTCPConnectionList();
}
const std::vector<IHTTPTransaction *>& MediaObject::GetHTTPTransactionList () const
{
return this->segment->GetHTTPTransactionList();
}
| 4,457 | 29.534247 | 136 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/INDNConnection.h
|
/*
* INDNConnection.h
*
* Author:Jack Samain <[email protected]>
*
*/
#ifndef QTSAMPLEPLAYER_LIBDASHFRAMEWORK_INPUT_INDNCONNECTION_H_
#define QTSAMPLEPLAYER_LIBDASHFRAMEWORK_INPUT_INDNCONNECTION_H_
#include "IConnection.h"
#include "IChunk.h"
namespace libdash {
namespace framework {
namespace input {
class INDNConnection : public dash::network::IConnection {
public:
virtual ~INDNConnection(){};
virtual int Read(uint8_t* data, size_t len) = 0;
virtual void Init(dash::network::IChunk *chunk) = 0;
virtual void InitForMPD(const std::string&) = 0;
};
}
}
}
#endif // QTSAMPLEPLAYER_LIBDASHFRAMEWORK_INPUT_INDNCONNECTION_H_
| 672 | 18.228571 | 65 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/MediaObjectDecoder.cpp
|
/*
* MediaObjectDecoder.cpp
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "MediaObjectDecoder.h"
using namespace sampleplayer::decoder;
using namespace libdash::framework::input;
using namespace dash::mpd;
MediaObjectDecoder::MediaObjectDecoder (MediaObject* initSegment, MediaObject* mediaSegment, IMediaObjectDecoderObserver *observer, bool nodecoding) :
observer (observer),
initSegment (initSegment),
mediaSegment (mediaSegment),
decoderInitialized (false),
initSegmentOffset (0),
threadHandle (NULL),
noDecoding (nodecoding)
{
if(!noDecoding)
{
this->decoder = new LibavDecoder(this);
this->decoder->AttachVideoObserver(this);
this->decoder->AttachAudioObserver(this);
}
}
MediaObjectDecoder::~MediaObjectDecoder()
{
this->WaitForDelete();
if(!noDecoding)
delete this->decoder;
delete this->mediaSegment;
}
bool MediaObjectDecoder::Start ()
{
if(!noDecoding)
{
if(!decoder->Init())
return false;
this->decoderInitialized = true;
this->run = true;
this->threadHandle = CreateThreadPortable (Decode, this);
if(this->threadHandle == NULL)
{
this->run = false;
return false;
}
return true;
}
else
{
this->run = true;
this->threadHandle = CreateThreadPortable (No_Decode, this);
if(this->threadHandle == NULL)
{
this->run = false;
return false;
}
return true;
}
}
void MediaObjectDecoder::Stop ()
{
if (!this->run)
return;
this->run = false;
if (this->threadHandle != NULL)
{
JoinThread(this->threadHandle);
DestroyThreadPortable(this->threadHandle);
}
}
void MediaObjectDecoder::WaitForDelete ()
{
if (this->threadHandle != NULL)
{
JoinThread(this->threadHandle);
DestroyThreadPortable(this->threadHandle);
}
}
void MediaObjectDecoder::OnVideoDataAvailable (const uint8_t **data, videoFrameProperties* props)
{
this->observer->OnVideoFrameDecoded(data, props);
}
void MediaObjectDecoder::OnAudioDataAvailable (const uint8_t **data, audioFrameProperties* props)
{
this->observer->OnAudioSampleDecoded(data, props);
}
void* MediaObjectDecoder::No_Decode (void *data)
{
MediaObjectDecoder *mediaObjectDecoder = (MediaObjectDecoder *) data;
sleep(2);
if (mediaObjectDecoder->run)
{
mediaObjectDecoder->Notify();
return NULL;
}
}
void* MediaObjectDecoder::Decode (void *data)
{
MediaObjectDecoder *mediaObjectDecoder = (MediaObjectDecoder *) data;
while (mediaObjectDecoder->run && mediaObjectDecoder->decoder->Decode());
if (mediaObjectDecoder->run)
{
mediaObjectDecoder->decoder->Flush();
mediaObjectDecoder->decoder->Stop();
mediaObjectDecoder->Notify();
return NULL;
}
mediaObjectDecoder->decoder->Stop();
return NULL;
}
int MediaObjectDecoder::Read (uint8_t *buf, int buf_size)
{
int ret = 0;
if (!this->decoderInitialized && this->initSegment)
{
ret = this->initSegment->Peek(buf, buf_size, this->initSegmentOffset);
this->initSegmentOffset += (size_t) ret;
}
if (ret == 0)
ret = this->mediaSegment->Read(buf, buf_size);
return ret;
}
bool MediaObjectDecoder::IsAudio ()
{
return this->decoder->IsAudio();
}
void MediaObjectDecoder::Notify ()
{
this->observer->OnDecodingFinished();
}
| 3,985 | 24.716129 | 151 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/DASHManager.cpp
|
/*
* DASHManager.cpp
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include <immintrin.h>
#include <tmmintrin.h>
#include "DASHManager.h"
using namespace libdash::framework::input;
using namespace libdash::framework::buffer;
using namespace sampleplayer::decoder;
using namespace dash;
using namespace dash::network;
using namespace dash::mpd;
//To circumvent the stupid refactoring in libavcodec...
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,1)
#define av_frame_alloc avcodec_alloc_frame
#define av_frame_free avcodec_free_frame
#endif
DASHManager::DASHManager (sampleplayer::managers::StreamType type, uint32_t maxCapacity, IDASHManagerObserver* stream, IMPD* mpd, bool ndnEnabled, double ndnAlpha, bool nodecoding, bool chunkGranularityEnabled, int sample) :
readSegmentCount (0),
receiver (NULL),
mediaObjectDecoder (NULL),
multimediaStream (stream),
isRunning (false),
isNDN (ndnEnabled),
ndnAlpha (ndnAlpha),
noDecoding (nodecoding),
chunkGranularity (chunkGranularityEnabled),
samplesize (sample)
{
this->buffer = new MediaObjectBuffer(type, maxCapacity);
this->buffer->AttachObserver(this);
this->receiver = new DASHReceiver(mpd, this, this->buffer, maxCapacity, this->IsNDN(), this->ndnAlpha, this->chunkGranularity, this->samplesize);
}
DASHManager::~DASHManager ()
{
this->Stop();
delete this->receiver;
delete this->buffer;
this->receiver = NULL;
this->buffer = NULL;
}
bool DASHManager::IsNDN ()
{
return this->isNDN;
}
void DASHManager::ShouldAbort ()
{
Debug("DASH MANAGER: ABORT REQUEST\n");
this->receiver->ShouldAbort();
}
bool DASHManager::Start ()
{
this->receiver->SetAdaptationLogic(this->adaptationLogic);
if (!this->receiver->Start())
return false;
if (!this->CreateAVDecoder())
return false;
this->isRunning = true;
return true;
}
void DASHManager::Stop ()
{
if (!this->isRunning)
return;
this->isRunning = false;
this->receiver->Stop();
this->mediaObjectDecoder->Stop();
this->buffer->Clear();
}
uint32_t DASHManager::GetPosition ()
{
return this->receiver->GetPosition();
}
void DASHManager::SetPosition (uint32_t segmentNumber)
{
this->receiver->SetPosition(segmentNumber);
}
void DASHManager::SetPositionInMsec (uint32_t milliSecs)
{
this->receiver->SetPositionInMsecs(milliSecs);
}
void DASHManager::SetAdaptationLogic (libdash::framework::adaptation::IAdaptationLogic *_adaptationLogic)
{
this->adaptationLogic = _adaptationLogic;
}
void DASHManager::Clear ()
{
this->buffer->Clear();
}
/*void DASHManager::ClearTail ()
{
this->buffer->ClearTail();
}
*/
void DASHManager::SetRepresentation (IPeriod *period, IAdaptationSet *adaptationSet, IRepresentation *representation)
{
this->receiver->SetRepresentation(period, adaptationSet, representation);
//this->buffer->ClearTail();
}
void DASHManager::EnqueueRepresentation (IPeriod *period, IAdaptationSet *adaptationSet, IRepresentation *representation)
{
this->receiver->SetRepresentation(period, adaptationSet, representation);
}
void DASHManager::OnVideoFrameDecoded (const uint8_t **data, videoFrameProperties* props)
{
/* TODO: some error handling here */
if (data == NULL || props->fireError)
{
Debug("data is %sNULL and %serror was fired\n", (data==NULL)? "" : "not ", (props->fireError)?"":"no ");
return;
}
int w = props->width;
int h = props->height;
//AVFrame *rgbframe = avcodec_alloc_frame();
AVFrame *rgbframe = av_frame_alloc();
int numBytes = avpicture_get_size(AV_PIX_FMT_RGB24, w, h);
uint8_t *buffer = (uint8_t*)av_malloc(numBytes);
avpicture_fill((AVPicture*)rgbframe, buffer, AV_PIX_FMT_RGB24, w, h);
SwsContext *imgConvertCtx = sws_getContext(props->width, props->height, (AVPixelFormat)props->pxlFmt, w, h, AV_PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL);
sws_scale(imgConvertCtx, data, props->linesize, 0, h, rgbframe->data, rgbframe->linesize);
uint8_t *src = (uint8_t *)rgbframe->data[0];
QImage *image = new QImage(w, h, QImage::Format_RGB32);
//TRYING to tackle efficiency issue by multithreading the rendering
///*
int numberOfThreads = 3;
Container* m_Containers[numberOfThreads];
THREAD_HANDLE m_threads[numberOfThreads];
for(int i=0; i < numberOfThreads; i++)
{
m_Containers[i] = (Container *)malloc(sizeof(struct Container));
m_Containers[i]->number = i;
m_Containers[i]->total = numberOfThreads;
m_Containers[i]->height = h;
m_Containers[i]->width = w;
m_Containers[i]->src = src + i * (h/numberOfThreads - 1) *rgbframe->linesize[0];
m_Containers[i]->image = image;
m_Containers[i]->linesize = rgbframe->linesize[0];
m_threads[i] = CreateThreadPortable(AV2QImage, m_Containers[i]);
}
for(int i = 0; i < numberOfThreads; i++)
{
JoinThread(m_threads[i]);
}
for(int i=0; i < numberOfThreads; i++)
free(m_Containers[i]);
//*/
/* for (size_t y = 0; y < h; y++)
{
QRgb *scanLine = (QRgb *)image->scanLine(y);
for(size_t x = 0; x < w; x ++)
{
scanLine[x] = qRgb(src[3*x],src[3*x + 1],src[3*x + 2]);
}
src += rgbframe->linesize[0];
}*/
this->multimediaStream->AddFrame(image);
//delete image;
//image = NULL;
av_free(rgbframe);
av_free(buffer);
sws_freeContext(imgConvertCtx);
imgConvertCtx = NULL;
}
/* in and out must be 16-byte aligned */
void DASHManager::rgb_to_bgrx_sse(unsigned w, const void *in, void *out)
{
const __m128i *in_vec = in;
__m128i *out_vec = out;
w /= 16;
while (w-- > 0) {
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
* in_vec[0] Ra Ga Ba Rb Gb Bb Rc Gc Bc Rd Gd Bd Re Ge Be Rf
* in_vec[1] Gf Bf Rg Gg Bg Rh Gh Bh Ri Gi Bi Rj Gj Bj Rk Gk
* in_vec[2] Bk Rl Gl Bl Rm Gm Bm Rn Gn Bn Ro Go Bo Rp Gp Bp
*/
__m128i in1, in2, in3;
__m128i out;
in1 = in_vec[0];
out = _mm_shuffle_epi8(in1,
_mm_set_epi8(0xff, 9, 10, 11, 0xff, 6, 7, 8, 0xff, 3, 4, 5, 0xff, 0, 1, 2));
out = _mm_or_si128(out,
_mm_set_epi8(0xff, 0, 0, 0, 0xff, 0, 0, 0, 0xff, 0, 0, 0, 0xff, 0, 0, 0));
out_vec[0] = out;
in2 = in_vec[1];
in1 = _mm_and_si128(in1,
_mm_set_epi8(0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0));
out = _mm_and_si128(in2,
_mm_set_epi8(0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff));
out = _mm_or_si128(out, in1);
out = _mm_shuffle_epi8(out,
_mm_set_epi8(0xff, 5, 6, 7, 0xff, 2, 3, 4, 0xff, 15, 0, 1, 0xff, 12, 13, 14));
out = _mm_or_si128(out,
_mm_set_epi8(0xff, 0, 0, 0, 0xff, 0, 0, 0, 0xff, 0, 0, 0, 0xff, 0, 0, 0));
out_vec[1] = out;
in3 = in_vec[2];
in_vec += 3;
in2 = _mm_and_si128(in2,
_mm_set_epi8(0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0));
out = _mm_and_si128(in3,
_mm_set_epi8(0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff));
out = _mm_or_si128(out, in2);
out = _mm_shuffle_epi8(out,
_mm_set_epi8(0xff, 1, 2, 3, 0xff, 14, 15, 0, 0xff, 11, 12, 13, 0xff, 8, 9, 10));
out = _mm_or_si128(out,
_mm_set_epi8(0xff, 0, 0, 0, 0xff, 0, 0, 0, 0xff, 0, 0, 0, 0xff, 0, 0, 0));
out_vec[2] = out;
out = _mm_shuffle_epi8(in3,
_mm_set_epi8(0xff, 13, 14, 15, 0xff, 10, 11, 12, 0xff, 7, 8, 9, 0xff, 4, 5, 6));
out = _mm_or_si128(out,
_mm_set_epi8(0xff, 0, 0, 0, 0xff, 0, 0, 0, 0xff, 0, 0, 0, 0xff, 0, 0, 0));
out_vec[3] = out;
out_vec += 4;
}
}
void* DASHManager::AV2QImage (void* data)
{
Container *m_container = (Container *) data;
for(size_t y = (m_container->height / m_container->total)*m_container->number; y < ((m_container->number == m_container->total - 1) ? m_container->height : (m_container->height / m_container->total) * (m_container->number + 1) ); y++)
{
QRgb *scanLine = (QRgb *)m_container->image->scanLine(y);
rgb_to_bgrx_sse(m_container->width, m_container->src, (void *) scanLine);
/*for(size_t x = 0; x < m_container->width; x ++)
{
scanLine[x] = qRgb(m_container->src[3*x],m_container->src[3*x + 1],m_container->src[3*x + 2]);
}*/
m_container->src += m_container->linesize;
}
}
void DASHManager::OnAudioSampleDecoded (const uint8_t **data, audioFrameProperties* props)
{
/* TODO: some error handling here */
if (data == NULL || props->fireError)
return;
QAudioFormat *format = new QAudioFormat();
format->setSampleRate(props->sampleRate);
format->setChannelCount(props->channels);
format->setSampleSize(props->samples);
format->setCodec("audio/pcm");
format->setByteOrder(QAudioFormat::LittleEndian);
format->setSampleType(QAudioFormat::Float);
Debug("chunksize: %d, sampleRate: %d, samples: %d\n",props->chunkSize, props->sampleRate, props->samples);
AudioChunk *samples = new AudioChunk(format, (char*)data[0], props->linesize);
this->multimediaStream->AddSamples(samples);
}
void DASHManager::OnBufferStateChanged (uint32_t fillstateInPercent)
{
this->multimediaStream->OnSegmentBufferStateChanged(fillstateInPercent);
if(this->adaptationLogic->IsBufferBased())
this->receiver->OnSegmentBufferStateChanged(fillstateInPercent);
}
void DASHManager::OnEOS (bool value)
{
if(this->adaptationLogic->IsBufferBased())
this->receiver->OnEOS(value);
}
void DASHManager::OnSegmentDownloaded ()
{
this->readSegmentCount++;
// notify observers
}
void DASHManager::OnDecodingFinished ()
{
if (this->isRunning)
this->CreateAVDecoder();
}
bool DASHManager::CreateAVDecoder ()
{
MediaObject *mediaObject = this->buffer->GetFront();
// initSegForMediaObject may be NULL => BaseUrls
if (!mediaObject)
{
//No media Object here means that the stream is finished ? Feels like it is but need to check TODO
this->multimediaStream->SetEOS(true);
return false;
}
MediaObject *initSegForMediaObject = this->receiver->FindInitSegment(mediaObject->GetRepresentation());
if(this->mediaObjectDecoder)
{
delete this->mediaObjectDecoder;
}
this->mediaObjectDecoder = new MediaObjectDecoder(initSegForMediaObject, mediaObject, this, this->noDecoding);
return this->mediaObjectDecoder->Start();
}
void DASHManager::FastForward ()
{
this->receiver->FastForward();
}
void DASHManager::FastRewind ()
{
this->receiver->FastRewind();
}
void DASHManager::SetTargetDownloadingTime (double target)
{
this->receiver->SetTargetDownloadingTime(target);
}
| 11,148 | 31.037356 | 235 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/DASHManager.h
|
/*
* DASHManager.h
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_INPUT_DASHMANAGER_H_
#define LIBDASH_FRAMEWORK_INPUT_DASHMANAGER_H_
#include "../Buffer/MediaObjectBuffer.h"
#include "DASHReceiver.h"
#include "../../Decoder/IVideoObserver.h"
#include "IDASHReceiverObserver.h"
#include "IMediaObjectDecoderObserver.h"
#include "MediaObjectDecoder.h"
#include "libdash.h"
#include "IMPD.h"
#include <QtMultimedia/qaudioformat.h>
#include "IDASHManagerObserver.h"
#include "../Buffer/AudioChunk.h"
#include "../Buffer/IMediaObjectBufferObserver.h"
namespace libdash
{
namespace framework
{
namespace input
{
struct Container
{
int height;
int width;
int total;
int number;
QImage* image;
uint8_t* src;
int linesize;
};
class DASHManager : public IDASHReceiverObserver, public IMediaObjectDecoderObserver, public buffer::IMediaObjectBufferObserver
{
public:
DASHManager (sampleplayer::managers::StreamType type, uint32_t maxCapacity, IDASHManagerObserver *multimediaStream, dash::mpd::IMPD *mpd, bool ndnEnabled, double ndnAlpha, bool nodecoding, bool chunkGranularityEnabled, int sample);
virtual ~DASHManager ();
static void rgb_to_bgrx_sse(unsigned w, const void *in, void *out);
bool Start ();
void Stop ();
uint32_t GetPosition ();
void SetPosition (uint32_t segmentNumber); // to implement
void SetPositionInMsec (uint32_t millisec);
void Clear ();
void ClearTail ();
void SetRepresentation (dash::mpd::IPeriod *period, dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation);
void EnqueueRepresentation (dash::mpd::IPeriod *period, dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation);
void OnSegmentDownloaded ();
void OnDecodingFinished ();
void OnVideoFrameDecoded (const uint8_t **data, sampleplayer::decoder::videoFrameProperties* props);
void OnAudioSampleDecoded (const uint8_t **data, sampleplayer::decoder::audioFrameProperties* props);
void OnBufferStateChanged (uint32_t fillstateInPercent);
void OnEOS (bool value);
void SetAdaptationLogic (libdash::framework::adaptation::IAdaptationLogic *_adaptationLogic);
bool IsNDN ();
void ShouldAbort ();
void FastForward ();
void FastRewind ();
void SetTargetDownloadingTime(double);
private:
bool CreateAVDecoder ();
static void* AV2QImage (void* data);
buffer::MediaObjectBuffer *buffer;
MediaObjectDecoder *mediaObjectDecoder;
DASHReceiver *receiver;
uint32_t readSegmentCount;
IDASHManagerObserver *multimediaStream;
bool isRunning;
bool isNDN;
double ndnAlpha;
bool noDecoding;
bool chunkGranularity;
int samplesize;
libdash::framework::adaptation::IAdaptationLogic *adaptationLogic;
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_INPUT_DASHMANAGER_H_ */
| 4,356 | 41.715686 | 263 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/DASHReceiver.h
|
/*
* DASHReceiver.h
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_INPUT_DASHRECEIVER_H_
#define LIBDASH_FRAMEWORK_INPUT_DASHRECEIVER_H_
#include "libdash.h"
#include "IMPD.h"
#include "../Input/MediaObject.h"
#include "IDASHReceiverObserver.h"
#include "../Buffer/MediaObjectBuffer.h"
#include "../MPD/AdaptationSetStream.h"
#include "../MPD/IRepresentationStream.h"
#include "../Portable/MultiThreading.h"
#include <chrono>
#ifdef NDNICPDOWNLOAD
#include "NDNConnection.h"
#else
#include "NDNConnectionConsumerApi.h"
#endif
namespace libdash
{
namespace framework
{
namespace adaptation
{
class IAdaptationLogic;
}
namespace buffer
{
class MediaObjectBuffer;
}
namespace input
{
class MediaObject;
class DASHReceiver
{
public:
DASHReceiver (dash::mpd::IMPD *mpd, IDASHReceiverObserver *obs, buffer::MediaObjectBuffer *buffer, uint32_t bufferSize, bool ndnEnabled, double ndnAlpha, bool chunkGranularityEnabled, int sample);
virtual ~DASHReceiver ();
bool Start ();
void Stop ();
input::MediaObject* GetNextSegment ();
input::MediaObject* GetSegment (uint32_t segmentNumber);
input::MediaObject* GetInitSegment ();
input::MediaObject* FindInitSegment (dash::mpd::IRepresentation *representation);
uint32_t GetPosition ();
void SetPosition (uint32_t segmentNumber);
void SetPositionInMsecs (uint32_t milliSecs);
dash::mpd::IRepresentation* GetRepresentation ();
void SetRepresentation (dash::mpd::IPeriod *period,
dash::mpd::IAdaptationSet *adaptationSet,
dash::mpd::IRepresentation *representation);
void SetAdaptationLogic (adaptation::IAdaptationLogic *_adaptationLogic);
libdash::framework::adaptation::IAdaptationLogic* GetAdaptationLogic ();
void Notifybps (uint64_t bps);
void NotifybpsSegment (uint64_t bps);
void NotifybpsChunk (uint64_t bps);
void NotifyContextChunk (uint64_t rtt, uint64_t numHops);
void NotifyDlTime (double dnltime);
void NotifyBitrateChange (dash::mpd::IRepresentation *representation);
void OnSegmentBufferStateChanged(uint32_t fillstateInPercent);
bool IsNDN ();
void ShouldAbort ();
void Seeking (int);
void FastForward ();
void FastRewind ();
void OnEOS (bool value);
void SetTargetDownloadingTime(double);
void NotifyCheckedAdaptationLogic();
bool threadComplete;
private:
uint32_t CalculateSegmentOffset ();
void NotifySegmentDownloaded (double bufferFillPct, int segNum, int quality);
void DownloadInitSegment (dash::mpd::IRepresentation* rep);
bool InitSegmentExists (dash::mpd::IRepresentation* rep);
bool withFeedBack;
static void* DoBuffering (void *receiver);
std::map<dash::mpd::IRepresentation*, MediaObject*> initSegments;
buffer::MediaObjectBuffer *buffer;
IDASHReceiverObserver *observer;
dash::mpd::IMPD *mpd;
dash::mpd::IPeriod *period;
dash::mpd::IAdaptationSet *adaptationSet;
dash::mpd::IRepresentation *representation;
mpd::AdaptationSetStream *adaptationSetStream;
mpd::IRepresentationStream *representationStream;
uint32_t segmentNumber;
uint32_t positionInMsecs;
uint32_t segmentOffset;
uint32_t bufferSize;
mutable CRITICAL_SECTION monitorMutex;
mutable CRITICAL_SECTION monitorPausedMutex;
mutable CONDITION_VARIABLE paused;
bool isPaused;
bool isScheduledPaced;
double targetDownload;
double downloadingTime;
adaptation::IAdaptationLogic *adaptationLogic;
INDNConnection* conn;
INDNConnection* initConn;
THREAD_HANDLE bufferingThread;
bool isBuffering;
bool isNDN;
double ndnAlpha;
int previousQuality;
bool chunkGranularity;
int samplesize;
ChunktimeObserver* chunktimeObs;
std::map<int, std::vector<int>> rttMap;
std::map<int, std::vector<int>> numHopsMap;
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_INPUT_DASHRECEIVER_H_ */
| 6,681 | 48.132353 | 227 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/MediaObject.h
|
/*
* MediaObject.h
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_INPUT_MEDIAOBJECT_H_
#define LIBDASH_FRAMEWORK_INPUT_MEDIAOBJECT_H_
#include "../Adaptation/IAdaptationLogic.h"
#include "IMPD.h"
#include "IDownloadObserver.h"
#include "IDASHMetrics.h"
#include "../Portable/MultiThreading.h"
#ifdef NDNICPDOWNLOAD
#include "NDNConnection.h"
#else
#include "NDNConnectionConsumerApi.h"
#endif
namespace libdash
{
namespace framework
{
namespace adaptation
{
class IAdaptationLogic;
}
namespace input
{
class DASHReceiver;
class MediaObject : public dash::network::IDownloadObserver, public dash::metrics::IDASHMetrics
{
public:
MediaObject (dash::mpd::ISegment *segment, dash::mpd::IRepresentation *rep, bool withFeedBack = false);
virtual ~MediaObject ();
bool StartDownload ();
bool StartDownload (INDNConnection* conn);
void AbortDownload ();
void WaitFinished (bool isInit=false);
int Read (uint8_t *data, size_t len);
int Peek (uint8_t *data, size_t len);
int Peek (uint8_t *data, size_t len, size_t offset);
dash::mpd::IRepresentation* GetRepresentation ();
const char* GetPath ();
void SetFeedBack (bool flag);
virtual void OnDownloadStateChanged (dash::network::DownloadState state);
virtual void OnDownloadRateChanged (uint64_t bytesDownloaded); //Here the bytesDownloaded is in fact the bitrate bps
virtual void OnDownloadTimeChanged (double dnltime);
/*
* IDASHMetrics
*/
const std::vector<dash::metrics::ITCPConnection *>& GetTCPConnectionList () const;
const std::vector<dash::metrics::IHTTPTransaction *>& GetHTTPTransactionList () const;
void SetAdaptationLogic(framework::adaptation::IAdaptationLogic *_adaptationLogic);
void SetDASHReceiver(input::DASHReceiver *_dashReceiver);
private:
dash::mpd::ISegment *segment;
dash::mpd::IRepresentation *rep;
dash::network::DownloadState state;
uint64_t bps;
double dnltime;
bool withFeedBack;
input::DASHReceiver *dashReceiver;
adaptation::IAdaptationLogic *adaptationLogic;
mutable CRITICAL_SECTION stateLock;
mutable CONDITION_VARIABLE stateChanged;
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_INPUT_MEDIAOBJECT_H_ */
| 3,591 | 41.258824 | 144 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/IMediaObjectDecoderObserver.h
|
/*
* IMediaObjectDecoderObserver.h
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_INPUT_IMEDIAOBJECTDECODEROBSERVER_H_
#define LIBDASH_FRAMEWORK_INPUT_IMEDIAOBJECTDECODEROBSERVER_H_
#include "../../Decoder/IAudioObserver.h"
#include "../../Decoder/IVideoObserver.h"
namespace libdash
{
namespace framework
{
namespace input
{
class IMediaObjectDecoderObserver
{
public:
virtual ~IMediaObjectDecoderObserver () {}
virtual void OnDecodingFinished () = 0;
virtual void OnVideoFrameDecoded (const uint8_t **data, sampleplayer::decoder::videoFrameProperties* props) = 0;
virtual void OnAudioSampleDecoded (const uint8_t **data, sampleplayer::decoder::audioFrameProperties* props) = 0;
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_INPUT_IMEDIAOBJECTDECODEROBSERVER_H_ */
| 1,419 | 37.378378 | 140 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/IDASHManagerObserver.h
|
/*
* IDASHManagerObserver.h
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_INPUT_IDASHMANAGEROBSERVER_H_
#define LIBDASH_FRAMEWORK_INPUT_IDASHMANAGEROBSERVER_H_
#include <QImage>
#include "../Buffer/AudioChunk.h"
#include "../Buffer/Buffer.h"
namespace libdash
{
namespace framework
{
namespace input
{
class IDASHManagerObserver
{
public:
virtual ~IDASHManagerObserver () {}
virtual void AddFrame (QImage *frame) = 0;
//virtual void AddFrame (ImageWrap *frame) = 0;
virtual void AddSamples (buffer::AudioChunk *samples) = 0;
virtual void SetEOS (bool value) = 0;
//virtual void AddSubtitle () = 0;
virtual void OnSegmentBufferStateChanged (uint32_t fillstateInPercent) = 0;
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_INPUT_IDASHMANAGEROBSERVER_H_ */
| 1,441 | 33.333333 | 97 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Input/IDataReceiver.h
|
/*
* IDataReceiver.h
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_INPUT_IDATARECEIVER_H_
#define LIBDASH_FRAMEWORK_INPUT_IDATARECEIVER_H_
#include <stdint.h>
namespace libdash
{
namespace framework
{
namespace input
{
class IDataReceiver
{
public:
virtual ~IDataReceiver () {}
virtual int Read (uint8_t *buf, int buf_size ) = 0;
virtual bool IsAudio () = 0;
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_INPUT_IDATARECEIVER_H_ */
| 974 | 26.857143 | 79 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/AdaptationSetStream.h
|
/*
* AdaptationSetStream.h
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_MPD_ADAPTATIONSETSTREAM_H_
#define LIBDASH_FRAMEWORK_MPD_ADAPTATIONSETSTREAM_H_
#include "IRepresentationStream.h"
#include "IRepresentation.h"
#include "IMPD.h"
#include "IPeriod.h"
#include "IAdaptationSet.h"
#include "RepresentationStreamFactory.h"
#include "BaseUrlResolver.h"
namespace libdash
{
namespace framework
{
namespace mpd
{
class AdaptationSetStream
{
public:
AdaptationSetStream (dash::mpd::IMPD *mpd, dash::mpd::IPeriod *period, dash::mpd::IAdaptationSet *adaptationSet);
virtual ~AdaptationSetStream ();
IRepresentationStream* GetRepresentationStream (dash::mpd::IRepresentation *representation);
private:
RepresentationStreamType DetermineRepresentationStreamType (dash::mpd::IRepresentation *representation);
void Initialize ();
std::map<dash::mpd::IRepresentation *, IRepresentationStream *> representations;
dash::mpd::IMPD *mpd;
dash::mpd::IPeriod *period;
dash::mpd::IAdaptationSet *adaptationSet;
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_MPD_ADAPTATIONSETSTREAM_H_ */
| 1,961 | 37.470588 | 145 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/TimeResolver.cpp
|
/*
* TimeResolver.cpp
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "TimeResolver.h"
using namespace libdash::framework::mpd;
bool TimeResolver::CheckTimeInterval (std::string availabilityStartTime, std::string availabilityEndTime)
{
struct tm* startTime = TimeResolver::ResolveUTCDateTime(availabilityStartTime);
struct tm* currentTime = TimeResolver::GetCurrentUTCTime();
struct tm* endTime = TimeResolver::ResolveUTCDateTime(availabilityEndTime);
if (!startTime)
{
if (!endTime)
return true;
if (difftime(mktime(endTime),mktime(currentTime)) > 0)
return true;
}
else
{
if (difftime(mktime(currentTime),mktime(startTime)) > 0)
{
if (!endTime)
return true;
if (difftime(mktime(endTime),mktime(currentTime)) > 0)
return true;
}
}
return false;
}
uint32_t TimeResolver::GetCurrentTimeInSec ()
{
return mktime(TimeResolver::GetCurrentUTCTime());
}
uint32_t TimeResolver::GetUTCDateTimeInSec (const std::string& datetime)
{
return mktime(TimeResolver::ResolveUTCDateTime(datetime));
}
double TimeResolver::GetDurationInSec (const std::string& duration)
{
/* no check for duration with yyyy,dd,mm */
if (duration == "" || duration.substr(0, 2) != "PT")
return 0;
size_t startPos = 2;
size_t endPos = std::string::npos;
uint32_t hours = 0;
uint32_t mins = 0;
double secs = 0;
char designators[] = { 'H', 'M', 'S' };
endPos = duration.find(designators[0], startPos);
if (endPos != std::string::npos)
{
hours = strtol(duration.substr(startPos, endPos - startPos).c_str(), NULL, 10);
startPos = endPos + 1;
}
endPos = duration.find(designators[1], startPos);
if (endPos != std::string::npos)
{
mins = strtol(duration.substr(startPos, endPos - startPos).c_str(), NULL, 10);
startPos = endPos + 1;
}
endPos = duration.find(designators[2], startPos);
if (endPos != std::string::npos)
secs = strtod(duration.substr(startPos, endPos - startPos).c_str(), NULL);
return hours*3600 + mins*60 + secs;
}
struct tm* TimeResolver::ResolveUTCDateTime (const std::string& dateTimeString)
{
if (dateTimeString == "")
return NULL;
time_t rawtime;
struct tm* timeInfo;
time ( &rawtime );
timeInfo = gmtime ( &rawtime );
std::string timeString = dateTimeString.substr();
timeString = timeString.substr(0, timeString.size()-1);
std::vector<std::string> dateTime = SplitToStr(timeString, 'T');
std::vector<int> dateChunks = SplitToI(dateTime.at(0), '-');
std::vector<int> timeChunks = SplitToI(dateTime.at(1), ':');
timeInfo->tm_year = dateChunks.at(0) - 1900;
timeInfo->tm_mon = dateChunks.at(1) - 1;
timeInfo->tm_mday = dateChunks.at(2);
timeInfo->tm_hour = timeChunks.at(0);
timeInfo->tm_min = timeChunks.at(1);
timeInfo->tm_sec = timeChunks.at(2);
return timeInfo;
}
struct tm* TimeResolver::GetCurrentUTCTime ()
{
time_t rawTime;
time(&rawTime);
return gmtime(&rawTime);
}
std::vector<int> TimeResolver::SplitToI (const std::string &s, char delim)
{
std::stringstream ss(s);
std::string item;
std::vector<int> integers;
while(std::getline(ss, item, delim))
integers.push_back((int)strtol(item.c_str(), NULL, 10));
return integers;
}
std::vector<std::string> TimeResolver::SplitToStr (const std::string &s, char delim)
{
std::stringstream ss(s);
std::string item;
std::vector<std::string> strings;
while(std::getline(ss, item, delim))
strings.push_back(item);
return strings;
}
| 4,380 | 29.423611 | 130 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/TimeResolver.h
|
/*
* TimeResolver.h
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_MPD_TIMERESOLVER_H_
#define LIBDASH_FRAMEWORK_MPD_TIMERESOLVER_H_
#include <time.h>
#include "config.h"
namespace libdash
{
namespace framework
{
namespace mpd
{
class TimeResolver
{
public:
static bool CheckTimeInterval (std::string availabilityStartTime, std::string availabilityEndTime);
static uint32_t GetCurrentTimeInSec ();
static uint32_t GetUTCDateTimeInSec (const std::string& datetime);
static double GetDurationInSec (const std::string& duration);
private:
static struct tm* ResolveUTCDateTime (const std::string& timeString);
static struct tm* GetCurrentUTCTime ();
static std::vector<int> SplitToI (const std::string &s, char delim);
static std::vector<std::string> SplitToStr (const std::string &s, char delim);
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_MPD_TIMERESOLVER_H_ */
| 1,601 | 35.409091 | 129 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/SingleMediaSegmentStream.h
|
/*
* SingleMediaSegmentStream.h
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_MPD_SINGLEMEDIASEGMENTSTREAM_H_
#define LIBDASH_FRAMEWORK_MPD_SINGLEMEDIASEGMENTSTREAM_H_
#include "IMPD.h"
#include "AbstractRepresentationStream.h"
#include "ISegment.h"
namespace libdash
{
namespace framework
{
namespace mpd
{
class SingleMediaSegmentStream: public AbstractRepresentationStream
{
public:
SingleMediaSegmentStream (dash::mpd::IMPD *mpd, dash::mpd::IPeriod *period, dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation);
virtual ~SingleMediaSegmentStream ();
virtual dash::mpd::ISegment* GetInitializationSegment ();
virtual dash::mpd::ISegment* GetIndexSegment (size_t segmentNumber);
virtual dash::mpd::ISegment* GetMediaSegment (size_t segmentNumber);
virtual dash::mpd::ISegment* GetBitstreamSwitchingSegment ();
virtual RepresentationStreamType GetStreamType ();
virtual uint32_t GetFirstSegmentNumber ();
virtual uint32_t GetCurrentSegmentNumber ();
virtual uint32_t GetLastSegmentNumber ();
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_MPD_SINGLEMEDIASEGMENTSTREAM_H_ */
| 1,972 | 41.891304 | 192 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/BaseUrlResolver.h
|
/*
* BaseUrlResolver.h
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_MPD_BASEURLRESOLVER_H_
#define LIBDASH_FRAMEWORK_MPD_BASEURLRESOLVER_H_
#include "IMPD.h"
namespace libdash
{
namespace framework
{
namespace mpd
{
class BaseUrlResolver
{
public:
static std::vector<dash::mpd::IBaseUrl *> ResolveBaseUrl (dash::mpd::IMPD *mpd, dash::mpd::IPeriod *period, dash::mpd::IAdaptationSet *adaptationSet,
size_t mpdBaseUrl, size_t periodBaseUrl, size_t adaptationSetBaseUrl);
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_MPD_BASEURLRESOLVER_H_ */
| 1,122 | 32.029412 | 173 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/AbstractRepresentationStream.h
|
/*
* AbstractRepresentationStream.h
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_MPD_ABSTRACTREPRESENTATIONSTREAM_H_
#define LIBDASH_FRAMEWORK_MPD_ABSTRACTREPRESENTATIONSTREAM_H_
#include "IRepresentationStream.h"
#include "IBaseUrl.h"
#include "IRepresentation.h"
#include "IAdaptationSet.h"
#include "IMPD.h"
#include "IPeriod.h"
#include "BaseUrlResolver.h"
#include "TimeResolver.h"
namespace libdash
{
namespace framework
{
namespace mpd
{
class AbstractRepresentationStream : public IRepresentationStream
{
public:
AbstractRepresentationStream (dash::mpd::IMPD *mpd, dash::mpd::IPeriod *period, dash::mpd::IAdaptationSet *adaptationSet,
dash::mpd::IRepresentation *representation);
virtual ~AbstractRepresentationStream ();
virtual dash::mpd::ISegment* GetInitializationSegment () = 0;
virtual dash::mpd::ISegment* GetIndexSegment (size_t segmentNumber) = 0;
virtual dash::mpd::ISegment* GetMediaSegment (size_t segmentNumber) = 0;
virtual dash::mpd::ISegment* GetBitstreamSwitchingSegment () = 0;
virtual RepresentationStreamType GetStreamType () = 0;
virtual uint32_t GetSize ();
virtual uint32_t GetFirstSegmentNumber ();
virtual uint32_t GetCurrentSegmentNumber ();
virtual uint32_t GetLastSegmentNumber ();
virtual uint32_t GetAverageSegmentDuration ();
protected:
virtual void SetBaseUrls (const std::vector<dash::mpd::IBaseUrl *> baseurls);
std::vector<dash::mpd::IBaseUrl *> baseUrls;
dash::mpd::IMPD *mpd;
dash::mpd::IPeriod *period;
dash::mpd::IAdaptationSet *adaptationSet;
dash::mpd::IRepresentation *representation;
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_ADAPTATION_ABSTRACTADAPTATIONLOGIC_H_ */
| 2,896 | 45.725806 | 152 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/SingleMediaSegmentStream.cpp
|
/*
* SingleMediaSegmentStream.cpp
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "SingleMediaSegmentStream.h"
using namespace dash::mpd;
using namespace libdash::framework::mpd;
SingleMediaSegmentStream::SingleMediaSegmentStream (IMPD *mpd, IPeriod *period, IAdaptationSet *adaptationSet, IRepresentation *representation) :
AbstractRepresentationStream (mpd, period, adaptationSet, representation)
{
this->baseUrls = BaseUrlResolver::ResolveBaseUrl(mpd, period, adaptationSet, 0, 0, 0);
}
SingleMediaSegmentStream::~SingleMediaSegmentStream ()
{
}
ISegment* SingleMediaSegmentStream::GetInitializationSegment ()
{
if (this->representation->GetSegmentBase())
{
/* TODO: check whether @sourceURL and/or @range is available in SegmentBase.Initialization, see Table 13 */
if (this->representation->GetSegmentBase()->GetInitialization())
return this->representation->GetSegmentBase()->GetInitialization()->ToSegment(baseUrls);
}
return NULL;
}
ISegment* SingleMediaSegmentStream::GetIndexSegment (size_t segmentNumber)
{
/* segmentNumber is not used in this case */
if (this->representation->GetSegmentBase())
{
if (this->representation->GetSegmentBase()->GetRepresentationIndex())
return this->representation->GetSegmentBase()->GetRepresentationIndex()->ToSegment(baseUrls);
}
return NULL;
}
ISegment* SingleMediaSegmentStream::GetMediaSegment (size_t segmentNumber)
{
/* segmentNumber equals the desired BaseUrl */
if (this->representation->GetBaseURLs().size() > segmentNumber)
return this->representation->GetBaseURLs().at(segmentNumber)->ToMediaSegment(baseUrls);
return this->representation->GetBaseURLs().at(0)->ToMediaSegment(baseUrls);
}
ISegment* SingleMediaSegmentStream::GetBitstreamSwitchingSegment ()
{
/* not possible */
return NULL;
}
RepresentationStreamType SingleMediaSegmentStream::GetStreamType ()
{
return SingleMediaSegment;
}
uint32_t SingleMediaSegmentStream::GetFirstSegmentNumber ()
{
return 0;
}
uint32_t SingleMediaSegmentStream::GetCurrentSegmentNumber ()
{
return 0;
}
uint32_t SingleMediaSegmentStream::GetLastSegmentNumber ()
{
return 0;
}
| 2,827 | 36.210526 | 150 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/AdaptationSetStream.cpp
|
/*
* AbstractRepresentationStream.cpp
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "AdaptationSetStream.h"
using namespace libdash::framework::mpd;
using namespace dash::mpd;
AdaptationSetStream::AdaptationSetStream (IMPD *mpd, IPeriod *period, IAdaptationSet *adaptationSet) :
mpd (mpd),
period (period),
adaptationSet (adaptationSet)
{
Initialize();
}
AdaptationSetStream::~AdaptationSetStream()
{
std::map<IRepresentation *, IRepresentationStream *>::iterator iter;
for (iter = representations.begin(); iter != representations.end(); ++iter)
{
delete(iter->second);
}
}
IRepresentationStream* AdaptationSetStream::GetRepresentationStream (IRepresentation *representation)
{
return this->representations.find(representation)->second;
}
RepresentationStreamType AdaptationSetStream::DetermineRepresentationStreamType (IRepresentation *representation)
{
/* check on Representation Level */
if (representation->GetSegmentList())
return libdash::framework::mpd::SegmentList;
if (representation->GetSegmentTemplate())
return libdash::framework::mpd::SegmentTemplate;
if (representation->GetSegmentBase() || representation->GetBaseURLs().size() > 0)
return libdash::framework::mpd::SingleMediaSegment;
/* check on AdaptationSet Level */
if (this->adaptationSet->GetSegmentList())
return libdash::framework::mpd::SegmentList;
if (this->adaptationSet->GetSegmentTemplate())
return libdash::framework::mpd::SegmentTemplate;
if (this->adaptationSet->GetSegmentBase())
return libdash::framework::mpd::SingleMediaSegment;
/* check on Period Level */
if (this->period->GetSegmentList())
return libdash::framework::mpd::SegmentList;
if (this->period->GetSegmentTemplate())
return libdash::framework::mpd::SegmentTemplate;
if (this->period->GetSegmentBase())
return libdash::framework::mpd::SingleMediaSegment;
return libdash::framework::mpd::UNDEFINED;
}
void AdaptationSetStream::Initialize()
{
for (size_t i = 0; i < adaptationSet->GetRepresentation().size(); i++)
{
IRepresentation *representation = adaptationSet->GetRepresentation().at(i);
RepresentationStreamType type = DetermineRepresentationStreamType(representation);
representations[representation] = RepresentationStreamFactory::Create(type, mpd, period, adaptationSet, representation);
}
}
| 2,965 | 36.075 | 128 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/SegmentTemplateStream.cpp
|
/*
* SegmentTemplateStream.cpp
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "SegmentTemplateStream.h"
using namespace dash::mpd;
using namespace libdash::framework::mpd;
SegmentTemplateStream::SegmentTemplateStream (IMPD *mpd, IPeriod *period, IAdaptationSet *adaptationSet, IRepresentation *representation) :
AbstractRepresentationStream (mpd, period, adaptationSet, representation)
{
this->baseUrls = BaseUrlResolver::ResolveBaseUrl(mpd, period, adaptationSet, 0, 0, 0);
this->segmentTemplate = FindSegmentTemplate();
CalculateSegmentStartTimes();
}
SegmentTemplateStream::~SegmentTemplateStream ()
{
}
ISegment* SegmentTemplateStream::GetInitializationSegment ()
{
if (this->segmentTemplate->GetInitialization())
return this->segmentTemplate->GetInitialization()->ToSegment(baseUrls);
return this->segmentTemplate->ToInitializationSegment(baseUrls, representation->GetId(), representation->GetBandwidth());
}
ISegment* SegmentTemplateStream::GetIndexSegment (size_t segmentNumber)
{
/* time-based template */
if (this->segmentTemplate->GetSegmentTimeline())
{
if (this->segmentStartTimes.size() > segmentNumber)
return this->segmentTemplate->GetIndexSegmentFromTime(baseUrls, representation->GetId(), representation->GetBandwidth(), this->segmentStartTimes.at(segmentNumber));
return NULL;
}
/* number-based template */
return this->segmentTemplate->GetIndexSegmentFromNumber(baseUrls, representation->GetId(), representation->GetBandwidth(),
this->segmentTemplate->GetStartNumber() + segmentNumber);
}
ISegment* SegmentTemplateStream::GetMediaSegment (size_t segmentNumber)
{
/* time-based template */
if (this->segmentTemplate->GetSegmentTimeline())
{
if (this->segmentStartTimes.size() > segmentNumber)
return this->segmentTemplate->GetMediaSegmentFromTime(baseUrls, representation->GetId(), representation->GetBandwidth(), this->segmentStartTimes.at(segmentNumber));
return NULL;
}
/* number-based template */
return this->segmentTemplate->GetMediaSegmentFromNumber(baseUrls, representation->GetId(), representation->GetBandwidth(),
this->segmentTemplate->GetStartNumber() + segmentNumber);
}
ISegment* SegmentTemplateStream::GetBitstreamSwitchingSegment ()
{
if (this->segmentTemplate->GetBitstreamSwitching())
return this->segmentTemplate->GetBitstreamSwitching()->ToSegment(baseUrls);
return this->segmentTemplate->ToBitstreamSwitchingSegment(baseUrls, representation->GetId(), representation->GetBandwidth());
}
RepresentationStreamType SegmentTemplateStream::GetStreamType ()
{
return SegmentList;
}
uint32_t SegmentTemplateStream::GetSize ()
{
if (!this->segmentStartTimes.empty())
return this->segmentStartTimes.size();
uint32_t numberOfSegments = 0;
double mediaPresentationDuration = 0;
if (this->mpd->GetType() == "static")
{
mediaPresentationDuration = TimeResolver::GetDurationInSec(this->mpd->GetMediaPresentationDuration());
numberOfSegments = (uint32_t) ceil(mediaPresentationDuration / (this->segmentTemplate->GetDuration() / this->segmentTemplate->GetTimescale()));
}
else
{
numberOfSegments = UINT32_MAX - 1;
}
return numberOfSegments;
}
uint32_t SegmentTemplateStream::GetAverageSegmentDuration ()
{
/* TODO calculate average segment durations for SegmentTimeline */
return this->segmentTemplate->GetDuration();
}
ISegmentTemplate* SegmentTemplateStream::FindSegmentTemplate ()
{
if (this->representation->GetSegmentTemplate())
return this->representation->GetSegmentTemplate();
if (this->adaptationSet->GetSegmentTemplate())
return this->adaptationSet->GetSegmentTemplate();
if (this->period->GetSegmentTemplate())
return this->period->GetSegmentTemplate();
return NULL;
}
void SegmentTemplateStream::CalculateSegmentStartTimes ()
{
if (!this->segmentTemplate->GetSegmentTimeline())
return;
size_t numOfTimelines = 0;
uint32_t segStartTime = 0;
uint32_t segDuration = 0;
size_t repeatCount = 0;
numOfTimelines = this->segmentTemplate->GetSegmentTimeline()->GetTimelines().size();
for (size_t i = 0; i < numOfTimelines; i++)
{
repeatCount = this->segmentTemplate->GetSegmentTimeline()->GetTimelines().at(i)->GetRepeatCount();
segStartTime = this->segmentTemplate->GetSegmentTimeline()->GetTimelines().at(i)->GetStartTime();
segDuration = this->segmentTemplate->GetSegmentTimeline()->GetTimelines().at(i)->GetDuration();
if (repeatCount > 0)
{
for (size_t j = 0; j <= repeatCount; j++)
{
if (segStartTime > 0)
{
this->segmentStartTimes.push_back(segStartTime + segDuration * j);
}
else
{
/* TODO: implement if SegmentTemplate.SegmentTimeline.S@t is not specified */
}
}
}
else
{
this->segmentStartTimes.push_back(segStartTime);
}
}
}
| 5,976 | 38.065359 | 176 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/RepresentationStreamFactory.cpp
|
/*
* RepresentationStreamFactory.cpp
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "RepresentationStreamFactory.h"
using namespace libdash::framework::mpd;
using namespace dash::mpd;
IRepresentationStream* RepresentationStreamFactory::Create(RepresentationStreamType type, IMPD *mpd, IPeriod *period, IAdaptationSet *adaptationSet, IRepresentation *representation)
{
switch(type)
{
case SingleMediaSegment: return new SingleMediaSegmentStream(mpd, period, adaptationSet, representation);
case SegmentList: return new SegmentListStream (mpd, period, adaptationSet, representation);
case SegmentTemplate: return new SegmentTemplateStream (mpd, period, adaptationSet, representation);
default: return NULL;
}
}
| 1,166 | 40.678571 | 182 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/AdaptationSetHelper.cpp
|
/*
* AbstractSetHelper.cpp
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "AdaptationSetHelper.h"
using namespace libdash::framework::mpd;
using namespace dash::mpd;
std::vector<IAdaptationSet *> AdaptationSetHelper::GetAudioAdaptationSets (dash::mpd::IPeriod *period)
{
std::vector<IAdaptationSet *> audioAdaptationSets;
std::vector<IAdaptationSet *> adaptationSets = period->GetAdaptationSets();
for (size_t i = 0; i < adaptationSets.size(); i++)
if (AdaptationSetHelper::IsAudioAdaptationSet(adaptationSets.at(i)))
audioAdaptationSets.push_back(adaptationSets.at(i));
return audioAdaptationSets;
}
std::vector<IAdaptationSet *> AdaptationSetHelper::GetVideoAdaptationSets (dash::mpd::IPeriod *period)
{
std::vector<IAdaptationSet *> videoAdaptationSets;
std::vector<IAdaptationSet *> adaptationSets = period->GetAdaptationSets();
for (size_t i = 0; i < adaptationSets.size(); i++)
if (AdaptationSetHelper::IsVideoAdaptationSet(adaptationSets.at(i)))
videoAdaptationSets.push_back(adaptationSets.at(i));
return videoAdaptationSets;
}
bool AdaptationSetHelper::IsAudioAdaptationSet (dash::mpd::IAdaptationSet *adaptationSet)
{
return IsContainedInMimeType(adaptationSet, "audio");
}
bool AdaptationSetHelper::IsVideoAdaptationSet (dash::mpd::IAdaptationSet *adaptationSet)
{
return IsContainedInMimeType(adaptationSet, "video");
}
bool AdaptationSetHelper::IsContainedInMimeType (dash::mpd::IAdaptationSet *adaptationSet, std::string value)
{
if (adaptationSet->GetMimeType() != "")
if (adaptationSet->GetMimeType().find(value) != std::string::npos)
return true;
for (size_t i = 0; i < adaptationSet->GetRepresentation().size(); i++)
if (adaptationSet->GetRepresentation().at(i)->GetMimeType() != "")
if (adaptationSet->GetRepresentation().at(i)->GetMimeType().find(value) != std::string::npos)
return true;
return false;
}
| 2,446 | 39.783333 | 137 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/AdaptationSetHelper.h
|
/*
* AbstractSetHelper.h
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_MPD_ADAPTATIONSETHELPER_H_
#define LIBDASH_FRAMEWORK_MPD_ADAPTATIONSETHELPER_H_
#include "IMPD.h"
namespace libdash
{
namespace framework
{
namespace mpd
{
class AdaptationSetHelper
{
public:
static std::vector<dash::mpd::IAdaptationSet *> GetAudioAdaptationSets (dash::mpd::IPeriod *period);
static std::vector<dash::mpd::IAdaptationSet *> GetVideoAdaptationSets (dash::mpd::IPeriod *period);
static bool IsAudioAdaptationSet (dash::mpd::IAdaptationSet *adaptationSet);
static bool IsVideoAdaptationSet (dash::mpd::IAdaptationSet *adaptationSet);
static bool IsContainedInMimeType (dash::mpd::IAdaptationSet *adaptationSet, std::string value);
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_MPD_ADAPTATIONSETHELPER_H_ */
| 1,484 | 40.25 | 154 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/SegmentTemplateStream.h
|
/*
* SegmentTemplateStream.h
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_MPD_SEGMENTTEMPLATESTREAM_H_
#define LIBDASH_FRAMEWORK_MPD_SEGMENTTEMPLATESTREAM_H_
#include <math.h>
#include "IMPD.h"
#include "AbstractRepresentationStream.h"
#include "ISegment.h"
#include "ISegmentTemplate.h"
namespace libdash
{
namespace framework
{
namespace mpd
{
class SegmentTemplateStream: public AbstractRepresentationStream
{
public:
SegmentTemplateStream (dash::mpd::IMPD *mpd, dash::mpd::IPeriod *period, dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation);
virtual ~SegmentTemplateStream ();
virtual dash::mpd::ISegment* GetInitializationSegment ();
virtual dash::mpd::ISegment* GetIndexSegment (size_t segmentNumber);
virtual dash::mpd::ISegment* GetMediaSegment (size_t segmentNumber);
virtual dash::mpd::ISegment* GetBitstreamSwitchingSegment ();
virtual RepresentationStreamType GetStreamType ();
virtual uint32_t GetSize ();
virtual uint32_t GetAverageSegmentDuration ();
private:
dash::mpd::ISegmentTemplate* FindSegmentTemplate ();
void CalculateSegmentStartTimes ();
dash::mpd::ISegmentTemplate *segmentTemplate;
std::vector<uint32_t> segmentStartTimes;
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_MPD_SEGMENTTEMPLATESTREAM_H_ */
| 2,252 | 39.963636 | 189 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/BaseUrlResolver.cpp
|
/*
* BaseUrlResolver.cpp
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "BaseUrlResolver.h"
using namespace dash::mpd;
using namespace libdash::framework::mpd;
std::vector<dash::mpd::IBaseUrl *> BaseUrlResolver::ResolveBaseUrl(IMPD *mpd, IPeriod *period, IAdaptationSet *adaptationSet,
size_t mpdBaseUrl, size_t periodBaseUrl, size_t adaptationSetBaseUrl)
{
std::vector<dash::mpd::IBaseUrl *> urls;
if (mpd->GetBaseUrls().size() > 0)
{
if (mpd->GetBaseUrls().size() > mpdBaseUrl)
urls.push_back(mpd->GetBaseUrls().at(mpdBaseUrl));
else
urls.push_back(mpd->GetBaseUrls().at(0));
}
if (period->GetBaseURLs().size() > 0)
{
if (period->GetBaseURLs().size() > periodBaseUrl)
urls.push_back(period->GetBaseURLs().at(periodBaseUrl));
else
urls.push_back(period->GetBaseURLs().at(0));
}
if (adaptationSet->GetBaseURLs().size() > 0)
{
if (adaptationSet->GetBaseURLs().size() > adaptationSetBaseUrl)
urls.push_back(adaptationSet->GetBaseURLs().at(adaptationSetBaseUrl));
else
urls.push_back(adaptationSet->GetBaseURLs().at(0));
}
if (urls.size() > 0)
{
if (urls.at(0)->GetUrl().substr(0,7) != "http://" && urls.at(0)->GetUrl().substr(0,8) != "https://")
{
urls.push_back(mpd->GetMPDPathBaseUrl());
size_t lastPos = urls.size() - 1;
IBaseUrl *absoluteUrl = urls.at(lastPos);
for (size_t i = lastPos; i > 0; i--)
{
urls[i] = urls[i-1];
}
urls[0] = absoluteUrl;
}
}
else
{
urls.push_back(mpd->GetMPDPathBaseUrl());
}
return urls;
}
| 2,187 | 32.661538 | 136 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/SegmentListStream.cpp
|
/*
* SegmentListStream.cpp
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "SegmentListStream.h"
using namespace dash::mpd;
using namespace libdash::framework::mpd;
SegmentListStream::SegmentListStream (IMPD *mpd, IPeriod *period, IAdaptationSet *adaptationSet, IRepresentation *representation) :
AbstractRepresentationStream (mpd, period, adaptationSet, representation)
{
this->baseUrls = BaseUrlResolver::ResolveBaseUrl(mpd, period, adaptationSet, 0, 0, 0);
this->segmentList = FindSegmentList();
}
SegmentListStream::~SegmentListStream ()
{
}
ISegment* SegmentListStream::GetInitializationSegment ()
{
if (this->segmentList->GetInitialization())
return this->segmentList->GetInitialization()->ToSegment(this->baseUrls);
return NULL;
}
ISegment* SegmentListStream::GetIndexSegment (size_t segmentNumber)
{
if (this->segmentList->GetSegmentURLs().size() > segmentNumber)
return this->segmentList->GetSegmentURLs().at(segmentNumber)->ToIndexSegment(this->baseUrls);
return NULL;
}
ISegment* SegmentListStream::GetMediaSegment (size_t segmentNumber)
{
if (this->segmentList->GetSegmentURLs().size() > segmentNumber)
return this->segmentList->GetSegmentURLs().at(segmentNumber)->ToMediaSegment(this->baseUrls);
return NULL;
}
ISegment* SegmentListStream::GetBitstreamSwitchingSegment ()
{
if (this->segmentList->GetBitstreamSwitching())
return this->segmentList->GetBitstreamSwitching()->ToSegment(baseUrls);
return NULL;
}
RepresentationStreamType SegmentListStream::GetStreamType ()
{
return SegmentList;
}
uint32_t SegmentListStream::GetSize ()
{
return this->segmentList->GetSegmentURLs().size();
}
ISegmentList* SegmentListStream::FindSegmentList ()
{
if (this->representation->GetSegmentList())
return this->representation->GetSegmentList();
if (this->adaptationSet->GetSegmentList())
return this->adaptationSet->GetSegmentList();
if (this->period->GetSegmentList())
return this->period->GetSegmentList();
return NULL;
}
uint32_t SegmentListStream::GetAverageSegmentDuration ()
{
/* TODO calculate average segment durations for SegmentTimeline */
return this->segmentList->GetDuration();
}
| 2,862 | 34.7875 | 142 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/SegmentListStream.h
|
/*
* SegmentListStream.h
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_MPD_SEGMENTLISTSTREAM_H_
#define LIBDASH_FRAMEWORK_MPD_SEGMENTLISTSTREAM_H_
#include "IMPD.h"
#include "AbstractRepresentationStream.h"
#include "ISegment.h"
#include "ISegmentList.h"
namespace libdash
{
namespace framework
{
namespace mpd
{
class SegmentListStream: public AbstractRepresentationStream
{
public:
SegmentListStream (dash::mpd::IMPD *mpd, dash::mpd::IPeriod *period, dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation);
virtual ~SegmentListStream ();
virtual dash::mpd::ISegment* GetInitializationSegment ();
virtual dash::mpd::ISegment* GetIndexSegment (size_t segmentNumber);
virtual dash::mpd::ISegment* GetMediaSegment (size_t segmentNumber);
virtual dash::mpd::ISegment* GetBitstreamSwitchingSegment ();
virtual RepresentationStreamType GetStreamType ();
virtual uint32_t GetSize ();
virtual uint32_t GetAverageSegmentDuration ();
private:
dash::mpd::ISegmentList* FindSegmentList ();
dash::mpd::ISegmentList *segmentList;
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_MPD_SEGMENTLISTSTREAM_H_ */
| 2,046 | 39.137255 | 185 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/IRepresentationStream.h
|
/*
* IRepresentationStream.h
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_MPD_IREPRESENTATIONSTREAM_H_
#define LIBDASH_FRAMEWORK_MPD_IREPRESENTATIONSTREAM_H_
#include "ISegment.h"
namespace libdash
{
namespace framework
{
namespace mpd
{
enum RepresentationStreamType
{
SingleMediaSegment,
SegmentList,
SegmentTemplate,
UNDEFINED
};
class IRepresentationStream
{
public:
virtual ~IRepresentationStream () {}
virtual dash::mpd::ISegment* GetInitializationSegment () = 0;
virtual dash::mpd::ISegment* GetIndexSegment (size_t segmentNumber) = 0;
virtual dash::mpd::ISegment* GetMediaSegment (size_t segmentNumber) = 0;
virtual dash::mpd::ISegment* GetBitstreamSwitchingSegment () = 0;
virtual RepresentationStreamType GetStreamType () = 0;
virtual uint32_t GetSize () = 0;
virtual uint32_t GetFirstSegmentNumber () = 0;
virtual uint32_t GetCurrentSegmentNumber () = 0;
virtual uint32_t GetLastSegmentNumber () = 0;
virtual uint32_t GetAverageSegmentDuration () = 0;
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_MPD_IREPRESENTATIONSTREAM_H_ */
| 2,083 | 39.862745 | 115 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/AbstractRepresentationStream.cpp
|
/*
* AbstractRepresentationStream.cpp
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "AbstractRepresentationStream.h"
using namespace libdash::framework::mpd;
using namespace dash::mpd;
AbstractRepresentationStream::AbstractRepresentationStream (IMPD *mpd, IPeriod *period, IAdaptationSet *adaptationSet, IRepresentation *representation) :
mpd (mpd),
period (period),
adaptationSet (adaptationSet),
representation (representation)
{
}
AbstractRepresentationStream::~AbstractRepresentationStream ()
{
}
void AbstractRepresentationStream::SetBaseUrls (const std::vector<dash::mpd::IBaseUrl *> baseurls)
{
this->baseUrls.clear();
for (size_t i = 0; i < baseurls.size(); i++)
this->baseUrls.push_back(baseurls.at(i));
}
uint32_t AbstractRepresentationStream::GetSize ()
{
return UINT32_MAX - 1;
}
uint32_t AbstractRepresentationStream::GetFirstSegmentNumber ()
{
if (this->mpd->GetType() == "dynamic")
{
uint32_t currTime = TimeResolver::GetCurrentTimeInSec();
uint32_t availStT = TimeResolver::GetUTCDateTimeInSec(this->mpd->GetAvailabilityStarttime());
uint32_t duration = this->GetAverageSegmentDuration();
uint32_t timeshift = TimeResolver::GetDurationInSec(this->mpd->GetTimeShiftBufferDepth());
return (currTime - duration - availStT - timeshift ) / duration;
}
return 0;
}
uint32_t AbstractRepresentationStream::GetCurrentSegmentNumber ()
{
if (this->mpd->GetType() == "dynamic")
{
uint32_t currTime = TimeResolver::GetCurrentTimeInSec();
uint32_t duration = this->GetAverageSegmentDuration();
uint32_t availStT = TimeResolver::GetUTCDateTimeInSec(this->mpd->GetAvailabilityStarttime());
return (currTime - duration - availStT) / duration;
}
return 0;
}
uint32_t AbstractRepresentationStream::GetLastSegmentNumber ()
{
if (this->mpd->GetType() == "dynamic")
{
uint32_t currTime = TimeResolver::GetCurrentTimeInSec();
uint32_t duration = this->GetAverageSegmentDuration();
uint32_t availStT = TimeResolver::GetUTCDateTimeInSec(this->mpd->GetAvailabilityStarttime());
uint32_t checkTime = mpd->GetFetchTime() +
TimeResolver::GetDurationInSec(this->mpd->GetMinimumUpdatePeriod());
return ( ((checkTime > currTime) ? currTime : checkTime) - duration - availStT) / duration;
}
return 0;
}
uint32_t AbstractRepresentationStream::GetAverageSegmentDuration ()
{
return 1;
}
| 3,147 | 36.035294 | 154 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/MPD/RepresentationStreamFactory.h
|
/*
* RepresentationStreamFactory.h
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_MPD_RERPRESENTATIONSTREAMFACTORY_H_
#define LIBDASH_FRAMEWORK_MPD_RERPRESENTATIONSTREAMFACTORY_H_
#include "IRepresentationStream.h"
#include "SingleMediaSegmentStream.h"
#include "SegmentListStream.h"
#include "SegmentTemplateStream.h"
#include "IRepresentation.h"
namespace libdash
{
namespace framework
{
namespace mpd
{
class RepresentationStreamFactory
{
public:
static IRepresentationStream* Create(libdash::framework::mpd::RepresentationStreamType type, dash::mpd::IMPD *mpd, dash::mpd::IPeriod *period,
dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation);
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_MPD_RERPRESENTATIONSTREAMFACTORY_H_ */
| 1,317 | 32.794872 | 162 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Buffer/AudioChunk.cpp
|
/*
* AudioChunk.cpp
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "AudioChunk.h"
using namespace libdash::framework::buffer;
AudioChunk::AudioChunk (QAudioFormat *format, char* data, qint64 dataLength) :
chunkLength (dataLength),
format (format)
{
this->data = (char*) malloc(this->chunkLength);
memcpy(this->data, data, this->chunkLength);
}
AudioChunk::~AudioChunk ()
{
delete this->format;
free(this->data);
}
char* AudioChunk::Data ()
{
return this->data;
}
qint64 AudioChunk::Length ()
{
return this->chunkLength;
}
QAudioFormat* AudioChunk::Format ()
{
return this->format;
}
| 1,045 | 24.512195 | 79 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Buffer/Buffer.h
|
/*
* Buffer.h
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_BUFFER_BUFFER_H_
#define LIBDASH_FRAMEWORK_BUFFER_BUFFER_H_
#include "../Portable/MultiThreading.h"
#include "IBufferObserver.h"
#include <deque>
#include <vector>
namespace libdash
{
namespace framework
{
/*struct ImageWrap
{
QImage *image;
uint8_t *data;
};
*/
namespace buffer
{
template <class T>
class Buffer
{
public:
Buffer (uint32_t maxcapacity, BufferType type);
virtual ~Buffer ();
bool PushBack (T *element);
T* Front ();
T* GetFront ();
void PopFront ();
void ClearTail ();
void Clear ();
void SetEOS (bool value);
uint32_t Length ();
uint32_t Capacity ();
void AttachObserver (IBufferObserver *observer);
void Notify ();
private:
std::deque<T*> objects;
std::vector<IBufferObserver *> observer;
bool eos;
uint32_t maxcapacity;
mutable CRITICAL_SECTION monitorMutex;
mutable CONDITION_VARIABLE full;
mutable CONDITION_VARIABLE empty;
BufferType type;
};
}
}
}
using namespace libdash::framework::buffer;
template <class T>
Buffer<T>::Buffer (uint32_t maxcapacity, BufferType type) :
type (type),
eos (false),
maxcapacity (maxcapacity)
{
InitializeConditionVariable (&this->full);
InitializeConditionVariable (&this->empty);
InitializeCriticalSection (&this->monitorMutex);
}
template <class T>
Buffer<T>::~Buffer ()
{
this->Clear();
DeleteConditionVariable (&this->full);
DeleteConditionVariable (&this->empty);
DeleteCriticalSection (&this->monitorMutex);
}
template <class T>
bool Buffer<T>::PushBack (T *object)
{
EnterCriticalSection(&this->monitorMutex);
while(this->objects.size() >= this->maxcapacity && !this->eos)
SleepConditionVariableCS(&this->empty, &this->monitorMutex, INFINITE);
if(this->objects.size() >= this->maxcapacity)
{
LeaveCriticalSection(&this->monitorMutex);
return false;
}
this->objects.push_back(object);
WakeAllConditionVariable(&this->full);
LeaveCriticalSection(&this->monitorMutex);
this->Notify();
return true;
}
template <class T>
T* Buffer<T>::Front ()
{
EnterCriticalSection(&this->monitorMutex);
while(this->objects.size() == 0 && !this->eos)
SleepConditionVariableCS(&this->full, &this->monitorMutex, INFINITE);
if(this->objects.size() == 0)
{
LeaveCriticalSection(&this->monitorMutex);
return NULL;
}
T *object = this->objects.front();
LeaveCriticalSection(&this->monitorMutex);
return object;
}
template <class T>
T* Buffer<T>::GetFront ()
{
EnterCriticalSection(&this->monitorMutex);
while(this->objects.size() == 0 && !this->eos)
SleepConditionVariableCS(&this->full, &this->monitorMutex, INFINITE);
if(this->objects.size() == 0)
{
LeaveCriticalSection(&this->monitorMutex);
return NULL;
}
T *object = this->objects.front();
this->objects.pop_front();
this->objects.shrink_to_fit();
WakeAllConditionVariable(&this->empty);
LeaveCriticalSection(&this->monitorMutex);
this->Notify();
return object;
}
template <class T>
uint32_t Buffer<T>::Length ()
{
EnterCriticalSection(&this->monitorMutex);
uint32_t ret = this->objects.size();
LeaveCriticalSection(&this->monitorMutex);
return ret;
}
template <class T>
void Buffer<T>::PopFront ()
{
EnterCriticalSection(&this->monitorMutex);
this->objects.pop_front();
this->objects.shrink_to_fit();
WakeAllConditionVariable(&this->empty);
LeaveCriticalSection(&this->monitorMutex);
this->Notify();
}
template <class T>
void Buffer<T>::SetEOS (bool value)
{
EnterCriticalSection(&this->monitorMutex);
this->eos = value;
WakeAllConditionVariable(&this->empty);
WakeAllConditionVariable(&this->full);
LeaveCriticalSection(&this->monitorMutex);
}
template <class T>
void Buffer<T>::AttachObserver (IBufferObserver *observer)
{
this->observer.push_back(observer);
}
template <class T>
void Buffer<T>::Notify ()
{
for(size_t i = 0; i < this->observer.size(); i++)
this->observer.at(i)->OnBufferStateChanged(this->type, (uint32_t)((double)this->objects.size()/(double)this->maxcapacity*100.0));
}
template <class T>
void Buffer<T>::ClearTail ()
{
EnterCriticalSection(&this->monitorMutex);
int size = this->objects.size() - 1;
if (size < 1)
{
LeaveCriticalSection(&this->monitorMutex);
return;
}
T* object = this->objects.front();
this->objects.pop_front();
for(int i=0; i < size; i++)
{
delete this->objects.front();
this->objects.pop_front();
}
this->objects.shrink_to_fit();
this->objects.push_back(object);
WakeAllConditionVariable(&this->empty);
WakeAllConditionVariable(&this->full);
LeaveCriticalSection(&this->monitorMutex);
this->Notify();
}
template <class T>
void Buffer<T>::Clear ()
{
EnterCriticalSection(&this->monitorMutex);
for(int i = 0; i < this->objects.size(); i++)
delete this->objects[i];
this->objects.clear();
this->objects.shrink_to_fit();
WakeAllConditionVariable(&this->empty);
WakeAllConditionVariable(&this->full);
LeaveCriticalSection(&this->monitorMutex);
this->Notify();
}
template <class T>
uint32_t Buffer<T>::Capacity ()
{
return this->maxcapacity;
}
#endif /* LIBDASH_FRAMEWORK_BUFFER_BUFFER_H_ */
| 6,776 | 26.54878 | 137 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Buffer/MediaObjectBuffer.cpp
|
/*
* MediaObjectBuffer.cpp
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "MediaObjectBuffer.h"
using namespace libdash::framework::buffer;
using namespace libdash::framework::input;
using namespace dash::mpd;
using namespace dash::network;
MediaObjectBuffer::MediaObjectBuffer (sampleplayer::managers::StreamType type, uint32_t maxcapacity) :
type (type),
eos (false),
maxcapacity (maxcapacity)
{
InitializeConditionVariable (&this->full);
InitializeConditionVariable (&this->empty);
InitializeCriticalSection (&this->monitorMutex);
}
MediaObjectBuffer::~MediaObjectBuffer ()
{
this->Clear();
DeleteConditionVariable (&this->full);
DeleteConditionVariable (&this->empty);
DeleteCriticalSection (&this->monitorMutex);
}
bool MediaObjectBuffer::PushBack (MediaObject *media)
{
Debug("Media Object Buffer: Pushing back\n");
EnterCriticalSection(&this->monitorMutex);
while(this->mediaobjects.size() >= this->maxcapacity && !this->eos)
SleepConditionVariableCS(&this->empty, &this->monitorMutex, INFINITE);
Debug("Media Object Buffer: Pushed back\n");
if(this->mediaobjects.size() >= this->maxcapacity)
{
LeaveCriticalSection(&this->monitorMutex);
return false;
}
this->mediaobjects.push_back(media);
WakeAllConditionVariable(&this->full);
LeaveCriticalSection(&this->monitorMutex);
this->Notify(MediaObjectBuffer::PushingBack, media);
return true;
}
MediaObject* MediaObjectBuffer::Front ()
{
EnterCriticalSection(&this->monitorMutex);
while(this->mediaobjects.size() == 0 && !this->eos)
SleepConditionVariableCS(&this->full, &this->monitorMutex, INFINITE);
if(this->mediaobjects.size() == 0)
{
LeaveCriticalSection(&this->monitorMutex);
return NULL;
}
MediaObject *object = this->mediaobjects.front();
LeaveCriticalSection(&this->monitorMutex);
return object;
}
MediaObject* MediaObjectBuffer::GetFront ()
{
Debug("Media Object Buffer: Asking for Front\n");
L("Media_object_buffer:\t%s\t%s\t%f\n", (this->type == sampleplayer::managers::StreamType::AUDIO)? "Audio": "Video", "Asking_Front" ,((double) this->mediaobjects.size()/(double) this->maxcapacity));
EnterCriticalSection(&this->monitorMutex);
bool isrebuf = false;
while(this->mediaobjects.size() == 0 && !this->eos)
{
L("Media_object_buffer:\tREBUFFERING_START\n");
isrebuf = true;
SleepConditionVariableCS(&this->full, &this->monitorMutex, INFINITE);
}
if(isrebuf)
L("Media_object_buffer:\tREBUFFERING_STOP\n");
Debug("Media Object Buffer: Got Front\n");
if(this->mediaobjects.size() == 0)
{
LeaveCriticalSection(&this->monitorMutex);
return NULL;
}
MediaObject *object = this->mediaobjects.front();
this->mediaobjects.pop_front();
WakeAllConditionVariable(&this->empty);
LeaveCriticalSection(&this->monitorMutex);
this->Notify(MediaObjectBuffer::GettingFront, object);
return object;
}
MediaObject* MediaObjectBuffer::ShouldAbort ()
{
MediaObject *mediaObject = NULL;
Debug("MEDIA OBJECT: SHOULD ABORT ENTERING LOCK\n");
EnterCriticalSection(&this->monitorMutex);
Debug("GOT THE LOCK\n");
if(this->mediaobjects.size() != 0)
{
mediaObject = this->mediaobjects.back();
this->mediaobjects.pop_back();
Debug("Aborting...\n");
mediaObject->AbortDownload();
WakeAllConditionVariable(&this->empty);
}
Debug("RELEASE THE LOCK\n");
LeaveCriticalSection(&this->monitorMutex);
//this->Notify();
Debug("RELEASED\n");
return mediaObject;
}
uint32_t MediaObjectBuffer::Length ()
{
EnterCriticalSection(&this->monitorMutex);
uint32_t ret = this->mediaobjects.size();
LeaveCriticalSection(&this->monitorMutex);
return ret;
}
/*void MediaObjectBuffer::PopFront ()
{
EnterCriticalSection(&this->monitorMutex);
this->mediaobjects.pop_front();
WakeAllConditionVariable(&this->empty);
LeaveCriticalSection(&this->monitorMutex);
this->Notify();
}
*/
void MediaObjectBuffer::SetEOS (bool value)
{
EnterCriticalSection(&this->monitorMutex);
for (size_t i = 0; i < this->mediaobjects.size(); i++)
this->mediaobjects.at(i)->AbortDownload();
this->eos = value;
WakeAllConditionVariable(&this->empty);
WakeAllConditionVariable(&this->full);
LeaveCriticalSection(&this->monitorMutex);
//As EOS means no more download, we can stop the adaptation logic
for(size_t i = 0; i < this->observer.size(); i++)
this->observer.at(i)->OnEOS(value);
}
void MediaObjectBuffer::AttachObserver (IMediaObjectBufferObserver *observer)
{
this->observer.push_back(observer);
}
void MediaObjectBuffer::Notify(enum NotificationType notifType, input::MediaObject* mediaObject)
{
L("Media_object_buffer:\t%s\t%s\t%s\t%f\n", (this->type == sampleplayer::managers::StreamType::AUDIO)? "Audio": "Video", (notifType == MediaObjectBuffer::GettingFront) ? "Got_Front" : (notifType == MediaObjectBuffer::PushingBack) ? "Pushed_Back" : "Cleared_Buffer" , (mediaObject != NULL) ? mediaObject->GetPath() : ".",((double) this->mediaobjects.size()/(double) this->maxcapacity));
for(size_t i = 0; i < this->observer.size(); i++)
this->observer.at(i)->OnBufferStateChanged((int)((double)this->mediaobjects.size()/(double)this->maxcapacity*100.0));
}
/*void MediaObjectBuffer::ClearTail ()
{
EnterCriticalSection(&this->monitorMutex);
int size = this->mediaobjects.size() - 1;
if (size < 1)
{
LeaveCriticalSection(&this->monitorMutex);
return;
}
MediaObject* object = this->mediaobjects.front();
this->mediaobjects.pop_front();
for(int i=0; i < size; i++)
{
delete this->mediaobjects.front();
this->mediaobjects.pop_front();
}
this->mediaobjects.push_back(object);
WakeAllConditionVariable(&this->empty);
WakeAllConditionVariable(&this->full);
LeaveCriticalSection(&this->monitorMutex);
this->Notify();
} */
void MediaObjectBuffer::Clear ()
{
EnterCriticalSection(&this->monitorMutex);
for(int i = 0; i < this->mediaobjects.size(); i++)
delete this->mediaobjects[i];
this->mediaobjects.clear();
WakeAllConditionVariable(&this->empty);
WakeAllConditionVariable(&this->full);
LeaveCriticalSection(&this->monitorMutex);
this->Notify(MediaObjectBuffer::ClearBuffer, NULL);
}
uint32_t MediaObjectBuffer::Capacity ()
{
return this->maxcapacity;
}
| 7,115 | 30.626667 | 386 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Buffer/MediaObjectBuffer.h
|
/*
* MediaObjectBuffer.h
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_BUFFER_MEDIAOBJECTBUFFER_H_
#define LIBDASH_FRAMEWORK_BUFFER_MEDIAOBJECTBUFFER_H_
#include "../Input/MediaObject.h"
#include "../Portable/MultiThreading.h"
#include "IMediaObjectBufferObserver.h"
#include"../../Managers/IStreamObserver.h"
#include <deque>
namespace libdash
{
namespace framework
{
namespace input
{
class MediaObject;
}
namespace buffer
{
class MediaObjectBuffer
{
private:
enum NotificationType
{
GettingFront,
PushingBack,
ClearBuffer
};
public:
MediaObjectBuffer (sampleplayer::managers::StreamType type, uint32_t maxcapacity);
virtual ~MediaObjectBuffer ();
bool PushBack (input::MediaObject *media);
input::MediaObject* Front ();
input::MediaObject* GetFront ();
input::MediaObject* ShouldAbort ();
void PopFront ();
void ClearTail ();
void Clear ();
void SetEOS (bool value);
uint32_t Length ();
uint32_t Capacity ();
void AttachObserver (IMediaObjectBufferObserver *observer);
void Notify (enum NotificationType type, input::MediaObject* mediaObject);
uint32_t maxcapacity;
std::deque<input::MediaObject *> mediaobjects;
private:
std::vector<IMediaObjectBufferObserver *> observer;
bool eos;
sampleplayer::managers::StreamType type;
mutable CRITICAL_SECTION monitorMutex;
mutable CONDITION_VARIABLE full;
mutable CONDITION_VARIABLE empty;
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_BUFFER_MEDIAOBJECTBUFFER_H_ */
| 2,883 | 36.947368 | 128 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Buffer/IMediaObjectBufferObserver.h
|
/*
* IMediaObjectBufferObserver.h
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_BUFFER_IMEDIAOBJECTBUFFEROBSERVER_H_
#define LIBDASH_FRAMEWORK_BUFFER_IMEDIAOBJECTBUFFEROBSERVER_H_
#include <stdint.h>
namespace libdash
{
namespace framework
{
namespace buffer
{
class IMediaObjectBufferObserver
{
public:
virtual ~IMediaObjectBufferObserver () {}
virtual void OnBufferStateChanged(uint32_t fillstateInPercent) = 0;
virtual void OnEOS(bool value) = 0;
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_BUFFER_IMEDIAOBJECTBUFFEROBSERVER_H_ */
| 1,071 | 29.628571 | 87 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Buffer/IBufferObserver.h
|
/*
* IBufferObserver.h
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBDASH_FRAMEWORK_BUFFER_IBUFFEROBSERVER_H_
#define LIBDASH_FRAMEWORK_BUFFER_IBUFFEROBSERVER_H_
#include <stdint.h>
namespace libdash
{
namespace framework
{
namespace buffer
{
enum BufferType
{
AUDIO,
VIDEO,
SUBTITLE
};
class IBufferObserver
{
public:
virtual ~IBufferObserver () {}
virtual void OnBufferStateChanged(BufferType type, uint32_t fillstateInPercent) = 0;
};
}
}
}
#endif /* LIBDASH_FRAMEWORK_BUFFER_IBUFFEROBSERVER_H_ */
| 1,095 | 25.731707 | 104 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/libdashframework/Buffer/AudioChunk.h
|
/*
* AudioChunk.h
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef QTSAMPLEPLAYER_BUFFER_AUDIOCHUNK_H_
#define QTSAMPLEPLAYER_BUFFER_AUDIOCHUNK_H_
#include "config.h"
#include <QtMultimedia/qaudioformat.h>
namespace libdash
{
namespace framework
{
namespace buffer
{
class AudioChunk
{
public:
AudioChunk (QAudioFormat *format, char* data, qint64 dataLength);
virtual ~AudioChunk ();
char* Data ();
qint64 Length ();
QAudioFormat* Format ();
private:
uint64_t chunkLength;
char* data;
QAudioFormat *format;
};
}
}
}
#endif /* QTSAMPLEPLAYER_BUFFER_AUDIOCHUNK_H_ */
| 1,261 | 27.681818 | 94 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/Managers/MultimediaStream.cpp
|
/*
* MultimediaStream.cpp
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "MultimediaStream.h"
using namespace sampleplayer::managers;
using namespace sampleplayer::decoder;
using namespace libdash::framework::adaptation;
using namespace libdash::framework::input;
using namespace libdash::framework::buffer;
using namespace dash::mpd;
MultimediaStream::MultimediaStream (StreamType type, IMPD *mpd, uint32_t bufferSize, uint32_t frameBufferSize, uint32_t sampleBufferSize, bool ndnEnabled, double ndnAlpha, bool nodecoding, bool chunkGranularityEnabled, int sample) :
type (type),
segmentBufferSize (bufferSize),
frameBufferSize (frameBufferSize),
sampleBufferSize (sampleBufferSize),
dashManager (NULL),
mpd (mpd),
isNDN (ndnEnabled),
ndnAlpha (ndnAlpha),
noDecoding (nodecoding),
chunkGranularity (chunkGranularityEnabled),
samplesize (sample)
{
this->frameBuffer = NULL;
this->sampleBuffer = NULL;
this->Init();
}
MultimediaStream::~MultimediaStream ()
{
this->Stop();
delete this->dashManager;
if(this->frameBuffer)
{
this->frameBuffer->Clear();
delete this->frameBuffer;
}
if(this->sampleBuffer)
{
this->sampleBuffer->Clear();
delete this->sampleBuffer;
}
}
bool MultimediaStream::IsNDN ()
{
return this->isNDN;
}
void MultimediaStream::ShouldAbort ()
{
this->dashManager->ShouldAbort();
}
uint32_t MultimediaStream::GetPosition ()
{
return this->dashManager->GetPosition();
}
void MultimediaStream::SetPosition (uint32_t segmentNumber)
{
this->dashManager->SetPosition(segmentNumber);
}
void MultimediaStream::SetPositionInMsec (uint32_t milliSecs)
{
this->dashManager->SetPositionInMsec(milliSecs);
}
void MultimediaStream::Init ()
{
this->dashManager = new DASHManager(this->type, this->segmentBufferSize, this, this->mpd, this->IsNDN(), this->ndnAlpha, this->noDecoding, this->chunkGranularity, this->samplesize);
if(this->frameBufferSize != 0)
this->frameBuffer = new Buffer<QImage>(this->frameBufferSize, libdash::framework::buffer::VIDEO);
if(this->sampleBufferSize != 0)
this->sampleBuffer = new Buffer<AudioChunk>(this->sampleBufferSize, libdash::framework::buffer::AUDIO);
if(this->frameBuffer)
this->frameBuffer->AttachObserver(this);
if(this->sampleBuffer)
this->sampleBuffer->AttachObserver(this);
}
bool MultimediaStream::Start ()
{
if(!this->StartDownload())
return false;
return true;
}
bool MultimediaStream::StartDownload ()
{
dashManager->SetAdaptationLogic(this->logic);
if(!dashManager->Start())
return false;
return true;
}
void MultimediaStream::Stop ()
{
this->StopDownload();
if(this->frameBuffer)
{
this->frameBuffer->SetEOS(true);
this->frameBuffer->Clear();
}
if(this->sampleBuffer)
{
this->sampleBuffer->SetEOS(true);
this->sampleBuffer->Clear();
}
}
void MultimediaStream::StopDownload ()
{
this->dashManager->Stop();
}
void MultimediaStream::Clear ()
{
this->dashManager->Clear();
}
void MultimediaStream::AddFrame (QImage *frame)
{
this->frameBuffer->PushBack(frame);
}
QImage* MultimediaStream::GetFrame ()
{
//return NULL;
return this->frameBuffer->GetFront();
}
void MultimediaStream::AddSamples (AudioChunk *samples)
{
this->sampleBuffer->PushBack(samples);
}
AudioChunk* MultimediaStream::GetSamples ()
{
return this->sampleBuffer->GetFront();
}
void MultimediaStream::AttachStreamObserver (IStreamObserver *observer)
{
this->observers.push_back(observer);
}
void MultimediaStream::SetRepresentation (IPeriod *period, IAdaptationSet *adaptationSet, IRepresentation *representation)
{
this->dashManager->SetRepresentation(period, adaptationSet, representation);
}
void MultimediaStream::EnqueueRepresentation (IPeriod *period, IAdaptationSet *adaptationSet, IRepresentation *representation)
{
this->dashManager->EnqueueRepresentation(period, adaptationSet, representation);
}
void MultimediaStream::SetAdaptationLogic (libdash::framework::adaptation::IAdaptationLogic *logic)
{
this->logic = logic;
}
void MultimediaStream::OnSegmentBufferStateChanged (uint32_t fillstateInPercent)
{
for (size_t i = 0; i < observers.size(); i++)
this->observers.at(i)->OnSegmentBufferStateChanged(this->type, fillstateInPercent);
}
void MultimediaStream::OnBufferStateChanged (BufferType type, uint32_t fillstateInPercent)
{
switch(type)
{
case libdash::framework::buffer::AUDIO:
for (size_t i = 0; i < observers.size(); i++)
this->observers.at(i)->OnAudioBufferStateChanged(fillstateInPercent);
break;
case libdash::framework::buffer::VIDEO:
for (size_t i = 0; i < observers.size(); i++)
this->observers.at(i)->OnVideoBufferStateChanged(fillstateInPercent);
default:
break;
}
}
void MultimediaStream::SetEOS (bool value)
{
if(this->sampleBuffer)
this->sampleBuffer->SetEOS(value);
if(this->frameBuffer)
this->frameBuffer->SetEOS(value);
for(size_t i = 0; i < observers.size(); i++)
this->observers.at(i)->SetEOS(value);
}
void MultimediaStream::SetTargetDownloadingTime (double target)
{
this->dashManager->SetTargetDownloadingTime(target);
}
void MultimediaStream::FastForward ()
{
this->dashManager->FastForward();
}
void MultimediaStream::FastRewind ()
{
this->dashManager->FastRewind();
}
| 6,035 | 28.300971 | 233 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/Managers/IStreamObserver.h
|
/*
* IStreamObserver.h
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef QTSAMPLEPLAYER_MANAGERS_STREAMOBSERVER_H_
#define QTSAMPLEPLAYER_MANAGERS_STREAMOBSERVER_H_
#include <stdint.h>
namespace sampleplayer
{
namespace managers
{
enum StreamType
{
AUDIO = (1u << 0),
VIDEO = (1u << 1),
SUBTITLE = (1u << 2),
};
class IStreamObserver
{
public:
virtual ~IStreamObserver () {}
virtual void OnSegmentDownloaded () = 0;
virtual void OnSegmentBufferStateChanged (StreamType type, uint32_t fillstateInPercent) = 0;
virtual void OnVideoBufferStateChanged (uint32_t fillstateInPercent) = 0;
virtual void OnAudioBufferStateChanged (uint32_t fillstateInPercent) = 0;
virtual void SetEOS (bool value) = 0;
};
}
}
#endif /* QTSAMPLEPLAYER_MANAGERS_STREAMOBSERVER_H_ */
| 1,411 | 31.090909 | 111 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/Managers/MultimediaManager.cpp
|
/*
* MultimediaManager.cpp
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*
* Modifications:
*
* Copyright (C) 2016
*
* Jacques Samain <[email protected]>
*
*****************************************************************************/
#include "MultimediaManager.h"
#include<fstream>
#include<iostream>
using namespace libdash::framework::adaptation;
using namespace libdash::framework::buffer;
using namespace sampleplayer::managers;
using namespace sampleplayer::renderer;
using namespace dash::mpd;
#define SEGMENTBUFFER_SIZE 10 //Buffersize changed HERE?
MultimediaManager::MultimediaManager (QTGLRenderer *videoElement, QTAudioRenderer *audioElement, bool nodecoding) :
videoElement (videoElement),
audioElement (audioElement),
mpd (NULL),
period (NULL),
videoAdaptationSet (NULL),
videoRepresentation (NULL),
videoLogic (NULL),
videoStream (NULL),
audioAdaptationSet (NULL),
audioRepresentation (NULL),
audioLogic (NULL),
videoRendererHandle (NULL),
audioRendererHandle (NULL),
audioStream (NULL),
isStarted (false),
isStopping (false),
framesDisplayed (0),
segmentsDownloaded (0),
isVideoRendering (false),
isAudioRendering (false),
eos (false),
playing (false),
noDecoding (nodecoding),
localmpdset (false),
localmpdpath (NULL)
{
InitializeCriticalSection (&this->monitorMutex);
InitializeCriticalSection (&this->monitor_playing_video_mutex);
InitializeConditionVariable (&this->playingVideoStatusChanged);
InitializeCriticalSection (&this->monitor_playing_audio_mutex);
InitializeConditionVariable (&this->playingAudioStatusChanged);
this->manager = CreateDashManager();
// av_register_all();
}
MultimediaManager::~MultimediaManager ()
{
this->Stop();
this->manager->Delete();
DeleteCriticalSection (&this->monitorMutex);
DeleteCriticalSection (&this->monitor_playing_video_mutex);
DeleteConditionVariable (&this->playingVideoStatusChanged);
DeleteCriticalSection (&this->monitor_playing_audio_mutex);
DeleteConditionVariable (&this->playingAudioStatusChanged);
}
IMPD* MultimediaManager::GetMPD ()
{
return this->mpd;
}
bool MultimediaManager::Init (const std::string& url)
{
EnterCriticalSection(&this->monitorMutex);
this->mpd = this->manager->Open((char *)url.c_str());
if(this->mpd == NULL)
{
LeaveCriticalSection(&this->monitorMutex);
return false;
}
LeaveCriticalSection(&this->monitorMutex);
return true;
}
void MultimediaManager::SetLocalMPD (char* path)
{
localmpdpath = path;
localmpdset = true;
}
bool MultimediaManager::InitNDN (const std::string& url)
{
EnterCriticalSection(&this->monitorMutex);
#ifdef NDNICPDOWNLOAD
libdash::framework::input::INDNConnection* ndnConn = new libdash::framework::input::NDNConnection(20, NULL);
#else
libdash::framework::input::INDNConnection* ndnConn = new libdash::framework::input::NDNConnectionConsumerApi(20);
#endif
ndnConn->InitForMPD(url);
int ret = 0;
char * data = (char *)malloc(4096);
int pos = url.find_last_of("/");
if(pos == std::string::npos)
{
pos = strlen(url.c_str());
}
else
{
pos = pos + 1;
}
char *name = (char*)malloc(2 + pos);
0[name] = '.';
1[name] = '/';
strncpy(name +2, url.substr(pos).c_str(), pos);
FILE *fp;
fp = fopen(name, "w");
if(fp == NULL)
{
free(data);
free(name);
delete ndnConn;
LeaveCriticalSection(&this->monitorMutex);
return false;
}
ret = ndnConn->Read((uint8_t*)data, 4096);
while(ret)
{
fwrite(data, sizeof(char), ret, fp);
ret = ndnConn->Read((uint8_t*)data,4096);
}
fclose(fp);
if(localmpdset)
{
printf("Start the extended MPD parsing.\n");
this->mpd = this->manager->Open(localmpdpath);
printf("Extended MPD is ready.\n");
} else
this->mpd = this->manager->Open(name);
if(this->mpd == NULL)
{
remove(name);
free(name);
free(data);
delete ndnConn;
LeaveCriticalSection(&this->monitorMutex);
return false;
}
remove(name);
free(name);
free(data);
delete ndnConn;
LeaveCriticalSection(&this->monitorMutex);
return true;
}
bool MultimediaManager::IsStarted ()
{
return this->isStarted;
}
bool MultimediaManager::IsStopping ()
{
return this->isStopping;
}
bool MultimediaManager::IsNDN ()
{
return this->isNDN;
}
void MultimediaManager::Start (bool ndnEnabled, double ndnAlpha, bool chunkGranularityEnabled, int sample)
{
this->isNDN = ndnEnabled;
this->ndnAlpha = ndnAlpha;
this->chunkGranularity = chunkGranularityEnabled;
this->samplesize = sample;
/* Global Start button for start must be added to interface*/
if (this->isStarted)
this->Stop();
L("Starting MultimediaManager...\n");
L("Chunk Granularity Enabled:\t%s\twith sample size\t%d\n", chunkGranularity ? "true" : "false", samplesize);
L("Is_NDN:\t%s\n", isNDN ? "true" : "false");
if(ndnAlpha <= 1 && ndnAlpha >=0)
L("ICN-enhanced rate estimation: alpha = %f\n",ndnAlpha);
else
L("normal rate estimation\n");
L("Segment_Buffer_size:\t%d\n", SEGMENTBUFFER_SIZE);
L("Adaptation_rate:\t%s\n", this->logicName);
EnterCriticalSection(&this->monitorMutex);
if (this->videoAdaptationSet && this->videoRepresentation)
{
this->InitVideoRendering(0);
this->videoStream->SetAdaptationLogic(this->videoLogic);
this->videoLogic->SetMultimediaManager(this);
this->videoStream->Start();
if(this->videoElement)
this->StartVideoRenderingThread();
}
if (this->audioAdaptationSet && this->audioRepresentation)
{
this->InitAudioPlayback(0);
if(this->audioElement)
this->audioElement->StartPlayback();
this->audioStream->SetAdaptationLogic(this->audioLogic);
this->audioLogic->SetMultimediaManager(this);
this->audioStream->Start();
if(this->audioElement)
this->StartAudioRenderingThread();
}
this->isStarted = true;
this->playing = true;
LeaveCriticalSection(&this->monitorMutex);
}
void MultimediaManager::Stop ()
{
if (!this->isStarted)
return;
this->isStopping = true;
EnterCriticalSection(&this->monitorMutex);
this->StopVideo();
this->StopAudio();
this->isStopping = false;
this->isStarted = false;
LeaveCriticalSection(&this->monitorMutex);
L("VIDEO STOPPED\n");
FlushLog();
}
void MultimediaManager::StopVideo ()
{
if(this->isStarted && this->videoStream)
{
this->videoStream->Stop();
this->StopVideoRenderingThread();
delete this->videoStream;
delete this->videoLogic;
this->videoStream = NULL;
this->videoLogic = NULL;
}
}
void MultimediaManager::StopAudio ()
{
if (this->isStarted && this->audioStream)
{
this->audioStream->Stop();
this->StopAudioRenderingThread();
if(this->audioElement)
this->audioElement->StopPlayback();
delete this->audioStream;
delete this->audioLogic;
this->audioStream = NULL;
this->audioLogic = NULL;
}
}
bool MultimediaManager::SetVideoQuality (IPeriod* period, IAdaptationSet *adaptationSet, IRepresentation *representation)
{
EnterCriticalSection(&this->monitorMutex);
this->period = period;
this->videoAdaptationSet = adaptationSet;
this->videoRepresentation = representation;
if (this->videoStream)
this->videoStream->SetRepresentation(this->period, this->videoAdaptationSet, this->videoRepresentation);
LeaveCriticalSection(&this->monitorMutex);
return true;
}
bool MultimediaManager::SetAudioQuality (IPeriod* period, IAdaptationSet *adaptationSet, IRepresentation *representation)
{
EnterCriticalSection(&this->monitorMutex);
this->period = period;
this->audioAdaptationSet = adaptationSet;
this->audioRepresentation = representation;
if (this->audioStream)
this->audioStream->SetRepresentation(this->period, this->audioAdaptationSet, this->audioRepresentation);
LeaveCriticalSection(&this->monitorMutex);
return true;
}
bool MultimediaManager::IsUserDependent ()
{
if(this->videoLogic)
return this->videoLogic->IsUserDependent();
else
return true;
}
bool MultimediaManager::SetVideoAdaptationLogic (libdash::framework::adaptation::LogicType type, double arg1, double arg2, double arg3,
double arg4, double arg5, double arg6)
{
if(this->videoAdaptationSet)
{
this->videoLogic = AdaptationLogicFactory::Create(type, this->mpd, this->period, this->videoAdaptationSet, 1, arg1, arg2, arg3, arg4, arg5, arg6);
this->logicName = LogicType_string[type];
}
else
{
this->videoLogic = NULL;
return true;
}
if(this->videoLogic)
return true;
else
return false;
}
void MultimediaManager::ShouldAbort (bool isVideo)
{
if(isVideo)
{
this->videoStream->ShouldAbort();
return;
}
else
{
this->audioStream->ShouldAbort();
}
}
void MultimediaManager::SetTargetDownloadingTime (bool isVideo, double target)
{
if(isVideo)
this->videoStream->SetTargetDownloadingTime(target);
else
this->audioStream->SetTargetDownloadingTime(target);
}
bool MultimediaManager::SetAudioAdaptationLogic (libdash::framework::adaptation::LogicType type, double arg1, double arg2, double arg3,
double arg4, double arg5, double arg6)
{
if(this->audioAdaptationSet)
{
this->audioLogic = AdaptationLogicFactory::Create(type, this->mpd, this->period, this->audioAdaptationSet, 0, arg1, arg2, arg3);
this->logicName = LogicType_string[type];
}
else
{
this->audioLogic = NULL;
return true;
}
if(this->audioLogic)
return true;
else
return false;
}
void MultimediaManager::AttachManagerObserver (IMultimediaManagerObserver *observer)
{
this->managerObservers.push_back(observer);
}
void MultimediaManager::NotifyVideoBufferObservers (uint32_t fillstateInPercent)
{
for (size_t i = 0; i < this->managerObservers.size(); i++)
this->managerObservers.at(i)->OnVideoBufferStateChanged(fillstateInPercent);
}
void MultimediaManager::NotifyVideoSegmentBufferObservers(uint32_t fillstateInPercent)
{
for (size_t i = 0; i < this->managerObservers.size(); i++)
this->managerObservers.at(i)->OnVideoSegmentBufferStateChanged(fillstateInPercent);
}
void MultimediaManager::NotifyAudioSegmentBufferObservers(uint32_t fillstateInPercent)
{
for (size_t i = 0; i < this->managerObservers.size(); i++)
this->managerObservers.at(i)->OnAudioSegmentBufferStateChanged(fillstateInPercent);
}
void MultimediaManager::NotifyAudioBufferObservers (uint32_t fillstateInPercent)
{
for (size_t i = 0; i < this->managerObservers.size(); i++)
this->managerObservers.at(i)->OnAudioBufferStateChanged(fillstateInPercent);
}
void MultimediaManager::InitVideoRendering (uint32_t offset)
{
// this->videoLogic = AdaptationLogicFactory::Create(libdash::framework::adaptation::Manual, this->mpd, this->period, this->videoAdaptationSet);
this->videoStream = new MultimediaStream(sampleplayer::managers::VIDEO, this->mpd, SEGMENTBUFFER_SIZE, 20, 0, this->IsNDN(), this->ndnAlpha, this->noDecoding, this->chunkGranularity, this->samplesize);
this->videoStream->AttachStreamObserver(this);
this->videoStream->SetRepresentation(this->period, this->videoAdaptationSet, this->videoRepresentation);
this->videoStream->SetPosition(offset);
}
void MultimediaManager::InitAudioPlayback (uint32_t offset)
{
// this->audioLogic = AdaptationLogicFactory::Create(libdash::framework::adaptation::Manual, this->mpd, this->period, this->audioAdaptationSet);
this->audioStream = new MultimediaStream(sampleplayer::managers::AUDIO, this->mpd, SEGMENTBUFFER_SIZE, 0, 10, this->IsNDN(), this->ndnAlpha, this->noDecoding, this->chunkGranularity, this->samplesize);
this->audioStream->AttachStreamObserver(this);
this->audioStream->SetRepresentation(this->period, this->audioAdaptationSet, this->audioRepresentation);
this->audioStream->SetPosition(offset);
}
void MultimediaManager::OnSegmentDownloaded ()
{
this->segmentsDownloaded++;
}
void MultimediaManager::OnSegmentBufferStateChanged (StreamType type, uint32_t fillstateInPercent)
{
switch (type)
{
case AUDIO:
this->NotifyAudioSegmentBufferObservers(fillstateInPercent);
break;
case VIDEO:
this->NotifyVideoSegmentBufferObservers(fillstateInPercent);
break;
default:
break;
}
}
void MultimediaManager::OnVideoBufferStateChanged (uint32_t fillstateInPercent)
{
this->NotifyVideoBufferObservers(fillstateInPercent);
}
void MultimediaManager::OnAudioBufferStateChanged (uint32_t fillstateInPercent)
{
this->NotifyAudioBufferObservers(fillstateInPercent);
}
void MultimediaManager::SetFrameRate (double framerate)
{
this->frameRate = framerate;
}
void MultimediaManager::SetEOS (bool value)
{
this->eos = value;
if(value) //ie: End of Stream so the rendering thread(s) will finish
{
this->isStopping = true;
if(this->videoRendererHandle != NULL)
{
JoinThread(this->videoRendererHandle);
DestroyThreadPortable(this->videoRendererHandle);
this->videoRendererHandle = NULL;
}
if(this->audioRendererHandle != NULL)
{
JoinThread(this->audioRendererHandle);
DestroyThreadPortable(this->audioRendererHandle);
this->audioRendererHandle = NULL;
}
this->isStopping = false;
for(size_t i = 0; i < this->managerObservers.size(); i++)
this->managerObservers.at(0)->OnEOS();
}
}
bool MultimediaManager::StartVideoRenderingThread ()
{
this->isVideoRendering = true;
this->videoRendererHandle = CreateThreadPortable (RenderVideo, this);
if(this->videoRendererHandle == NULL)
return false;
return true;
}
void MultimediaManager::StopVideoRenderingThread ()
{
this->isVideoRendering = false;
if (this->videoRendererHandle != NULL)
{
JoinThread(this->videoRendererHandle);
DestroyThreadPortable(this->videoRendererHandle);
}
}
bool MultimediaManager::StartAudioRenderingThread ()
{
this->isAudioRendering = true;
this->audioRendererHandle = CreateThreadPortable (RenderAudio, this);
if(this->audioRendererHandle == NULL)
return false;
return true;
}
void MultimediaManager::StopAudioRenderingThread ()
{
this->isAudioRendering = false;
if (this->audioRendererHandle != NULL)
{
JoinThread(this->audioRendererHandle);
DestroyThreadPortable(this->audioRendererHandle);
}
}
void* MultimediaManager::RenderVideo (void *data)
{
MultimediaManager *manager = (MultimediaManager*) data;
QImage *frame = manager->videoStream->GetFrame();
while(manager->isVideoRendering)
{
EnterCriticalSection(&manager->monitor_playing_video_mutex);
while(manager->isPlaying() == false)
SleepConditionVariableCS(&manager->playingVideoStatusChanged, &manager->monitor_playing_video_mutex, INFINITE);
LeaveCriticalSection(&manager->monitor_playing_video_mutex);
if (frame)
{
if(manager->videoElement)
{
manager->videoElement->SetImage(frame);
manager->videoElement->update();
}
manager->framesDisplayed++;
PortableSleep(1 / manager->frameRate);
delete(frame);
}
else
{
if(manager->eos)
break;
}
frame = manager->videoStream->GetFrame();
}
return NULL;
}
void* MultimediaManager::RenderAudio (void *data)
{
MultimediaManager *manager = (MultimediaManager*) data;
AudioChunk *samples = manager->audioStream->GetSamples();
while(manager->isAudioRendering)
{
EnterCriticalSection(&manager->monitor_playing_audio_mutex);
while(manager->isPlaying() == false)
SleepConditionVariableCS(&manager->playingAudioStatusChanged, &manager->monitor_playing_audio_mutex, INFINITE);
LeaveCriticalSection(&manager->monitor_playing_audio_mutex);
if (samples)
{
if(manager->audioElement)
{
manager->audioElement->WriteToBuffer(samples->Data(), samples->Length());
}
PortableSleep(1 / (double)48000);
delete samples;
}
else
if(manager->eos)
break;
samples = manager->audioStream->GetSamples();
}
return NULL;
}
bool MultimediaManager::isPlaying ()
{
return this->playing;
}
void MultimediaManager::OnPausePressed ()
{
EnterCriticalSection(&this->monitor_playing_video_mutex);
EnterCriticalSection(&this->monitor_playing_audio_mutex);
this->playing = !this->playing;
WakeAllConditionVariable(&this->playingVideoStatusChanged);
WakeAllConditionVariable(&this->playingAudioStatusChanged);
LeaveCriticalSection(&this->monitor_playing_video_mutex);
LeaveCriticalSection(&this->monitor_playing_audio_mutex);
}
void MultimediaManager::OnFastForward ()
{
if(this->videoStream)
{
this->videoStream->FastForward();
}
if(this->audioStream)
{
this->audioStream->FastForward();
}
}
void MultimediaManager::OnFastRewind ()
{
if(this->videoStream)
{
this->videoStream->FastRewind();
}
if(this->audioStream)
{
this->audioStream->FastRewind();
}
}
| 19,139 | 29.673077 | 205 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/Managers/IMultimediaManagerObserver.h
|
/*
* IMultimediaManagerObserver.h
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef QTSAMPLEPLAYER_MANAGERS_IMULTIMEDIAMANAGEROBSERVER_H_
#define QTSAMPLEPLAYER_MANAGERS_IMULTIMEDIAMANAGEROBSERVER_H_
#include <stdint.h>
namespace sampleplayer
{
namespace managers
{
class IMultimediaManagerObserver
{
public:
virtual ~IMultimediaManagerObserver () {}
virtual void OnVideoBufferStateChanged (uint32_t fillstateInPercent) = 0;
virtual void OnVideoSegmentBufferStateChanged (uint32_t fillstateInPercent) = 0;
virtual void OnAudioBufferStateChanged (uint32_t fillstateInPercent) = 0;
virtual void OnAudioSegmentBufferStateChanged (uint32_t fillstateInPercent) = 0;
virtual void OnEOS () = 0;
// todo subtitles
};
}
}
#endif /* QTSAMPLEPLAYER_MANAGERS_IMULTIMEDIAMANAGEROBSERVER_H_ */
| 1,351 | 36.555556 | 98 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/Managers/MultimediaStream.h
|
/*
* MultimediaStream.h
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef QTSAMPLEPLAYER_MANAGERS_MULTIMEDIASTREAM_H_
#define QTSAMPLEPLAYER_MANAGERS_MULTIMEDIASTREAM_H_
#include "IMPD.h"
#include "IStreamObserver.h"
#include "../libdashframework/Input/DASHManager.h"
#include "../libdashframework/Buffer/IBufferObserver.h"
#include "../libdashframework/Adaptation/IAdaptationLogic.h"
#include <QtMultimedia/qaudioformat.h>
#include "../libdashframework/Input/IDASHManagerObserver.h"
#include "../libdashframework/Buffer/Buffer.h"
#include "../libdashframework/Buffer/AudioChunk.h"
#include <QImage>
namespace sampleplayer
{
namespace managers
{
class MultimediaStream : public libdash::framework::input::IDASHManagerObserver, public libdash::framework::buffer::IBufferObserver
{
public:
MultimediaStream (StreamType type, dash::mpd::IMPD *mpd, uint32_t segmentBufferSize, uint32_t frameBufferSize, uint32_t sampleBufferSize, bool ndnEnabled, double ndnAlpha, bool nodecoding, bool chunkGranularityEnabled, int sample);
virtual ~MultimediaStream ();
bool Start ();
void Stop ();
void StopDownload ();
bool StartDownload ();
void Clear ();
uint32_t GetPosition ();
void SetPosition (uint32_t segmentNumber);
void SetPositionInMsec (uint32_t milliSecs);
//void AddFrame (libdash::framework::ImageWrap *frame);
void AddFrame (QImage *frame);
//libdash::framework::ImageWrap* GetFrame ();
QImage* GetFrame ();
void AddSamples (libdash::framework::buffer::AudioChunk* samples);
libdash::framework::buffer::AudioChunk* GetSamples ();
void SetEOS (bool value);
//void AddSubtitle ();
//SubtitleObj* GetSubtitle ();
void SetRepresentation (dash::mpd::IPeriod *period, dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation);
void EnqueueRepresentation (dash::mpd::IPeriod *period, dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation);
void SetAdaptationLogic (libdash::framework::adaptation::IAdaptationLogic *logic);
void AttachStreamObserver (IStreamObserver *observer);
void OnSegmentBufferStateChanged (uint32_t fillstateInPercent);
void OnBufferStateChanged (libdash::framework::buffer::BufferType type, uint32_t fillstateInPercent);
bool IsNDN ();
void ShouldAbort ();
void FastForward ();
void FastRewind ();
void SetTargetDownloadingTime(double);
private:
std::vector<IStreamObserver *> observers;
dash::mpd::IMPD *mpd;
libdash::framework::adaptation::IAdaptationLogic *logic;
libdash::framework::input::DASHManager *dashManager;
//libdash::framework::buffer::Buffer<libdash::framework::ImageWrap> *frameBuffer;
libdash::framework::buffer::Buffer<QImage> *frameBuffer;
libdash::framework::buffer::Buffer<libdash::framework::buffer::AudioChunk> *sampleBuffer;
// subtitle buffer
uint32_t segmentBufferSize;
uint32_t frameBufferSize;
uint32_t sampleBufferSize;
StreamType type;
bool isNDN;
double ndnAlpha;
bool noDecoding;
bool chunkGranularity;
int samplesize;
void Init ();
};
}
}
#endif /* QTSAMPLEPLAYER_MANAGERS_MULTIMEDIASTREAM_H_ */
| 4,960 | 50.14433 | 258 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/Managers/MultimediaManager.h
|
/*
* MultimediaManager.h
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef QTSAMPLEPLAYER_MANAGERS_MULTIMEDIAMANAGER_H_
#define QTSAMPLEPLAYER_MANAGERS_MULTIMEDIAMANAGER_H_
#include "IMPD.h"
#include "MultimediaStream.h"
#include "IMultimediaManagerBase.h"
#include "IMultimediaManagerObserver.h"
#include "../libdashframework/Adaptation/IAdaptationLogic.h"
#include "../libdashframework/Adaptation/AdaptationLogicFactory.h"
#include "../Renderer/QTGLRenderer.h"
#include "../Renderer/QTAudioRenderer.h"
#include "../libdashframework/Portable/MultiThreading.h"
#include "../libdashframework/Buffer/AudioChunk.h"
#include <QtMultimedia/qaudiooutput.h>
#include<cstring>
namespace sampleplayer
{
namespace managers
{
class MultimediaManager : public IStreamObserver, public IMultimediaManagerBase
{
public:
MultimediaManager (renderer::QTGLRenderer *videoElement, renderer::QTAudioRenderer *audioElement, bool noDecoding = false);
virtual ~MultimediaManager ();
void SetLocalMPD (char * path);
bool Init (const std::string& url);
bool InitNDN (const std::string& url);
void Start (bool ndnEnabled, double ndnAlpha, bool chunkGranularity, int sample);
void Stop ();
dash::mpd::IMPD* GetMPD ();
bool SetVideoQuality (dash::mpd::IPeriod* period, dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation);
bool SetAudioQuality (dash::mpd::IPeriod* period, dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation);
bool SetVideoAdaptationLogic (libdash::framework::adaptation::LogicType type, double arg1 = 0, double arg2 =0, double arg3=0,
double arg4 = 0, double arg5 =0, double arg6=0);
bool SetAudioAdaptationLogic (libdash::framework::adaptation::LogicType type, double arg1 = 0, double arg2 =0, double arg3=0,
double arg4 = 0, double arg5 =0, double arg6=0);
void AttachManagerObserver (IMultimediaManagerObserver *observer);
void SetFrameRate (double frameRate);
/* IStreamObserver */
void OnSegmentDownloaded ();
void OnSegmentBufferStateChanged(StreamType type, uint32_t fillstateInPercent);
void OnVideoBufferStateChanged (uint32_t fillstateInPercent);
void OnAudioBufferStateChanged (uint32_t fillstateInPercent);
bool IsUserDependent ();
bool IsStarted ();
bool IsStopping ();
bool IsNDN ();
void SetEOS (bool value);
void ShouldAbort (bool isVideo);
void SetTargetDownloadingTime (bool isVid, double time);
bool isPlaying ();
void OnPausePressed ();
void OnFastForward ();
void OnFastRewind ();
private:
dash::IDASHManager *manager;
dash::mpd::IMPD *mpd;
renderer::QTGLRenderer *videoElement;
renderer::QTAudioRenderer *audioElement;
dash::mpd::IPeriod *period;
dash::mpd::IAdaptationSet *videoAdaptationSet;
dash::mpd::IRepresentation *videoRepresentation;
libdash::framework::adaptation::IAdaptationLogic *videoLogic;
MultimediaStream *videoStream;
dash::mpd::IAdaptationSet *audioAdaptationSet;
dash::mpd::IRepresentation *audioRepresentation;
libdash::framework::adaptation::IAdaptationLogic *audioLogic;
MultimediaStream *audioStream;
std::vector<IMultimediaManagerObserver *> managerObservers;
bool isStarted;
bool isStopping;
bool isNDN;
double ndnAlpha;
bool chunkGranularity;
int samplesize;
bool localmpdset;
char* localmpdpath;
uint64_t framesDisplayed;
uint64_t segmentsDownloaded;
CRITICAL_SECTION monitorMutex;
double frameRate;
THREAD_HANDLE videoRendererHandle;
THREAD_HANDLE audioRendererHandle;
bool isVideoRendering;
bool isAudioRendering;
bool eos;
bool playing;
mutable CRITICAL_SECTION monitor_playing_video_mutex;
mutable CONDITION_VARIABLE playingVideoStatusChanged;
mutable CRITICAL_SECTION monitor_playing_audio_mutex;
mutable CONDITION_VARIABLE playingAudioStatusChanged;
const char *logicName;
bool noDecoding;
/* Threads for Rendering Audio & Video */
bool StartVideoRenderingThread ();
void StopVideoRenderingThread ();
static void* RenderVideo (void *data);
bool StartAudioRenderingThread ();
void StopAudioRenderingThread ();
static void* RenderAudio (void *data);
void InitVideoRendering (uint32_t offset);
void InitAudioPlayback (uint32_t offset);
void StopVideo ();
void StopAudio ();
/* IMultimediaManager Notifiers */
void NotifyVideoBufferObservers (uint32_t fillstateInPercent);
void NotifyVideoSegmentBufferObservers (uint32_t fillstateInPercent);
void NotifyAudioBufferObservers (uint32_t fillstateInPercent);
void NotifyAudioSegmentBufferObservers (uint32_t fillstateInPercent);
};
}
}
#endif /* QTSAMPLEPLAYER_MANAGERS_MULTIMEDIAMANAGER_H_ */
| 7,992 | 55.288732 | 157 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/Managers/IMultimediaManagerBase.h
|
#ifndef QTSAMPLEPLAYER_MANAGERS_IMULTIMEDIAMANAGERBASE_H_
#define QTSAMPLEPLAYER_MANAGERS_IMULTIMEDIAMANAGERBASE_H_
#include "IMPD.h"
namespace sampleplayer
{
namespace managers
{
class IMultimediaManagerBase
{
public:
virtual bool SetVideoQuality (dash::mpd::IPeriod* period, dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation) = 0;
virtual bool SetAudioQuality (dash::mpd::IPeriod* period, dash::mpd::IAdaptationSet *adaptationSet, dash::mpd::IRepresentation *representation) = 0;
virtual bool IsStarted ()=0;
virtual bool IsStopping ()=0;
virtual void ShouldAbort (bool isVideo)=0;
virtual void SetTargetDownloadingTime (bool,double)=0;
};
}
}
#endif //QTSAMPLEPLAYER_MANAGERS_IMULTIMEDIAMANAGERBASE_H_
| 833 | 33.75 | 159 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/Renderer/QTGLRenderer.cpp
|
/*
* QTGLRenderer.cpp
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "QTGLRenderer.h"
using namespace sampleplayer::renderer;
QTGLRenderer::QTGLRenderer (QWidget *parent) :
QGLWidget (QGLFormat(QGL::SampleBuffers), parent)
{
InitializeCriticalSection (&this->monitorMutex);
setAutoBufferSwap(true);
// setAutoFillBackground(false);
// this->setGeometry(9+10,35+30,582,401);
}
QTGLRenderer::~QTGLRenderer ()
{
DeleteCriticalSection (&this->monitorMutex);
}
void QTGLRenderer::SetImage (QImage *image)
{
EnterCriticalSection(&this->monitorMutex);
img = *image;
LeaveCriticalSection(&this->monitorMutex);
}
void QTGLRenderer::paintEvent (QPaintEvent *paintEvent)
{
EnterCriticalSection(&this->monitorMutex);
QPainter p;
p.begin(this);
p.drawImage(this->rect(), this->img);
p.end();
LeaveCriticalSection(&this->monitorMutex);
}
| 1,291 | 27.086957 | 79 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/Renderer/QTAudioRenderer.h
|
/*
* QTAudioRenderer.h
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef QTAUDIORENDERER_H_
#define QTAUDIORENDERER_H_
#include <QtMultimedia/qaudiooutput.h>
#include <QtMultimedia/qaudioformat.h>
#include <qbuffer.h>
#include <qwidget.h>
#include <QtMultimedia/qaudiodeviceinfo.h>
namespace sampleplayer
{
namespace renderer
{
class QTAudioRenderer : public QWidget
{
Q_OBJECT
public:
QTAudioRenderer (QWidget *parent = NULL);
virtual ~QTAudioRenderer ();
void SetAudioFormat (const QAudioFormat& format);
const QAudioFormat& AudioFormat () const;
void StartPlayback ();
void StopPlayback ();
void WriteToBuffer (const char *data, qint64 len);
private:
QAudioOutput *audioOutput;
QAudioFormat format;
QAudioDeviceInfo deviceInfo;
QObject *parent;
QIODevice *output;
void Init();
void Reset();
};
}
}
#endif /* QTAUDIORENDERER_H_ */
| 1,657 | 30.283019 | 87 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/Renderer/QTAudioRenderer.cpp
|
/*
* QTAudioRenderer.cpp
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "QTAudioRenderer.h"
#include<stdio.h>
using namespace sampleplayer::renderer;
QTAudioRenderer::QTAudioRenderer(QWidget *parent) :
QWidget (parent),
parent (parent),
audioOutput (NULL),
output (NULL)
{
this->Init();
this->Reset();
}
QTAudioRenderer::~QTAudioRenderer()
{
delete this->audioOutput;
this->audioOutput = NULL;
}
void QTAudioRenderer::SetAudioFormat (const QAudioFormat& format)
{
if (!this->deviceInfo.isFormatSupported(format))
this->format = this->deviceInfo.nearestFormat(format);
}
const QAudioFormat& QTAudioRenderer::AudioFormat () const
{
return this->format;
}
void QTAudioRenderer::StartPlayback ()
{
this->Reset();
}
void QTAudioRenderer::StopPlayback ()
{
if (!this->audioOutput)
return;
if (this->audioOutput->state() == QAudio::ActiveState)
this->audioOutput->stop();
delete this->audioOutput;
this->audioOutput = NULL;
}
void QTAudioRenderer::WriteToBuffer (const char *data, qint64 len)
{
while (len > 0)
{
qint64 written = this->output->write(data, len);
len -= written;
data += written;
}
}
void QTAudioRenderer::Init ()
{
this->deviceInfo = QAudioDeviceInfo(QAudioDeviceInfo::defaultOutputDevice());
this->format.setSampleRate(44100);
this->format.setChannelCount(2);
this->format.setSampleSize(32);
this->format.setCodec("audio/pcm");
this->format.setByteOrder(QAudioFormat::LittleEndian);
this->format.setSampleType(QAudioFormat::SignedInt);
if (!this->deviceInfo.isFormatSupported(this->format))
format = this->deviceInfo.nearestFormat(this->format);
}
void QTAudioRenderer::Reset ()
{
this->audioOutput = new QAudioOutput(this->deviceInfo, this->format, this->parent);
this->output = this->audioOutput->start();
}
| 2,491 | 28.666667 | 87 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/Renderer/QTGLRenderer.h
|
/*
* QTGLRenderer.h
*****************************************************************************
* Copyright (C) 2013, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef QTGLRENDERER_H_
#define QTGLRENDERER_H_
#include "../libdashframework/Portable/MultiThreading.h"
#include <qimage.h>
#include <QtOpenGL/QGLWidget>
#include <QPaintEvent>
namespace sampleplayer
{
namespace renderer
{
class QTGLRenderer : public QGLWidget
{
Q_OBJECT
public:
QTGLRenderer (QWidget *parent = NULL);
virtual ~QTGLRenderer ();
void SetImage (QImage *image);
private:
QImage img;
CRITICAL_SECTION monitorMutex;
protected:
void paintEvent (QPaintEvent *paintEvent);
};
}
}
#endif /* QTGLRENDERER_H_ */
| 1,169 | 25 | 79 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/Decoder/LibavDecoder.cpp
|
/*
* LibavDecoder.cpp
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#include "LibavDecoder.h"
#include <fstream>
#include <iostream>
//To circumvent the stupid refactoring in libavcodec...
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,1)
#define av_frame_alloc avcodec_alloc_frame
#define av_frame_free avcodec_free_frame
#endif
using namespace libdash::framework::input;
using namespace sampleplayer::decoder;
#define AVERROR_RESSOURCE_NOT_AVAILABLE -11
int lock_call_back(void ** mutex, enum AVLockOp op) {
switch(op) {
case AV_LOCK_CREATE:
*mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t));
pthread_mutex_init((pthread_mutex_t *)(*mutex), NULL);
break;
case AV_LOCK_OBTAIN:
pthread_mutex_lock((pthread_mutex_t *)(*mutex));
break;
case AV_LOCK_RELEASE:
pthread_mutex_unlock((pthread_mutex_t *)(*mutex));
break;
case AV_LOCK_DESTROY:
pthread_mutex_destroy((pthread_mutex_t *)(*mutex));
free(*mutex);
break;
}
return 0;
}
static int IORead (void *opaque, uint8_t *buf, int buf_size)
{
IDataReceiver* datrec = (IDataReceiver*)opaque;
int ret = datrec->Read(buf, buf_size);
// if(datrec->IsAudio())
/* {
FILE * fp;
fp = fopen("/home/ndnops/IORead.bin", "ab");
fwrite(buf,sizeof(uint8_t), sizeof(uint8_t)*ret,fp);
fclose(fp);
}
// */
return ret;
}
bool LibavDecoder::IsAudio ()
{
return this->isAudio;
}
LibavDecoder::LibavDecoder (IDataReceiver* rec) :
receiver (rec),
errorHappened (false),
bufferSize (32768),
isAudio (false),
first (true)
{
av_register_all();
av_lockmgr_register(&lock_call_back);
}
LibavDecoder::~LibavDecoder ()
{
}
void LibavDecoder::AttachAudioObserver (IAudioObserver *observer)
{
audioObservers.push_back(observer);
}
void LibavDecoder::AttachVideoObserver (IVideoObserver *observer)
{
videoObservers.push_back(observer);
}
void LibavDecoder::Notify (AVFrame *frame, StreamConfig *config)
{
switch(config->stream->codec->codec_type)
{
case AVMEDIA_TYPE_VIDEO:
this->NotifyVideo(frame, config);
break;
case AVMEDIA_TYPE_AUDIO:
{
this->NotifyAudio(frame, config);
break;
}
case AVMEDIA_TYPE_SUBTITLE:
break;
case AVMEDIA_TYPE_UNKNOWN:
break;
default:
break;
}
}
void LibavDecoder::NotifyVideo (AVFrame * avFrame, StreamConfig* decoConf)
{
videoFrameProperties props;
props.fireError = false;
props.frame = decoConf->frameCnt;
props.height = decoConf->stream->codec->height;
props.width = decoConf->stream->codec->width;
props.linesize = avFrame->linesize;
props.streamIndex = decoConf->stream->index;
if(decoConf->stream->codec->pix_fmt == AV_PIX_FMT_YUV420P)
props.pxlFmt = yuv420p;
if(decoConf->stream->codec->pix_fmt == AV_PIX_FMT_YUV422P)
props.pxlFmt = yuv422p;
for(size_t i = 0; i < videoObservers.size(); i++)
videoObservers.at(i)->OnVideoDataAvailable((const uint8_t **)avFrame->data, &props);
}
void LibavDecoder::NotifyAudio (AVFrame * avFrame, StreamConfig* decoConf)
{
audioFrameProperties props;
props.fireError = false;
props.streamIndex = decoConf->stream->index;
props.linesize = avFrame->linesize[0];
props.channels = decoConf->stream->codec->channels;
props.sampleRate = decoConf->stream->codec->sample_rate;
props.samples = avFrame->nb_samples;
AVAudioResampleContext *resampCtx;
Debug("Allocating resample context");
resampCtx = avresample_alloc_context();
if(!resampCtx)
{
Debug("Couldn't alloc resample context...\n");
}
av_opt_set_int(resampCtx, "in_sample_fmt", decoConf->codecContext->sample_fmt,0);
av_opt_set_int(resampCtx, "in_sample_rate", decoConf->stream->codec->sample_rate,0);
av_opt_set_int(resampCtx, "in_channel_layout", AV_CH_LAYOUT_STEREO,0);
av_opt_set_int(resampCtx, "out_sample_fmt", AV_SAMPLE_FMT_S32,0);
av_opt_set_int(resampCtx, "out_sample_rate", decoConf->stream->codec->sample_rate,0);
av_opt_set_int(resampCtx, "out_channel_layout", AV_CH_LAYOUT_STEREO,0);
av_opt_set_int(resampCtx, "internal_sample_fmt", AV_SAMPLE_FMT_FLTP,0);
if(avresample_open(resampCtx) < 0)
Debug("Error openning the resampling context\n");
int data_size = av_samples_get_buffer_size(NULL, decoConf->codecContext->channels, avFrame->nb_samples,decoConf->codecContext->sample_fmt, 1);
props.linesize = data_size;
uint8_t *output;
int out_linesize;
int out_samples = avresample_available(resampCtx) + av_rescale_rnd(avresample_get_delay(resampCtx) + avFrame->nb_samples,decoConf->stream->codec->sample_rate, decoConf->stream->codec->sample_rate, AV_ROUND_UP);
// avresample_get_out_samples(resampCtx, avFrame->nb_samples);
Debug("out_samples: %d\n", out_samples);
av_samples_alloc(&output, &out_linesize, 2, out_samples,AV_SAMPLE_FMT_FLT, 0);
out_samples = avresample_convert(resampCtx, &output, out_linesize, out_samples,avFrame->data, avFrame->linesize[0], avFrame->nb_samples);
//for(size_t i = 0; i < audioObservers.size(); i++)
// audioObservers.at(i)->OnAudioDataAvailable((const uint8_t **) avFrame->data, &props);
for(size_t i = 0; i < audioObservers.size(); i++)
audioObservers.at(i)->OnAudioDataAvailable((const uint8_t **) &output, &props);
}
AVFormatContext* LibavDecoder::OpenInput ()
{
AVFormatContext *avFormatContextPtr = NULL;
int err = 0;
this->iobuffer = (unsigned char*) av_malloc(bufferSize);
avFormatContextPtr = avformat_alloc_context();
avFormatContextPtr->pb = avio_alloc_context(this->iobuffer, bufferSize, 0, receiver, IORead, NULL, NULL);
avFormatContextPtr->pb->seekable = 0;
err = avformat_open_input(&avFormatContextPtr, "", NULL, NULL);
if (err < 0)
{
this->Error("Error while calling avformat_open_input", err);
return NULL;
}
err = avformat_find_stream_info(avFormatContextPtr, 0);
if (err < 0)
{
this->Error("Error while calling avformat_find_stream_info", err);
return NULL;
}
return avFormatContextPtr;
}
void LibavDecoder::InitStreams (AVFormatContext *avFormatContextPtr)
{
AVStream *tempStream = NULL;
AVCodec *tempCodec = NULL;
StreamConfig tempConfig;
for (size_t streamcnt = 0; streamcnt < avFormatContextPtr->nb_streams; ++streamcnt)
{
tempStream = avFormatContextPtr->streams[streamcnt];
if ((tempStream->codec->codec_type == AVMEDIA_TYPE_VIDEO) ||
(tempStream->codec->codec_type == AVMEDIA_TYPE_AUDIO))
{
tempConfig.stream = tempStream;
tempCodec = avcodec_find_decoder(tempStream->codec->codec_id);
tempConfig.codecContext = tempStream->codec;
tempConfig.frameCnt = 0;
//tempStream->codec->hwaccel = ff_find_hwaccel(tempStream->codec->codec_id, tempStream->codec->pix_fmt);
avcodec_open2(tempConfig.codecContext, tempCodec, NULL);
this->streamconfigs.push_back(tempConfig);
}
if(tempStream->codec->codec_type == AVMEDIA_TYPE_AUDIO)
this->isAudio = true;
}
}
AVHWAccel * LibavDecoder::ff_find_hwaccel(enum AVCodecID codec_id, enum AVPixelFormat pix_fmt)
{
AVHWAccel *hwaccel = NULL;
while(hwaccel = av_hwaccel_next(hwaccel))
{
if((hwaccel->id == codec_id) && hwaccel->pix_fmt == pix_fmt)
return hwaccel;
}
return NULL;
}
StreamConfig* LibavDecoder::GetNextPacket (AVFormatContext* avFormatContextPtr, AVPacket* avpkt)
{
while (true)
{
int err = av_read_frame(avFormatContextPtr, avpkt);
if ((size_t)err == AVERROR_EOF)
return NULL;
if (err == AVERROR_RESSOURCE_NOT_AVAILABLE)
{
av_free_packet(avpkt);
continue;
}
if (err < 0)
{
this->Error("Error while av_read_frame", err);
return NULL;
}
StreamConfig *tempConfig = this->FindStreamConfig(avpkt->stream_index);
if (tempConfig)
return tempConfig;
av_free_packet(avpkt);
}
}
StreamConfig* LibavDecoder::FindStreamConfig (int streamIndex)
{
size_t configsCount = this->streamconfigs.size();
for (size_t i = 0; i < configsCount; i++)
{
if (this->streamconfigs.at(i).stream->index == streamIndex)
return &this->streamconfigs.at(i);
}
return NULL;
}
int LibavDecoder::DecodeMedia (AVFrame *frame, AVPacket *avpkt, StreamConfig *decConfig, int *got_frame)
{
switch(decConfig->stream->codec->codec_type)
{
case AVMEDIA_TYPE_VIDEO:
{
avcodec_get_frame_defaults(frame);
return avcodec_decode_video2(decConfig->codecContext, frame, got_frame, avpkt);
}
case AVMEDIA_TYPE_AUDIO:
{
return avcodec_decode_audio4(decConfig->codecContext, frame, got_frame, avpkt);
}
case AVMEDIA_TYPE_SUBTITLE:
break;
case AVMEDIA_TYPE_UNKNOWN:
break;
default:
break;
}
return -1;
}
int LibavDecoder::DecodeFrame (AVFrame *frame, AVPacket* avpkt, StreamConfig* decConfig)
{
int len = 0;
int got_frame = 1;
while (avpkt->size > 0)
{
/* TODO handle multi frame packets */
len = this->DecodeMedia(frame, avpkt, decConfig, &got_frame);
if(len < 0)
{
this->Error("Error while decoding frame", len);
return -1;
}
if(got_frame)
{
this->Notify(frame, decConfig);
decConfig->frameCnt++;
}
avpkt->data += len;
avpkt->size -= len;
}
// av_free_packet(avpkt);
return 0;
}
void LibavDecoder::Flush ()
{
int gotFrame = 0;
int configsCount = this->streamconfigs.size();
av_free_packet(&this->avpkt);
av_init_packet(&this->avpkt);
for (int i = 0; i < configsCount; i++)
{
do
{
this->DecodeMedia(this->frame, &this->avpkt, &this->streamconfigs.at(i), &gotFrame);
if (gotFrame)
{
this->Notify(this->frame, &this->streamconfigs.at(i));
}
} while(gotFrame);
}
av_free_packet(&this->avpkt);
}
bool LibavDecoder::Init ()
{
this->avFormatContextPtr = this->OpenInput();
if (this->errorHappened)
return false;
//this->frame = avcodec_alloc_frame();
this->frame = av_frame_alloc();
av_init_packet(&this->avpkt);
this->InitStreams(avFormatContextPtr);
return true;
}
bool LibavDecoder::Decode ()
{
StreamConfig *decConfig = this->GetNextPacket(this->avFormatContextPtr, &this->avpkt);
if(decConfig == NULL)
return false;
if(this->DecodeFrame(this->frame, &this->avpkt, decConfig) < 0)
return false;
return true;
}
void LibavDecoder::Stop ()
{
this->FreeConfigs();
avformat_close_input(&this->avFormatContextPtr);
av_free(this->frame);
}
void LibavDecoder::FreeConfigs ()
{
for(size_t i = 0; i < this->streamconfigs.size(); i++)
avcodec_close(this->streamconfigs.at(i).codecContext);
}
void LibavDecoder::Error (std::string errormsg, int errorcode)
{
videoFrameProperties videoprops;
audioFrameProperties audioprops;
char errorCodeMsg[1024];
std::stringstream sstm;
av_strerror(errorcode, errorCodeMsg, 1024);
sstm << "ERROR: " << errormsg << ", ErrorCodeMsg: " << errorCodeMsg;
videoprops.fireError = true;
videoprops.errorMessage = (char*)malloc(sstm.str().size()+1);
strcpy(videoprops.errorMessage, sstm.str().c_str());
Debug("Error LibavDecoder: %s\n\nNow onto solving it...\n\n",sstm.str().c_str());
for (size_t i = 0; i < videoObservers.size(); i++)
videoObservers.at(i)->OnVideoDataAvailable(NULL, &videoprops);
audioprops.fireError = true;
audioprops.errorMessage = (char*)malloc(sstm.str().size()+1);
strcpy(audioprops.errorMessage, sstm.str().c_str());
for (size_t j = 0; j < audioObservers.size(); j++)
audioObservers.at(j)->OnAudioDataAvailable(NULL, &audioprops);
this->errorHappened = true;
free(audioprops.errorMessage);
free(videoprops.errorMessage);
}
| 13,372 | 30.392019 | 214 |
cpp
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/Decoder/IAudioObserver.h
|
/*
* IAudioObserver.h
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef IAUDIOOBSERVER_H_
#define IAUDIOOBSERVER_H_
#include <stdint.h>
namespace sampleplayer
{
namespace decoder
{
struct audioFrameProperties
{
int streamIndex;
int linesize;
int sampleRate;
int channels;
int samples;
int chunkSize;
bool fireError;
char* errorMessage;
};
class IAudioObserver
{
public:
virtual ~IAudioObserver () {}
virtual void OnAudioDataAvailable (const uint8_t **data, audioFrameProperties* props) = 0;
};
}
}
#endif /* IAUDIOOBSERVER_H_ */
| 1,135 | 24.818182 | 106 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/Decoder/IVideoObserver.h
|
/*
* IVideoObserver.h
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef IVIDEOOBSERVER_H_
#define IVIDEOOBSERVER_H_
#include <stdint.h>
extern "C"
{
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
#include <libavresample/avresample.h>
}
namespace sampleplayer
{
namespace decoder
{
enum pixelFormat {
yuv420p = 0,
yuv422p = 4
};
struct videoFrameProperties
{
int* linesize;
int frame;
int streamIndex;
int framesPerChunk;
int width;
int height;
bool fireError;
char* errorMessage;
pixelFormat pxlFmt;
};
class IVideoObserver
{
public:
virtual ~IVideoObserver () {}
virtual void OnVideoDataAvailable (const uint8_t **data, videoFrameProperties* props) = 0;
};
}
}
#endif /* IVIDEOOBSERVER_H_ */
| 1,511 | 25.068966 | 106 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/qtsampleplayer/Decoder/LibavDecoder.h
|
/*
* LibavDecoder.h
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: [email protected]
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*****************************************************************************/
#ifndef LIBAVDECODER_H_
#define LIBAVDECODER_H_
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <iostream>
#include <sstream>
#include <sys/time.h>
extern "C"
{
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
#include <libavutil/mathematics.h>
#include <libavutil/opt.h>
#include <libavresample/avresample.h>
}
#include "../libdashframework/Input/IDataReceiver.h"
#include "../libdashframework/Portable/MultiThreading.h"
#include "IVideoObserver.h"
#include "IAudioObserver.h"
#include "../debug.h"
namespace sampleplayer
{
namespace decoder
{
struct StreamConfig
{
AVStream *stream;
AVCodecContext *codecContext;
int frameCnt;
};
class LibavDecoder
{
public:
LibavDecoder (libdash::framework::input::IDataReceiver *rec);
virtual ~LibavDecoder ();
bool Decode ();
bool Init ();
void Stop ();
void AttachVideoObserver (IVideoObserver *observer);
void AttachAudioObserver (IAudioObserver *observer);
void Flush ();
bool IsAudio ();
AVHWAccel* ff_find_hwaccel (enum AVCodecID, enum AVPixelFormat);
private:
libdash::framework::input::IDataReceiver *receiver;
std::vector <StreamConfig> streamconfigs;
std::vector <IVideoObserver*> videoObservers;
std::vector <IAudioObserver*> audioObservers;
unsigned char *iobuffer;
int bufferSize;
AVFormatContext *avFormatContextPtr;
AVFrame *frame;
AVPacket avpkt;
bool errorHappened;
bool isAudio;
bool first;
CRITICAL_SECTION monitorMutex;
AVFormatContext* OpenInput ();
void InitStreams (AVFormatContext *ctx);
StreamConfig* GetNextPacket (AVFormatContext *ctx, AVPacket *pkt);
int DecodeMedia (AVFrame *frame, AVPacket *pkt, StreamConfig *streamCfg, int *gotFrame);
int DecodeFrame (AVFrame *frame, AVPacket *pkt, StreamConfig *streamCfg);
void FreeConfigs ();
void Error (std::string errormsg, int errorcode);
void Notify (AVFrame *frame, StreamConfig *config);
void NotifyVideo (AVFrame *frame, StreamConfig *config);
void NotifyAudio (AVFrame *frame, StreamConfig *config);
StreamConfig* FindStreamConfig(int streamIndex);
};
}
}
#endif /* LIBAVDECODER_H_ */
| 3,788 | 37.272727 | 124 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/iconv/include/iconv.h
|
/* Copyright (C) 1999-2003 Free Software Foundation, Inc.
This file is part of the GNU LIBICONV Library.
The GNU LIBICONV Library is free software; you can redistribute it
and/or modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
The GNU LIBICONV 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU LIBICONV Library; see the file COPYING.LIB.
If not, write to the Free Software Foundation, Inc., 59 Temple Place -
Suite 330, Boston, MA 02111-1307, USA. */
/* When installed, this file is called "iconv.h". */
#ifndef _LIBICONV_H
#define _LIBICONV_H
#define _LIBICONV_VERSION 0x0109 /* version number: (major<<8) + minor */
extern int _libiconv_version; /* Likewise */
/* We would like to #include any system header file which could define
iconv_t, 1. in order to eliminate the risk that the user gets compilation
errors because some other system header file includes /usr/include/iconv.h
which defines iconv_t or declares iconv after this file, 2. when compiling
for LIBICONV_PLUG, we need the proper iconv_t type in order to produce
binary compatible code.
But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
has been installed in /usr/local/include, there is no way any more to
include the original /usr/include/iconv.h. We simply have to get away
without it.
Ad 1. The risk that a system header file does
#include "iconv.h" or #include_next "iconv.h"
is small. They all do #include <iconv.h>.
Ad 2. The iconv_t type is a pointer type in all cases I have seen. (It
has to be a scalar type because (iconv_t)(-1) is a possible return value
from iconv_open().) */
/* Define iconv_t ourselves. */
#undef iconv_t
#define iconv_t libiconv_t
typedef void* iconv_t;
/* Get size_t declaration. */
#include <stddef.h>
/* Get errno declaration and values. */
#include <errno.h>
/* Some systems, like SunOS 4, don't have EILSEQ. Some systems, like BSD/OS,
have EILSEQ in a different header. On these systems, define EILSEQ
ourselves. */
#ifndef EILSEQ
/* Igor: called upon EILSEQ from glibc, since autogeneration of this header
on Windows didn't do the job. */
/* #define EILSEQ @EILSEQ@ */
#define EILSEQ 84
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Allocates descriptor for code conversion from encoding `fromcode' to
encoding `tocode'. */
#ifndef LIBICONV_PLUG
#define iconv_open libiconv_open
#endif
extern iconv_t iconv_open (const char* tocode, const char* fromcode);
/* Converts, using conversion descriptor `cd', at most `*inbytesleft' bytes
starting at `*inbuf', writing at most `*outbytesleft' bytes starting at
`*outbuf'.
Decrements `*inbytesleft' and increments `*inbuf' by the same amount.
Decrements `*outbytesleft' and increments `*outbuf' by the same amount. */
#ifndef LIBICONV_PLUG
#define iconv libiconv
#endif
extern size_t iconv (iconv_t cd, const char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
/* Frees resources allocated for conversion descriptor `cd'. */
#ifndef LIBICONV_PLUG
#define iconv_close libiconv_close
#endif
extern int iconv_close (iconv_t cd);
#ifndef LIBICONV_PLUG
/* Nonstandard extensions. */
/* Control of attributes. */
#define iconvctl libiconvctl
extern int iconvctl (iconv_t cd, int request, void* argument);
/* Requests for iconvctl. */
#define ICONV_TRIVIALP 0 /* int *argument */
#define ICONV_GET_TRANSLITERATE 1 /* int *argument */
#define ICONV_SET_TRANSLITERATE 2 /* const int *argument */
#define ICONV_GET_DISCARD_ILSEQ 3 /* int *argument */
#define ICONV_SET_DISCARD_ILSEQ 4 /* const int *argument */
/* Listing of locale independent encodings. */
#define iconvlist libiconvlist
extern void iconvlist (int (*do_one) (unsigned int namescount,
const char * const * names,
void* data),
void* data);
/* Support for relocatable packages. */
/* Sets the original and the current installation prefix of the package.
Relocation simply replaces a pathname starting with the original prefix
by the corresponding pathname with the current prefix instead. Both
prefixes should be directory names without trailing slash (i.e. use ""
instead of "/"). */
extern void libiconv_set_relocation_prefix (const char *orig_prefix,
const char *curr_prefix);
#endif
#ifdef __cplusplus
}
#endif
#endif /* _LIBICONV_H */
| 4,902 | 35.318519 | 113 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/SAX.h
|
/*
* Summary: Old SAX version 1 handler, deprecated
* Description: DEPRECATED set of SAX version 1 interfaces used to
* build the DOM tree.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_SAX_H__
#define __XML_SAX_H__
#include <stdio.h>
#include <stdlib.h>
#include <libxml/xmlversion.h>
#include <libxml/parser.h>
#include <libxml/xlink.h>
#ifdef LIBXML_LEGACY_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
XMLPUBFUN const xmlChar * XMLCALL
getPublicId (void *ctx);
XMLPUBFUN const xmlChar * XMLCALL
getSystemId (void *ctx);
XMLPUBFUN void XMLCALL
setDocumentLocator (void *ctx,
xmlSAXLocatorPtr loc);
XMLPUBFUN int XMLCALL
getLineNumber (void *ctx);
XMLPUBFUN int XMLCALL
getColumnNumber (void *ctx);
XMLPUBFUN int XMLCALL
isStandalone (void *ctx);
XMLPUBFUN int XMLCALL
hasInternalSubset (void *ctx);
XMLPUBFUN int XMLCALL
hasExternalSubset (void *ctx);
XMLPUBFUN void XMLCALL
internalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN void XMLCALL
externalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlEntityPtr XMLCALL
getEntity (void *ctx,
const xmlChar *name);
XMLPUBFUN xmlEntityPtr XMLCALL
getParameterEntity (void *ctx,
const xmlChar *name);
XMLPUBFUN xmlParserInputPtr XMLCALL
resolveEntity (void *ctx,
const xmlChar *publicId,
const xmlChar *systemId);
XMLPUBFUN void XMLCALL
entityDecl (void *ctx,
const xmlChar *name,
int type,
const xmlChar *publicId,
const xmlChar *systemId,
xmlChar *content);
XMLPUBFUN void XMLCALL
attributeDecl (void *ctx,
const xmlChar *elem,
const xmlChar *fullname,
int type,
int def,
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
XMLPUBFUN void XMLCALL
elementDecl (void *ctx,
const xmlChar *name,
int type,
xmlElementContentPtr content);
XMLPUBFUN void XMLCALL
notationDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId);
XMLPUBFUN void XMLCALL
unparsedEntityDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId,
const xmlChar *notationName);
XMLPUBFUN void XMLCALL
startDocument (void *ctx);
XMLPUBFUN void XMLCALL
endDocument (void *ctx);
XMLPUBFUN void XMLCALL
attribute (void *ctx,
const xmlChar *fullname,
const xmlChar *value);
XMLPUBFUN void XMLCALL
startElement (void *ctx,
const xmlChar *fullname,
const xmlChar **atts);
XMLPUBFUN void XMLCALL
endElement (void *ctx,
const xmlChar *name);
XMLPUBFUN void XMLCALL
reference (void *ctx,
const xmlChar *name);
XMLPUBFUN void XMLCALL
characters (void *ctx,
const xmlChar *ch,
int len);
XMLPUBFUN void XMLCALL
ignorableWhitespace (void *ctx,
const xmlChar *ch,
int len);
XMLPUBFUN void XMLCALL
processingInstruction (void *ctx,
const xmlChar *target,
const xmlChar *data);
XMLPUBFUN void XMLCALL
globalNamespace (void *ctx,
const xmlChar *href,
const xmlChar *prefix);
XMLPUBFUN void XMLCALL
setNamespace (void *ctx,
const xmlChar *name);
XMLPUBFUN xmlNsPtr XMLCALL
getNamespace (void *ctx);
XMLPUBFUN int XMLCALL
checkNamespace (void *ctx,
xmlChar *nameSpace);
XMLPUBFUN void XMLCALL
namespaceDecl (void *ctx,
const xmlChar *href,
const xmlChar *prefix);
XMLPUBFUN void XMLCALL
comment (void *ctx,
const xmlChar *value);
XMLPUBFUN void XMLCALL
cdataBlock (void *ctx,
const xmlChar *value,
int len);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN void XMLCALL
initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
int warning);
#ifdef LIBXML_HTML_ENABLED
XMLPUBFUN void XMLCALL
inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
#endif
#ifdef LIBXML_DOCB_ENABLED
XMLPUBFUN void XMLCALL
initdocbDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
#endif
#endif /* LIBXML_SAX1_ENABLED */
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_LEGACY_ENABLED */
#endif /* __XML_SAX_H__ */
| 4,412 | 24.362069 | 66 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/xmlexports.h
|
/*
* Summary: macros for marking symbols as exportable/importable.
* Description: macros for marking symbols as exportable/importable.
*
* Copy: See Copyright for the status of this software.
*
* Author: Igor Zlatovic <[email protected]>
*/
#ifndef __XML_EXPORTS_H__
#define __XML_EXPORTS_H__
/**
* XMLPUBFUN, XMLPUBVAR, XMLCALL
*
* Macros which declare an exportable function, an exportable variable and
* the calling convention used for functions.
*
* Please use an extra block for every platform/compiler combination when
* modifying this, rather than overlong #ifdef lines. This helps
* readability as well as the fact that different compilers on the same
* platform might need different definitions.
*/
/**
* XMLPUBFUN:
*
* Macros which declare an exportable function
*/
#define XMLPUBFUN
/**
* XMLPUBVAR:
*
* Macros which declare an exportable variable
*/
#define XMLPUBVAR extern
/**
* XMLCALL:
*
* Macros which declare the called convention for exported functions
*/
#define XMLCALL
/**
* XMLCDECL:
*
* Macro which declares the calling convention for exported functions that
* use '...'.
*/
#define XMLCDECL
/** DOC_DISABLE */
/* Windows platform with MS compiler */
#if defined(_WIN32) && defined(_MSC_VER)
#undef XMLPUBFUN
#undef XMLPUBVAR
#undef XMLCALL
#undef XMLCDECL
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define XMLPUBFUN __declspec(dllexport)
#define XMLPUBVAR __declspec(dllexport)
#else
#define XMLPUBFUN
#if !defined(LIBXML_STATIC)
#define XMLPUBVAR __declspec(dllimport) extern
#else
#define XMLPUBVAR extern
#endif
#endif
#if defined(LIBXML_FASTCALL)
#define XMLCALL __fastcall
#else
#define XMLCALL __cdecl
#endif
#define XMLCDECL __cdecl
#if !defined _REENTRANT
#define _REENTRANT
#endif
#endif
/* Windows platform with Borland compiler */
#if defined(_WIN32) && defined(__BORLANDC__)
#undef XMLPUBFUN
#undef XMLPUBVAR
#undef XMLCALL
#undef XMLCDECL
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define XMLPUBFUN __declspec(dllexport)
#define XMLPUBVAR __declspec(dllexport) extern
#else
#define XMLPUBFUN
#if !defined(LIBXML_STATIC)
#define XMLPUBVAR __declspec(dllimport) extern
#else
#define XMLPUBVAR extern
#endif
#endif
#define XMLCALL __cdecl
#define XMLCDECL __cdecl
#if !defined _REENTRANT
#define _REENTRANT
#endif
#endif
/* Windows platform with GNU compiler (Mingw) */
#if defined(_WIN32) && defined(__MINGW32__)
#undef XMLPUBFUN
#undef XMLPUBVAR
#undef XMLCALL
#undef XMLCDECL
/*
* if defined(IN_LIBXML) this raises problems on mingw with msys
* _imp__xmlFree listed as missing. Try to workaround the problem
* by also making that declaration when compiling client code.
*/
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define XMLPUBFUN __declspec(dllexport)
#define XMLPUBVAR __declspec(dllexport)
#else
#define XMLPUBFUN
#if !defined(LIBXML_STATIC)
#define XMLPUBVAR __declspec(dllimport) extern
#else
#define XMLPUBVAR extern
#endif
#endif
#define XMLCALL __cdecl
#define XMLCDECL __cdecl
#if !defined _REENTRANT
#define _REENTRANT
#endif
#endif
/* Cygwin platform, GNU compiler */
#if defined(_WIN32) && defined(__CYGWIN__)
#undef XMLPUBFUN
#undef XMLPUBVAR
#undef XMLCALL
#undef XMLCDECL
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define XMLPUBFUN __declspec(dllexport)
#define XMLPUBVAR __declspec(dllexport)
#else
#define XMLPUBFUN
#if !defined(LIBXML_STATIC)
#define XMLPUBVAR __declspec(dllimport) extern
#else
#define XMLPUBVAR
#endif
#endif
#define XMLCALL __cdecl
#define XMLCDECL __cdecl
#endif
/* Compatibility */
#if !defined(LIBXML_DLL_IMPORT)
#define LIBXML_DLL_IMPORT XMLPUBVAR
#endif
#endif /* __XML_EXPORTS_H__ */
| 3,914 | 23.018405 | 75 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/tree.h
|
/*
* Summary: interfaces for tree manipulation
* Description: this module describes the structures found in an tree resulting
* from an XML or HTML parsing, as well as the API provided for
* various processing on that tree
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_TREE_H__
#define __XML_TREE_H__
#include <stdio.h>
#include <libxml/xmlversion.h>
#include <libxml/xmlstring.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Some of the basic types pointer to structures:
*/
/* xmlIO.h */
typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
typedef struct _xmlOutputBuffer xmlOutputBuffer;
typedef xmlOutputBuffer *xmlOutputBufferPtr;
/* parser.h */
typedef struct _xmlParserInput xmlParserInput;
typedef xmlParserInput *xmlParserInputPtr;
typedef struct _xmlParserCtxt xmlParserCtxt;
typedef xmlParserCtxt *xmlParserCtxtPtr;
typedef struct _xmlSAXLocator xmlSAXLocator;
typedef xmlSAXLocator *xmlSAXLocatorPtr;
typedef struct _xmlSAXHandler xmlSAXHandler;
typedef xmlSAXHandler *xmlSAXHandlerPtr;
/* entities.h */
typedef struct _xmlEntity xmlEntity;
typedef xmlEntity *xmlEntityPtr;
/**
* BASE_BUFFER_SIZE:
*
* default buffer size 4000.
*/
#define BASE_BUFFER_SIZE 4096
/**
* LIBXML_NAMESPACE_DICT:
*
* Defines experimental behaviour:
* 1) xmlNs gets an additional field @context (a xmlDoc)
* 2) when creating a tree, xmlNs->href is stored in the dict of xmlDoc.
*/
/* #define LIBXML_NAMESPACE_DICT */
/**
* xmlBufferAllocationScheme:
*
* A buffer allocation scheme can be defined to either match exactly the
* need or double it's allocated size each time it is found too small.
*/
typedef enum {
XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */
XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer */
XML_BUFFER_ALLOC_IO /* special allocation scheme used for I/O */
} xmlBufferAllocationScheme;
/**
* xmlBuffer:
*
* A buffer structure.
*/
typedef struct _xmlBuffer xmlBuffer;
typedef xmlBuffer *xmlBufferPtr;
struct _xmlBuffer {
xmlChar *content; /* The buffer content UTF8 */
unsigned int use; /* The buffer size used */
unsigned int size; /* The buffer size */
xmlBufferAllocationScheme alloc; /* The realloc method */
xmlChar *contentIO; /* in IO mode we may have a different base */
};
/**
* XML_XML_NAMESPACE:
*
* This is the namespace for the special xml: prefix predefined in the
* XML Namespace specification.
*/
#define XML_XML_NAMESPACE \
(const xmlChar *) "http://www.w3.org/XML/1998/namespace"
/**
* XML_XML_ID:
*
* This is the name for the special xml:id attribute
*/
#define XML_XML_ID (const xmlChar *) "xml:id"
/*
* The different element types carried by an XML tree.
*
* NOTE: This is synchronized with DOM Level1 values
* See http://www.w3.org/TR/REC-DOM-Level-1/
*
* Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
* be deprecated to use an XML_DTD_NODE.
*/
typedef enum {
XML_ELEMENT_NODE= 1,
XML_ATTRIBUTE_NODE= 2,
XML_TEXT_NODE= 3,
XML_CDATA_SECTION_NODE= 4,
XML_ENTITY_REF_NODE= 5,
XML_ENTITY_NODE= 6,
XML_PI_NODE= 7,
XML_COMMENT_NODE= 8,
XML_DOCUMENT_NODE= 9,
XML_DOCUMENT_TYPE_NODE= 10,
XML_DOCUMENT_FRAG_NODE= 11,
XML_NOTATION_NODE= 12,
XML_HTML_DOCUMENT_NODE= 13,
XML_DTD_NODE= 14,
XML_ELEMENT_DECL= 15,
XML_ATTRIBUTE_DECL= 16,
XML_ENTITY_DECL= 17,
XML_NAMESPACE_DECL= 18,
XML_XINCLUDE_START= 19,
XML_XINCLUDE_END= 20
#ifdef LIBXML_DOCB_ENABLED
,XML_DOCB_DOCUMENT_NODE= 21
#endif
} xmlElementType;
/**
* xmlNotation:
*
* A DTD Notation definition.
*/
typedef struct _xmlNotation xmlNotation;
typedef xmlNotation *xmlNotationPtr;
struct _xmlNotation {
const xmlChar *name; /* Notation name */
const xmlChar *PublicID; /* Public identifier, if any */
const xmlChar *SystemID; /* System identifier, if any */
};
/**
* xmlAttributeType:
*
* A DTD Attribute type definition.
*/
typedef enum {
XML_ATTRIBUTE_CDATA = 1,
XML_ATTRIBUTE_ID,
XML_ATTRIBUTE_IDREF ,
XML_ATTRIBUTE_IDREFS,
XML_ATTRIBUTE_ENTITY,
XML_ATTRIBUTE_ENTITIES,
XML_ATTRIBUTE_NMTOKEN,
XML_ATTRIBUTE_NMTOKENS,
XML_ATTRIBUTE_ENUMERATION,
XML_ATTRIBUTE_NOTATION
} xmlAttributeType;
/**
* xmlAttributeDefault:
*
* A DTD Attribute default definition.
*/
typedef enum {
XML_ATTRIBUTE_NONE = 1,
XML_ATTRIBUTE_REQUIRED,
XML_ATTRIBUTE_IMPLIED,
XML_ATTRIBUTE_FIXED
} xmlAttributeDefault;
/**
* xmlEnumeration:
*
* List structure used when there is an enumeration in DTDs.
*/
typedef struct _xmlEnumeration xmlEnumeration;
typedef xmlEnumeration *xmlEnumerationPtr;
struct _xmlEnumeration {
struct _xmlEnumeration *next; /* next one */
const xmlChar *name; /* Enumeration name */
};
/**
* xmlAttribute:
*
* An Attribute declaration in a DTD.
*/
typedef struct _xmlAttribute xmlAttribute;
typedef xmlAttribute *xmlAttributePtr;
struct _xmlAttribute {
void *_private; /* application data */
xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */
const xmlChar *name; /* Attribute name */
struct _xmlNode *children; /* NULL */
struct _xmlNode *last; /* NULL */
struct _xmlDtd *parent; /* -> DTD */
struct _xmlNode *next; /* next sibling link */
struct _xmlNode *prev; /* previous sibling link */
struct _xmlDoc *doc; /* the containing document */
struct _xmlAttribute *nexth; /* next in hash table */
xmlAttributeType atype; /* The attribute type */
xmlAttributeDefault def; /* the default */
const xmlChar *defaultValue; /* or the default value */
xmlEnumerationPtr tree; /* or the enumeration tree if any */
const xmlChar *prefix; /* the namespace prefix if any */
const xmlChar *elem; /* Element holding the attribute */
};
/**
* xmlElementContentType:
*
* Possible definitions of element content types.
*/
typedef enum {
XML_ELEMENT_CONTENT_PCDATA = 1,
XML_ELEMENT_CONTENT_ELEMENT,
XML_ELEMENT_CONTENT_SEQ,
XML_ELEMENT_CONTENT_OR
} xmlElementContentType;
/**
* xmlElementContentOccur:
*
* Possible definitions of element content occurrences.
*/
typedef enum {
XML_ELEMENT_CONTENT_ONCE = 1,
XML_ELEMENT_CONTENT_OPT,
XML_ELEMENT_CONTENT_MULT,
XML_ELEMENT_CONTENT_PLUS
} xmlElementContentOccur;
/**
* xmlElementContent:
*
* An XML Element content as stored after parsing an element definition
* in a DTD.
*/
typedef struct _xmlElementContent xmlElementContent;
typedef xmlElementContent *xmlElementContentPtr;
struct _xmlElementContent {
xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
const xmlChar *name; /* Element name */
struct _xmlElementContent *c1; /* first child */
struct _xmlElementContent *c2; /* second child */
struct _xmlElementContent *parent; /* parent */
const xmlChar *prefix; /* Namespace prefix */
};
/**
* xmlElementTypeVal:
*
* The different possibilities for an element content type.
*/
typedef enum {
XML_ELEMENT_TYPE_UNDEFINED = 0,
XML_ELEMENT_TYPE_EMPTY = 1,
XML_ELEMENT_TYPE_ANY,
XML_ELEMENT_TYPE_MIXED,
XML_ELEMENT_TYPE_ELEMENT
} xmlElementTypeVal;
#ifdef __cplusplus
}
#endif
#include <libxml/xmlregexp.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlElement:
*
* An XML Element declaration from a DTD.
*/
typedef struct _xmlElement xmlElement;
typedef xmlElement *xmlElementPtr;
struct _xmlElement {
void *_private; /* application data */
xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */
const xmlChar *name; /* Element name */
struct _xmlNode *children; /* NULL */
struct _xmlNode *last; /* NULL */
struct _xmlDtd *parent; /* -> DTD */
struct _xmlNode *next; /* next sibling link */
struct _xmlNode *prev; /* previous sibling link */
struct _xmlDoc *doc; /* the containing document */
xmlElementTypeVal etype; /* The type */
xmlElementContentPtr content; /* the allowed element content */
xmlAttributePtr attributes; /* List of the declared attributes */
const xmlChar *prefix; /* the namespace prefix if any */
#ifdef LIBXML_REGEXP_ENABLED
xmlRegexpPtr contModel; /* the validating regexp */
#else
void *contModel;
#endif
};
/**
* XML_LOCAL_NAMESPACE:
*
* A namespace declaration node.
*/
#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
typedef xmlElementType xmlNsType;
/**
* xmlNs:
*
* An XML namespace.
* Note that prefix == NULL is valid, it defines the default namespace
* within the subtree (until overridden).
*
* xmlNsType is unified with xmlElementType.
*/
typedef struct _xmlNs xmlNs;
typedef xmlNs *xmlNsPtr;
struct _xmlNs {
struct _xmlNs *next; /* next Ns link for this node */
xmlNsType type; /* global or local */
const xmlChar *href; /* URL for the namespace */
const xmlChar *prefix; /* prefix for the namespace */
void *_private; /* application data */
struct _xmlDoc *context; /* normally an xmlDoc */
};
/**
* xmlDtd:
*
* An XML DTD, as defined by <!DOCTYPE ... There is actually one for
* the internal subset and for the external subset.
*/
typedef struct _xmlDtd xmlDtd;
typedef xmlDtd *xmlDtdPtr;
struct _xmlDtd {
void *_private; /* application data */
xmlElementType type; /* XML_DTD_NODE, must be second ! */
const xmlChar *name; /* Name of the DTD */
struct _xmlNode *children; /* the value of the property link */
struct _xmlNode *last; /* last child link */
struct _xmlDoc *parent; /* child->parent link */
struct _xmlNode *next; /* next sibling link */
struct _xmlNode *prev; /* previous sibling link */
struct _xmlDoc *doc; /* the containing document */
/* End of common part */
void *notations; /* Hash table for notations if any */
void *elements; /* Hash table for elements if any */
void *attributes; /* Hash table for attributes if any */
void *entities; /* Hash table for entities if any */
const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
void *pentities; /* Hash table for param entities if any */
};
/**
* xmlAttr:
*
* An attribute on an XML node.
*/
typedef struct _xmlAttr xmlAttr;
typedef xmlAttr *xmlAttrPtr;
struct _xmlAttr {
void *_private; /* application data */
xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */
const xmlChar *name; /* the name of the property */
struct _xmlNode *children; /* the value of the property */
struct _xmlNode *last; /* NULL */
struct _xmlNode *parent; /* child->parent link */
struct _xmlAttr *next; /* next sibling link */
struct _xmlAttr *prev; /* previous sibling link */
struct _xmlDoc *doc; /* the containing document */
xmlNs *ns; /* pointer to the associated namespace */
xmlAttributeType atype; /* the attribute type if validating */
void *psvi; /* for type/PSVI informations */
};
/**
* xmlID:
*
* An XML ID instance.
*/
typedef struct _xmlID xmlID;
typedef xmlID *xmlIDPtr;
struct _xmlID {
struct _xmlID *next; /* next ID */
const xmlChar *value; /* The ID name */
xmlAttrPtr attr; /* The attribute holding it */
const xmlChar *name; /* The attribute if attr is not available */
int lineno; /* The line number if attr is not available */
struct _xmlDoc *doc; /* The document holding the ID */
};
/**
* xmlRef:
*
* An XML IDREF instance.
*/
typedef struct _xmlRef xmlRef;
typedef xmlRef *xmlRefPtr;
struct _xmlRef {
struct _xmlRef *next; /* next Ref */
const xmlChar *value; /* The Ref name */
xmlAttrPtr attr; /* The attribute holding it */
const xmlChar *name; /* The attribute if attr is not available */
int lineno; /* The line number if attr is not available */
};
/**
* xmlNode:
*
* A node in an XML tree.
*/
typedef struct _xmlNode xmlNode;
typedef xmlNode *xmlNodePtr;
struct _xmlNode {
void *_private; /* application data */
xmlElementType type; /* type number, must be second ! */
const xmlChar *name; /* the name of the node, or the entity */
struct _xmlNode *children; /* parent->childs link */
struct _xmlNode *last; /* last child link */
struct _xmlNode *parent; /* child->parent link */
struct _xmlNode *next; /* next sibling link */
struct _xmlNode *prev; /* previous sibling link */
struct _xmlDoc *doc; /* the containing document */
/* End of common part */
xmlNs *ns; /* pointer to the associated namespace */
xmlChar *content; /* the content */
struct _xmlAttr *properties;/* properties list */
xmlNs *nsDef; /* namespace definitions on this node */
void *psvi; /* for type/PSVI informations */
unsigned short line; /* line number */
unsigned short extra; /* extra data for XPath/XSLT */
};
/**
* XML_GET_CONTENT:
*
* Macro to extract the content pointer of a node.
*/
#define XML_GET_CONTENT(n) \
((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)
/**
* XML_GET_LINE:
*
* Macro to extract the line number of an element node.
*/
#define XML_GET_LINE(n) \
(xmlGetLineNo(n))
/**
* xmlDocProperty
*
* Set of properties of the document as found by the parser
* Some of them are linked to similary named xmlParserOption
*/
typedef enum {
XML_DOC_WELLFORMED = 1<<0, /* document is XML well formed */
XML_DOC_NSVALID = 1<<1, /* document is Namespace valid */
XML_DOC_OLD10 = 1<<2, /* parsed with old XML-1.0 parser */
XML_DOC_DTDVALID = 1<<3, /* DTD validation was successful */
XML_DOC_XINCLUDE = 1<<4, /* XInclude substitution was done */
XML_DOC_USERBUILT = 1<<5, /* Document was built using the API
and not by parsing an instance */
XML_DOC_INTERNAL = 1<<6, /* built for internal processing */
XML_DOC_HTML = 1<<7 /* parsed or built HTML document */
} xmlDocProperties;
/**
* xmlDoc:
*
* An XML document.
*/
typedef struct _xmlDoc xmlDoc;
typedef xmlDoc *xmlDocPtr;
struct _xmlDoc {
void *_private; /* application data */
xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
char *name; /* name/filename/URI of the document */
struct _xmlNode *children; /* the document tree */
struct _xmlNode *last; /* last child link */
struct _xmlNode *parent; /* child->parent link */
struct _xmlNode *next; /* next sibling link */
struct _xmlNode *prev; /* previous sibling link */
struct _xmlDoc *doc; /* autoreference to itself */
/* End of common part */
int compression;/* level of zlib compression */
int standalone; /* standalone document (no external refs)
1 if standalone="yes"
0 if standalone="no"
-1 if there is no XML declaration
-2 if there is an XML declaration, but no
standalone attribute was specified */
struct _xmlDtd *intSubset; /* the document internal subset */
struct _xmlDtd *extSubset; /* the document external subset */
struct _xmlNs *oldNs; /* Global namespace, the old way */
const xmlChar *version; /* the XML version string */
const xmlChar *encoding; /* external initial encoding, if any */
void *ids; /* Hash table for ID attributes if any */
void *refs; /* Hash table for IDREFs attributes if any */
const xmlChar *URL; /* The URI for that document */
int charset; /* encoding of the in-memory content
actually an xmlCharEncoding */
struct _xmlDict *dict; /* dict used to allocate names or NULL */
void *psvi; /* for type/PSVI informations */
int parseFlags; /* set of xmlParserOption used to parse the
document */
int properties; /* set of xmlDocProperties for this document
set at the end of parsing */
};
typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
/**
* xmlDOMWrapAcquireNsFunction:
* @ctxt: a DOM wrapper context
* @node: the context node (element or attribute)
* @nsName: the requested namespace name
* @nsPrefix: the requested namespace prefix
*
* A function called to acquire namespaces (xmlNs) from the wrapper.
*
* Returns an xmlNsPtr or NULL in case of an error.
*/
typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt,
xmlNodePtr node,
const xmlChar *nsName,
const xmlChar *nsPrefix);
/**
* xmlDOMWrapCtxt:
*
* Context for DOM wrapper-operations.
*/
struct _xmlDOMWrapCtxt {
void * _private;
/*
* The type of this context, just in case we need specialized
* contexts in the future.
*/
int type;
/*
* Internal namespace map used for various operations.
*/
void * namespaceMap;
/*
* Use this one to acquire an xmlNsPtr intended for node->ns.
* (Note that this is not intended for elem->nsDef).
*/
xmlDOMWrapAcquireNsFunction getNsForNodeFunc;
};
/**
* xmlChildrenNode:
*
* Macro for compatibility naming layer with libxml1. Maps
* to "children."
*/
#ifndef xmlChildrenNode
#define xmlChildrenNode children
#endif
/**
* xmlRootNode:
*
* Macro for compatibility naming layer with libxml1. Maps
* to "children".
*/
#ifndef xmlRootNode
#define xmlRootNode children
#endif
/*
* Variables.
*/
/*
* Some helper functions
*/
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
XMLPUBFUN int XMLCALL
xmlValidateNCName (const xmlChar *value,
int space);
#endif
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN int XMLCALL
xmlValidateQName (const xmlChar *value,
int space);
XMLPUBFUN int XMLCALL
xmlValidateName (const xmlChar *value,
int space);
XMLPUBFUN int XMLCALL
xmlValidateNMToken (const xmlChar *value,
int space);
#endif
XMLPUBFUN xmlChar * XMLCALL
xmlBuildQName (const xmlChar *ncname,
const xmlChar *prefix,
xmlChar *memory,
int len);
XMLPUBFUN xmlChar * XMLCALL
xmlSplitQName2 (const xmlChar *name,
xmlChar **prefix);
XMLPUBFUN const xmlChar * XMLCALL
xmlSplitQName3 (const xmlChar *name,
int *len);
/*
* Handling Buffers.
*/
XMLPUBFUN void XMLCALL
xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
XMLPUBFUN xmlBufferAllocationScheme XMLCALL
xmlGetBufferAllocationScheme(void);
XMLPUBFUN xmlBufferPtr XMLCALL
xmlBufferCreate (void);
XMLPUBFUN xmlBufferPtr XMLCALL
xmlBufferCreateSize (size_t size);
XMLPUBFUN xmlBufferPtr XMLCALL
xmlBufferCreateStatic (void *mem,
size_t size);
XMLPUBFUN int XMLCALL
xmlBufferResize (xmlBufferPtr buf,
unsigned int size);
XMLPUBFUN void XMLCALL
xmlBufferFree (xmlBufferPtr buf);
XMLPUBFUN int XMLCALL
xmlBufferDump (FILE *file,
xmlBufferPtr buf);
XMLPUBFUN int XMLCALL
xmlBufferAdd (xmlBufferPtr buf,
const xmlChar *str,
int len);
XMLPUBFUN int XMLCALL
xmlBufferAddHead (xmlBufferPtr buf,
const xmlChar *str,
int len);
XMLPUBFUN int XMLCALL
xmlBufferCat (xmlBufferPtr buf,
const xmlChar *str);
XMLPUBFUN int XMLCALL
xmlBufferCCat (xmlBufferPtr buf,
const char *str);
XMLPUBFUN int XMLCALL
xmlBufferShrink (xmlBufferPtr buf,
unsigned int len);
XMLPUBFUN int XMLCALL
xmlBufferGrow (xmlBufferPtr buf,
unsigned int len);
XMLPUBFUN void XMLCALL
xmlBufferEmpty (xmlBufferPtr buf);
XMLPUBFUN const xmlChar* XMLCALL
xmlBufferContent (const xmlBufferPtr buf);
XMLPUBFUN void XMLCALL
xmlBufferSetAllocationScheme(xmlBufferPtr buf,
xmlBufferAllocationScheme scheme);
XMLPUBFUN int XMLCALL
xmlBufferLength (const xmlBufferPtr buf);
/*
* Creating/freeing new structures.
*/
XMLPUBFUN xmlDtdPtr XMLCALL
xmlCreateIntSubset (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlDtdPtr XMLCALL
xmlNewDtd (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlDtdPtr XMLCALL
xmlGetIntSubset (xmlDocPtr doc);
XMLPUBFUN void XMLCALL
xmlFreeDtd (xmlDtdPtr cur);
#ifdef LIBXML_LEGACY_ENABLED
XMLPUBFUN xmlNsPtr XMLCALL
xmlNewGlobalNs (xmlDocPtr doc,
const xmlChar *href,
const xmlChar *prefix);
#endif /* LIBXML_LEGACY_ENABLED */
XMLPUBFUN xmlNsPtr XMLCALL
xmlNewNs (xmlNodePtr node,
const xmlChar *href,
const xmlChar *prefix);
XMLPUBFUN void XMLCALL
xmlFreeNs (xmlNsPtr cur);
XMLPUBFUN void XMLCALL
xmlFreeNsList (xmlNsPtr cur);
XMLPUBFUN xmlDocPtr XMLCALL
xmlNewDoc (const xmlChar *version);
XMLPUBFUN void XMLCALL
xmlFreeDoc (xmlDocPtr cur);
XMLPUBFUN xmlAttrPtr XMLCALL
xmlNewDocProp (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *value);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlAttrPtr XMLCALL
xmlNewProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *value);
#endif
XMLPUBFUN xmlAttrPtr XMLCALL
xmlNewNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *value);
XMLPUBFUN xmlAttrPtr XMLCALL
xmlNewNsPropEatName (xmlNodePtr node,
xmlNsPtr ns,
xmlChar *name,
const xmlChar *value);
XMLPUBFUN void XMLCALL
xmlFreePropList (xmlAttrPtr cur);
XMLPUBFUN void XMLCALL
xmlFreeProp (xmlAttrPtr cur);
XMLPUBFUN xmlAttrPtr XMLCALL
xmlCopyProp (xmlNodePtr target,
xmlAttrPtr cur);
XMLPUBFUN xmlAttrPtr XMLCALL
xmlCopyPropList (xmlNodePtr target,
xmlAttrPtr cur);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlDtdPtr XMLCALL
xmlCopyDtd (xmlDtdPtr dtd);
#endif /* LIBXML_TREE_ENABLED */
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlDocPtr XMLCALL
xmlCopyDoc (xmlDocPtr doc,
int recursive);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
/*
* Creating new nodes.
*/
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocNode (xmlDocPtr doc,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocNodeEatName (xmlDocPtr doc,
xmlNsPtr ns,
xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewNode (xmlNsPtr ns,
const xmlChar *name);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewNodeEatName (xmlNsPtr ns,
xmlChar *name);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewChild (xmlNodePtr parent,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
#endif
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocText (xmlDocPtr doc,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewText (const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocPI (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewPI (const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocTextLen (xmlDocPtr doc,
const xmlChar *content,
int len);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewTextLen (const xmlChar *content,
int len);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocComment (xmlDocPtr doc,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewComment (const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewCDataBlock (xmlDocPtr doc,
const xmlChar *content,
int len);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewCharRef (xmlDocPtr doc,
const xmlChar *name);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewReference (xmlDocPtr doc,
const xmlChar *name);
XMLPUBFUN xmlNodePtr XMLCALL
xmlCopyNode (const xmlNodePtr node,
int recursive);
XMLPUBFUN xmlNodePtr XMLCALL
xmlDocCopyNode (const xmlNodePtr node,
xmlDocPtr doc,
int recursive);
XMLPUBFUN xmlNodePtr XMLCALL
xmlDocCopyNodeList (xmlDocPtr doc,
const xmlNodePtr node);
XMLPUBFUN xmlNodePtr XMLCALL
xmlCopyNodeList (const xmlNodePtr node);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewTextChild (xmlNodePtr parent,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocRawNode (xmlDocPtr doc,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocFragment (xmlDocPtr doc);
#endif /* LIBXML_TREE_ENABLED */
/*
* Navigating.
*/
XMLPUBFUN long XMLCALL
xmlGetLineNo (xmlNodePtr node);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
XMLPUBFUN xmlChar * XMLCALL
xmlGetNodePath (xmlNodePtr node);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
XMLPUBFUN xmlNodePtr XMLCALL
xmlDocGetRootElement (xmlDocPtr doc);
XMLPUBFUN xmlNodePtr XMLCALL
xmlGetLastChild (xmlNodePtr parent);
XMLPUBFUN int XMLCALL
xmlNodeIsText (xmlNodePtr node);
XMLPUBFUN int XMLCALL
xmlIsBlankNode (xmlNodePtr node);
/*
* Changing the structure.
*/
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
XMLPUBFUN xmlNodePtr XMLCALL
xmlDocSetRootElement (xmlDocPtr doc,
xmlNodePtr root);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN void XMLCALL
xmlNodeSetName (xmlNodePtr cur,
const xmlChar *name);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddChild (xmlNodePtr parent,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddChildList (xmlNodePtr parent,
xmlNodePtr cur);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
XMLPUBFUN xmlNodePtr XMLCALL
xmlReplaceNode (xmlNodePtr old,
xmlNodePtr cur);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddPrevSibling (xmlNodePtr cur,
xmlNodePtr elem);
#endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddSibling (xmlNodePtr cur,
xmlNodePtr elem);
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddNextSibling (xmlNodePtr cur,
xmlNodePtr elem);
XMLPUBFUN void XMLCALL
xmlUnlinkNode (xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL
xmlTextMerge (xmlNodePtr first,
xmlNodePtr second);
XMLPUBFUN int XMLCALL
xmlTextConcat (xmlNodePtr node,
const xmlChar *content,
int len);
XMLPUBFUN void XMLCALL
xmlFreeNodeList (xmlNodePtr cur);
XMLPUBFUN void XMLCALL
xmlFreeNode (xmlNodePtr cur);
XMLPUBFUN void XMLCALL
xmlSetTreeDoc (xmlNodePtr tree,
xmlDocPtr doc);
XMLPUBFUN void XMLCALL
xmlSetListDoc (xmlNodePtr list,
xmlDocPtr doc);
/*
* Namespaces.
*/
XMLPUBFUN xmlNsPtr XMLCALL
xmlSearchNs (xmlDocPtr doc,
xmlNodePtr node,
const xmlChar *nameSpace);
XMLPUBFUN xmlNsPtr XMLCALL
xmlSearchNsByHref (xmlDocPtr doc,
xmlNodePtr node,
const xmlChar *href);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlNsPtr * XMLCALL
xmlGetNsList (xmlDocPtr doc,
xmlNodePtr node);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
XMLPUBFUN void XMLCALL
xmlSetNs (xmlNodePtr node,
xmlNsPtr ns);
XMLPUBFUN xmlNsPtr XMLCALL
xmlCopyNamespace (xmlNsPtr cur);
XMLPUBFUN xmlNsPtr XMLCALL
xmlCopyNamespaceList (xmlNsPtr cur);
/*
* Changing the content.
*/
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
XMLPUBFUN xmlAttrPtr XMLCALL
xmlSetProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *value);
XMLPUBFUN xmlAttrPtr XMLCALL
xmlSetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *value);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
XMLPUBFUN xmlChar * XMLCALL
xmlGetNoNsProp (xmlNodePtr node,
const xmlChar *name);
XMLPUBFUN xmlChar * XMLCALL
xmlGetProp (xmlNodePtr node,
const xmlChar *name);
XMLPUBFUN xmlAttrPtr XMLCALL
xmlHasProp (xmlNodePtr node,
const xmlChar *name);
XMLPUBFUN xmlAttrPtr XMLCALL
xmlHasNsProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *nameSpace);
XMLPUBFUN xmlChar * XMLCALL
xmlGetNsProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *nameSpace);
XMLPUBFUN xmlNodePtr XMLCALL
xmlStringGetNodeList (xmlDocPtr doc,
const xmlChar *value);
XMLPUBFUN xmlNodePtr XMLCALL
xmlStringLenGetNodeList (xmlDocPtr doc,
const xmlChar *value,
int len);
XMLPUBFUN xmlChar * XMLCALL
xmlNodeListGetString (xmlDocPtr doc,
xmlNodePtr list,
int inLine);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlChar * XMLCALL
xmlNodeListGetRawString (xmlDocPtr doc,
xmlNodePtr list,
int inLine);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
xmlNodeSetContent (xmlNodePtr cur,
const xmlChar *content);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN void XMLCALL
xmlNodeSetContentLen (xmlNodePtr cur,
const xmlChar *content,
int len);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
xmlNodeAddContent (xmlNodePtr cur,
const xmlChar *content);
XMLPUBFUN void XMLCALL
xmlNodeAddContentLen (xmlNodePtr cur,
const xmlChar *content,
int len);
XMLPUBFUN xmlChar * XMLCALL
xmlNodeGetContent (xmlNodePtr cur);
XMLPUBFUN int XMLCALL
xmlNodeBufGetContent (xmlBufferPtr buffer,
xmlNodePtr cur);
XMLPUBFUN xmlChar * XMLCALL
xmlNodeGetLang (xmlNodePtr cur);
XMLPUBFUN int XMLCALL
xmlNodeGetSpacePreserve (xmlNodePtr cur);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN void XMLCALL
xmlNodeSetLang (xmlNodePtr cur,
const xmlChar *lang);
XMLPUBFUN void XMLCALL
xmlNodeSetSpacePreserve (xmlNodePtr cur,
int val);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN xmlChar * XMLCALL
xmlNodeGetBase (xmlDocPtr doc,
xmlNodePtr cur);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
XMLPUBFUN void XMLCALL
xmlNodeSetBase (xmlNodePtr cur,
const xmlChar *uri);
#endif
/*
* Removing content.
*/
XMLPUBFUN int XMLCALL
xmlRemoveProp (xmlAttrPtr cur);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN int XMLCALL
xmlUnsetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name);
XMLPUBFUN int XMLCALL
xmlUnsetProp (xmlNodePtr node,
const xmlChar *name);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
/*
* Internal, don't use.
*/
XMLPUBFUN void XMLCALL
xmlBufferWriteCHAR (xmlBufferPtr buf,
const xmlChar *string);
XMLPUBFUN void XMLCALL
xmlBufferWriteChar (xmlBufferPtr buf,
const char *string);
XMLPUBFUN void XMLCALL
xmlBufferWriteQuotedString(xmlBufferPtr buf,
const xmlChar *string);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
xmlDocPtr doc,
xmlAttrPtr attr,
const xmlChar *string);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_TREE_ENABLED
/*
* Namespace handling.
*/
XMLPUBFUN int XMLCALL
xmlReconciliateNs (xmlDocPtr doc,
xmlNodePtr tree);
#endif
#ifdef LIBXML_OUTPUT_ENABLED
/*
* Saving.
*/
XMLPUBFUN void XMLCALL
xmlDocDumpFormatMemory (xmlDocPtr cur,
xmlChar **mem,
int *size,
int format);
XMLPUBFUN void XMLCALL
xmlDocDumpMemory (xmlDocPtr cur,
xmlChar **mem,
int *size);
XMLPUBFUN void XMLCALL
xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
xmlChar **doc_txt_ptr,
int * doc_txt_len,
const char *txt_encoding);
XMLPUBFUN void XMLCALL
xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
xmlChar **doc_txt_ptr,
int * doc_txt_len,
const char *txt_encoding,
int format);
XMLPUBFUN int XMLCALL
xmlDocFormatDump (FILE *f,
xmlDocPtr cur,
int format);
XMLPUBFUN int XMLCALL
xmlDocDump (FILE *f,
xmlDocPtr cur);
XMLPUBFUN void XMLCALL
xmlElemDump (FILE *f,
xmlDocPtr doc,
xmlNodePtr cur);
XMLPUBFUN int XMLCALL
xmlSaveFile (const char *filename,
xmlDocPtr cur);
XMLPUBFUN int XMLCALL
xmlSaveFormatFile (const char *filename,
xmlDocPtr cur,
int format);
XMLPUBFUN int XMLCALL
xmlNodeDump (xmlBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format);
XMLPUBFUN int XMLCALL
xmlSaveFileTo (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding);
XMLPUBFUN int XMLCALL
xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding,
int format);
XMLPUBFUN void XMLCALL
xmlNodeDumpOutput (xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format,
const char *encoding);
XMLPUBFUN int XMLCALL
xmlSaveFormatFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding,
int format);
XMLPUBFUN int XMLCALL
xmlSaveFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding);
#endif /* LIBXML_OUTPUT_ENABLED */
/*
* XHTML
*/
XMLPUBFUN int XMLCALL
xmlIsXHTML (const xmlChar *systemID,
const xmlChar *publicID);
/*
* Compression.
*/
XMLPUBFUN int XMLCALL
xmlGetDocCompressMode (xmlDocPtr doc);
XMLPUBFUN void XMLCALL
xmlSetDocCompressMode (xmlDocPtr doc,
int mode);
XMLPUBFUN int XMLCALL
xmlGetCompressMode (void);
XMLPUBFUN void XMLCALL
xmlSetCompressMode (int mode);
/*
* DOM-wrapper helper functions.
*/
XMLPUBFUN xmlDOMWrapCtxtPtr XMLCALL
xmlDOMWrapNewCtxt (void);
XMLPUBFUN void XMLCALL
xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt,
xmlNodePtr elem,
int options);
XMLPUBFUN int XMLCALL
xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
xmlDocPtr sourceDoc,
xmlNodePtr node,
xmlDocPtr destDoc,
xmlNodePtr destParent,
int options);
XMLPUBFUN int XMLCALL
xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr node,
int options);
XMLPUBFUN int XMLCALL
xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt,
xmlDocPtr sourceDoc,
xmlNodePtr node,
xmlNodePtr *clonedNode,
xmlDocPtr destDoc,
xmlNodePtr destParent,
int deep,
int options);
#ifdef LIBXML_TREE_ENABLED
/*
* 5 interfaces from DOM ElementTraversal, but different in entities
* traversal.
*/
XMLPUBFUN unsigned long XMLCALL
xmlChildElementCount (xmlNodePtr parent);
XMLPUBFUN xmlNodePtr XMLCALL
xmlNextElementSibling (xmlNodePtr node);
XMLPUBFUN xmlNodePtr XMLCALL
xmlFirstElementChild (xmlNodePtr parent);
XMLPUBFUN xmlNodePtr XMLCALL
xmlLastElementChild (xmlNodePtr parent);
XMLPUBFUN xmlNodePtr XMLCALL
xmlPreviousElementSibling (xmlNodePtr node);
#endif
#ifdef __cplusplus
}
#endif
#ifndef __XML_PARSER_H__
#include <libxml/xmlmemory.h>
#endif
#endif /* __XML_TREE_H__ */
| 36,628 | 28.233041 | 296 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/xmlunicode.h
|
/*
* Summary: Unicode character APIs
* Description: API for the Unicode character APIs
*
* This file is automatically generated from the
* UCS description files of the Unicode Character Database
* http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html
* using the genUnicode.py Python script.
*
* Generation date: Mon Mar 27 11:09:52 2006
* Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
* Author: Daniel Veillard
*/
#ifndef __XML_UNICODE_H__
#define __XML_UNICODE_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_UNICODE_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
XMLPUBFUN int XMLCALL xmlUCSIsAegeanNumbers (int code);
XMLPUBFUN int XMLCALL xmlUCSIsAlphabeticPresentationForms (int code);
XMLPUBFUN int XMLCALL xmlUCSIsArabic (int code);
XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsA (int code);
XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsB (int code);
XMLPUBFUN int XMLCALL xmlUCSIsArmenian (int code);
XMLPUBFUN int XMLCALL xmlUCSIsArrows (int code);
XMLPUBFUN int XMLCALL xmlUCSIsBasicLatin (int code);
XMLPUBFUN int XMLCALL xmlUCSIsBengali (int code);
XMLPUBFUN int XMLCALL xmlUCSIsBlockElements (int code);
XMLPUBFUN int XMLCALL xmlUCSIsBopomofo (int code);
XMLPUBFUN int XMLCALL xmlUCSIsBopomofoExtended (int code);
XMLPUBFUN int XMLCALL xmlUCSIsBoxDrawing (int code);
XMLPUBFUN int XMLCALL xmlUCSIsBraillePatterns (int code);
XMLPUBFUN int XMLCALL xmlUCSIsBuhid (int code);
XMLPUBFUN int XMLCALL xmlUCSIsByzantineMusicalSymbols (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibility (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityForms (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographs (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographsSupplement (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCJKRadicalsSupplement (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCJKSymbolsandPunctuation (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographs (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionA (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionB (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCherokee (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarks (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarksforSymbols (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCombiningHalfMarks (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCombiningMarksforSymbols (int code);
XMLPUBFUN int XMLCALL xmlUCSIsControlPictures (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCurrencySymbols (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCypriotSyllabary (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCyrillic (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCyrillicSupplement (int code);
XMLPUBFUN int XMLCALL xmlUCSIsDeseret (int code);
XMLPUBFUN int XMLCALL xmlUCSIsDevanagari (int code);
XMLPUBFUN int XMLCALL xmlUCSIsDingbats (int code);
XMLPUBFUN int XMLCALL xmlUCSIsEnclosedAlphanumerics (int code);
XMLPUBFUN int XMLCALL xmlUCSIsEnclosedCJKLettersandMonths (int code);
XMLPUBFUN int XMLCALL xmlUCSIsEthiopic (int code);
XMLPUBFUN int XMLCALL xmlUCSIsGeneralPunctuation (int code);
XMLPUBFUN int XMLCALL xmlUCSIsGeometricShapes (int code);
XMLPUBFUN int XMLCALL xmlUCSIsGeorgian (int code);
XMLPUBFUN int XMLCALL xmlUCSIsGothic (int code);
XMLPUBFUN int XMLCALL xmlUCSIsGreek (int code);
XMLPUBFUN int XMLCALL xmlUCSIsGreekExtended (int code);
XMLPUBFUN int XMLCALL xmlUCSIsGreekandCoptic (int code);
XMLPUBFUN int XMLCALL xmlUCSIsGujarati (int code);
XMLPUBFUN int XMLCALL xmlUCSIsGurmukhi (int code);
XMLPUBFUN int XMLCALL xmlUCSIsHalfwidthandFullwidthForms (int code);
XMLPUBFUN int XMLCALL xmlUCSIsHangulCompatibilityJamo (int code);
XMLPUBFUN int XMLCALL xmlUCSIsHangulJamo (int code);
XMLPUBFUN int XMLCALL xmlUCSIsHangulSyllables (int code);
XMLPUBFUN int XMLCALL xmlUCSIsHanunoo (int code);
XMLPUBFUN int XMLCALL xmlUCSIsHebrew (int code);
XMLPUBFUN int XMLCALL xmlUCSIsHighPrivateUseSurrogates (int code);
XMLPUBFUN int XMLCALL xmlUCSIsHighSurrogates (int code);
XMLPUBFUN int XMLCALL xmlUCSIsHiragana (int code);
XMLPUBFUN int XMLCALL xmlUCSIsIPAExtensions (int code);
XMLPUBFUN int XMLCALL xmlUCSIsIdeographicDescriptionCharacters (int code);
XMLPUBFUN int XMLCALL xmlUCSIsKanbun (int code);
XMLPUBFUN int XMLCALL xmlUCSIsKangxiRadicals (int code);
XMLPUBFUN int XMLCALL xmlUCSIsKannada (int code);
XMLPUBFUN int XMLCALL xmlUCSIsKatakana (int code);
XMLPUBFUN int XMLCALL xmlUCSIsKatakanaPhoneticExtensions (int code);
XMLPUBFUN int XMLCALL xmlUCSIsKhmer (int code);
XMLPUBFUN int XMLCALL xmlUCSIsKhmerSymbols (int code);
XMLPUBFUN int XMLCALL xmlUCSIsLao (int code);
XMLPUBFUN int XMLCALL xmlUCSIsLatin1Supplement (int code);
XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedA (int code);
XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedB (int code);
XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedAdditional (int code);
XMLPUBFUN int XMLCALL xmlUCSIsLetterlikeSymbols (int code);
XMLPUBFUN int XMLCALL xmlUCSIsLimbu (int code);
XMLPUBFUN int XMLCALL xmlUCSIsLinearBIdeograms (int code);
XMLPUBFUN int XMLCALL xmlUCSIsLinearBSyllabary (int code);
XMLPUBFUN int XMLCALL xmlUCSIsLowSurrogates (int code);
XMLPUBFUN int XMLCALL xmlUCSIsMalayalam (int code);
XMLPUBFUN int XMLCALL xmlUCSIsMathematicalAlphanumericSymbols (int code);
XMLPUBFUN int XMLCALL xmlUCSIsMathematicalOperators (int code);
XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsA (int code);
XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsB (int code);
XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbols (int code);
XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbolsandArrows (int code);
XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousTechnical (int code);
XMLPUBFUN int XMLCALL xmlUCSIsMongolian (int code);
XMLPUBFUN int XMLCALL xmlUCSIsMusicalSymbols (int code);
XMLPUBFUN int XMLCALL xmlUCSIsMyanmar (int code);
XMLPUBFUN int XMLCALL xmlUCSIsNumberForms (int code);
XMLPUBFUN int XMLCALL xmlUCSIsOgham (int code);
XMLPUBFUN int XMLCALL xmlUCSIsOldItalic (int code);
XMLPUBFUN int XMLCALL xmlUCSIsOpticalCharacterRecognition (int code);
XMLPUBFUN int XMLCALL xmlUCSIsOriya (int code);
XMLPUBFUN int XMLCALL xmlUCSIsOsmanya (int code);
XMLPUBFUN int XMLCALL xmlUCSIsPhoneticExtensions (int code);
XMLPUBFUN int XMLCALL xmlUCSIsPrivateUse (int code);
XMLPUBFUN int XMLCALL xmlUCSIsPrivateUseArea (int code);
XMLPUBFUN int XMLCALL xmlUCSIsRunic (int code);
XMLPUBFUN int XMLCALL xmlUCSIsShavian (int code);
XMLPUBFUN int XMLCALL xmlUCSIsSinhala (int code);
XMLPUBFUN int XMLCALL xmlUCSIsSmallFormVariants (int code);
XMLPUBFUN int XMLCALL xmlUCSIsSpacingModifierLetters (int code);
XMLPUBFUN int XMLCALL xmlUCSIsSpecials (int code);
XMLPUBFUN int XMLCALL xmlUCSIsSuperscriptsandSubscripts (int code);
XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsA (int code);
XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsB (int code);
XMLPUBFUN int XMLCALL xmlUCSIsSupplementalMathematicalOperators (int code);
XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaA (int code);
XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaB (int code);
XMLPUBFUN int XMLCALL xmlUCSIsSyriac (int code);
XMLPUBFUN int XMLCALL xmlUCSIsTagalog (int code);
XMLPUBFUN int XMLCALL xmlUCSIsTagbanwa (int code);
XMLPUBFUN int XMLCALL xmlUCSIsTags (int code);
XMLPUBFUN int XMLCALL xmlUCSIsTaiLe (int code);
XMLPUBFUN int XMLCALL xmlUCSIsTaiXuanJingSymbols (int code);
XMLPUBFUN int XMLCALL xmlUCSIsTamil (int code);
XMLPUBFUN int XMLCALL xmlUCSIsTelugu (int code);
XMLPUBFUN int XMLCALL xmlUCSIsThaana (int code);
XMLPUBFUN int XMLCALL xmlUCSIsThai (int code);
XMLPUBFUN int XMLCALL xmlUCSIsTibetan (int code);
XMLPUBFUN int XMLCALL xmlUCSIsUgaritic (int code);
XMLPUBFUN int XMLCALL xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code);
XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectors (int code);
XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectorsSupplement (int code);
XMLPUBFUN int XMLCALL xmlUCSIsYiRadicals (int code);
XMLPUBFUN int XMLCALL xmlUCSIsYiSyllables (int code);
XMLPUBFUN int XMLCALL xmlUCSIsYijingHexagramSymbols (int code);
XMLPUBFUN int XMLCALL xmlUCSIsBlock (int code, const char *block);
XMLPUBFUN int XMLCALL xmlUCSIsCatC (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatCc (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatCf (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatCo (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatCs (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatL (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatLl (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatLm (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatLo (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatLt (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatLu (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatM (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatMc (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatMe (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatMn (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatN (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatNd (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatNl (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatNo (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatP (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatPc (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatPd (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatPe (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatPf (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatPi (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatPo (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatPs (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatS (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatSc (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatSk (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatSm (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatSo (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatZ (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatZl (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatZp (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCatZs (int code);
XMLPUBFUN int XMLCALL xmlUCSIsCat (int code, const char *cat);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_UNICODE_ENABLED */
#endif /* __XML_UNICODE_H__ */
| 9,993 | 48.231527 | 78 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/xmlIO.h
|
/*
* Summary: interface for the I/O interfaces used by the parser
* Description: interface for the I/O interfaces used by the parser
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_IO_H__
#define __XML_IO_H__
#include <stdio.h>
#include <libxml/xmlversion.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Those are the functions and datatypes for the parser input
* I/O structures.
*/
/**
* xmlInputMatchCallback:
* @filename: the filename or URI
*
* Callback used in the I/O Input API to detect if the current handler
* can provide input fonctionnalities for this resource.
*
* Returns 1 if yes and 0 if another Input module should be used
*/
typedef int (XMLCALL *xmlInputMatchCallback) (char const *filename);
/**
* xmlInputOpenCallback:
* @filename: the filename or URI
*
* Callback used in the I/O Input API to open the resource
*
* Returns an Input context or NULL in case or error
*/
typedef void * (XMLCALL *xmlInputOpenCallback) (char const *filename);
/**
* xmlInputReadCallback:
* @context: an Input context
* @buffer: the buffer to store data read
* @len: the length of the buffer in bytes
*
* Callback used in the I/O Input API to read the resource
*
* Returns the number of bytes read or -1 in case of error
*/
typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int len);
/**
* xmlInputCloseCallback:
* @context: an Input context
*
* Callback used in the I/O Input API to close the resource
*
* Returns 0 or -1 in case of error
*/
typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
#ifdef LIBXML_OUTPUT_ENABLED
/*
* Those are the functions and datatypes for the library output
* I/O structures.
*/
/**
* xmlOutputMatchCallback:
* @filename: the filename or URI
*
* Callback used in the I/O Output API to detect if the current handler
* can provide output fonctionnalities for this resource.
*
* Returns 1 if yes and 0 if another Output module should be used
*/
typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename);
/**
* xmlOutputOpenCallback:
* @filename: the filename or URI
*
* Callback used in the I/O Output API to open the resource
*
* Returns an Output context or NULL in case or error
*/
typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename);
/**
* xmlOutputWriteCallback:
* @context: an Output context
* @buffer: the buffer of data to write
* @len: the length of the buffer in bytes
*
* Callback used in the I/O Output API to write to the resource
*
* Returns the number of bytes written or -1 in case of error
*/
typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buffer,
int len);
/**
* xmlOutputCloseCallback:
* @context: an Output context
*
* Callback used in the I/O Output API to close the resource
*
* Returns 0 or -1 in case of error
*/
typedef int (XMLCALL *xmlOutputCloseCallback) (void * context);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef __cplusplus
}
#endif
#include <libxml/globals.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/encoding.h>
#ifdef __cplusplus
extern "C" {
#endif
struct _xmlParserInputBuffer {
void* context;
xmlInputReadCallback readcallback;
xmlInputCloseCallback closecallback;
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 */
xmlBufferPtr raw; /* if encoder != NULL buffer for raw input */
int compressed; /* -1=unknown, 0=not compressed, 1=compressed */
int error;
unsigned long rawconsumed;/* amount consumed from raw */
};
#ifdef LIBXML_OUTPUT_ENABLED
struct _xmlOutputBuffer {
void* context;
xmlOutputWriteCallback writecallback;
xmlOutputCloseCallback closecallback;
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
xmlBufferPtr conv; /* if encoder != NULL buffer for output */
int written; /* total number of byte written */
int error;
};
#endif /* LIBXML_OUTPUT_ENABLED */
/*
* Interfaces for input
*/
XMLPUBFUN void XMLCALL
xmlCleanupInputCallbacks (void);
XMLPUBFUN int XMLCALL
xmlPopInputCallbacks (void);
XMLPUBFUN void XMLCALL
xmlRegisterDefaultInputCallbacks (void);
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
xmlAllocParserInputBuffer (xmlCharEncoding enc);
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
xmlParserInputBufferCreateFilename (const char *URI,
xmlCharEncoding enc);
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
xmlParserInputBufferCreateFile (FILE *file,
xmlCharEncoding enc);
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
xmlParserInputBufferCreateFd (int fd,
xmlCharEncoding enc);
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
xmlParserInputBufferCreateMem (const char *mem, int size,
xmlCharEncoding enc);
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
xmlParserInputBufferCreateStatic (const char *mem, int size,
xmlCharEncoding enc);
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
xmlCharEncoding enc);
XMLPUBFUN int XMLCALL
xmlParserInputBufferRead (xmlParserInputBufferPtr in,
int len);
XMLPUBFUN int XMLCALL
xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
int len);
XMLPUBFUN int XMLCALL
xmlParserInputBufferPush (xmlParserInputBufferPtr in,
int len,
const char *buf);
XMLPUBFUN void XMLCALL
xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
XMLPUBFUN char * XMLCALL
xmlParserGetDirectory (const char *filename);
XMLPUBFUN int XMLCALL
xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc,
xmlInputOpenCallback openFunc,
xmlInputReadCallback readFunc,
xmlInputCloseCallback closeFunc);
xmlParserInputBufferPtr
__xmlParserInputBufferCreateFilename(const char *URI,
xmlCharEncoding enc);
#ifdef LIBXML_OUTPUT_ENABLED
/*
* Interfaces for output
*/
XMLPUBFUN void XMLCALL
xmlCleanupOutputCallbacks (void);
XMLPUBFUN void XMLCALL
xmlRegisterDefaultOutputCallbacks(void);
XMLPUBFUN xmlOutputBufferPtr XMLCALL
xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN xmlOutputBufferPtr XMLCALL
xmlOutputBufferCreateFilename (const char *URI,
xmlCharEncodingHandlerPtr encoder,
int compression);
XMLPUBFUN xmlOutputBufferPtr XMLCALL
xmlOutputBufferCreateFile (FILE *file,
xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN xmlOutputBufferPtr XMLCALL
xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN xmlOutputBufferPtr XMLCALL
xmlOutputBufferCreateFd (int fd,
xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN xmlOutputBufferPtr XMLCALL
xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite,
xmlOutputCloseCallback ioclose,
void *ioctx,
xmlCharEncodingHandlerPtr encoder);
XMLPUBFUN int XMLCALL
xmlOutputBufferWrite (xmlOutputBufferPtr out,
int len,
const char *buf);
XMLPUBFUN int XMLCALL
xmlOutputBufferWriteString (xmlOutputBufferPtr out,
const char *str);
XMLPUBFUN int XMLCALL
xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
const xmlChar *str,
xmlCharEncodingOutputFunc escaping);
XMLPUBFUN int XMLCALL
xmlOutputBufferFlush (xmlOutputBufferPtr out);
XMLPUBFUN int XMLCALL
xmlOutputBufferClose (xmlOutputBufferPtr out);
XMLPUBFUN int XMLCALL
xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
xmlOutputOpenCallback openFunc,
xmlOutputWriteCallback writeFunc,
xmlOutputCloseCallback closeFunc);
xmlOutputBufferPtr
__xmlOutputBufferCreateFilename(const char *URI,
xmlCharEncodingHandlerPtr encoder,
int compression);
#ifdef LIBXML_HTTP_ENABLED
/* This function only exists if HTTP support built into the library */
XMLPUBFUN void XMLCALL
xmlRegisterHTTPPostCallbacks (void );
#endif /* LIBXML_HTTP_ENABLED */
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN xmlParserInputPtr XMLCALL
xmlCheckHTTPInput (xmlParserCtxtPtr ctxt,
xmlParserInputPtr ret);
/*
* A predefined entity loader disabling network accesses
*/
XMLPUBFUN xmlParserInputPtr XMLCALL
xmlNoNetExternalEntityLoader (const char *URL,
const char *ID,
xmlParserCtxtPtr ctxt);
/*
* xmlNormalizeWindowsPath is obsolete, don't use it.
* Check xmlCanonicPath in uri.h for a better alternative.
*/
XMLPUBFUN xmlChar * XMLCALL
xmlNormalizeWindowsPath (const xmlChar *path);
XMLPUBFUN int XMLCALL
xmlCheckFilename (const char *path);
/**
* Default 'file://' protocol callbacks
*/
XMLPUBFUN int XMLCALL
xmlFileMatch (const char *filename);
XMLPUBFUN void * XMLCALL
xmlFileOpen (const char *filename);
XMLPUBFUN int XMLCALL
xmlFileRead (void * context,
char * buffer,
int len);
XMLPUBFUN int XMLCALL
xmlFileClose (void * context);
/**
* Default 'http://' protocol callbacks
*/
#ifdef LIBXML_HTTP_ENABLED
XMLPUBFUN int XMLCALL
xmlIOHTTPMatch (const char *filename);
XMLPUBFUN void * XMLCALL
xmlIOHTTPOpen (const char *filename);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void * XMLCALL
xmlIOHTTPOpenW (const char * post_uri,
int compression );
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN int XMLCALL
xmlIOHTTPRead (void * context,
char * buffer,
int len);
XMLPUBFUN int XMLCALL
xmlIOHTTPClose (void * context);
#endif /* LIBXML_HTTP_ENABLED */
/**
* Default 'ftp://' protocol callbacks
*/
#ifdef LIBXML_FTP_ENABLED
XMLPUBFUN int XMLCALL
xmlIOFTPMatch (const char *filename);
XMLPUBFUN void * XMLCALL
xmlIOFTPOpen (const char *filename);
XMLPUBFUN int XMLCALL
xmlIOFTPRead (void * context,
char * buffer,
int len);
XMLPUBFUN int XMLCALL
xmlIOFTPClose (void * context);
#endif /* LIBXML_FTP_ENABLED */
#ifdef __cplusplus
}
#endif
#endif /* __XML_IO_H__ */
| 10,448 | 27.944598 | 85 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/nanoftp.h
|
/*
* Summary: minimal FTP implementation
* Description: minimal FTP implementation allowing to fetch resources
* like external subset.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __NANO_FTP_H__
#define __NANO_FTP_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_FTP_ENABLED
/* Needed for portability to Windows 64 bits */
#if defined(__MINGW32__) || defined(_WIN32_WCE)
#include <winsock2.h>
#else
/**
* SOCKET:
*
* macro used to provide portability of code to windows sockets
*/
#define SOCKET int
/**
* INVALID_SOCKET:
*
* macro used to provide portability of code to windows sockets
* the value to be used when the socket is not valid
*/
#define INVALID_SOCKET (-1)
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
* ftpListCallback:
* @userData: user provided data for the callback
* @filename: the file name (including "->" when links are shown)
* @attrib: the attribute string
* @owner: the owner string
* @group: the group string
* @size: the file size
* @links: the link count
* @year: the year
* @month: the month
* @day: the day
* @hour: the hour
* @minute: the minute
*
* A callback for the xmlNanoFTPList command.
* Note that only one of year and day:minute are specified.
*/
typedef void (*ftpListCallback) (void *userData,
const char *filename, const char *attrib,
const char *owner, const char *group,
unsigned long size, int links, int year,
const char *month, int day, int hour,
int minute);
/**
* ftpDataCallback:
* @userData: the user provided context
* @data: the data received
* @len: its size in bytes
*
* A callback for the xmlNanoFTPGet command.
*/
typedef void (*ftpDataCallback) (void *userData,
const char *data,
int len);
/*
* Init
*/
XMLPUBFUN void XMLCALL
xmlNanoFTPInit (void);
XMLPUBFUN void XMLCALL
xmlNanoFTPCleanup (void);
/*
* Creating/freeing contexts.
*/
XMLPUBFUN void * XMLCALL
xmlNanoFTPNewCtxt (const char *URL);
XMLPUBFUN void XMLCALL
xmlNanoFTPFreeCtxt (void * ctx);
XMLPUBFUN void * XMLCALL
xmlNanoFTPConnectTo (const char *server,
int port);
/*
* Opening/closing session connections.
*/
XMLPUBFUN void * XMLCALL
xmlNanoFTPOpen (const char *URL);
XMLPUBFUN int XMLCALL
xmlNanoFTPConnect (void *ctx);
XMLPUBFUN int XMLCALL
xmlNanoFTPClose (void *ctx);
XMLPUBFUN int XMLCALL
xmlNanoFTPQuit (void *ctx);
XMLPUBFUN void XMLCALL
xmlNanoFTPScanProxy (const char *URL);
XMLPUBFUN void XMLCALL
xmlNanoFTPProxy (const char *host,
int port,
const char *user,
const char *passwd,
int type);
XMLPUBFUN int XMLCALL
xmlNanoFTPUpdateURL (void *ctx,
const char *URL);
/*
* Rather internal commands.
*/
XMLPUBFUN int XMLCALL
xmlNanoFTPGetResponse (void *ctx);
XMLPUBFUN int XMLCALL
xmlNanoFTPCheckResponse (void *ctx);
/*
* CD/DIR/GET handlers.
*/
XMLPUBFUN int XMLCALL
xmlNanoFTPCwd (void *ctx,
const char *directory);
XMLPUBFUN int XMLCALL
xmlNanoFTPDele (void *ctx,
const char *file);
XMLPUBFUN SOCKET XMLCALL
xmlNanoFTPGetConnection (void *ctx);
XMLPUBFUN int XMLCALL
xmlNanoFTPCloseConnection(void *ctx);
XMLPUBFUN int XMLCALL
xmlNanoFTPList (void *ctx,
ftpListCallback callback,
void *userData,
const char *filename);
XMLPUBFUN SOCKET XMLCALL
xmlNanoFTPGetSocket (void *ctx,
const char *filename);
XMLPUBFUN int XMLCALL
xmlNanoFTPGet (void *ctx,
ftpDataCallback callback,
void *userData,
const char *filename);
XMLPUBFUN int XMLCALL
xmlNanoFTPRead (void *ctx,
void *dest,
int len);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_FTP_ENABLED */
#endif /* __NANO_FTP_H__ */
| 3,739 | 21.944785 | 70 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/relaxng.h
|
/*
* Summary: implementation of the Relax-NG validation
* Description: implementation of the Relax-NG validation
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_RELAX_NG__
#define __XML_RELAX_NG__
#include <libxml/xmlversion.h>
#include <libxml/hash.h>
#include <libxml/xmlstring.h>
#ifdef LIBXML_SCHEMAS_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _xmlRelaxNG xmlRelaxNG;
typedef xmlRelaxNG *xmlRelaxNGPtr;
/**
* xmlRelaxNGValidityErrorFunc:
* @ctx: the validation context
* @msg: the message
* @...: extra arguments
*
* Signature of an error callback from a Relax-NG validation
*/
typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* xmlRelaxNGValidityWarningFunc:
* @ctx: the validation context
* @msg: the message
* @...: extra arguments
*
* Signature of a warning callback from a Relax-NG validation
*/
typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* A schemas validation context
*/
typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt;
typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr;
/*
* xmlRelaxNGValidErr:
*
* List of possible Relax NG validation errors
*/
typedef enum {
XML_RELAXNG_OK = 0,
XML_RELAXNG_ERR_MEMORY,
XML_RELAXNG_ERR_TYPE,
XML_RELAXNG_ERR_TYPEVAL,
XML_RELAXNG_ERR_DUPID,
XML_RELAXNG_ERR_TYPECMP,
XML_RELAXNG_ERR_NOSTATE,
XML_RELAXNG_ERR_NODEFINE,
XML_RELAXNG_ERR_LISTEXTRA,
XML_RELAXNG_ERR_LISTEMPTY,
XML_RELAXNG_ERR_INTERNODATA,
XML_RELAXNG_ERR_INTERSEQ,
XML_RELAXNG_ERR_INTEREXTRA,
XML_RELAXNG_ERR_ELEMNAME,
XML_RELAXNG_ERR_ATTRNAME,
XML_RELAXNG_ERR_ELEMNONS,
XML_RELAXNG_ERR_ATTRNONS,
XML_RELAXNG_ERR_ELEMWRONGNS,
XML_RELAXNG_ERR_ATTRWRONGNS,
XML_RELAXNG_ERR_ELEMEXTRANS,
XML_RELAXNG_ERR_ATTREXTRANS,
XML_RELAXNG_ERR_ELEMNOTEMPTY,
XML_RELAXNG_ERR_NOELEM,
XML_RELAXNG_ERR_NOTELEM,
XML_RELAXNG_ERR_ATTRVALID,
XML_RELAXNG_ERR_CONTENTVALID,
XML_RELAXNG_ERR_EXTRACONTENT,
XML_RELAXNG_ERR_INVALIDATTR,
XML_RELAXNG_ERR_DATAELEM,
XML_RELAXNG_ERR_VALELEM,
XML_RELAXNG_ERR_LISTELEM,
XML_RELAXNG_ERR_DATATYPE,
XML_RELAXNG_ERR_VALUE,
XML_RELAXNG_ERR_LIST,
XML_RELAXNG_ERR_NOGRAMMAR,
XML_RELAXNG_ERR_EXTRADATA,
XML_RELAXNG_ERR_LACKDATA,
XML_RELAXNG_ERR_INTERNAL,
XML_RELAXNG_ERR_ELEMWRONG,
XML_RELAXNG_ERR_TEXTWRONG
} xmlRelaxNGValidErr;
/*
* xmlRelaxNGParserFlags:
*
* List of possible Relax NG Parser flags
*/
typedef enum {
XML_RELAXNGP_NONE = 0,
XML_RELAXNGP_FREE_DOC = 1,
XML_RELAXNGP_CRNG = 2
} xmlRelaxNGParserFlag;
XMLPUBFUN int XMLCALL
xmlRelaxNGInitTypes (void);
XMLPUBFUN void XMLCALL
xmlRelaxNGCleanupTypes (void);
/*
* Interfaces for parsing.
*/
XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
xmlRelaxNGNewParserCtxt (const char *URL);
XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
xmlRelaxNGNewMemParserCtxt (const char *buffer,
int size);
XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc);
XMLPUBFUN int XMLCALL
xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt,
int flag);
XMLPUBFUN void XMLCALL
xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc err,
xmlRelaxNGValidityWarningFunc warn,
void *ctx);
XMLPUBFUN int XMLCALL
xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc *err,
xmlRelaxNGValidityWarningFunc *warn,
void **ctx);
XMLPUBFUN void XMLCALL
xmlRelaxNGSetParserStructuredErrors(
xmlRelaxNGParserCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void *ctx);
XMLPUBFUN xmlRelaxNGPtr XMLCALL
xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
xmlRelaxNGFree (xmlRelaxNGPtr schema);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
xmlRelaxNGDump (FILE *output,
xmlRelaxNGPtr schema);
XMLPUBFUN void XMLCALL
xmlRelaxNGDumpTree (FILE * output,
xmlRelaxNGPtr schema);
#endif /* LIBXML_OUTPUT_ENABLED */
/*
* Interfaces for validating
*/
XMLPUBFUN void XMLCALL
xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc err,
xmlRelaxNGValidityWarningFunc warn,
void *ctx);
XMLPUBFUN int XMLCALL
xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc *err,
xmlRelaxNGValidityWarningFunc *warn,
void **ctx);
XMLPUBFUN void XMLCALL
xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror, void *ctx);
XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL
xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
XMLPUBFUN void XMLCALL
xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc);
/*
* Interfaces for progressive validation when possible
*/
XMLPUBFUN int XMLCALL
xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
XMLPUBFUN int XMLCALL
xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt,
const xmlChar *data,
int len);
XMLPUBFUN int XMLCALL
xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
XMLPUBFUN int XMLCALL
xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_SCHEMAS_ENABLED */
#endif /* __XML_RELAX_NG__ */
| 5,958 | 26.845794 | 113 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/list.h
|
/*
* Summary: lists interfaces
* Description: this module implement the list support used in
* various place in the library.
*
* Copy: See Copyright for the status of this software.
*
* Author: Gary Pennington <[email protected]>
*/
#ifndef __XML_LINK_INCLUDE__
#define __XML_LINK_INCLUDE__
#include <libxml/xmlversion.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _xmlLink xmlLink;
typedef xmlLink *xmlLinkPtr;
typedef struct _xmlList xmlList;
typedef xmlList *xmlListPtr;
/**
* xmlListDeallocator:
* @lk: the data to deallocate
*
* Callback function used to free data from a list.
*/
typedef void (*xmlListDeallocator) (xmlLinkPtr lk);
/**
* xmlListDataCompare:
* @data0: the first data
* @data1: the second data
*
* Callback function used to compare 2 data.
*
* Returns 0 is equality, -1 or 1 otherwise depending on the ordering.
*/
typedef int (*xmlListDataCompare) (const void *data0, const void *data1);
/**
* xmlListWalker:
* @data: the data found in the list
* @user: extra user provided data to the walker
*
* Callback function used when walking a list with xmlListWalk().
*
* Returns 0 to stop walking the list, 1 otherwise.
*/
typedef int (*xmlListWalker) (const void *data, const void *user);
/* Creation/Deletion */
XMLPUBFUN xmlListPtr XMLCALL
xmlListCreate (xmlListDeallocator deallocator,
xmlListDataCompare compare);
XMLPUBFUN void XMLCALL
xmlListDelete (xmlListPtr l);
/* Basic Operators */
XMLPUBFUN void * XMLCALL
xmlListSearch (xmlListPtr l,
void *data);
XMLPUBFUN void * XMLCALL
xmlListReverseSearch (xmlListPtr l,
void *data);
XMLPUBFUN int XMLCALL
xmlListInsert (xmlListPtr l,
void *data) ;
XMLPUBFUN int XMLCALL
xmlListAppend (xmlListPtr l,
void *data) ;
XMLPUBFUN int XMLCALL
xmlListRemoveFirst (xmlListPtr l,
void *data);
XMLPUBFUN int XMLCALL
xmlListRemoveLast (xmlListPtr l,
void *data);
XMLPUBFUN int XMLCALL
xmlListRemoveAll (xmlListPtr l,
void *data);
XMLPUBFUN void XMLCALL
xmlListClear (xmlListPtr l);
XMLPUBFUN int XMLCALL
xmlListEmpty (xmlListPtr l);
XMLPUBFUN xmlLinkPtr XMLCALL
xmlListFront (xmlListPtr l);
XMLPUBFUN xmlLinkPtr XMLCALL
xmlListEnd (xmlListPtr l);
XMLPUBFUN int XMLCALL
xmlListSize (xmlListPtr l);
XMLPUBFUN void XMLCALL
xmlListPopFront (xmlListPtr l);
XMLPUBFUN void XMLCALL
xmlListPopBack (xmlListPtr l);
XMLPUBFUN int XMLCALL
xmlListPushFront (xmlListPtr l,
void *data);
XMLPUBFUN int XMLCALL
xmlListPushBack (xmlListPtr l,
void *data);
/* Advanced Operators */
XMLPUBFUN void XMLCALL
xmlListReverse (xmlListPtr l);
XMLPUBFUN void XMLCALL
xmlListSort (xmlListPtr l);
XMLPUBFUN void XMLCALL
xmlListWalk (xmlListPtr l,
xmlListWalker walker,
const void *user);
XMLPUBFUN void XMLCALL
xmlListReverseWalk (xmlListPtr l,
xmlListWalker walker,
const void *user);
XMLPUBFUN void XMLCALL
xmlListMerge (xmlListPtr l1,
xmlListPtr l2);
XMLPUBFUN xmlListPtr XMLCALL
xmlListDup (const xmlListPtr old);
XMLPUBFUN int XMLCALL
xmlListCopy (xmlListPtr cur,
const xmlListPtr old);
/* Link operators */
XMLPUBFUN void * XMLCALL
xmlLinkGetData (xmlLinkPtr lk);
/* xmlListUnique() */
/* xmlListSwap */
#ifdef __cplusplus
}
#endif
#endif /* __XML_LINK_INCLUDE__ */
| 3,422 | 23.804348 | 74 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/xmlversion.h
|
/*
* Summary: compile-time version informations
* Description: compile-time version informations for the XML library
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_VERSION_H__
#define __XML_VERSION_H__
#include <libxml/xmlexports.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* use those to be sure nothing nasty will happen if
* your library and includes mismatch
*/
#ifndef LIBXML2_COMPILING_MSCCDEF
XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
#endif /* LIBXML2_COMPILING_MSCCDEF */
/**
* LIBXML_DOTTED_VERSION:
*
* the version string like "1.2.3"
*/
#define LIBXML_DOTTED_VERSION "2.7.8"
/**
* LIBXML_VERSION:
*
* the version number: 1.2.3 value is 10203
*/
#define LIBXML_VERSION 20708
/**
* LIBXML_VERSION_STRING:
*
* the version number string, 1.2.3 value is "10203"
*/
#define LIBXML_VERSION_STRING "20708"
/**
* LIBXML_VERSION_EXTRA:
*
* extra version information, used to show a CVS compilation
*/
#define LIBXML_VERSION_EXTRA ""
/**
* LIBXML_TEST_VERSION:
*
* Macro to check that the libxml version in use is compatible with
* the version the software has been compiled against
*/
#define LIBXML_TEST_VERSION xmlCheckVersion(20708);
#ifndef VMS
#if 0
/**
* WITH_TRIO:
*
* defined if the trio support need to be configured in
*/
#define WITH_TRIO
#else
/**
* WITHOUT_TRIO:
*
* defined if the trio support should not be configured in
*/
#define WITHOUT_TRIO
#endif
#else /* VMS */
/**
* WITH_TRIO:
*
* defined if the trio support need to be configured in
*/
#define WITH_TRIO 1
#endif /* VMS */
/**
* LIBXML_THREAD_ENABLED:
*
* Whether the thread support is configured in
*/
#if 1
#if defined(_REENTRANT) || defined(__MT__) || \
(defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L))
#define LIBXML_THREAD_ENABLED
#endif
#endif
/**
* LIBXML_TREE_ENABLED:
*
* Whether the DOM like tree manipulation API support is configured in
*/
#if 1
#define LIBXML_TREE_ENABLED
#endif
/**
* LIBXML_OUTPUT_ENABLED:
*
* Whether the serialization/saving support is configured in
*/
#if 1
#define LIBXML_OUTPUT_ENABLED
#endif
/**
* LIBXML_PUSH_ENABLED:
*
* Whether the push parsing interfaces are configured in
*/
#if 1
#define LIBXML_PUSH_ENABLED
#endif
/**
* LIBXML_READER_ENABLED:
*
* Whether the xmlReader parsing interface is configured in
*/
#if 1
#define LIBXML_READER_ENABLED
#endif
/**
* LIBXML_PATTERN_ENABLED:
*
* Whether the xmlPattern node selection interface is configured in
*/
#if 1
#define LIBXML_PATTERN_ENABLED
#endif
/**
* LIBXML_WRITER_ENABLED:
*
* Whether the xmlWriter saving interface is configured in
*/
#if 1
#define LIBXML_WRITER_ENABLED
#endif
/**
* LIBXML_SAX1_ENABLED:
*
* Whether the older SAX1 interface is configured in
*/
#if 1
#define LIBXML_SAX1_ENABLED
#endif
/**
* LIBXML_FTP_ENABLED:
*
* Whether the FTP support is configured in
*/
#if 1
#define LIBXML_FTP_ENABLED
#endif
/**
* LIBXML_HTTP_ENABLED:
*
* Whether the HTTP support is configured in
*/
#if 1
#define LIBXML_HTTP_ENABLED
#endif
/**
* LIBXML_VALID_ENABLED:
*
* Whether the DTD validation support is configured in
*/
#if 1
#define LIBXML_VALID_ENABLED
#endif
/**
* LIBXML_HTML_ENABLED:
*
* Whether the HTML support is configured in
*/
#if 1
#define LIBXML_HTML_ENABLED
#endif
/**
* LIBXML_LEGACY_ENABLED:
*
* Whether the deprecated APIs are compiled in for compatibility
*/
#if 1
#define LIBXML_LEGACY_ENABLED
#endif
/**
* LIBXML_C14N_ENABLED:
*
* Whether the Canonicalization support is configured in
*/
#if 1
#define LIBXML_C14N_ENABLED
#endif
/**
* LIBXML_CATALOG_ENABLED:
*
* Whether the Catalog support is configured in
*/
#if 1
#define LIBXML_CATALOG_ENABLED
#endif
/**
* LIBXML_DOCB_ENABLED:
*
* Whether the SGML Docbook support is configured in
*/
#if 1
#define LIBXML_DOCB_ENABLED
#endif
/**
* LIBXML_XPATH_ENABLED:
*
* Whether XPath is configured in
*/
#if 1
#define LIBXML_XPATH_ENABLED
#endif
/**
* LIBXML_XPTR_ENABLED:
*
* Whether XPointer is configured in
*/
#if 1
#define LIBXML_XPTR_ENABLED
#endif
/**
* LIBXML_XINCLUDE_ENABLED:
*
* Whether XInclude is configured in
*/
#if 1
#define LIBXML_XINCLUDE_ENABLED
#endif
/**
* LIBXML_ICONV_ENABLED:
*
* Whether iconv support is available
*/
#if 1
#define LIBXML_ICONV_ENABLED
#endif
/**
* LIBXML_ICU_ENABLED:
*
* Whether icu support is available
*/
#if 0
#define LIBXML_ICU_ENABLED
#endif
/**
* LIBXML_ISO8859X_ENABLED:
*
* Whether ISO-8859-* support is made available in case iconv is not
*/
#if 0
#define LIBXML_ISO8859X_ENABLED
#endif
/**
* LIBXML_DEBUG_ENABLED:
*
* Whether Debugging module is configured in
*/
#if 1
#define LIBXML_DEBUG_ENABLED
#endif
/**
* DEBUG_MEMORY_LOCATION:
*
* Whether the memory debugging is configured in
*/
#if 0
#define DEBUG_MEMORY_LOCATION
#endif
/**
* LIBXML_DEBUG_RUNTIME:
*
* Whether the runtime debugging is configured in
*/
#if 0
#define LIBXML_DEBUG_RUNTIME
#endif
/**
* LIBXML_UNICODE_ENABLED:
*
* Whether the Unicode related interfaces are compiled in
*/
#if 1
#define LIBXML_UNICODE_ENABLED
#endif
/**
* LIBXML_REGEXP_ENABLED:
*
* Whether the regular expressions interfaces are compiled in
*/
#if 1
#define LIBXML_REGEXP_ENABLED
#endif
/**
* LIBXML_AUTOMATA_ENABLED:
*
* Whether the automata interfaces are compiled in
*/
#if 1
#define LIBXML_AUTOMATA_ENABLED
#endif
/**
* LIBXML_EXPR_ENABLED:
*
* Whether the formal expressions interfaces are compiled in
*/
#if 1
#define LIBXML_EXPR_ENABLED
#endif
/**
* LIBXML_SCHEMAS_ENABLED:
*
* Whether the Schemas validation interfaces are compiled in
*/
#if 1
#define LIBXML_SCHEMAS_ENABLED
#endif
/**
* LIBXML_SCHEMATRON_ENABLED:
*
* Whether the Schematron validation interfaces are compiled in
*/
#if 1
#define LIBXML_SCHEMATRON_ENABLED
#endif
/**
* LIBXML_MODULES_ENABLED:
*
* Whether the module interfaces are compiled in
*/
#if 1
#define LIBXML_MODULES_ENABLED
/**
* LIBXML_MODULE_EXTENSION:
*
* the string suffix used by dynamic modules (usually shared libraries)
*/
#define LIBXML_MODULE_EXTENSION ".dll"
#endif
/**
* LIBXML_ZLIB_ENABLED:
*
* Whether the Zlib support is compiled in
*/
#if 1
#define LIBXML_ZLIB_ENABLED
#endif
#ifdef __GNUC__
#ifdef HAVE_ANSIDECL_H
#include <ansidecl.h>
#endif
/**
* ATTRIBUTE_UNUSED:
*
* Macro used to signal to GCC unused function parameters
*/
#ifndef ATTRIBUTE_UNUSED
#define ATTRIBUTE_UNUSED __attribute__((unused))
#endif
/**
* LIBXML_ATTR_ALLOC_SIZE:
*
* Macro used to indicate to GCC this is an allocator function
*/
#ifndef LIBXML_ATTR_ALLOC_SIZE
# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
# else
# define LIBXML_ATTR_ALLOC_SIZE(x)
# endif
#else
# define LIBXML_ATTR_ALLOC_SIZE(x)
#endif
/**
* LIBXML_ATTR_FORMAT:
*
* Macro used to indicate to GCC the parameter are printf like
*/
#ifndef LIBXML_ATTR_FORMAT
# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
# else
# define LIBXML_ATTR_FORMAT(fmt,args)
# endif
#else
# define LIBXML_ATTR_FORMAT(fmt,args)
#endif
#else /* ! __GNUC__ */
/**
* ATTRIBUTE_UNUSED:
*
* Macro used to signal to GCC unused function parameters
*/
#define ATTRIBUTE_UNUSED
/**
* LIBXML_ATTR_ALLOC_SIZE:
*
* Macro used to indicate to GCC this is an allocator function
*/
#define LIBXML_ATTR_ALLOC_SIZE(x)
/**
* LIBXML_ATTR_FORMAT:
*
* Macro used to indicate to GCC the parameter are printf like
*/
#define LIBXML_ATTR_FORMAT(fmt,args)
#endif /* __GNUC__ */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
| 7,748 | 15.557692 | 87 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/catalog.h
|
/**
* Summary: interfaces to the Catalog handling system
* Description: the catalog module implements the support for
* XML Catalogs and SGML catalogs
*
* SGML Open Technical Resolution TR9401:1997.
* http://www.jclark.com/sp/catalog.htm
*
* XML Catalogs Working Draft 06 August 2001
* http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_CATALOG_H__
#define __XML_CATALOG_H__
#include <stdio.h>
#include <libxml/xmlversion.h>
#include <libxml/xmlstring.h>
#include <libxml/tree.h>
#ifdef LIBXML_CATALOG_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/**
* XML_CATALOGS_NAMESPACE:
*
* The namespace for the XML Catalogs elements.
*/
#define XML_CATALOGS_NAMESPACE \
(const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
/**
* XML_CATALOG_PI:
*
* The specific XML Catalog Processing Instuction name.
*/
#define XML_CATALOG_PI \
(const xmlChar *) "oasis-xml-catalog"
/*
* The API is voluntarily limited to general cataloging.
*/
typedef enum {
XML_CATA_PREFER_NONE = 0,
XML_CATA_PREFER_PUBLIC = 1,
XML_CATA_PREFER_SYSTEM
} xmlCatalogPrefer;
typedef enum {
XML_CATA_ALLOW_NONE = 0,
XML_CATA_ALLOW_GLOBAL = 1,
XML_CATA_ALLOW_DOCUMENT = 2,
XML_CATA_ALLOW_ALL = 3
} xmlCatalogAllow;
typedef struct _xmlCatalog xmlCatalog;
typedef xmlCatalog *xmlCatalogPtr;
/*
* Operations on a given catalog.
*/
XMLPUBFUN xmlCatalogPtr XMLCALL
xmlNewCatalog (int sgml);
XMLPUBFUN xmlCatalogPtr XMLCALL
xmlLoadACatalog (const char *filename);
XMLPUBFUN xmlCatalogPtr XMLCALL
xmlLoadSGMLSuperCatalog (const char *filename);
XMLPUBFUN int XMLCALL
xmlConvertSGMLCatalog (xmlCatalogPtr catal);
XMLPUBFUN int XMLCALL
xmlACatalogAdd (xmlCatalogPtr catal,
const xmlChar *type,
const xmlChar *orig,
const xmlChar *replace);
XMLPUBFUN int XMLCALL
xmlACatalogRemove (xmlCatalogPtr catal,
const xmlChar *value);
XMLPUBFUN xmlChar * XMLCALL
xmlACatalogResolve (xmlCatalogPtr catal,
const xmlChar *pubID,
const xmlChar *sysID);
XMLPUBFUN xmlChar * XMLCALL
xmlACatalogResolveSystem(xmlCatalogPtr catal,
const xmlChar *sysID);
XMLPUBFUN xmlChar * XMLCALL
xmlACatalogResolvePublic(xmlCatalogPtr catal,
const xmlChar *pubID);
XMLPUBFUN xmlChar * XMLCALL
xmlACatalogResolveURI (xmlCatalogPtr catal,
const xmlChar *URI);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
xmlACatalogDump (xmlCatalogPtr catal,
FILE *out);
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN void XMLCALL
xmlFreeCatalog (xmlCatalogPtr catal);
XMLPUBFUN int XMLCALL
xmlCatalogIsEmpty (xmlCatalogPtr catal);
/*
* Global operations.
*/
XMLPUBFUN void XMLCALL
xmlInitializeCatalog (void);
XMLPUBFUN int XMLCALL
xmlLoadCatalog (const char *filename);
XMLPUBFUN void XMLCALL
xmlLoadCatalogs (const char *paths);
XMLPUBFUN void XMLCALL
xmlCatalogCleanup (void);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
xmlCatalogDump (FILE *out);
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN xmlChar * XMLCALL
xmlCatalogResolve (const xmlChar *pubID,
const xmlChar *sysID);
XMLPUBFUN xmlChar * XMLCALL
xmlCatalogResolveSystem (const xmlChar *sysID);
XMLPUBFUN xmlChar * XMLCALL
xmlCatalogResolvePublic (const xmlChar *pubID);
XMLPUBFUN xmlChar * XMLCALL
xmlCatalogResolveURI (const xmlChar *URI);
XMLPUBFUN int XMLCALL
xmlCatalogAdd (const xmlChar *type,
const xmlChar *orig,
const xmlChar *replace);
XMLPUBFUN int XMLCALL
xmlCatalogRemove (const xmlChar *value);
XMLPUBFUN xmlDocPtr XMLCALL
xmlParseCatalogFile (const char *filename);
XMLPUBFUN int XMLCALL
xmlCatalogConvert (void);
/*
* Strictly minimal interfaces for per-document catalogs used
* by the parser.
*/
XMLPUBFUN void XMLCALL
xmlCatalogFreeLocal (void *catalogs);
XMLPUBFUN void * XMLCALL
xmlCatalogAddLocal (void *catalogs,
const xmlChar *URL);
XMLPUBFUN xmlChar * XMLCALL
xmlCatalogLocalResolve (void *catalogs,
const xmlChar *pubID,
const xmlChar *sysID);
XMLPUBFUN xmlChar * XMLCALL
xmlCatalogLocalResolveURI(void *catalogs,
const xmlChar *URI);
/*
* Preference settings.
*/
XMLPUBFUN int XMLCALL
xmlCatalogSetDebug (int level);
XMLPUBFUN xmlCatalogPrefer XMLCALL
xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
XMLPUBFUN void XMLCALL
xmlCatalogSetDefaults (xmlCatalogAllow allow);
XMLPUBFUN xmlCatalogAllow XMLCALL
xmlCatalogGetDefaults (void);
/* DEPRECATED interfaces */
XMLPUBFUN const xmlChar * XMLCALL
xmlCatalogGetSystem (const xmlChar *sysID);
XMLPUBFUN const xmlChar * XMLCALL
xmlCatalogGetPublic (const xmlChar *pubID);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_CATALOG_ENABLED */
#endif /* __XML_CATALOG_H__ */
| 4,958 | 26.098361 | 67 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/xmlautomata.h
|
/*
* Summary: API to build regexp automata
* Description: the API to build regexp automata
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_AUTOMATA_H__
#define __XML_AUTOMATA_H__
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#ifdef LIBXML_REGEXP_ENABLED
#ifdef LIBXML_AUTOMATA_ENABLED
#include <libxml/xmlregexp.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlAutomataPtr:
*
* A libxml automata description, It can be compiled into a regexp
*/
typedef struct _xmlAutomata xmlAutomata;
typedef xmlAutomata *xmlAutomataPtr;
/**
* xmlAutomataStatePtr:
*
* A state int the automata description,
*/
typedef struct _xmlAutomataState xmlAutomataState;
typedef xmlAutomataState *xmlAutomataStatePtr;
/*
* Building API
*/
XMLPUBFUN xmlAutomataPtr XMLCALL
xmlNewAutomata (void);
XMLPUBFUN void XMLCALL
xmlFreeAutomata (xmlAutomataPtr am);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataGetInitState (xmlAutomataPtr am);
XMLPUBFUN int XMLCALL
xmlAutomataSetFinalState (xmlAutomataPtr am,
xmlAutomataStatePtr state);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewState (xmlAutomataPtr am);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewTransition (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewTransition2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
const xmlChar *token2,
void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewNegTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
const xmlChar *token2,
void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewCountTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
int min,
int max,
void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
const xmlChar *token2,
int min,
int max,
void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewOnceTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
int min,
int max,
void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
const xmlChar *token2,
int min,
int max,
void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewAllTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int lax);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewEpsilon (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewCountedTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int counter);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewCounterTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int counter);
XMLPUBFUN int XMLCALL
xmlAutomataNewCounter (xmlAutomataPtr am,
int min,
int max);
XMLPUBFUN xmlRegexpPtr XMLCALL
xmlAutomataCompile (xmlAutomataPtr am);
XMLPUBFUN int XMLCALL
xmlAutomataIsDeterminist (xmlAutomataPtr am);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_AUTOMATA_ENABLED */
#endif /* LIBXML_REGEXP_ENABLED */
#endif /* __XML_AUTOMATA_H__ */
| 3,992 | 26.163265 | 66 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/c14n.h
|
/*
* Summary: Provide Canonical XML and Exclusive XML Canonicalization
* Description: the c14n modules provides a
*
* "Canonical XML" implementation
* http://www.w3.org/TR/xml-c14n
*
* and an
*
* "Exclusive XML Canonicalization" implementation
* http://www.w3.org/TR/xml-exc-c14n
* Copy: See Copyright for the status of this software.
*
* Author: Aleksey Sanin <[email protected]>
*/
#ifndef __XML_C14N_H__
#define __XML_C14N_H__
#ifdef LIBXML_C14N_ENABLED
#ifdef LIBXML_OUTPUT_ENABLED
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#include <libxml/xpath.h>
/*
* XML Canonicazation
* http://www.w3.org/TR/xml-c14n
*
* Exclusive XML Canonicazation
* http://www.w3.org/TR/xml-exc-c14n
*
* Canonical form of an XML document could be created if and only if
* a) default attributes (if any) are added to all nodes
* b) all character and parsed entity references are resolved
* In order to achive this in libxml2 the document MUST be loaded with
* following global setings:
*
* xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
* xmlSubstituteEntitiesDefault(1);
*
* or corresponding parser context setting:
* xmlParserCtxtPtr ctxt;
*
* ...
* ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
* ctxt->replaceEntities = 1;
* ...
*/
/*
* xmlC14NMode:
*
* Predefined values for C14N modes
*
*/
typedef enum {
XML_C14N_1_0 = 0, /* Origianal C14N 1.0 spec */
XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */
XML_C14N_1_1 = 2 /* C14N 1.1 spec */
} xmlC14NMode;
XMLPUBFUN int XMLCALL
xmlC14NDocSaveTo (xmlDocPtr doc,
xmlNodeSetPtr nodes,
int mode, /* a xmlC14NMode */
xmlChar **inclusive_ns_prefixes,
int with_comments,
xmlOutputBufferPtr buf);
XMLPUBFUN int XMLCALL
xmlC14NDocDumpMemory (xmlDocPtr doc,
xmlNodeSetPtr nodes,
int mode, /* a xmlC14NMode */
xmlChar **inclusive_ns_prefixes,
int with_comments,
xmlChar **doc_txt_ptr);
XMLPUBFUN int XMLCALL
xmlC14NDocSave (xmlDocPtr doc,
xmlNodeSetPtr nodes,
int mode, /* a xmlC14NMode */
xmlChar **inclusive_ns_prefixes,
int with_comments,
const char* filename,
int compression);
/**
* This is the core C14N function
*/
/**
* xmlC14NIsVisibleCallback:
* @user_data: user data
* @node: the curent node
* @parent: the parent node
*
* Signature for a C14N callback on visible nodes
*
* Returns 1 if the node should be included
*/
typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
xmlNodePtr node,
xmlNodePtr parent);
XMLPUBFUN int XMLCALL
xmlC14NExecute (xmlDocPtr doc,
xmlC14NIsVisibleCallback is_visible_callback,
void* user_data,
int mode, /* a xmlC14NMode */
xmlChar **inclusive_ns_prefixes,
int with_comments,
xmlOutputBufferPtr buf);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LIBXML_OUTPUT_ENABLED */
#endif /* LIBXML_C14N_ENABLED */
#endif /* __XML_C14N_H__ */
| 3,110 | 23.496063 | 70 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/xinclude.h
|
/*
* Summary: implementation of XInclude
* Description: API to handle XInclude processing,
* implements the
* World Wide Web Consortium Last Call Working Draft 10 November 2003
* http://www.w3.org/TR/2003/WD-xinclude-20031110
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_XINCLUDE_H__
#define __XML_XINCLUDE_H__
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#ifdef LIBXML_XINCLUDE_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/**
* XINCLUDE_NS:
*
* Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
*/
#define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude"
/**
* XINCLUDE_OLD_NS:
*
* Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude
*/
#define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude"
/**
* XINCLUDE_NODE:
*
* Macro defining "include"
*/
#define XINCLUDE_NODE (const xmlChar *) "include"
/**
* XINCLUDE_FALLBACK:
*
* Macro defining "fallback"
*/
#define XINCLUDE_FALLBACK (const xmlChar *) "fallback"
/**
* XINCLUDE_HREF:
*
* Macro defining "href"
*/
#define XINCLUDE_HREF (const xmlChar *) "href"
/**
* XINCLUDE_PARSE:
*
* Macro defining "parse"
*/
#define XINCLUDE_PARSE (const xmlChar *) "parse"
/**
* XINCLUDE_PARSE_XML:
*
* Macro defining "xml"
*/
#define XINCLUDE_PARSE_XML (const xmlChar *) "xml"
/**
* XINCLUDE_PARSE_TEXT:
*
* Macro defining "text"
*/
#define XINCLUDE_PARSE_TEXT (const xmlChar *) "text"
/**
* XINCLUDE_PARSE_ENCODING:
*
* Macro defining "encoding"
*/
#define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding"
/**
* XINCLUDE_PARSE_XPOINTER:
*
* Macro defining "xpointer"
*/
#define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer"
typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
/*
* standalone processing
*/
XMLPUBFUN int XMLCALL
xmlXIncludeProcess (xmlDocPtr doc);
XMLPUBFUN int XMLCALL
xmlXIncludeProcessFlags (xmlDocPtr doc,
int flags);
XMLPUBFUN int XMLCALL
xmlXIncludeProcessFlagsData(xmlDocPtr doc,
int flags,
void *data);
XMLPUBFUN int XMLCALL
xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
int flags,
void *data);
XMLPUBFUN int XMLCALL
xmlXIncludeProcessTree (xmlNodePtr tree);
XMLPUBFUN int XMLCALL
xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
int flags);
/*
* contextual processing
*/
XMLPUBFUN xmlXIncludeCtxtPtr XMLCALL
xmlXIncludeNewContext (xmlDocPtr doc);
XMLPUBFUN int XMLCALL
xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
int flags);
XMLPUBFUN void XMLCALL
xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
xmlNodePtr tree);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_XINCLUDE_ENABLED */
#endif /* __XML_XINCLUDE_H__ */
| 2,967 | 21.830769 | 79 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/xmlwriter.h
|
/*
* Summary: text writing API for XML
* Description: text writing API for XML
*
* Copy: See Copyright for the status of this software.
*
* Author: Alfred Mickautsch <[email protected]>
*/
#ifndef __XML_XMLWRITER_H__
#define __XML_XMLWRITER_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_WRITER_ENABLED
#include <stdarg.h>
#include <libxml/xmlIO.h>
#include <libxml/list.h>
#include <libxml/xmlstring.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _xmlTextWriter xmlTextWriter;
typedef xmlTextWriter *xmlTextWriterPtr;
/*
* Constructors & Destructor
*/
XMLPUBFUN xmlTextWriterPtr XMLCALL
xmlNewTextWriter(xmlOutputBufferPtr out);
XMLPUBFUN xmlTextWriterPtr XMLCALL
xmlNewTextWriterFilename(const char *uri, int compression);
XMLPUBFUN xmlTextWriterPtr XMLCALL
xmlNewTextWriterMemory(xmlBufferPtr buf, int compression);
XMLPUBFUN xmlTextWriterPtr XMLCALL
xmlNewTextWriterPushParser(xmlParserCtxtPtr ctxt, int compression);
XMLPUBFUN xmlTextWriterPtr XMLCALL
xmlNewTextWriterDoc(xmlDocPtr * doc, int compression);
XMLPUBFUN xmlTextWriterPtr XMLCALL
xmlNewTextWriterTree(xmlDocPtr doc, xmlNodePtr node,
int compression);
XMLPUBFUN void XMLCALL xmlFreeTextWriter(xmlTextWriterPtr writer);
/*
* Functions
*/
/*
* Document
*/
XMLPUBFUN int XMLCALL
xmlTextWriterStartDocument(xmlTextWriterPtr writer,
const char *version,
const char *encoding,
const char *standalone);
XMLPUBFUN int XMLCALL xmlTextWriterEndDocument(xmlTextWriterPtr
writer);
/*
* Comments
*/
XMLPUBFUN int XMLCALL xmlTextWriterStartComment(xmlTextWriterPtr
writer);
XMLPUBFUN int XMLCALL xmlTextWriterEndComment(xmlTextWriterPtr writer);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
const char *format, ...)
LIBXML_ATTR_FORMAT(2,3);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(2,0);
XMLPUBFUN int XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr
writer,
const xmlChar *
content);
/*
* Elements
*/
XMLPUBFUN int XMLCALL
xmlTextWriterStartElement(xmlTextWriterPtr writer,
const xmlChar * name);
XMLPUBFUN int XMLCALL xmlTextWriterStartElementNS(xmlTextWriterPtr
writer,
const xmlChar *
prefix,
const xmlChar * name,
const xmlChar *
namespaceURI);
XMLPUBFUN int XMLCALL xmlTextWriterEndElement(xmlTextWriterPtr writer);
XMLPUBFUN int XMLCALL xmlTextWriterFullEndElement(xmlTextWriterPtr
writer);
/*
* Elements conveniency functions
*/
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...)
LIBXML_ATTR_FORMAT(3,4);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(3,0);
XMLPUBFUN int XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr
writer,
const xmlChar * name,
const xmlChar *
content);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char *format, ...)
LIBXML_ATTR_FORMAT(5,6);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(5,0);
XMLPUBFUN int XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr
writer,
const xmlChar *
prefix,
const xmlChar * name,
const xmlChar *
namespaceURI,
const xmlChar *
content);
/*
* Text
*/
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer,
const char *format, ...)
LIBXML_ATTR_FORMAT(2,3);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer,
const char *format, va_list argptr)
LIBXML_ATTR_FORMAT(2,0);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteRawLen(xmlTextWriterPtr writer,
const xmlChar * content, int len);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteRaw(xmlTextWriterPtr writer,
const xmlChar * content);
XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatString(xmlTextWriterPtr
writer,
const char
*format, ...)
LIBXML_ATTR_FORMAT(2,3);
XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr
writer,
const char
*format,
va_list argptr)
LIBXML_ATTR_FORMAT(2,0);
XMLPUBFUN int XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer,
const xmlChar *
content);
XMLPUBFUN int XMLCALL xmlTextWriterWriteBase64(xmlTextWriterPtr writer,
const char *data,
int start, int len);
XMLPUBFUN int XMLCALL xmlTextWriterWriteBinHex(xmlTextWriterPtr writer,
const char *data,
int start, int len);
/*
* Attributes
*/
XMLPUBFUN int XMLCALL
xmlTextWriterStartAttribute(xmlTextWriterPtr writer,
const xmlChar * name);
XMLPUBFUN int XMLCALL xmlTextWriterStartAttributeNS(xmlTextWriterPtr
writer,
const xmlChar *
prefix,
const xmlChar *
name,
const xmlChar *
namespaceURI);
XMLPUBFUN int XMLCALL xmlTextWriterEndAttribute(xmlTextWriterPtr
writer);
/*
* Attributes conveniency functions
*/
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...)
LIBXML_ATTR_FORMAT(3,4);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(3,0);
XMLPUBFUN int XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr
writer,
const xmlChar * name,
const xmlChar *
content);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char *format, ...)
LIBXML_ATTR_FORMAT(5,6);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer,
const xmlChar * prefix,
const xmlChar * name,
const xmlChar * namespaceURI,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(5,0);
XMLPUBFUN int XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
writer,
const xmlChar *
prefix,
const xmlChar *
name,
const xmlChar *
namespaceURI,
const xmlChar *
content);
/*
* PI's
*/
XMLPUBFUN int XMLCALL
xmlTextWriterStartPI(xmlTextWriterPtr writer,
const xmlChar * target);
XMLPUBFUN int XMLCALL xmlTextWriterEndPI(xmlTextWriterPtr writer);
/*
* PI conveniency functions
*/
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer,
const xmlChar * target,
const char *format, ...)
LIBXML_ATTR_FORMAT(3,4);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer,
const xmlChar * target,
const char *format, va_list argptr)
LIBXML_ATTR_FORMAT(3,0);
XMLPUBFUN int XMLCALL
xmlTextWriterWritePI(xmlTextWriterPtr writer,
const xmlChar * target,
const xmlChar * content);
/**
* xmlTextWriterWriteProcessingInstruction:
*
* This macro maps to xmlTextWriterWritePI
*/
#define xmlTextWriterWriteProcessingInstruction xmlTextWriterWritePI
/*
* CDATA
*/
XMLPUBFUN int XMLCALL xmlTextWriterStartCDATA(xmlTextWriterPtr writer);
XMLPUBFUN int XMLCALL xmlTextWriterEndCDATA(xmlTextWriterPtr writer);
/*
* CDATA conveniency functions
*/
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer,
const char *format, ...)
LIBXML_ATTR_FORMAT(2,3);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer,
const char *format, va_list argptr)
LIBXML_ATTR_FORMAT(2,0);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteCDATA(xmlTextWriterPtr writer,
const xmlChar * content);
/*
* DTD
*/
XMLPUBFUN int XMLCALL
xmlTextWriterStartDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid);
XMLPUBFUN int XMLCALL xmlTextWriterEndDTD(xmlTextWriterPtr writer);
/*
* DTD conveniency functions
*/
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const char *format, ...)
LIBXML_ATTR_FORMAT(5,6);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const char *format, va_list argptr)
LIBXML_ATTR_FORMAT(5,0);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteDTD(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar * subset);
/**
* xmlTextWriterWriteDocType:
*
* this macro maps to xmlTextWriterWriteDTD
*/
#define xmlTextWriterWriteDocType xmlTextWriterWriteDTD
/*
* DTD element definition
*/
XMLPUBFUN int XMLCALL
xmlTextWriterStartDTDElement(xmlTextWriterPtr writer,
const xmlChar * name);
XMLPUBFUN int XMLCALL xmlTextWriterEndDTDElement(xmlTextWriterPtr
writer);
/*
* DTD element definition conveniency functions
*/
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...)
LIBXML_ATTR_FORMAT(3,4);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(3,0);
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr
writer,
const xmlChar *
name,
const xmlChar *
content);
/*
* DTD attribute list definition
*/
XMLPUBFUN int XMLCALL
xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer,
const xmlChar * name);
XMLPUBFUN int XMLCALL xmlTextWriterEndDTDAttlist(xmlTextWriterPtr
writer);
/*
* DTD attribute list definition conveniency functions
*/
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format, ...)
LIBXML_ATTR_FORMAT(3,4);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer,
const xmlChar * name,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(3,0);
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
writer,
const xmlChar *
name,
const xmlChar *
content);
/*
* DTD entity definition
*/
XMLPUBFUN int XMLCALL
xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer,
int pe, const xmlChar * name);
XMLPUBFUN int XMLCALL xmlTextWriterEndDTDEntity(xmlTextWriterPtr
writer);
/*
* DTD entity definition conveniency functions
*/
XMLPUBFUN int XMLCALL
xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const char *format, ...)
LIBXML_ATTR_FORMAT(4,5);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const char *format,
va_list argptr)
LIBXML_ATTR_FORMAT(4,0);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const xmlChar * content);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer,
int pe,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar * ndataid);
XMLPUBFUN int XMLCALL
xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr
writer,
const xmlChar * pubid,
const xmlChar * sysid,
const xmlChar *
ndataid);
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDEntity(xmlTextWriterPtr
writer, int pe,
const xmlChar * name,
const xmlChar *
pubid,
const xmlChar *
sysid,
const xmlChar *
ndataid,
const xmlChar *
content);
/*
* DTD notation definition
*/
XMLPUBFUN int XMLCALL
xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer,
const xmlChar * name,
const xmlChar * pubid,
const xmlChar * sysid);
/*
* Indentation
*/
XMLPUBFUN int XMLCALL
xmlTextWriterSetIndent(xmlTextWriterPtr writer, int indent);
XMLPUBFUN int XMLCALL
xmlTextWriterSetIndentString(xmlTextWriterPtr writer,
const xmlChar * str);
/*
* misc
*/
XMLPUBFUN int XMLCALL xmlTextWriterFlush(xmlTextWriterPtr writer);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_WRITER_ENABLED */
#endif /* __XML_XMLWRITER_H__ */
| 21,159 | 42.539095 | 75 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/threads.h
|
/**
* Summary: interfaces for thread handling
* Description: set of generic threading related routines
* should work with pthreads, Windows native or TLS threads
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_THREADS_H__
#define __XML_THREADS_H__
#include <libxml/xmlversion.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* xmlMutex are a simple mutual exception locks.
*/
typedef struct _xmlMutex xmlMutex;
typedef xmlMutex *xmlMutexPtr;
/*
* xmlRMutex are reentrant mutual exception locks.
*/
typedef struct _xmlRMutex xmlRMutex;
typedef xmlRMutex *xmlRMutexPtr;
#ifdef __cplusplus
}
#endif
#include <libxml/globals.h>
#ifdef __cplusplus
extern "C" {
#endif
XMLPUBFUN xmlMutexPtr XMLCALL
xmlNewMutex (void);
XMLPUBFUN void XMLCALL
xmlMutexLock (xmlMutexPtr tok);
XMLPUBFUN void XMLCALL
xmlMutexUnlock (xmlMutexPtr tok);
XMLPUBFUN void XMLCALL
xmlFreeMutex (xmlMutexPtr tok);
XMLPUBFUN xmlRMutexPtr XMLCALL
xmlNewRMutex (void);
XMLPUBFUN void XMLCALL
xmlRMutexLock (xmlRMutexPtr tok);
XMLPUBFUN void XMLCALL
xmlRMutexUnlock (xmlRMutexPtr tok);
XMLPUBFUN void XMLCALL
xmlFreeRMutex (xmlRMutexPtr tok);
/*
* Library wide APIs.
*/
XMLPUBFUN void XMLCALL
xmlInitThreads (void);
XMLPUBFUN void XMLCALL
xmlLockLibrary (void);
XMLPUBFUN void XMLCALL
xmlUnlockLibrary(void);
XMLPUBFUN int XMLCALL
xmlGetThreadId (void);
XMLPUBFUN int XMLCALL
xmlIsMainThread (void);
XMLPUBFUN void XMLCALL
xmlCleanupThreads(void);
XMLPUBFUN xmlGlobalStatePtr XMLCALL
xmlGetGlobalState(void);
#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && defined(LIBXML_STATIC_FOR_DLL)
int XMLCALL xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved);
#endif
#ifdef __cplusplus
}
#endif
#endif /* __XML_THREADS_H__ */
| 1,852 | 20.8 | 96 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/xmlstring.h
|
/*
* Summary: set of routines to process strings
* Description: type and interfaces needed for the internal string handling
* of the library, especially UTF8 processing.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_STRING_H__
#define __XML_STRING_H__
#include <stdarg.h>
#include <libxml/xmlversion.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlChar:
*
* This is a basic byte in an UTF-8 encoded string.
* It's unsigned allowing to pinpoint case where char * are assigned
* to xmlChar * (possibly making serialization back impossible).
*/
typedef unsigned char xmlChar;
/**
* BAD_CAST:
*
* Macro to cast a string to an xmlChar * when one know its safe.
*/
#define BAD_CAST (xmlChar *)
/*
* xmlChar handling
*/
XMLPUBFUN xmlChar * XMLCALL
xmlStrdup (const xmlChar *cur);
XMLPUBFUN xmlChar * XMLCALL
xmlStrndup (const xmlChar *cur,
int len);
XMLPUBFUN xmlChar * XMLCALL
xmlCharStrndup (const char *cur,
int len);
XMLPUBFUN xmlChar * XMLCALL
xmlCharStrdup (const char *cur);
XMLPUBFUN xmlChar * XMLCALL
xmlStrsub (const xmlChar *str,
int start,
int len);
XMLPUBFUN const xmlChar * XMLCALL
xmlStrchr (const xmlChar *str,
xmlChar val);
XMLPUBFUN const xmlChar * XMLCALL
xmlStrstr (const xmlChar *str,
const xmlChar *val);
XMLPUBFUN const xmlChar * XMLCALL
xmlStrcasestr (const xmlChar *str,
const xmlChar *val);
XMLPUBFUN int XMLCALL
xmlStrcmp (const xmlChar *str1,
const xmlChar *str2);
XMLPUBFUN int XMLCALL
xmlStrncmp (const xmlChar *str1,
const xmlChar *str2,
int len);
XMLPUBFUN int XMLCALL
xmlStrcasecmp (const xmlChar *str1,
const xmlChar *str2);
XMLPUBFUN int XMLCALL
xmlStrncasecmp (const xmlChar *str1,
const xmlChar *str2,
int len);
XMLPUBFUN int XMLCALL
xmlStrEqual (const xmlChar *str1,
const xmlChar *str2);
XMLPUBFUN int XMLCALL
xmlStrQEqual (const xmlChar *pref,
const xmlChar *name,
const xmlChar *str);
XMLPUBFUN int XMLCALL
xmlStrlen (const xmlChar *str);
XMLPUBFUN xmlChar * XMLCALL
xmlStrcat (xmlChar *cur,
const xmlChar *add);
XMLPUBFUN xmlChar * XMLCALL
xmlStrncat (xmlChar *cur,
const xmlChar *add,
int len);
XMLPUBFUN xmlChar * XMLCALL
xmlStrncatNew (const xmlChar *str1,
const xmlChar *str2,
int len);
XMLPUBFUN int XMLCALL
xmlStrPrintf (xmlChar *buf,
int len,
const xmlChar *msg,
...);
XMLPUBFUN int XMLCALL
xmlStrVPrintf (xmlChar *buf,
int len,
const xmlChar *msg,
va_list ap);
XMLPUBFUN int XMLCALL
xmlGetUTF8Char (const unsigned char *utf,
int *len);
XMLPUBFUN int XMLCALL
xmlCheckUTF8 (const unsigned char *utf);
XMLPUBFUN int XMLCALL
xmlUTF8Strsize (const xmlChar *utf,
int len);
XMLPUBFUN xmlChar * XMLCALL
xmlUTF8Strndup (const xmlChar *utf,
int len);
XMLPUBFUN const xmlChar * XMLCALL
xmlUTF8Strpos (const xmlChar *utf,
int pos);
XMLPUBFUN int XMLCALL
xmlUTF8Strloc (const xmlChar *utf,
const xmlChar *utfchar);
XMLPUBFUN xmlChar * XMLCALL
xmlUTF8Strsub (const xmlChar *utf,
int start,
int len);
XMLPUBFUN int XMLCALL
xmlUTF8Strlen (const xmlChar *utf);
XMLPUBFUN int XMLCALL
xmlUTF8Size (const xmlChar *utf);
XMLPUBFUN int XMLCALL
xmlUTF8Charcmp (const xmlChar *utf1,
const xmlChar *utf2);
#ifdef __cplusplus
}
#endif
#endif /* __XML_STRING_H__ */
| 5,472 | 37.815603 | 75 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/DOCBparser.h
|
/*
* Summary: old DocBook SGML parser
* Description: interface for a DocBook SGML non-verifying parser
* This code is DEPRECATED, and should not be used anymore.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __DOCB_PARSER_H__
#define __DOCB_PARSER_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_DOCB_ENABLED
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
#ifndef IN_LIBXML
#ifdef __GNUC__
#warning "The DOCBparser module has been deprecated in libxml2-2.6.0"
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Most of the back-end structures from XML and SGML are shared.
*/
typedef xmlParserCtxt docbParserCtxt;
typedef xmlParserCtxtPtr docbParserCtxtPtr;
typedef xmlSAXHandler docbSAXHandler;
typedef xmlSAXHandlerPtr docbSAXHandlerPtr;
typedef xmlParserInput docbParserInput;
typedef xmlParserInputPtr docbParserInputPtr;
typedef xmlDocPtr docbDocPtr;
/*
* There is only few public functions.
*/
XMLPUBFUN int XMLCALL
docbEncodeEntities(unsigned char *out,
int *outlen,
const unsigned char *in,
int *inlen, int quoteChar);
XMLPUBFUN docbDocPtr XMLCALL
docbSAXParseDoc (xmlChar *cur,
const char *encoding,
docbSAXHandlerPtr sax,
void *userData);
XMLPUBFUN docbDocPtr XMLCALL
docbParseDoc (xmlChar *cur,
const char *encoding);
XMLPUBFUN docbDocPtr XMLCALL
docbSAXParseFile (const char *filename,
const char *encoding,
docbSAXHandlerPtr sax,
void *userData);
XMLPUBFUN docbDocPtr XMLCALL
docbParseFile (const char *filename,
const char *encoding);
/**
* Interfaces for the Push mode.
*/
XMLPUBFUN void XMLCALL
docbFreeParserCtxt (docbParserCtxtPtr ctxt);
XMLPUBFUN docbParserCtxtPtr XMLCALL
docbCreatePushParserCtxt(docbSAXHandlerPtr sax,
void *user_data,
const char *chunk,
int size,
const char *filename,
xmlCharEncoding enc);
XMLPUBFUN int XMLCALL
docbParseChunk (docbParserCtxtPtr ctxt,
const char *chunk,
int size,
int terminate);
XMLPUBFUN docbParserCtxtPtr XMLCALL
docbCreateFileParserCtxt(const char *filename,
const char *encoding);
XMLPUBFUN int XMLCALL
docbParseDocument (docbParserCtxtPtr ctxt);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_DOCB_ENABLED */
#endif /* __DOCB_PARSER_H__ */
| 3,277 | 32.793814 | 69 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/uri.h
|
/**
* Summary: library of generic URI related routines
* Description: library of generic URI related routines
* Implements RFC 2396
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_URI_H__
#define __XML_URI_H__
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlURI:
*
* A parsed URI reference. This is a struct containing the various fields
* as described in RFC 2396 but separated for further processing.
*
* Note: query is a deprecated field which is incorrectly unescaped.
* query_raw takes precedence over query if the former is set.
* See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
*/
typedef struct _xmlURI xmlURI;
typedef xmlURI *xmlURIPtr;
struct _xmlURI {
char *scheme; /* the URI scheme */
char *opaque; /* opaque part */
char *authority; /* the authority part */
char *server; /* the server part */
char *user; /* the user part */
int port; /* the port number */
char *path; /* the path string */
char *query; /* the query string (deprecated - use with caution) */
char *fragment; /* the fragment identifier */
int cleanup; /* parsing potentially unclean URI */
char *query_raw; /* the query string (as it appears in the URI) */
};
/*
* This function is in tree.h:
* xmlChar * xmlNodeGetBase (xmlDocPtr doc,
* xmlNodePtr cur);
*/
XMLPUBFUN xmlURIPtr XMLCALL
xmlCreateURI (void);
XMLPUBFUN xmlChar * XMLCALL
xmlBuildURI (const xmlChar *URI,
const xmlChar *base);
XMLPUBFUN xmlChar * XMLCALL
xmlBuildRelativeURI (const xmlChar *URI,
const xmlChar *base);
XMLPUBFUN xmlURIPtr XMLCALL
xmlParseURI (const char *str);
XMLPUBFUN xmlURIPtr XMLCALL
xmlParseURIRaw (const char *str,
int raw);
XMLPUBFUN int XMLCALL
xmlParseURIReference (xmlURIPtr uri,
const char *str);
XMLPUBFUN xmlChar * XMLCALL
xmlSaveUri (xmlURIPtr uri);
XMLPUBFUN void XMLCALL
xmlPrintURI (FILE *stream,
xmlURIPtr uri);
XMLPUBFUN xmlChar * XMLCALL
xmlURIEscapeStr (const xmlChar *str,
const xmlChar *list);
XMLPUBFUN char * XMLCALL
xmlURIUnescapeString (const char *str,
int len,
char *target);
XMLPUBFUN int XMLCALL
xmlNormalizeURIPath (char *path);
XMLPUBFUN xmlChar * XMLCALL
xmlURIEscape (const xmlChar *str);
XMLPUBFUN void XMLCALL
xmlFreeURI (xmlURIPtr uri);
XMLPUBFUN xmlChar* XMLCALL
xmlCanonicPath (const xmlChar *path);
XMLPUBFUN xmlChar* XMLCALL
xmlPathToURI (const xmlChar *path);
#ifdef __cplusplus
}
#endif
#endif /* __XML_URI_H__ */
| 2,664 | 27.052632 | 73 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/globals.h
|
/*
* Summary: interface for all global variables of the library
* Description: all the global variables and thread handling for
* those variables is handled by this module.
*
* The bottom of this file is automatically generated by build_glob.py
* based on the description file global.data
*
* Copy: See Copyright for the status of this software.
*
* Author: Gary Pennington <[email protected]>, Daniel Veillard
*/
#ifndef __XML_GLOBALS_H
#define __XML_GLOBALS_H
#include <libxml/xmlversion.h>
#include <libxml/parser.h>
#include <libxml/xmlerror.h>
#include <libxml/SAX.h>
#include <libxml/SAX2.h>
#include <libxml/xmlmemory.h>
#ifdef __cplusplus
extern "C" {
#endif
XMLPUBFUN void XMLCALL xmlInitGlobals(void);
XMLPUBFUN void XMLCALL xmlCleanupGlobals(void);
/**
* xmlParserInputBufferCreateFilenameFunc:
* @URI: the URI to read from
* @enc: the requested source encoding
*
* Signature for the function doing the lookup for a suitable input method
* corresponding to an URI.
*
* Returns the new xmlParserInputBufferPtr in case of success or NULL if no
* method was found.
*/
typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI, xmlCharEncoding enc);
/**
* xmlOutputBufferCreateFilenameFunc:
* @URI: the URI to write to
* @enc: the requested target encoding
*
* Signature for the function doing the lookup for a suitable output method
* corresponding to an URI.
*
* Returns the new xmlOutputBufferPtr in case of success or NULL if no
* method was found.
*/
typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI, xmlCharEncodingHandlerPtr encoder, int compression);
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func);
XMLPUBFUN xmlOutputBufferCreateFilenameFunc
XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func);
/*
* Externally global symbols which need to be protected for backwards
* compatibility support.
*/
#undef docbDefaultSAXHandler
#undef htmlDefaultSAXHandler
#undef oldXMLWDcompatibility
#undef xmlBufferAllocScheme
#undef xmlDefaultBufferSize
#undef xmlDefaultSAXHandler
#undef xmlDefaultSAXLocator
#undef xmlDoValidityCheckingDefaultValue
#undef xmlFree
#undef xmlGenericError
#undef xmlStructuredError
#undef xmlGenericErrorContext
#undef xmlStructuredErrorContext
#undef xmlGetWarningsDefaultValue
#undef xmlIndentTreeOutput
#undef xmlTreeIndentString
#undef xmlKeepBlanksDefaultValue
#undef xmlLineNumbersDefaultValue
#undef xmlLoadExtDtdDefaultValue
#undef xmlMalloc
#undef xmlMallocAtomic
#undef xmlMemStrdup
#undef xmlParserDebugEntities
#undef xmlParserVersion
#undef xmlPedanticParserDefaultValue
#undef xmlRealloc
#undef xmlSaveNoEmptyTags
#undef xmlSubstituteEntitiesDefaultValue
#undef xmlRegisterNodeDefaultValue
#undef xmlDeregisterNodeDefaultValue
#undef xmlLastError
#undef xmlParserInputBufferCreateFilenameValue
#undef xmlOutputBufferCreateFilenameValue
/**
* xmlRegisterNodeFunc:
* @node: the current node
*
* Signature for the registration callback of a created node
*/
typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
/**
* xmlDeregisterNodeFunc:
* @node: the current node
*
* Signature for the deregistration callback of a discarded node
*/
typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
typedef struct _xmlGlobalState xmlGlobalState;
typedef xmlGlobalState *xmlGlobalStatePtr;
struct _xmlGlobalState
{
const char *xmlParserVersion;
xmlSAXLocator xmlDefaultSAXLocator;
xmlSAXHandlerV1 xmlDefaultSAXHandler;
xmlSAXHandlerV1 docbDefaultSAXHandler;
xmlSAXHandlerV1 htmlDefaultSAXHandler;
xmlFreeFunc xmlFree;
xmlMallocFunc xmlMalloc;
xmlStrdupFunc xmlMemStrdup;
xmlReallocFunc xmlRealloc;
xmlGenericErrorFunc xmlGenericError;
xmlStructuredErrorFunc xmlStructuredError;
void *xmlGenericErrorContext;
int oldXMLWDcompatibility;
xmlBufferAllocationScheme xmlBufferAllocScheme;
int xmlDefaultBufferSize;
int xmlSubstituteEntitiesDefaultValue;
int xmlDoValidityCheckingDefaultValue;
int xmlGetWarningsDefaultValue;
int xmlKeepBlanksDefaultValue;
int xmlLineNumbersDefaultValue;
int xmlLoadExtDtdDefaultValue;
int xmlParserDebugEntities;
int xmlPedanticParserDefaultValue;
int xmlSaveNoEmptyTags;
int xmlIndentTreeOutput;
const char *xmlTreeIndentString;
xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
xmlMallocFunc xmlMallocAtomic;
xmlError xmlLastError;
xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
void *xmlStructuredErrorContext;
};
#ifdef __cplusplus
}
#endif
#include <libxml/threads.h>
#ifdef __cplusplus
extern "C" {
#endif
XMLPUBFUN void XMLCALL xmlInitializeGlobalState(xmlGlobalStatePtr gs);
XMLPUBFUN void XMLCALL xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler);
XMLPUBFUN void XMLCALL xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler);
XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlRegisterNodeDefault(xmlRegisterNodeFunc func);
XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func);
XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL
xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func);
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
xmlThrDefParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func);
/** DOC_DISABLE */
/*
* In general the memory allocation entry points are not kept
* thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
* - xmlMalloc
* - xmlMallocAtomic
* - xmlRealloc
* - xmlMemStrdup
* - xmlFree
*/
#ifdef LIBXML_THREAD_ALLOC_ENABLED
#ifdef LIBXML_THREAD_ENABLED
XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMalloc(void);
#define xmlMalloc \
(*(__xmlMalloc()))
#else
XMLPUBVAR xmlMallocFunc xmlMalloc;
#endif
#ifdef LIBXML_THREAD_ENABLED
XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMallocAtomic(void);
#define xmlMallocAtomic \
(*(__xmlMallocAtomic()))
#else
XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
#endif
#ifdef LIBXML_THREAD_ENABLED
XMLPUBFUN xmlReallocFunc * XMLCALL __xmlRealloc(void);
#define xmlRealloc \
(*(__xmlRealloc()))
#else
XMLPUBVAR xmlReallocFunc xmlRealloc;
#endif
#ifdef LIBXML_THREAD_ENABLED
XMLPUBFUN xmlFreeFunc * XMLCALL __xmlFree(void);
#define xmlFree \
(*(__xmlFree()))
#else
XMLPUBVAR xmlFreeFunc xmlFree;
#endif
#ifdef LIBXML_THREAD_ENABLED
XMLPUBFUN xmlStrdupFunc * XMLCALL __xmlMemStrdup(void);
#define xmlMemStrdup \
(*(__xmlMemStrdup()))
#else
XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
#endif
#else /* !LIBXML_THREAD_ALLOC_ENABLED */
XMLPUBVAR xmlMallocFunc xmlMalloc;
XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
XMLPUBVAR xmlReallocFunc xmlRealloc;
XMLPUBVAR xmlFreeFunc xmlFree;
XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
#endif /* LIBXML_THREAD_ALLOC_ENABLED */
#ifdef LIBXML_DOCB_ENABLED
XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __docbDefaultSAXHandler(void);
#ifdef LIBXML_THREAD_ENABLED
#define docbDefaultSAXHandler \
(*(__docbDefaultSAXHandler()))
#else
XMLPUBVAR xmlSAXHandlerV1 docbDefaultSAXHandler;
#endif
#endif
#ifdef LIBXML_HTML_ENABLED
XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void);
#ifdef LIBXML_THREAD_ENABLED
#define htmlDefaultSAXHandler \
(*(__htmlDefaultSAXHandler()))
#else
XMLPUBVAR xmlSAXHandlerV1 htmlDefaultSAXHandler;
#endif
#endif
XMLPUBFUN xmlError * XMLCALL __xmlLastError(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlLastError \
(*(__xmlLastError()))
#else
XMLPUBVAR xmlError xmlLastError;
#endif
/*
* Everything starting from the line below is
* Automatically generated by build_glob.py.
* Do not modify the previous line.
*/
XMLPUBFUN int * XMLCALL __oldXMLWDcompatibility(void);
#ifdef LIBXML_THREAD_ENABLED
#define oldXMLWDcompatibility \
(*(__oldXMLWDcompatibility()))
#else
XMLPUBVAR int oldXMLWDcompatibility;
#endif
XMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlBufferAllocScheme \
(*(__xmlBufferAllocScheme()))
#else
XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme;
#endif
XMLPUBFUN xmlBufferAllocationScheme XMLCALL xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);
XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlDefaultBufferSize \
(*(__xmlDefaultBufferSize()))
#else
XMLPUBVAR int xmlDefaultBufferSize;
#endif
XMLPUBFUN int XMLCALL xmlThrDefDefaultBufferSize(int v);
XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __xmlDefaultSAXHandler(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlDefaultSAXHandler \
(*(__xmlDefaultSAXHandler()))
#else
XMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler;
#endif
XMLPUBFUN xmlSAXLocator * XMLCALL __xmlDefaultSAXLocator(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlDefaultSAXLocator \
(*(__xmlDefaultSAXLocator()))
#else
XMLPUBVAR xmlSAXLocator xmlDefaultSAXLocator;
#endif
XMLPUBFUN int * XMLCALL __xmlDoValidityCheckingDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlDoValidityCheckingDefaultValue \
(*(__xmlDoValidityCheckingDefaultValue()))
#else
XMLPUBVAR int xmlDoValidityCheckingDefaultValue;
#endif
XMLPUBFUN int XMLCALL xmlThrDefDoValidityCheckingDefaultValue(int v);
XMLPUBFUN xmlGenericErrorFunc * XMLCALL __xmlGenericError(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlGenericError \
(*(__xmlGenericError()))
#else
XMLPUBVAR xmlGenericErrorFunc xmlGenericError;
#endif
XMLPUBFUN xmlStructuredErrorFunc * XMLCALL __xmlStructuredError(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlStructuredError \
(*(__xmlStructuredError()))
#else
XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError;
#endif
XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlGenericErrorContext \
(*(__xmlGenericErrorContext()))
#else
XMLPUBVAR void * xmlGenericErrorContext;
#endif
XMLPUBFUN void * * XMLCALL __xmlStructuredErrorContext(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlStructuredErrorContext \
(*(__xmlStructuredErrorContext()))
#else
XMLPUBVAR void * xmlStructuredErrorContext;
#endif
XMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlGetWarningsDefaultValue \
(*(__xmlGetWarningsDefaultValue()))
#else
XMLPUBVAR int xmlGetWarningsDefaultValue;
#endif
XMLPUBFUN int XMLCALL xmlThrDefGetWarningsDefaultValue(int v);
XMLPUBFUN int * XMLCALL __xmlIndentTreeOutput(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlIndentTreeOutput \
(*(__xmlIndentTreeOutput()))
#else
XMLPUBVAR int xmlIndentTreeOutput;
#endif
XMLPUBFUN int XMLCALL xmlThrDefIndentTreeOutput(int v);
XMLPUBFUN const char * * XMLCALL __xmlTreeIndentString(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlTreeIndentString \
(*(__xmlTreeIndentString()))
#else
XMLPUBVAR const char * xmlTreeIndentString;
#endif
XMLPUBFUN const char * XMLCALL xmlThrDefTreeIndentString(const char * v);
XMLPUBFUN int * XMLCALL __xmlKeepBlanksDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlKeepBlanksDefaultValue \
(*(__xmlKeepBlanksDefaultValue()))
#else
XMLPUBVAR int xmlKeepBlanksDefaultValue;
#endif
XMLPUBFUN int XMLCALL xmlThrDefKeepBlanksDefaultValue(int v);
XMLPUBFUN int * XMLCALL __xmlLineNumbersDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlLineNumbersDefaultValue \
(*(__xmlLineNumbersDefaultValue()))
#else
XMLPUBVAR int xmlLineNumbersDefaultValue;
#endif
XMLPUBFUN int XMLCALL xmlThrDefLineNumbersDefaultValue(int v);
XMLPUBFUN int * XMLCALL __xmlLoadExtDtdDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlLoadExtDtdDefaultValue \
(*(__xmlLoadExtDtdDefaultValue()))
#else
XMLPUBVAR int xmlLoadExtDtdDefaultValue;
#endif
XMLPUBFUN int XMLCALL xmlThrDefLoadExtDtdDefaultValue(int v);
XMLPUBFUN int * XMLCALL __xmlParserDebugEntities(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlParserDebugEntities \
(*(__xmlParserDebugEntities()))
#else
XMLPUBVAR int xmlParserDebugEntities;
#endif
XMLPUBFUN int XMLCALL xmlThrDefParserDebugEntities(int v);
XMLPUBFUN const char * * XMLCALL __xmlParserVersion(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlParserVersion \
(*(__xmlParserVersion()))
#else
XMLPUBVAR const char * xmlParserVersion;
#endif
XMLPUBFUN int * XMLCALL __xmlPedanticParserDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlPedanticParserDefaultValue \
(*(__xmlPedanticParserDefaultValue()))
#else
XMLPUBVAR int xmlPedanticParserDefaultValue;
#endif
XMLPUBFUN int XMLCALL xmlThrDefPedanticParserDefaultValue(int v);
XMLPUBFUN int * XMLCALL __xmlSaveNoEmptyTags(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlSaveNoEmptyTags \
(*(__xmlSaveNoEmptyTags()))
#else
XMLPUBVAR int xmlSaveNoEmptyTags;
#endif
XMLPUBFUN int XMLCALL xmlThrDefSaveNoEmptyTags(int v);
XMLPUBFUN int * XMLCALL __xmlSubstituteEntitiesDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlSubstituteEntitiesDefaultValue \
(*(__xmlSubstituteEntitiesDefaultValue()))
#else
XMLPUBVAR int xmlSubstituteEntitiesDefaultValue;
#endif
XMLPUBFUN int XMLCALL xmlThrDefSubstituteEntitiesDefaultValue(int v);
XMLPUBFUN xmlRegisterNodeFunc * XMLCALL __xmlRegisterNodeDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlRegisterNodeDefaultValue \
(*(__xmlRegisterNodeDefaultValue()))
#else
XMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
#endif
XMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlDeregisterNodeDefaultValue \
(*(__xmlDeregisterNodeDefaultValue()))
#else
XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
#endif
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL __xmlParserInputBufferCreateFilenameValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlParserInputBufferCreateFilenameValue \
(*(__xmlParserInputBufferCreateFilenameValue()))
#else
XMLPUBVAR xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
#endif
XMLPUBFUN xmlOutputBufferCreateFilenameFunc * XMLCALL __xmlOutputBufferCreateFilenameValue(void);
#ifdef LIBXML_THREAD_ENABLED
#define xmlOutputBufferCreateFilenameValue \
(*(__xmlOutputBufferCreateFilenameValue()))
#else
XMLPUBVAR xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
#endif
#ifdef __cplusplus
}
#endif
#endif /* __XML_GLOBALS_H */
| 14,651 | 28.129225 | 134 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/valid.h
|
/*
* Summary: The DTD validation
* Description: API for the DTD handling and the validity checking
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_VALID_H__
#define __XML_VALID_H__
#include <libxml/xmlversion.h>
#include <libxml/xmlerror.h>
#include <libxml/tree.h>
#include <libxml/list.h>
#include <libxml/xmlautomata.h>
#include <libxml/xmlregexp.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Validation state added for non-determinist content model.
*/
typedef struct _xmlValidState xmlValidState;
typedef xmlValidState *xmlValidStatePtr;
/**
* xmlValidityErrorFunc:
* @ctx: usually an xmlValidCtxtPtr to a validity error context,
* but comes from ctxt->userData (which normally contains such
* a pointer); ctxt->userData can be changed by the user.
* @msg: the string to format *printf like vararg
* @...: remaining arguments to the format
*
* Callback called when a validity error is found. This is a message
* oriented function similar to an *printf function.
*/
typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
/**
* xmlValidityWarningFunc:
* @ctx: usually an xmlValidCtxtPtr to a validity error context,
* but comes from ctxt->userData (which normally contains such
* a pointer); ctxt->userData can be changed by the user.
* @msg: the string to format *printf like vararg
* @...: remaining arguments to the format
*
* Callback called when a validity warning is found. This is a message
* oriented function similar to an *printf function.
*/
typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
#ifdef IN_LIBXML
/**
* XML_CTXT_FINISH_DTD_0:
*
* Special value for finishDtd field when embedded in an xmlParserCtxt
*/
#define XML_CTXT_FINISH_DTD_0 0xabcd1234
/**
* XML_CTXT_FINISH_DTD_1:
*
* Special value for finishDtd field when embedded in an xmlParserCtxt
*/
#define XML_CTXT_FINISH_DTD_1 0xabcd1235
#endif
/*
* xmlValidCtxt:
* An xmlValidCtxt is used for error reporting when validating.
*/
typedef struct _xmlValidCtxt xmlValidCtxt;
typedef xmlValidCtxt *xmlValidCtxtPtr;
struct _xmlValidCtxt {
void *userData; /* user specific data block */
xmlValidityErrorFunc error; /* the callback in case of errors */
xmlValidityWarningFunc warning; /* the callback in case of warning */
/* Node analysis stack used when validating within entities */
xmlNodePtr node; /* Current parsed Node */
int nodeNr; /* Depth of the parsing stack */
int nodeMax; /* Max depth of the parsing stack */
xmlNodePtr *nodeTab; /* array of nodes */
unsigned int finishDtd; /* finished validating the Dtd ? */
xmlDocPtr doc; /* the document */
int valid; /* temporary validity check result */
/* state state used for non-determinist content validation */
xmlValidState *vstate; /* current state */
int vstateNr; /* Depth of the validation stack */
int vstateMax; /* Max depth of the validation stack */
xmlValidState *vstateTab; /* array of validation states */
#ifdef LIBXML_REGEXP_ENABLED
xmlAutomataPtr am; /* the automata */
xmlAutomataStatePtr state; /* used to build the automata */
#else
void *am;
void *state;
#endif
};
/*
* ALL notation declarations are stored in a table.
* There is one table per DTD.
*/
typedef struct _xmlHashTable xmlNotationTable;
typedef xmlNotationTable *xmlNotationTablePtr;
/*
* ALL element declarations are stored in a table.
* There is one table per DTD.
*/
typedef struct _xmlHashTable xmlElementTable;
typedef xmlElementTable *xmlElementTablePtr;
/*
* ALL attribute declarations are stored in a table.
* There is one table per DTD.
*/
typedef struct _xmlHashTable xmlAttributeTable;
typedef xmlAttributeTable *xmlAttributeTablePtr;
/*
* ALL IDs attributes are stored in a table.
* There is one table per document.
*/
typedef struct _xmlHashTable xmlIDTable;
typedef xmlIDTable *xmlIDTablePtr;
/*
* ALL Refs attributes are stored in a table.
* There is one table per document.
*/
typedef struct _xmlHashTable xmlRefTable;
typedef xmlRefTable *xmlRefTablePtr;
/* Notation */
XMLPUBFUN xmlNotationPtr XMLCALL
xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd,
const xmlChar *name,
const xmlChar *PublicID,
const xmlChar *SystemID);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlNotationTablePtr XMLCALL
xmlCopyNotationTable (xmlNotationTablePtr table);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
xmlFreeNotationTable (xmlNotationTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
xmlDumpNotationDecl (xmlBufferPtr buf,
xmlNotationPtr nota);
XMLPUBFUN void XMLCALL
xmlDumpNotationTable (xmlBufferPtr buf,
xmlNotationTablePtr table);
#endif /* LIBXML_OUTPUT_ENABLED */
/* Element Content */
/* the non Doc version are being deprecated */
XMLPUBFUN xmlElementContentPtr XMLCALL
xmlNewElementContent (const xmlChar *name,
xmlElementContentType type);
XMLPUBFUN xmlElementContentPtr XMLCALL
xmlCopyElementContent (xmlElementContentPtr content);
XMLPUBFUN void XMLCALL
xmlFreeElementContent (xmlElementContentPtr cur);
/* the new versions with doc argument */
XMLPUBFUN xmlElementContentPtr XMLCALL
xmlNewDocElementContent (xmlDocPtr doc,
const xmlChar *name,
xmlElementContentType type);
XMLPUBFUN xmlElementContentPtr XMLCALL
xmlCopyDocElementContent(xmlDocPtr doc,
xmlElementContentPtr content);
XMLPUBFUN void XMLCALL
xmlFreeDocElementContent(xmlDocPtr doc,
xmlElementContentPtr cur);
XMLPUBFUN void XMLCALL
xmlSnprintfElementContent(char *buf,
int size,
xmlElementContentPtr content,
int englob);
#ifdef LIBXML_OUTPUT_ENABLED
/* DEPRECATED */
XMLPUBFUN void XMLCALL
xmlSprintfElementContent(char *buf,
xmlElementContentPtr content,
int englob);
#endif /* LIBXML_OUTPUT_ENABLED */
/* DEPRECATED */
/* Element */
XMLPUBFUN xmlElementPtr XMLCALL
xmlAddElementDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd,
const xmlChar *name,
xmlElementTypeVal type,
xmlElementContentPtr content);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlElementTablePtr XMLCALL
xmlCopyElementTable (xmlElementTablePtr table);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
xmlFreeElementTable (xmlElementTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
xmlDumpElementTable (xmlBufferPtr buf,
xmlElementTablePtr table);
XMLPUBFUN void XMLCALL
xmlDumpElementDecl (xmlBufferPtr buf,
xmlElementPtr elem);
#endif /* LIBXML_OUTPUT_ENABLED */
/* Enumeration */
XMLPUBFUN xmlEnumerationPtr XMLCALL
xmlCreateEnumeration (const xmlChar *name);
XMLPUBFUN void XMLCALL
xmlFreeEnumeration (xmlEnumerationPtr cur);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlEnumerationPtr XMLCALL
xmlCopyEnumeration (xmlEnumerationPtr cur);
#endif /* LIBXML_TREE_ENABLED */
/* Attribute */
XMLPUBFUN xmlAttributePtr XMLCALL
xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd,
const xmlChar *elem,
const xmlChar *name,
const xmlChar *ns,
xmlAttributeType type,
xmlAttributeDefault def,
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlAttributeTablePtr XMLCALL
xmlCopyAttributeTable (xmlAttributeTablePtr table);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
xmlFreeAttributeTable (xmlAttributeTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
xmlDumpAttributeTable (xmlBufferPtr buf,
xmlAttributeTablePtr table);
XMLPUBFUN void XMLCALL
xmlDumpAttributeDecl (xmlBufferPtr buf,
xmlAttributePtr attr);
#endif /* LIBXML_OUTPUT_ENABLED */
/* IDs */
XMLPUBFUN xmlIDPtr XMLCALL
xmlAddID (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
const xmlChar *value,
xmlAttrPtr attr);
XMLPUBFUN void XMLCALL
xmlFreeIDTable (xmlIDTablePtr table);
XMLPUBFUN xmlAttrPtr XMLCALL
xmlGetID (xmlDocPtr doc,
const xmlChar *ID);
XMLPUBFUN int XMLCALL
xmlIsID (xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr);
XMLPUBFUN int XMLCALL
xmlRemoveID (xmlDocPtr doc,
xmlAttrPtr attr);
/* IDREFs */
XMLPUBFUN xmlRefPtr XMLCALL
xmlAddRef (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
const xmlChar *value,
xmlAttrPtr attr);
XMLPUBFUN void XMLCALL
xmlFreeRefTable (xmlRefTablePtr table);
XMLPUBFUN int XMLCALL
xmlIsRef (xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr);
XMLPUBFUN int XMLCALL
xmlRemoveRef (xmlDocPtr doc,
xmlAttrPtr attr);
XMLPUBFUN xmlListPtr XMLCALL
xmlGetRefs (xmlDocPtr doc,
const xmlChar *ID);
/**
* The public function calls related to validity checking.
*/
#ifdef LIBXML_VALID_ENABLED
/* Allocate/Release Validation Contexts */
XMLPUBFUN xmlValidCtxtPtr XMLCALL
xmlNewValidCtxt(void);
XMLPUBFUN void XMLCALL
xmlFreeValidCtxt(xmlValidCtxtPtr);
XMLPUBFUN int XMLCALL
xmlValidateRoot (xmlValidCtxtPtr ctxt,
xmlDocPtr doc);
XMLPUBFUN int XMLCALL
xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlElementPtr elem);
XMLPUBFUN xmlChar * XMLCALL
xmlValidNormalizeAttributeValue(xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *name,
const xmlChar *value);
XMLPUBFUN xmlChar * XMLCALL
xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *name,
const xmlChar *value);
XMLPUBFUN int XMLCALL
xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlAttributePtr attr);
XMLPUBFUN int XMLCALL
xmlValidateAttributeValue(xmlAttributeType type,
const xmlChar *value);
XMLPUBFUN int XMLCALL
xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNotationPtr nota);
XMLPUBFUN int XMLCALL
xmlValidateDtd (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlDtdPtr dtd);
XMLPUBFUN int XMLCALL
xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
xmlDocPtr doc);
XMLPUBFUN int XMLCALL
xmlValidateDocument (xmlValidCtxtPtr ctxt,
xmlDocPtr doc);
XMLPUBFUN int XMLCALL
xmlValidateElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
XMLPUBFUN int XMLCALL
xmlValidateOneElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
XMLPUBFUN int XMLCALL
xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr,
const xmlChar *value);
XMLPUBFUN int XMLCALL
xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *prefix,
xmlNsPtr ns,
const xmlChar *value);
XMLPUBFUN int XMLCALL
xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
xmlDocPtr doc);
#endif /* LIBXML_VALID_ENABLED */
#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN int XMLCALL
xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
const xmlChar *notationName);
#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
XMLPUBFUN int XMLCALL
xmlIsMixedElement (xmlDocPtr doc,
const xmlChar *name);
XMLPUBFUN xmlAttributePtr XMLCALL
xmlGetDtdAttrDesc (xmlDtdPtr dtd,
const xmlChar *elem,
const xmlChar *name);
XMLPUBFUN xmlAttributePtr XMLCALL
xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
const xmlChar *elem,
const xmlChar *name,
const xmlChar *prefix);
XMLPUBFUN xmlNotationPtr XMLCALL
xmlGetDtdNotationDesc (xmlDtdPtr dtd,
const xmlChar *name);
XMLPUBFUN xmlElementPtr XMLCALL
xmlGetDtdQElementDesc (xmlDtdPtr dtd,
const xmlChar *name,
const xmlChar *prefix);
XMLPUBFUN xmlElementPtr XMLCALL
xmlGetDtdElementDesc (xmlDtdPtr dtd,
const xmlChar *name);
#ifdef LIBXML_VALID_ENABLED
XMLPUBFUN int XMLCALL
xmlValidGetPotentialChildren(xmlElementContent *ctree,
const xmlChar **names,
int *len,
int max);
XMLPUBFUN int XMLCALL
xmlValidGetValidElements(xmlNode *prev,
xmlNode *next,
const xmlChar **names,
int max);
XMLPUBFUN int XMLCALL
xmlValidateNameValue (const xmlChar *value);
XMLPUBFUN int XMLCALL
xmlValidateNamesValue (const xmlChar *value);
XMLPUBFUN int XMLCALL
xmlValidateNmtokenValue (const xmlChar *value);
XMLPUBFUN int XMLCALL
xmlValidateNmtokensValue(const xmlChar *value);
#ifdef LIBXML_REGEXP_ENABLED
/*
* Validation based on the regexp support
*/
XMLPUBFUN int XMLCALL
xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
xmlElementPtr elem);
XMLPUBFUN int XMLCALL
xmlValidatePushElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *qname);
XMLPUBFUN int XMLCALL
xmlValidatePushCData (xmlValidCtxtPtr ctxt,
const xmlChar *data,
int len);
XMLPUBFUN int XMLCALL
xmlValidatePopElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *qname);
#endif /* LIBXML_REGEXP_ENABLED */
#endif /* LIBXML_VALID_ENABLED */
#ifdef __cplusplus
}
#endif
#endif /* __XML_VALID_H__ */
| 13,818 | 29.106754 | 77 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/SAX2.h
|
/*
* Summary: SAX2 parser interface used to build the DOM tree
* Description: those are the default SAX2 interfaces used by
* the library when building DOM tree.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_SAX2_H__
#define __XML_SAX2_H__
#include <stdio.h>
#include <stdlib.h>
#include <libxml/xmlversion.h>
#include <libxml/parser.h>
#include <libxml/xlink.h>
#ifdef __cplusplus
extern "C" {
#endif
XMLPUBFUN const xmlChar * XMLCALL
xmlSAX2GetPublicId (void *ctx);
XMLPUBFUN const xmlChar * XMLCALL
xmlSAX2GetSystemId (void *ctx);
XMLPUBFUN void XMLCALL
xmlSAX2SetDocumentLocator (void *ctx,
xmlSAXLocatorPtr loc);
XMLPUBFUN int XMLCALL
xmlSAX2GetLineNumber (void *ctx);
XMLPUBFUN int XMLCALL
xmlSAX2GetColumnNumber (void *ctx);
XMLPUBFUN int XMLCALL
xmlSAX2IsStandalone (void *ctx);
XMLPUBFUN int XMLCALL
xmlSAX2HasInternalSubset (void *ctx);
XMLPUBFUN int XMLCALL
xmlSAX2HasExternalSubset (void *ctx);
XMLPUBFUN void XMLCALL
xmlSAX2InternalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN void XMLCALL
xmlSAX2ExternalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlEntityPtr XMLCALL
xmlSAX2GetEntity (void *ctx,
const xmlChar *name);
XMLPUBFUN xmlEntityPtr XMLCALL
xmlSAX2GetParameterEntity (void *ctx,
const xmlChar *name);
XMLPUBFUN xmlParserInputPtr XMLCALL
xmlSAX2ResolveEntity (void *ctx,
const xmlChar *publicId,
const xmlChar *systemId);
XMLPUBFUN void XMLCALL
xmlSAX2EntityDecl (void *ctx,
const xmlChar *name,
int type,
const xmlChar *publicId,
const xmlChar *systemId,
xmlChar *content);
XMLPUBFUN void XMLCALL
xmlSAX2AttributeDecl (void *ctx,
const xmlChar *elem,
const xmlChar *fullname,
int type,
int def,
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
XMLPUBFUN void XMLCALL
xmlSAX2ElementDecl (void *ctx,
const xmlChar *name,
int type,
xmlElementContentPtr content);
XMLPUBFUN void XMLCALL
xmlSAX2NotationDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId);
XMLPUBFUN void XMLCALL
xmlSAX2UnparsedEntityDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId,
const xmlChar *notationName);
XMLPUBFUN void XMLCALL
xmlSAX2StartDocument (void *ctx);
XMLPUBFUN void XMLCALL
xmlSAX2EndDocument (void *ctx);
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
XMLPUBFUN void XMLCALL
xmlSAX2StartElement (void *ctx,
const xmlChar *fullname,
const xmlChar **atts);
XMLPUBFUN void XMLCALL
xmlSAX2EndElement (void *ctx,
const xmlChar *name);
#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED */
XMLPUBFUN void XMLCALL
xmlSAX2StartElementNs (void *ctx,
const xmlChar *localname,
const xmlChar *prefix,
const xmlChar *URI,
int nb_namespaces,
const xmlChar **namespaces,
int nb_attributes,
int nb_defaulted,
const xmlChar **attributes);
XMLPUBFUN void XMLCALL
xmlSAX2EndElementNs (void *ctx,
const xmlChar *localname,
const xmlChar *prefix,
const xmlChar *URI);
XMLPUBFUN void XMLCALL
xmlSAX2Reference (void *ctx,
const xmlChar *name);
XMLPUBFUN void XMLCALL
xmlSAX2Characters (void *ctx,
const xmlChar *ch,
int len);
XMLPUBFUN void XMLCALL
xmlSAX2IgnorableWhitespace (void *ctx,
const xmlChar *ch,
int len);
XMLPUBFUN void XMLCALL
xmlSAX2ProcessingInstruction (void *ctx,
const xmlChar *target,
const xmlChar *data);
XMLPUBFUN void XMLCALL
xmlSAX2Comment (void *ctx,
const xmlChar *value);
XMLPUBFUN void XMLCALL
xmlSAX2CDataBlock (void *ctx,
const xmlChar *value,
int len);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN int XMLCALL
xmlSAXDefaultVersion (int version);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN int XMLCALL
xmlSAXVersion (xmlSAXHandler *hdlr,
int version);
XMLPUBFUN void XMLCALL
xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
int warning);
#ifdef LIBXML_HTML_ENABLED
XMLPUBFUN void XMLCALL
xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
XMLPUBFUN void XMLCALL
htmlDefaultSAXHandlerInit (void);
#endif
#ifdef LIBXML_DOCB_ENABLED
XMLPUBFUN void XMLCALL
xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr);
XMLPUBFUN void XMLCALL
docbDefaultSAXHandlerInit (void);
#endif
XMLPUBFUN void XMLCALL
xmlDefaultSAXHandlerInit (void);
#ifdef __cplusplus
}
#endif
#endif /* __XML_SAX2_H__ */
| 4,944 | 26.937853 | 130 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/pattern.h
|
/*
* Summary: pattern expression handling
* Description: allows to compile and test pattern expressions for nodes
* either in a tree or based on a parser state.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_PATTERN_H__
#define __XML_PATTERN_H__
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#include <libxml/dict.h>
#ifdef LIBXML_PATTERN_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlPattern:
*
* A compiled (XPath based) pattern to select nodes
*/
typedef struct _xmlPattern xmlPattern;
typedef xmlPattern *xmlPatternPtr;
/**
* xmlPatternFlags:
*
* This is the set of options affecting the behaviour of pattern
* matching with this module
*
*/
typedef enum {
XML_PATTERN_DEFAULT = 0, /* simple pattern match */
XML_PATTERN_XPATH = 1<<0, /* standard XPath pattern */
XML_PATTERN_XSSEL = 1<<1, /* XPath subset for schema selector */
XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */
} xmlPatternFlags;
XMLPUBFUN void XMLCALL
xmlFreePattern (xmlPatternPtr comp);
XMLPUBFUN void XMLCALL
xmlFreePatternList (xmlPatternPtr comp);
XMLPUBFUN xmlPatternPtr XMLCALL
xmlPatterncompile (const xmlChar *pattern,
xmlDict *dict,
int flags,
const xmlChar **namespaces);
XMLPUBFUN int XMLCALL
xmlPatternMatch (xmlPatternPtr comp,
xmlNodePtr node);
/* streaming interfaces */
typedef struct _xmlStreamCtxt xmlStreamCtxt;
typedef xmlStreamCtxt *xmlStreamCtxtPtr;
XMLPUBFUN int XMLCALL
xmlPatternStreamable (xmlPatternPtr comp);
XMLPUBFUN int XMLCALL
xmlPatternMaxDepth (xmlPatternPtr comp);
XMLPUBFUN int XMLCALL
xmlPatternMinDepth (xmlPatternPtr comp);
XMLPUBFUN int XMLCALL
xmlPatternFromRoot (xmlPatternPtr comp);
XMLPUBFUN xmlStreamCtxtPtr XMLCALL
xmlPatternGetStreamCtxt (xmlPatternPtr comp);
XMLPUBFUN void XMLCALL
xmlFreeStreamCtxt (xmlStreamCtxtPtr stream);
XMLPUBFUN int XMLCALL
xmlStreamPushNode (xmlStreamCtxtPtr stream,
const xmlChar *name,
const xmlChar *ns,
int nodeType);
XMLPUBFUN int XMLCALL
xmlStreamPush (xmlStreamCtxtPtr stream,
const xmlChar *name,
const xmlChar *ns);
XMLPUBFUN int XMLCALL
xmlStreamPushAttr (xmlStreamCtxtPtr stream,
const xmlChar *name,
const xmlChar *ns);
XMLPUBFUN int XMLCALL
xmlStreamPop (xmlStreamCtxtPtr stream);
XMLPUBFUN int XMLCALL
xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_PATTERN_ENABLED */
#endif /* __XML_PATTERN_H__ */
| 2,586 | 24.613861 | 72 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/HTMLparser.h
|
/*
* Summary: interface for an HTML 4.0 non-verifying parser
* Description: this module implements an HTML 4.0 non-verifying parser
* with API compatible with the XML parser ones. It should
* be able to parse "real world" HTML, even if severely
* broken from a specification point of view.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __HTML_PARSER_H__
#define __HTML_PARSER_H__
#include <libxml/xmlversion.h>
#include <libxml/parser.h>
#ifdef LIBXML_HTML_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/*
* Most of the back-end structures from XML and HTML are shared.
*/
typedef xmlParserCtxt htmlParserCtxt;
typedef xmlParserCtxtPtr htmlParserCtxtPtr;
typedef xmlParserNodeInfo htmlParserNodeInfo;
typedef xmlSAXHandler htmlSAXHandler;
typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;
typedef xmlParserInput htmlParserInput;
typedef xmlParserInputPtr htmlParserInputPtr;
typedef xmlDocPtr htmlDocPtr;
typedef xmlNodePtr htmlNodePtr;
/*
* Internal description of an HTML element, representing HTML 4.01
* and XHTML 1.0 (which share the same structure).
*/
typedef struct _htmlElemDesc htmlElemDesc;
typedef htmlElemDesc *htmlElemDescPtr;
struct _htmlElemDesc {
const char *name; /* The tag name */
char startTag; /* Whether the start tag can be implied */
char endTag; /* Whether the end tag can be implied */
char saveEndTag; /* Whether the end tag should be saved */
char empty; /* Is this an empty element ? */
char depr; /* Is this a deprecated element ? */
char dtd; /* 1: only in Loose DTD, 2: only Frameset one */
char isinline; /* is this a block 0 or inline 1 element */
const char *desc; /* the description */
/* NRK Jan.2003
* New fields encapsulating HTML structure
*
* Bugs:
* This is a very limited representation. It fails to tell us when
* an element *requires* subelements (we only have whether they're
* allowed or not), and it doesn't tell us where CDATA and PCDATA
* are allowed. Some element relationships are not fully represented:
* these are flagged with the word MODIFIER
*/
const char** subelts; /* allowed sub-elements of this element */
const char* defaultsubelt; /* subelement for suggested auto-repair
if necessary or NULL */
const char** attrs_opt; /* Optional Attributes */
const char** attrs_depr; /* Additional deprecated attributes */
const char** attrs_req; /* Required attributes */
};
/*
* Internal description of an HTML entity.
*/
typedef struct _htmlEntityDesc htmlEntityDesc;
typedef htmlEntityDesc *htmlEntityDescPtr;
struct _htmlEntityDesc {
unsigned int value; /* the UNICODE value for the character */
const char *name; /* The entity name */
const char *desc; /* the description */
};
/*
* There is only few public functions.
*/
XMLPUBFUN const htmlElemDesc * XMLCALL
htmlTagLookup (const xmlChar *tag);
XMLPUBFUN const htmlEntityDesc * XMLCALL
htmlEntityLookup(const xmlChar *name);
XMLPUBFUN const htmlEntityDesc * XMLCALL
htmlEntityValueLookup(unsigned int value);
XMLPUBFUN int XMLCALL
htmlIsAutoClosed(htmlDocPtr doc,
htmlNodePtr elem);
XMLPUBFUN int XMLCALL
htmlAutoCloseTag(htmlDocPtr doc,
const xmlChar *name,
htmlNodePtr elem);
XMLPUBFUN const htmlEntityDesc * XMLCALL
htmlParseEntityRef(htmlParserCtxtPtr ctxt,
const xmlChar **str);
XMLPUBFUN int XMLCALL
htmlParseCharRef(htmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
htmlParseElement(htmlParserCtxtPtr ctxt);
XMLPUBFUN htmlParserCtxtPtr XMLCALL
htmlNewParserCtxt(void);
XMLPUBFUN htmlParserCtxtPtr XMLCALL
htmlCreateMemoryParserCtxt(const char *buffer,
int size);
XMLPUBFUN int XMLCALL
htmlParseDocument(htmlParserCtxtPtr ctxt);
XMLPUBFUN htmlDocPtr XMLCALL
htmlSAXParseDoc (xmlChar *cur,
const char *encoding,
htmlSAXHandlerPtr sax,
void *userData);
XMLPUBFUN htmlDocPtr XMLCALL
htmlParseDoc (xmlChar *cur,
const char *encoding);
XMLPUBFUN htmlDocPtr XMLCALL
htmlSAXParseFile(const char *filename,
const char *encoding,
htmlSAXHandlerPtr sax,
void *userData);
XMLPUBFUN htmlDocPtr XMLCALL
htmlParseFile (const char *filename,
const char *encoding);
XMLPUBFUN int XMLCALL
UTF8ToHtml (unsigned char *out,
int *outlen,
const unsigned char *in,
int *inlen);
XMLPUBFUN int XMLCALL
htmlEncodeEntities(unsigned char *out,
int *outlen,
const unsigned char *in,
int *inlen, int quoteChar);
XMLPUBFUN int XMLCALL
htmlIsScriptAttribute(const xmlChar *name);
XMLPUBFUN int XMLCALL
htmlHandleOmittedElem(int val);
#ifdef LIBXML_PUSH_ENABLED
/**
* Interfaces for the Push mode.
*/
XMLPUBFUN htmlParserCtxtPtr XMLCALL
htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
void *user_data,
const char *chunk,
int size,
const char *filename,
xmlCharEncoding enc);
XMLPUBFUN int XMLCALL
htmlParseChunk (htmlParserCtxtPtr ctxt,
const char *chunk,
int size,
int terminate);
#endif /* LIBXML_PUSH_ENABLED */
XMLPUBFUN void XMLCALL
htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
/*
* New set of simpler/more flexible APIs
*/
/**
* xmlParserOption:
*
* This is the set of XML parser options that can be passed down
* to the xmlReadDoc() and similar calls.
*/
typedef enum {
HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */
HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */
HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */
HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */
HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
HTML_PARSE_NONET = 1<<11,/* Forbid network access */
HTML_PARSE_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */
HTML_PARSE_COMPACT = 1<<16 /* compact small text nodes */
} htmlParserOption;
XMLPUBFUN void XMLCALL
htmlCtxtReset (htmlParserCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
int options);
XMLPUBFUN htmlDocPtr XMLCALL
htmlReadDoc (const xmlChar *cur,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr XMLCALL
htmlReadFile (const char *URL,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr XMLCALL
htmlReadMemory (const char *buffer,
int size,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr XMLCALL
htmlReadFd (int fd,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr XMLCALL
htmlReadIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr XMLCALL
htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
const xmlChar *cur,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr XMLCALL
htmlCtxtReadFile (xmlParserCtxtPtr ctxt,
const char *filename,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr XMLCALL
htmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
const char *buffer,
int size,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr XMLCALL
htmlCtxtReadFd (xmlParserCtxtPtr ctxt,
int fd,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN htmlDocPtr XMLCALL
htmlCtxtReadIO (xmlParserCtxtPtr ctxt,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
const char *URL,
const char *encoding,
int options);
/* NRK/Jan2003: further knowledge of HTML structure
*/
typedef enum {
HTML_NA = 0 , /* something we don't check at all */
HTML_INVALID = 0x1 ,
HTML_DEPRECATED = 0x2 ,
HTML_VALID = 0x4 ,
HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */
} htmlStatus ;
/* Using htmlElemDesc rather than name here, to emphasise the fact
that otherwise there's a lookup overhead
*/
XMLPUBFUN htmlStatus XMLCALL htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
XMLPUBFUN int XMLCALL htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
XMLPUBFUN htmlStatus XMLCALL htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
XMLPUBFUN htmlStatus XMLCALL htmlNodeStatus(const htmlNodePtr, int) ;
/**
* htmlDefaultSubelement:
* @elt: HTML element
*
* Returns the default subelement for this element
*/
#define htmlDefaultSubelement(elt) elt->defaultsubelt
/**
* htmlElementAllowedHereDesc:
* @parent: HTML parent element
* @elt: HTML element
*
* Checks whether an HTML element description may be a
* direct child of the specified element.
*
* Returns 1 if allowed; 0 otherwise.
*/
#define htmlElementAllowedHereDesc(parent,elt) \
htmlElementAllowedHere((parent), (elt)->name)
/**
* htmlRequiredAttrs:
* @elt: HTML element
*
* Returns the attributes required for the specified element.
*/
#define htmlRequiredAttrs(elt) (elt)->attrs_req
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_HTML_ENABLED */
#endif /* __HTML_PARSER_H__ */
| 9,372 | 29.630719 | 94 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/schematron.h
|
/*
* Summary: XML Schemastron implementation
* Description: interface to the XML Schematron validity checking.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_SCHEMATRON_H__
#define __XML_SCHEMATRON_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_SCHEMATRON_ENABLED
#include <libxml/tree.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
XML_SCHEMATRON_OUT_QUIET = 1 << 0, /* quiet no report */
XML_SCHEMATRON_OUT_TEXT = 1 << 1, /* build a textual report */
XML_SCHEMATRON_OUT_XML = 1 << 2, /* output SVRL */
XML_SCHEMATRON_OUT_ERROR = 1 << 3, /* output via xmlStructuredErrorFunc */
XML_SCHEMATRON_OUT_FILE = 1 << 8, /* output to a file descriptor */
XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */
XML_SCHEMATRON_OUT_IO = 1 << 10 /* output to I/O mechanism */
} xmlSchematronValidOptions;
/**
* The schemas related types are kept internal
*/
typedef struct _xmlSchematron xmlSchematron;
typedef xmlSchematron *xmlSchematronPtr;
/**
* xmlSchematronValidityErrorFunc:
* @ctx: the validation context
* @msg: the message
* @...: extra arguments
*
* Signature of an error callback from a Schematron validation
*/
typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
/**
* xmlSchematronValidityWarningFunc:
* @ctx: the validation context
* @msg: the message
* @...: extra arguments
*
* Signature of a warning callback from a Schematron validation
*/
typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
/**
* A schemas validation context
*/
typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
/*
* Interfaces for parsing.
*/
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
xmlSchematronNewParserCtxt (const char *URL);
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
xmlSchematronNewMemParserCtxt(const char *buffer,
int size);
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
XMLPUBFUN void XMLCALL
xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
/*****
XMLPUBFUN void XMLCALL
xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
xmlSchematronValidityErrorFunc err,
xmlSchematronValidityWarningFunc warn,
void *ctx);
XMLPUBFUN int XMLCALL
xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
xmlSchematronValidityErrorFunc * err,
xmlSchematronValidityWarningFunc * warn,
void **ctx);
XMLPUBFUN int XMLCALL
xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
*****/
XMLPUBFUN xmlSchematronPtr XMLCALL
xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
xmlSchematronFree (xmlSchematronPtr schema);
/*
* Interfaces for validating
*/
XMLPUBFUN void XMLCALL
xmlSchematronSetValidStructuredErrors(
xmlSchematronValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void *ctx);
/******
XMLPUBFUN void XMLCALL
xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
xmlSchematronValidityErrorFunc err,
xmlSchematronValidityWarningFunc warn,
void *ctx);
XMLPUBFUN int XMLCALL
xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt,
xmlSchematronValidityErrorFunc *err,
xmlSchematronValidityWarningFunc *warn,
void **ctx);
XMLPUBFUN int XMLCALL
xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
int options);
XMLPUBFUN int XMLCALL
xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
xmlNodePtr elem);
*******/
XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL
xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
int options);
XMLPUBFUN void XMLCALL
xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
xmlDocPtr instance);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_SCHEMATRON_ENABLED */
#endif /* __XML_SCHEMATRON_H__ */
| 4,393 | 29.727273 | 83 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/nanohttp.h
|
/*
* Summary: minimal HTTP implementation
* Description: minimal HTTP implementation allowing to fetch resources
* like external subset.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __NANO_HTTP_H__
#define __NANO_HTTP_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_HTTP_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
XMLPUBFUN void XMLCALL
xmlNanoHTTPInit (void);
XMLPUBFUN void XMLCALL
xmlNanoHTTPCleanup (void);
XMLPUBFUN void XMLCALL
xmlNanoHTTPScanProxy (const char *URL);
XMLPUBFUN int XMLCALL
xmlNanoHTTPFetch (const char *URL,
const char *filename,
char **contentType);
XMLPUBFUN void * XMLCALL
xmlNanoHTTPMethod (const char *URL,
const char *method,
const char *input,
char **contentType,
const char *headers,
int ilen);
XMLPUBFUN void * XMLCALL
xmlNanoHTTPMethodRedir (const char *URL,
const char *method,
const char *input,
char **contentType,
char **redir,
const char *headers,
int ilen);
XMLPUBFUN void * XMLCALL
xmlNanoHTTPOpen (const char *URL,
char **contentType);
XMLPUBFUN void * XMLCALL
xmlNanoHTTPOpenRedir (const char *URL,
char **contentType,
char **redir);
XMLPUBFUN int XMLCALL
xmlNanoHTTPReturnCode (void *ctx);
XMLPUBFUN const char * XMLCALL
xmlNanoHTTPAuthHeader (void *ctx);
XMLPUBFUN const char * XMLCALL
xmlNanoHTTPRedir (void *ctx);
XMLPUBFUN int XMLCALL
xmlNanoHTTPContentLength( void * ctx );
XMLPUBFUN const char * XMLCALL
xmlNanoHTTPEncoding (void *ctx);
XMLPUBFUN const char * XMLCALL
xmlNanoHTTPMimeType (void *ctx);
XMLPUBFUN int XMLCALL
xmlNanoHTTPRead (void *ctx,
void *dest,
int len);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN int XMLCALL
xmlNanoHTTPSave (void *ctxt,
const char *filename);
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN void XMLCALL
xmlNanoHTTPClose (void *ctx);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_HTTP_ENABLED */
#endif /* __NANO_HTTP_H__ */
| 2,018 | 23.621951 | 71 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/chvalid.h
|
/*
* Summary: Unicode character range checking
* Description: this module exports interfaces for the character
* range validation APIs
*
* This file is automatically generated from the cvs source
* definition files using the genChRanges.py Python script
*
* Generation date: Mon Mar 27 11:09:48 2006
* Sources: chvalid.def
* Author: William Brack <[email protected]>
*/
#ifndef __XML_CHVALID_H__
#define __XML_CHVALID_H__
#include <libxml/xmlversion.h>
#include <libxml/xmlstring.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Define our typedefs and structures
*
*/
typedef struct _xmlChSRange xmlChSRange;
typedef xmlChSRange *xmlChSRangePtr;
struct _xmlChSRange {
unsigned short low;
unsigned short high;
};
typedef struct _xmlChLRange xmlChLRange;
typedef xmlChLRange *xmlChLRangePtr;
struct _xmlChLRange {
unsigned int low;
unsigned int high;
};
typedef struct _xmlChRangeGroup xmlChRangeGroup;
typedef xmlChRangeGroup *xmlChRangeGroupPtr;
struct _xmlChRangeGroup {
int nbShortRange;
int nbLongRange;
const xmlChSRange *shortRange; /* points to an array of ranges */
const xmlChLRange *longRange;
};
/**
* Range checking routine
*/
XMLPUBFUN int XMLCALL
xmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
/**
* xmlIsBaseChar_ch:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
((0x61 <= (c)) && ((c) <= 0x7a)) || \
((0xc0 <= (c)) && ((c) <= 0xd6)) || \
((0xd8 <= (c)) && ((c) <= 0xf6)) || \
(0xf8 <= (c)))
/**
* xmlIsBaseCharQ:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsBaseCharQ(c) (((c) < 0x100) ? \
xmlIsBaseChar_ch((c)) : \
xmlCharInRange((c), &xmlIsBaseCharGroup))
XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup;
/**
* xmlIsBlank_ch:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsBlank_ch(c) (((c) == 0x20) || \
((0x9 <= (c)) && ((c) <= 0xa)) || \
((c) == 0xd))
/**
* xmlIsBlankQ:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsBlankQ(c) (((c) < 0x100) ? \
xmlIsBlank_ch((c)) : 0)
/**
* xmlIsChar_ch:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsChar_ch(c) (((0x9 <= (c)) && ((c) <= 0xa)) || \
((c) == 0xd) || \
(0x20 <= (c)))
/**
* xmlIsCharQ:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsCharQ(c) (((c) < 0x100) ? \
xmlIsChar_ch((c)) :\
(((0x100 <= (c)) && ((c) <= 0xd7ff)) || \
((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
((0x10000 <= (c)) && ((c) <= 0x10ffff))))
XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup;
/**
* xmlIsCombiningQ:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsCombiningQ(c) (((c) < 0x100) ? \
0 : \
xmlCharInRange((c), &xmlIsCombiningGroup))
XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup;
/**
* xmlIsDigit_ch:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsDigit_ch(c) (((0x30 <= (c)) && ((c) <= 0x39)))
/**
* xmlIsDigitQ:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsDigitQ(c) (((c) < 0x100) ? \
xmlIsDigit_ch((c)) : \
xmlCharInRange((c), &xmlIsDigitGroup))
XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup;
/**
* xmlIsExtender_ch:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsExtender_ch(c) (((c) == 0xb7))
/**
* xmlIsExtenderQ:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsExtenderQ(c) (((c) < 0x100) ? \
xmlIsExtender_ch((c)) : \
xmlCharInRange((c), &xmlIsExtenderGroup))
XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup;
/**
* xmlIsIdeographicQ:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsIdeographicQ(c) (((c) < 0x100) ? \
0 :\
(((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \
((c) == 0x3007) || \
((0x3021 <= (c)) && ((c) <= 0x3029))))
XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup;
XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
/**
* xmlIsPubidChar_ch:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)])
/**
* xmlIsPubidCharQ:
* @c: char to validate
*
* Automatically generated by genChRanges.py
*/
#define xmlIsPubidCharQ(c) (((c) < 0x100) ? \
xmlIsPubidChar_ch((c)) : 0)
XMLPUBFUN int XMLCALL
xmlIsBaseChar(unsigned int ch);
XMLPUBFUN int XMLCALL
xmlIsBlank(unsigned int ch);
XMLPUBFUN int XMLCALL
xmlIsChar(unsigned int ch);
XMLPUBFUN int XMLCALL
xmlIsCombining(unsigned int ch);
XMLPUBFUN int XMLCALL
xmlIsDigit(unsigned int ch);
XMLPUBFUN int XMLCALL
xmlIsExtender(unsigned int ch);
XMLPUBFUN int XMLCALL
xmlIsIdeographic(unsigned int ch);
XMLPUBFUN int XMLCALL
xmlIsPubidChar(unsigned int ch);
#ifdef __cplusplus
}
#endif
#endif /* __XML_CHVALID_H__ */
| 5,159 | 21.337662 | 69 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/xpointer.h
|
/*
* Summary: API to handle XML Pointers
* Description: API to handle XML Pointers
* Base implementation was made accordingly to
* W3C Candidate Recommendation 7 June 2000
* http://www.w3.org/TR/2000/CR-xptr-20000607
*
* Added support for the element() scheme described in:
* W3C Proposed Recommendation 13 November 2002
* http://www.w3.org/TR/2002/PR-xptr-element-20021113/
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_XPTR_H__
#define __XML_XPTR_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_XPTR_ENABLED
#include <libxml/tree.h>
#include <libxml/xpath.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* A Location Set
*/
typedef struct _xmlLocationSet xmlLocationSet;
typedef xmlLocationSet *xmlLocationSetPtr;
struct _xmlLocationSet {
int locNr; /* number of locations in the set */
int locMax; /* size of the array as allocated */
xmlXPathObjectPtr *locTab;/* array of locations */
};
/*
* Handling of location sets.
*/
XMLPUBFUN xmlLocationSetPtr XMLCALL
xmlXPtrLocationSetCreate (xmlXPathObjectPtr val);
XMLPUBFUN void XMLCALL
xmlXPtrFreeLocationSet (xmlLocationSetPtr obj);
XMLPUBFUN xmlLocationSetPtr XMLCALL
xmlXPtrLocationSetMerge (xmlLocationSetPtr val1,
xmlLocationSetPtr val2);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRange (xmlNodePtr start,
int startindex,
xmlNodePtr end,
int endindex);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRangePoints (xmlXPathObjectPtr start,
xmlXPathObjectPtr end);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRangeNodePoint (xmlNodePtr start,
xmlXPathObjectPtr end);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRangePointNode (xmlXPathObjectPtr start,
xmlNodePtr end);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRangeNodes (xmlNodePtr start,
xmlNodePtr end);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewLocationSetNodes (xmlNodePtr start,
xmlNodePtr end);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRangeNodeObject (xmlNodePtr start,
xmlXPathObjectPtr end);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewCollapsedRange (xmlNodePtr start);
XMLPUBFUN void XMLCALL
xmlXPtrLocationSetAdd (xmlLocationSetPtr cur,
xmlXPathObjectPtr val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrWrapLocationSet (xmlLocationSetPtr val);
XMLPUBFUN void XMLCALL
xmlXPtrLocationSetDel (xmlLocationSetPtr cur,
xmlXPathObjectPtr val);
XMLPUBFUN void XMLCALL
xmlXPtrLocationSetRemove (xmlLocationSetPtr cur,
int val);
/*
* Functions.
*/
XMLPUBFUN xmlXPathContextPtr XMLCALL
xmlXPtrNewContext (xmlDocPtr doc,
xmlNodePtr here,
xmlNodePtr origin);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrEval (const xmlChar *str,
xmlXPathContextPtr ctx);
XMLPUBFUN void XMLCALL
xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt,
int nargs);
XMLPUBFUN xmlNodePtr XMLCALL
xmlXPtrBuildNodeList (xmlXPathObjectPtr obj);
XMLPUBFUN void XMLCALL
xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_XPTR_ENABLED */
#endif /* __XML_XPTR_H__ */
| 3,411 | 28.669565 | 64 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/entities.h
|
/*
* Summary: interface for the XML entities handling
* Description: this module provides some of the entity API needed
* for the parser and applications.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_ENTITIES_H__
#define __XML_ENTITIES_H__
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* The different valid entity types.
*/
typedef enum {
XML_INTERNAL_GENERAL_ENTITY = 1,
XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
XML_INTERNAL_PARAMETER_ENTITY = 4,
XML_EXTERNAL_PARAMETER_ENTITY = 5,
XML_INTERNAL_PREDEFINED_ENTITY = 6
} xmlEntityType;
/*
* An unit of storage for an entity, contains the string, the value
* and the linkind data needed for the linking in the hash table.
*/
struct _xmlEntity {
void *_private; /* application data */
xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
const xmlChar *name; /* Entity name */
struct _xmlNode *children; /* First child link */
struct _xmlNode *last; /* Last child link */
struct _xmlDtd *parent; /* -> DTD */
struct _xmlNode *next; /* next sibling link */
struct _xmlNode *prev; /* previous sibling link */
struct _xmlDoc *doc; /* the containing document */
xmlChar *orig; /* content without ref substitution */
xmlChar *content; /* content or ndata if unparsed */
int length; /* the content length */
xmlEntityType etype; /* The entity type */
const xmlChar *ExternalID; /* External identifier for PUBLIC */
const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
struct _xmlEntity *nexte; /* unused */
const xmlChar *URI; /* the full URI as computed */
int owner; /* does the entity own the childrens */
int checked; /* was the entity content checked */
/* this is also used to count entites
* references done from that entity */
};
/*
* All entities are stored in an hash table.
* There is 2 separate hash tables for global and parameter entities.
*/
typedef struct _xmlHashTable xmlEntitiesTable;
typedef xmlEntitiesTable *xmlEntitiesTablePtr;
/*
* External functions:
*/
#ifdef LIBXML_LEGACY_ENABLED
XMLPUBFUN void XMLCALL
xmlInitializePredefinedEntities (void);
#endif /* LIBXML_LEGACY_ENABLED */
XMLPUBFUN xmlEntityPtr XMLCALL
xmlNewEntity (xmlDocPtr doc,
const xmlChar *name,
int type,
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content);
XMLPUBFUN xmlEntityPtr XMLCALL
xmlAddDocEntity (xmlDocPtr doc,
const xmlChar *name,
int type,
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content);
XMLPUBFUN xmlEntityPtr XMLCALL
xmlAddDtdEntity (xmlDocPtr doc,
const xmlChar *name,
int type,
const xmlChar *ExternalID,
const xmlChar *SystemID,
const xmlChar *content);
XMLPUBFUN xmlEntityPtr XMLCALL
xmlGetPredefinedEntity (const xmlChar *name);
XMLPUBFUN xmlEntityPtr XMLCALL
xmlGetDocEntity (xmlDocPtr doc,
const xmlChar *name);
XMLPUBFUN xmlEntityPtr XMLCALL
xmlGetDtdEntity (xmlDocPtr doc,
const xmlChar *name);
XMLPUBFUN xmlEntityPtr XMLCALL
xmlGetParameterEntity (xmlDocPtr doc,
const xmlChar *name);
#ifdef LIBXML_LEGACY_ENABLED
XMLPUBFUN const xmlChar * XMLCALL
xmlEncodeEntities (xmlDocPtr doc,
const xmlChar *input);
#endif /* LIBXML_LEGACY_ENABLED */
XMLPUBFUN xmlChar * XMLCALL
xmlEncodeEntitiesReentrant(xmlDocPtr doc,
const xmlChar *input);
XMLPUBFUN xmlChar * XMLCALL
xmlEncodeSpecialChars (xmlDocPtr doc,
const xmlChar *input);
XMLPUBFUN xmlEntitiesTablePtr XMLCALL
xmlCreateEntitiesTable (void);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlEntitiesTablePtr XMLCALL
xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
xmlDumpEntitiesTable (xmlBufferPtr buf,
xmlEntitiesTablePtr table);
XMLPUBFUN void XMLCALL
xmlDumpEntityDecl (xmlBufferPtr buf,
xmlEntityPtr ent);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_LEGACY_ENABLED
XMLPUBFUN void XMLCALL
xmlCleanupPredefinedEntities(void);
#endif /* LIBXML_LEGACY_ENABLED */
#ifdef __cplusplus
}
#endif
# endif /* __XML_ENTITIES_H__ */
| 4,672 | 29.94702 | 79 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/xlink.h
|
/*
* Summary: unfinished XLink detection module
* Description: unfinished XLink detection module
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_XLINK_H__
#define __XML_XLINK_H__
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#ifdef LIBXML_XPTR_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/**
* Various defines for the various Link properties.
*
* NOTE: the link detection layer will try to resolve QName expansion
* of namespaces. If "foo" is the prefix for "http://foo.com/"
* then the link detection layer will expand role="foo:myrole"
* to "http://foo.com/:myrole".
* NOTE: the link detection layer will expand URI-Refences found on
* href attributes by using the base mechanism if found.
*/
typedef xmlChar *xlinkHRef;
typedef xmlChar *xlinkRole;
typedef xmlChar *xlinkTitle;
typedef enum {
XLINK_TYPE_NONE = 0,
XLINK_TYPE_SIMPLE,
XLINK_TYPE_EXTENDED,
XLINK_TYPE_EXTENDED_SET
} xlinkType;
typedef enum {
XLINK_SHOW_NONE = 0,
XLINK_SHOW_NEW,
XLINK_SHOW_EMBED,
XLINK_SHOW_REPLACE
} xlinkShow;
typedef enum {
XLINK_ACTUATE_NONE = 0,
XLINK_ACTUATE_AUTO,
XLINK_ACTUATE_ONREQUEST
} xlinkActuate;
/**
* xlinkNodeDetectFunc:
* @ctx: user data pointer
* @node: the node to check
*
* This is the prototype for the link detection routine.
* It calls the default link detection callbacks upon link detection.
*/
typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node);
/*
* The link detection module interact with the upper layers using
* a set of callback registered at parsing time.
*/
/**
* xlinkSimpleLinkFunk:
* @ctx: user data pointer
* @node: the node carrying the link
* @href: the target of the link
* @role: the role string
* @title: the link title
*
* This is the prototype for a simple link detection callback.
*/
typedef void
(*xlinkSimpleLinkFunk) (void *ctx,
xmlNodePtr node,
const xlinkHRef href,
const xlinkRole role,
const xlinkTitle title);
/**
* xlinkExtendedLinkFunk:
* @ctx: user data pointer
* @node: the node carrying the link
* @nbLocators: the number of locators detected on the link
* @hrefs: pointer to the array of locator hrefs
* @roles: pointer to the array of locator roles
* @nbArcs: the number of arcs detected on the link
* @from: pointer to the array of source roles found on the arcs
* @to: pointer to the array of target roles found on the arcs
* @show: array of values for the show attributes found on the arcs
* @actuate: array of values for the actuate attributes found on the arcs
* @nbTitles: the number of titles detected on the link
* @title: array of titles detected on the link
* @langs: array of xml:lang values for the titles
*
* This is the prototype for a extended link detection callback.
*/
typedef void
(*xlinkExtendedLinkFunk)(void *ctx,
xmlNodePtr node,
int nbLocators,
const xlinkHRef *hrefs,
const xlinkRole *roles,
int nbArcs,
const xlinkRole *from,
const xlinkRole *to,
xlinkShow *show,
xlinkActuate *actuate,
int nbTitles,
const xlinkTitle *titles,
const xmlChar **langs);
/**
* xlinkExtendedLinkSetFunk:
* @ctx: user data pointer
* @node: the node carrying the link
* @nbLocators: the number of locators detected on the link
* @hrefs: pointer to the array of locator hrefs
* @roles: pointer to the array of locator roles
* @nbTitles: the number of titles detected on the link
* @title: array of titles detected on the link
* @langs: array of xml:lang values for the titles
*
* This is the prototype for a extended link set detection callback.
*/
typedef void
(*xlinkExtendedLinkSetFunk) (void *ctx,
xmlNodePtr node,
int nbLocators,
const xlinkHRef *hrefs,
const xlinkRole *roles,
int nbTitles,
const xlinkTitle *titles,
const xmlChar **langs);
/**
* This is the structure containing a set of Links detection callbacks.
*
* There is no default xlink callbacks, if one want to get link
* recognition activated, those call backs must be provided before parsing.
*/
typedef struct _xlinkHandler xlinkHandler;
typedef xlinkHandler *xlinkHandlerPtr;
struct _xlinkHandler {
xlinkSimpleLinkFunk simple;
xlinkExtendedLinkFunk extended;
xlinkExtendedLinkSetFunk set;
};
/*
* The default detection routine, can be overridden, they call the default
* detection callbacks.
*/
XMLPUBFUN xlinkNodeDetectFunc XMLCALL
xlinkGetDefaultDetect (void);
XMLPUBFUN void XMLCALL
xlinkSetDefaultDetect (xlinkNodeDetectFunc func);
/*
* Routines to set/get the default handlers.
*/
XMLPUBFUN xlinkHandlerPtr XMLCALL
xlinkGetDefaultHandler (void);
XMLPUBFUN void XMLCALL
xlinkSetDefaultHandler (xlinkHandlerPtr handler);
/*
* Link detection module itself.
*/
XMLPUBFUN xlinkType XMLCALL
xlinkIsLink (xmlDocPtr doc,
xmlNodePtr node);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_XPTR_ENABLED */
#endif /* __XML_XLINK_H__ */
| 5,051 | 25.589474 | 75 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/xmlmodule.h
|
/*
* Summary: dynamic module loading
* Description: basic API for dynamic module loading, used by
* libexslt added in 2.6.17
*
* Copy: See Copyright for the status of this software.
*
* Author: Joel W. Reed
*/
#ifndef __XML_MODULE_H__
#define __XML_MODULE_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_MODULES_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlModulePtr:
*
* A handle to a dynamically loaded module
*/
typedef struct _xmlModule xmlModule;
typedef xmlModule *xmlModulePtr;
/**
* xmlModuleOption:
*
* enumeration of options that can be passed down to xmlModuleOpen()
*/
typedef enum {
XML_MODULE_LAZY = 1, /* lazy binding */
XML_MODULE_LOCAL= 2 /* local binding */
} xmlModuleOption;
XMLPUBFUN xmlModulePtr XMLCALL xmlModuleOpen (const char *filename,
int options);
XMLPUBFUN int XMLCALL xmlModuleSymbol (xmlModulePtr module,
const char* name,
void **result);
XMLPUBFUN int XMLCALL xmlModuleClose (xmlModulePtr module);
XMLPUBFUN int XMLCALL xmlModuleFree (xmlModulePtr module);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_MODULES_ENABLED */
#endif /*__XML_MODULE_H__ */
| 1,171 | 19.206897 | 68 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/parser.h
|
/*
* Summary: the core parser module
* Description: Interfaces, constants and types related to the XML parser
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_PARSER_H__
#define __XML_PARSER_H__
#include <stdarg.h>
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#include <libxml/dict.h>
#include <libxml/hash.h>
#include <libxml/valid.h>
#include <libxml/entities.h>
#include <libxml/xmlerror.h>
#include <libxml/xmlstring.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* XML_DEFAULT_VERSION:
*
* The default version of XML used: 1.0
*/
#define XML_DEFAULT_VERSION "1.0"
/**
* xmlParserInput:
*
* An xmlParserInput is an input flow for the XML processor.
* Each entity parsed is associated an xmlParserInput (except the
* few predefined ones). This is the case both for internal entities
* - in which case the flow is already completely in memory - or
* external entities - in which case we use the buf structure for
* progressive reading and I18N conversions to the internal UTF-8 format.
*/
/**
* xmlParserInputDeallocate:
* @str: the string to deallocate
*
* Callback for freeing some parser input allocations.
*/
typedef void (* xmlParserInputDeallocate)(xmlChar *str);
struct _xmlParserInput {
/* Input buffer */
xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */
const char *filename; /* The file analyzed, if any */
const char *directory; /* the directory/base of the file */
const xmlChar *base; /* Base of the array to parse */
const xmlChar *cur; /* Current char being parsed */
const xmlChar *end; /* end of the array to parse */
int length; /* length if known */
int line; /* Current line */
int col; /* Current column */
/*
* NOTE: consumed is only tested for equality in the parser code,
* so even if there is an overflow this should not give troubles
* for parsing very large instances.
*/
unsigned long consumed; /* How many xmlChars already consumed */
xmlParserInputDeallocate free; /* function to deallocate the base */
const xmlChar *encoding; /* the encoding string for entity */
const xmlChar *version; /* the version string for entity */
int standalone; /* Was that entity marked standalone */
int id; /* an unique identifier for the entity */
};
/**
* xmlParserNodeInfo:
*
* The parser can be asked to collect Node informations, i.e. at what
* place in the file they were detected.
* NOTE: This is off by default and not very well tested.
*/
typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
struct _xmlParserNodeInfo {
const struct _xmlNode* node;
/* Position & line # that text that created the node begins & ends on */
unsigned long begin_pos;
unsigned long begin_line;
unsigned long end_pos;
unsigned long end_line;
};
typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
struct _xmlParserNodeInfoSeq {
unsigned long maximum;
unsigned long length;
xmlParserNodeInfo* buffer;
};
/**
* xmlParserInputState:
*
* The parser is now working also as a state based parser.
* The recursive one use the state info for entities processing.
*/
typedef enum {
XML_PARSER_EOF = -1, /* nothing is to be parsed */
XML_PARSER_START = 0, /* nothing has been parsed */
XML_PARSER_MISC, /* Misc* before int subset */
XML_PARSER_PI, /* Within a processing instruction */
XML_PARSER_DTD, /* within some DTD content */
XML_PARSER_PROLOG, /* Misc* after internal subset */
XML_PARSER_COMMENT, /* within a comment */
XML_PARSER_START_TAG, /* within a start tag */
XML_PARSER_CONTENT, /* within the content */
XML_PARSER_CDATA_SECTION, /* within a CDATA section */
XML_PARSER_END_TAG, /* within a closing tag */
XML_PARSER_ENTITY_DECL, /* within an entity declaration */
XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */
XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */
XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
XML_PARSER_EPILOG, /* the Misc* after the last end tag */
XML_PARSER_IGNORE, /* within an IGNORED section */
XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */
} xmlParserInputState;
/**
* XML_DETECT_IDS:
*
* Bit in the loadsubset context field to tell to do ID/REFs lookups.
* Use it to initialize xmlLoadExtDtdDefaultValue.
*/
#define XML_DETECT_IDS 2
/**
* XML_COMPLETE_ATTRS:
*
* Bit in the loadsubset context field to tell to do complete the
* elements attributes lists with the ones defaulted from the DTDs.
* Use it to initialize xmlLoadExtDtdDefaultValue.
*/
#define XML_COMPLETE_ATTRS 4
/**
* XML_SKIP_IDS:
*
* Bit in the loadsubset context field to tell to not do ID/REFs registration.
* Used to initialize xmlLoadExtDtdDefaultValue in some special cases.
*/
#define XML_SKIP_IDS 8
/**
* xmlParserMode:
*
* A parser can operate in various modes
*/
typedef enum {
XML_PARSE_UNKNOWN = 0,
XML_PARSE_DOM = 1,
XML_PARSE_SAX = 2,
XML_PARSE_PUSH_DOM = 3,
XML_PARSE_PUSH_SAX = 4,
XML_PARSE_READER = 5
} xmlParserMode;
/**
* xmlParserCtxt:
*
* The parser context.
* NOTE This doesn't completely define the parser state, the (current ?)
* design of the parser uses recursive function calls since this allow
* and easy mapping from the production rules of the specification
* to the actual code. The drawback is that the actual function call
* also reflect the parser state. However most of the parsing routines
* takes as the only argument the parser context pointer, so migrating
* to a state based parser for progressive parsing shouldn't be too hard.
*/
struct _xmlParserCtxt {
struct _xmlSAXHandler *sax; /* The SAX handler */
void *userData; /* For SAX interface only, used by DOM build */
xmlDocPtr myDoc; /* the document being built */
int wellFormed; /* is the document well formed */
int replaceEntities; /* shall we replace entities ? */
const xmlChar *version; /* the XML version string */
const xmlChar *encoding; /* the declared encoding, if any */
int standalone; /* standalone document */
int html; /* an HTML(1)/Docbook(2) document
* 3 is HTML after <head>
* 10 is HTML after <body>
*/
/* Input stream stack */
xmlParserInputPtr input; /* Current input stream */
int inputNr; /* Number of current input streams */
int inputMax; /* Max number of input streams */
xmlParserInputPtr *inputTab; /* stack of inputs */
/* Node analysis stack only used for DOM building */
xmlNodePtr node; /* Current parsed Node */
int nodeNr; /* Depth of the parsing stack */
int nodeMax; /* Max depth of the parsing stack */
xmlNodePtr *nodeTab; /* array of nodes */
int record_info; /* Whether node info should be kept */
xmlParserNodeInfoSeq node_seq; /* info about each node parsed */
int errNo; /* error code */
int hasExternalSubset; /* reference and external subset */
int hasPErefs; /* the internal subset has PE refs */
int external; /* are we parsing an external entity */
int valid; /* is the document valid */
int validate; /* shall we try to validate ? */
xmlValidCtxt vctxt; /* The validity context */
xmlParserInputState instate; /* current type of input */
int token; /* next char look-ahead */
char *directory; /* the data directory */
/* Node name stack */
const xmlChar *name; /* Current parsed Node */
int nameNr; /* Depth of the parsing stack */
int nameMax; /* Max depth of the parsing stack */
const xmlChar * *nameTab; /* array of nodes */
long nbChars; /* number of xmlChar processed */
long checkIndex; /* used by progressive parsing lookup */
int keepBlanks; /* ugly but ... */
int disableSAX; /* SAX callbacks are disabled */
int inSubset; /* Parsing is in int 1/ext 2 subset */
const xmlChar * intSubName; /* name of subset */
xmlChar * extSubURI; /* URI of external subset */
xmlChar * extSubSystem; /* SYSTEM ID of external subset */
/* xml:space values */
int * space; /* Should the parser preserve spaces */
int spaceNr; /* Depth of the parsing stack */
int spaceMax; /* Max depth of the parsing stack */
int * spaceTab; /* array of space infos */
int depth; /* to prevent entity substitution loops */
xmlParserInputPtr entity; /* used to check entities boundaries */
int charset; /* encoding of the in-memory content
actually an xmlCharEncoding */
int nodelen; /* Those two fields are there to */
int nodemem; /* Speed up large node parsing */
int pedantic; /* signal pedantic warnings */
void *_private; /* For user data, libxml won't touch it */
int loadsubset; /* should the external subset be loaded */
int linenumbers; /* set line number in element content */
void *catalogs; /* document's own catalog */
int recovery; /* run in recovery mode */
int progressive; /* is this a progressive parsing */
xmlDictPtr dict; /* dictionnary for the parser */
const xmlChar * *atts; /* array for the attributes callbacks */
int maxatts; /* the size of the array */
int docdict; /* use strings from dict to build tree */
/*
* pre-interned strings
*/
const xmlChar *str_xml;
const xmlChar *str_xmlns;
const xmlChar *str_xml_ns;
/*
* Everything below is used only by the new SAX mode
*/
int sax2; /* operating in the new SAX mode */
int nsNr; /* the number of inherited namespaces */
int nsMax; /* the size of the arrays */
const xmlChar * *nsTab; /* the array of prefix/namespace name */
int *attallocs; /* which attribute were allocated */
void * *pushTab; /* array of data for push */
xmlHashTablePtr attsDefault; /* defaulted attributes if any */
xmlHashTablePtr attsSpecial; /* non-CDATA attributes if any */
int nsWellFormed; /* is the document XML Nanespace okay */
int options; /* Extra options */
/*
* Those fields are needed only for treaming parsing so far
*/
int dictNames; /* Use dictionary names for the tree */
int freeElemsNr; /* number of freed element nodes */
xmlNodePtr freeElems; /* List of freed element nodes */
int freeAttrsNr; /* number of freed attributes nodes */
xmlAttrPtr freeAttrs; /* List of freed attributes nodes */
/*
* the complete error informations for the last error.
*/
xmlError lastError;
xmlParserMode parseMode; /* the parser mode */
unsigned long nbentities; /* number of entities references */
unsigned long sizeentities; /* size of parsed entities */
/* for use by HTML non-recursive parser */
xmlParserNodeInfo *nodeInfo; /* Current NodeInfo */
int nodeInfoNr; /* Depth of the parsing stack */
int nodeInfoMax; /* Max depth of the parsing stack */
xmlParserNodeInfo *nodeInfoTab; /* array of nodeInfos */
};
/**
* xmlSAXLocator:
*
* A SAX Locator.
*/
struct _xmlSAXLocator {
const xmlChar *(*getPublicId)(void *ctx);
const xmlChar *(*getSystemId)(void *ctx);
int (*getLineNumber)(void *ctx);
int (*getColumnNumber)(void *ctx);
};
/**
* xmlSAXHandler:
*
* A SAX handler is bunch of callbacks called by the parser when processing
* of the input generate data or structure informations.
*/
/**
* resolveEntitySAXFunc:
* @ctx: the user data (XML parser context)
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
*
* Callback:
* The entity loader, to control the loading of external entities,
* the application can either:
* - override this resolveEntity() callback in the SAX block
* - or better use the xmlSetExternalEntityLoader() function to
* set up it's own entity resolution routine
*
* Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
*/
typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
const xmlChar *publicId,
const xmlChar *systemId);
/**
* internalSubsetSAXFunc:
* @ctx: the user data (XML parser context)
* @name: the root element name
* @ExternalID: the external ID
* @SystemID: the SYSTEM ID (e.g. filename or URL)
*
* Callback on internal subset declaration.
*/
typedef void (*internalSubsetSAXFunc) (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
/**
* externalSubsetSAXFunc:
* @ctx: the user data (XML parser context)
* @name: the root element name
* @ExternalID: the external ID
* @SystemID: the SYSTEM ID (e.g. filename or URL)
*
* Callback on external subset declaration.
*/
typedef void (*externalSubsetSAXFunc) (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
/**
* getEntitySAXFunc:
* @ctx: the user data (XML parser context)
* @name: The entity name
*
* Get an entity by name.
*
* Returns the xmlEntityPtr if found.
*/
typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
const xmlChar *name);
/**
* getParameterEntitySAXFunc:
* @ctx: the user data (XML parser context)
* @name: The entity name
*
* Get a parameter entity by name.
*
* Returns the xmlEntityPtr if found.
*/
typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
const xmlChar *name);
/**
* entityDeclSAXFunc:
* @ctx: the user data (XML parser context)
* @name: the entity name
* @type: the entity type
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
* @content: the entity value (without processing).
*
* An entity definition has been parsed.
*/
typedef void (*entityDeclSAXFunc) (void *ctx,
const xmlChar *name,
int type,
const xmlChar *publicId,
const xmlChar *systemId,
xmlChar *content);
/**
* notationDeclSAXFunc:
* @ctx: the user data (XML parser context)
* @name: The name of the notation
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
*
* What to do when a notation declaration has been parsed.
*/
typedef void (*notationDeclSAXFunc)(void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId);
/**
* attributeDeclSAXFunc:
* @ctx: the user data (XML parser context)
* @elem: the name of the element
* @fullname: the attribute name
* @type: the attribute type
* @def: the type of default value
* @defaultValue: the attribute default value
* @tree: the tree of enumerated value set
*
* An attribute definition has been parsed.
*/
typedef void (*attributeDeclSAXFunc)(void *ctx,
const xmlChar *elem,
const xmlChar *fullname,
int type,
int def,
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
/**
* elementDeclSAXFunc:
* @ctx: the user data (XML parser context)
* @name: the element name
* @type: the element type
* @content: the element value tree
*
* An element definition has been parsed.
*/
typedef void (*elementDeclSAXFunc)(void *ctx,
const xmlChar *name,
int type,
xmlElementContentPtr content);
/**
* unparsedEntityDeclSAXFunc:
* @ctx: the user data (XML parser context)
* @name: The name of the entity
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
* @notationName: the name of the notation
*
* What to do when an unparsed entity declaration is parsed.
*/
typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId,
const xmlChar *notationName);
/**
* setDocumentLocatorSAXFunc:
* @ctx: the user data (XML parser context)
* @loc: A SAX Locator
*
* Receive the document locator at startup, actually xmlDefaultSAXLocator.
* Everything is available on the context, so this is useless in our case.
*/
typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
xmlSAXLocatorPtr loc);
/**
* startDocumentSAXFunc:
* @ctx: the user data (XML parser context)
*
* Called when the document start being processed.
*/
typedef void (*startDocumentSAXFunc) (void *ctx);
/**
* endDocumentSAXFunc:
* @ctx: the user data (XML parser context)
*
* Called when the document end has been detected.
*/
typedef void (*endDocumentSAXFunc) (void *ctx);
/**
* startElementSAXFunc:
* @ctx: the user data (XML parser context)
* @name: The element name, including namespace prefix
* @atts: An array of name/value attributes pairs, NULL terminated
*
* Called when an opening tag has been processed.
*/
typedef void (*startElementSAXFunc) (void *ctx,
const xmlChar *name,
const xmlChar **atts);
/**
* endElementSAXFunc:
* @ctx: the user data (XML parser context)
* @name: The element name
*
* Called when the end of an element has been detected.
*/
typedef void (*endElementSAXFunc) (void *ctx,
const xmlChar *name);
/**
* attributeSAXFunc:
* @ctx: the user data (XML parser context)
* @name: The attribute name, including namespace prefix
* @value: The attribute value
*
* Handle an attribute that has been read by the parser.
* The default handling is to convert the attribute into an
* DOM subtree and past it in a new xmlAttr element added to
* the element.
*/
typedef void (*attributeSAXFunc) (void *ctx,
const xmlChar *name,
const xmlChar *value);
/**
* referenceSAXFunc:
* @ctx: the user data (XML parser context)
* @name: The entity name
*
* Called when an entity reference is detected.
*/
typedef void (*referenceSAXFunc) (void *ctx,
const xmlChar *name);
/**
* charactersSAXFunc:
* @ctx: the user data (XML parser context)
* @ch: a xmlChar string
* @len: the number of xmlChar
*
* Receiving some chars from the parser.
*/
typedef void (*charactersSAXFunc) (void *ctx,
const xmlChar *ch,
int len);
/**
* ignorableWhitespaceSAXFunc:
* @ctx: the user data (XML parser context)
* @ch: a xmlChar string
* @len: the number of xmlChar
*
* Receiving some ignorable whitespaces from the parser.
* UNUSED: by default the DOM building will use characters.
*/
typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
const xmlChar *ch,
int len);
/**
* processingInstructionSAXFunc:
* @ctx: the user data (XML parser context)
* @target: the target name
* @data: the PI data's
*
* A processing instruction has been parsed.
*/
typedef void (*processingInstructionSAXFunc) (void *ctx,
const xmlChar *target,
const xmlChar *data);
/**
* commentSAXFunc:
* @ctx: the user data (XML parser context)
* @value: the comment content
*
* A comment has been parsed.
*/
typedef void (*commentSAXFunc) (void *ctx,
const xmlChar *value);
/**
* cdataBlockSAXFunc:
* @ctx: the user data (XML parser context)
* @value: The pcdata content
* @len: the block length
*
* Called when a pcdata block has been parsed.
*/
typedef void (*cdataBlockSAXFunc) (
void *ctx,
const xmlChar *value,
int len);
/**
* warningSAXFunc:
* @ctx: an XML parser context
* @msg: the message to display/transmit
* @...: extra parameters for the message display
*
* Display and format a warning messages, callback.
*/
typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* errorSAXFunc:
* @ctx: an XML parser context
* @msg: the message to display/transmit
* @...: extra parameters for the message display
*
* Display and format an error messages, callback.
*/
typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* fatalErrorSAXFunc:
* @ctx: an XML parser context
* @msg: the message to display/transmit
* @...: extra parameters for the message display
*
* Display and format fatal error messages, callback.
* Note: so far fatalError() SAX callbacks are not used, error()
* get all the callbacks for errors.
*/
typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx,
const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* isStandaloneSAXFunc:
* @ctx: the user data (XML parser context)
*
* Is this document tagged standalone?
*
* Returns 1 if true
*/
typedef int (*isStandaloneSAXFunc) (void *ctx);
/**
* hasInternalSubsetSAXFunc:
* @ctx: the user data (XML parser context)
*
* Does this document has an internal subset.
*
* Returns 1 if true
*/
typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
/**
* hasExternalSubsetSAXFunc:
* @ctx: the user data (XML parser context)
*
* Does this document has an external subset?
*
* Returns 1 if true
*/
typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
/************************************************************************
* *
* The SAX version 2 API extensions *
* *
************************************************************************/
/**
* XML_SAX2_MAGIC:
*
* Special constant found in SAX2 blocks initialized fields
*/
#define XML_SAX2_MAGIC 0xDEEDBEAF
/**
* startElementNsSAX2Func:
* @ctx: the user data (XML parser context)
* @localname: the local name of the element
* @prefix: the element namespace prefix if available
* @URI: the element namespace name if available
* @nb_namespaces: number of namespace definitions on that node
* @namespaces: pointer to the array of prefix/URI pairs namespace definitions
* @nb_attributes: the number of attributes on that node
* @nb_defaulted: the number of defaulted attributes. The defaulted
* ones are at the end of the array
* @attributes: pointer to the array of (localname/prefix/URI/value/end)
* attribute values.
*
* SAX2 callback when an element start has been detected by the parser.
* It provides the namespace informations for the element, as well as
* the new namespace declarations on the element.
*/
typedef void (*startElementNsSAX2Func) (void *ctx,
const xmlChar *localname,
const xmlChar *prefix,
const xmlChar *URI,
int nb_namespaces,
const xmlChar **namespaces,
int nb_attributes,
int nb_defaulted,
const xmlChar **attributes);
/**
* endElementNsSAX2Func:
* @ctx: the user data (XML parser context)
* @localname: the local name of the element
* @prefix: the element namespace prefix if available
* @URI: the element namespace name if available
*
* SAX2 callback when an element end has been detected by the parser.
* It provides the namespace informations for the element.
*/
typedef void (*endElementNsSAX2Func) (void *ctx,
const xmlChar *localname,
const xmlChar *prefix,
const xmlChar *URI);
struct _xmlSAXHandler {
internalSubsetSAXFunc internalSubset;
isStandaloneSAXFunc isStandalone;
hasInternalSubsetSAXFunc hasInternalSubset;
hasExternalSubsetSAXFunc hasExternalSubset;
resolveEntitySAXFunc resolveEntity;
getEntitySAXFunc getEntity;
entityDeclSAXFunc entityDecl;
notationDeclSAXFunc notationDecl;
attributeDeclSAXFunc attributeDecl;
elementDeclSAXFunc elementDecl;
unparsedEntityDeclSAXFunc unparsedEntityDecl;
setDocumentLocatorSAXFunc setDocumentLocator;
startDocumentSAXFunc startDocument;
endDocumentSAXFunc endDocument;
startElementSAXFunc startElement;
endElementSAXFunc endElement;
referenceSAXFunc reference;
charactersSAXFunc characters;
ignorableWhitespaceSAXFunc ignorableWhitespace;
processingInstructionSAXFunc processingInstruction;
commentSAXFunc comment;
warningSAXFunc warning;
errorSAXFunc error;
fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
getParameterEntitySAXFunc getParameterEntity;
cdataBlockSAXFunc cdataBlock;
externalSubsetSAXFunc externalSubset;
unsigned int initialized;
/* The following fields are extensions available only on version 2 */
void *_private;
startElementNsSAX2Func startElementNs;
endElementNsSAX2Func endElementNs;
xmlStructuredErrorFunc serror;
};
/*
* SAX Version 1
*/
typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1;
typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr;
struct _xmlSAXHandlerV1 {
internalSubsetSAXFunc internalSubset;
isStandaloneSAXFunc isStandalone;
hasInternalSubsetSAXFunc hasInternalSubset;
hasExternalSubsetSAXFunc hasExternalSubset;
resolveEntitySAXFunc resolveEntity;
getEntitySAXFunc getEntity;
entityDeclSAXFunc entityDecl;
notationDeclSAXFunc notationDecl;
attributeDeclSAXFunc attributeDecl;
elementDeclSAXFunc elementDecl;
unparsedEntityDeclSAXFunc unparsedEntityDecl;
setDocumentLocatorSAXFunc setDocumentLocator;
startDocumentSAXFunc startDocument;
endDocumentSAXFunc endDocument;
startElementSAXFunc startElement;
endElementSAXFunc endElement;
referenceSAXFunc reference;
charactersSAXFunc characters;
ignorableWhitespaceSAXFunc ignorableWhitespace;
processingInstructionSAXFunc processingInstruction;
commentSAXFunc comment;
warningSAXFunc warning;
errorSAXFunc error;
fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
getParameterEntitySAXFunc getParameterEntity;
cdataBlockSAXFunc cdataBlock;
externalSubsetSAXFunc externalSubset;
unsigned int initialized;
};
/**
* xmlExternalEntityLoader:
* @URL: The System ID of the resource requested
* @ID: The Public ID of the resource requested
* @context: the XML parser context
*
* External entity loaders types.
*
* Returns the entity input parser.
*/
typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
const char *ID,
xmlParserCtxtPtr context);
#ifdef __cplusplus
}
#endif
#include <libxml/encoding.h>
#include <libxml/xmlIO.h>
#include <libxml/globals.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Init/Cleanup
*/
XMLPUBFUN void XMLCALL
xmlInitParser (void);
XMLPUBFUN void XMLCALL
xmlCleanupParser (void);
/*
* Input functions
*/
XMLPUBFUN int XMLCALL
xmlParserInputRead (xmlParserInputPtr in,
int len);
XMLPUBFUN int XMLCALL
xmlParserInputGrow (xmlParserInputPtr in,
int len);
/*
* Basic parsing Interfaces
*/
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN xmlDocPtr XMLCALL
xmlParseDoc (const xmlChar *cur);
XMLPUBFUN xmlDocPtr XMLCALL
xmlParseFile (const char *filename);
XMLPUBFUN xmlDocPtr XMLCALL
xmlParseMemory (const char *buffer,
int size);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN int XMLCALL
xmlSubstituteEntitiesDefault(int val);
XMLPUBFUN int XMLCALL
xmlKeepBlanksDefault (int val);
XMLPUBFUN void XMLCALL
xmlStopParser (xmlParserCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
xmlPedanticParserDefault(int val);
XMLPUBFUN int XMLCALL
xmlLineNumbersDefault (int val);
#ifdef LIBXML_SAX1_ENABLED
/*
* Recovery mode
*/
XMLPUBFUN xmlDocPtr XMLCALL
xmlRecoverDoc (const xmlChar *cur);
XMLPUBFUN xmlDocPtr XMLCALL
xmlRecoverMemory (const char *buffer,
int size);
XMLPUBFUN xmlDocPtr XMLCALL
xmlRecoverFile (const char *filename);
#endif /* LIBXML_SAX1_ENABLED */
/*
* Less common routines and SAX interfaces
*/
XMLPUBFUN int XMLCALL
xmlParseDocument (xmlParserCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN int XMLCALL
xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
void *user_data,
const char *filename);
XMLPUBFUN int XMLCALL
xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
void *user_data,
const char *buffer,
int size);
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseDoc (xmlSAXHandlerPtr sax,
const xmlChar *cur,
int recovery);
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseMemory (xmlSAXHandlerPtr sax,
const char *buffer,
int size,
int recovery);
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
const char *buffer,
int size,
int recovery,
void *data);
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseFile (xmlSAXHandlerPtr sax,
const char *filename,
int recovery);
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
const char *filename,
int recovery,
void *data);
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseEntity (xmlSAXHandlerPtr sax,
const char *filename);
XMLPUBFUN xmlDocPtr XMLCALL
xmlParseEntity (const char *filename);
#endif /* LIBXML_SAX1_ENABLED */
#ifdef LIBXML_VALID_ENABLED
XMLPUBFUN xmlDtdPtr XMLCALL
xmlSAXParseDTD (xmlSAXHandlerPtr sax,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlDtdPtr XMLCALL
xmlParseDTD (const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlDtdPtr XMLCALL
xmlIOParseDTD (xmlSAXHandlerPtr sax,
xmlParserInputBufferPtr input,
xmlCharEncoding enc);
#endif /* LIBXML_VALID_ENABLE */
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN int XMLCALL
xmlParseBalancedChunkMemory(xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void *user_data,
int depth,
const xmlChar *string,
xmlNodePtr *lst);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN xmlParserErrors XMLCALL
xmlParseInNodeContext (xmlNodePtr node,
const char *data,
int datalen,
int options,
xmlNodePtr *lst);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN int XMLCALL
xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void *user_data,
int depth,
const xmlChar *string,
xmlNodePtr *lst,
int recover);
XMLPUBFUN int XMLCALL
xmlParseExternalEntity (xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void *user_data,
int depth,
const xmlChar *URL,
const xmlChar *ID,
xmlNodePtr *lst);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN int XMLCALL
xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
const xmlChar *URL,
const xmlChar *ID,
xmlNodePtr *lst);
/*
* Parser contexts handling.
*/
XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlNewParserCtxt (void);
XMLPUBFUN int XMLCALL
xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN void XMLCALL
xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
const xmlChar* buffer,
const char *filename);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlCreateDocParserCtxt (const xmlChar *cur);
#ifdef LIBXML_LEGACY_ENABLED
/*
* Reading/setting optional parsing features.
*/
XMLPUBFUN int XMLCALL
xmlGetFeaturesList (int *len,
const char **result);
XMLPUBFUN int XMLCALL
xmlGetFeature (xmlParserCtxtPtr ctxt,
const char *name,
void *result);
XMLPUBFUN int XMLCALL
xmlSetFeature (xmlParserCtxtPtr ctxt,
const char *name,
void *value);
#endif /* LIBXML_LEGACY_ENABLED */
#ifdef LIBXML_PUSH_ENABLED
/*
* Interfaces for the Push mode.
*/
XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
void *user_data,
const char *chunk,
int size,
const char *filename);
XMLPUBFUN int XMLCALL
xmlParseChunk (xmlParserCtxtPtr ctxt,
const char *chunk,
int size,
int terminate);
#endif /* LIBXML_PUSH_ENABLED */
/*
* Special I/O mode.
*/
XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
void *user_data,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
xmlCharEncoding enc);
XMLPUBFUN xmlParserInputPtr XMLCALL
xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
xmlParserInputBufferPtr input,
xmlCharEncoding enc);
/*
* Node infos.
*/
XMLPUBFUN const xmlParserNodeInfo* XMLCALL
xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt,
const xmlNodePtr node);
XMLPUBFUN void XMLCALL
xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
XMLPUBFUN void XMLCALL
xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
XMLPUBFUN unsigned long XMLCALL
xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
const xmlNodePtr node);
XMLPUBFUN void XMLCALL
xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
const xmlParserNodeInfoPtr info);
/*
* External entities handling actually implemented in xmlIO.
*/
XMLPUBFUN void XMLCALL
xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
XMLPUBFUN xmlExternalEntityLoader XMLCALL
xmlGetExternalEntityLoader(void);
XMLPUBFUN xmlParserInputPtr XMLCALL
xmlLoadExternalEntity (const char *URL,
const char *ID,
xmlParserCtxtPtr ctxt);
/*
* Index lookup, actually implemented in the encoding module
*/
XMLPUBFUN long XMLCALL
xmlByteConsumed (xmlParserCtxtPtr ctxt);
/*
* New set of simpler/more flexible APIs
*/
/**
* xmlParserOption:
*
* This is the set of XML parser options that can be passed down
* to the xmlReadDoc() and similar calls.
*/
typedef enum {
XML_PARSE_RECOVER = 1<<0, /* recover on errors */
XML_PARSE_NOENT = 1<<1, /* substitute entities */
XML_PARSE_DTDLOAD = 1<<2, /* load the external subset */
XML_PARSE_DTDATTR = 1<<3, /* default DTD attributes */
XML_PARSE_DTDVALID = 1<<4, /* validate with the DTD */
XML_PARSE_NOERROR = 1<<5, /* suppress error reports */
XML_PARSE_NOWARNING = 1<<6, /* suppress warning reports */
XML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
XML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
XML_PARSE_SAX1 = 1<<9, /* use the SAX1 interface internally */
XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitition */
XML_PARSE_NONET = 1<<11,/* Forbid network access */
XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionnary */
XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */
XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */
XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */
XML_PARSE_COMPACT = 1<<16,/* compact small text nodes; no modification of
the tree allowed afterwards (will possibly
crash if you try to modify the tree) */
XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */
XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */
XML_PARSE_HUGE = 1<<19, /* relax any hardcoded limit from the parser */
XML_PARSE_OLDSAX = 1<<20 /* parse using SAX2 interface from before 2.7.0 */
} xmlParserOption;
XMLPUBFUN void XMLCALL
xmlCtxtReset (xmlParserCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
xmlCtxtResetPush (xmlParserCtxtPtr ctxt,
const char *chunk,
int size,
const char *filename,
const char *encoding);
XMLPUBFUN int XMLCALL
xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
int options);
XMLPUBFUN xmlDocPtr XMLCALL
xmlReadDoc (const xmlChar *cur,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr XMLCALL
xmlReadFile (const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr XMLCALL
xmlReadMemory (const char *buffer,
int size,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr XMLCALL
xmlReadFd (int fd,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr XMLCALL
xmlReadIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr XMLCALL
xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
const xmlChar *cur,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr XMLCALL
xmlCtxtReadFile (xmlParserCtxtPtr ctxt,
const char *filename,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr XMLCALL
xmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
const char *buffer,
int size,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr XMLCALL
xmlCtxtReadFd (xmlParserCtxtPtr ctxt,
int fd,
const char *URL,
const char *encoding,
int options);
XMLPUBFUN xmlDocPtr XMLCALL
xmlCtxtReadIO (xmlParserCtxtPtr ctxt,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx,
const char *URL,
const char *encoding,
int options);
/*
* Library wide options
*/
/**
* xmlFeature:
*
* Used to examine the existance of features that can be enabled
* or disabled at compile-time.
* They used to be called XML_FEATURE_xxx but this clashed with Expat
*/
typedef enum {
XML_WITH_THREAD = 1,
XML_WITH_TREE = 2,
XML_WITH_OUTPUT = 3,
XML_WITH_PUSH = 4,
XML_WITH_READER = 5,
XML_WITH_PATTERN = 6,
XML_WITH_WRITER = 7,
XML_WITH_SAX1 = 8,
XML_WITH_FTP = 9,
XML_WITH_HTTP = 10,
XML_WITH_VALID = 11,
XML_WITH_HTML = 12,
XML_WITH_LEGACY = 13,
XML_WITH_C14N = 14,
XML_WITH_CATALOG = 15,
XML_WITH_XPATH = 16,
XML_WITH_XPTR = 17,
XML_WITH_XINCLUDE = 18,
XML_WITH_ICONV = 19,
XML_WITH_ISO8859X = 20,
XML_WITH_UNICODE = 21,
XML_WITH_REGEXP = 22,
XML_WITH_AUTOMATA = 23,
XML_WITH_EXPR = 24,
XML_WITH_SCHEMAS = 25,
XML_WITH_SCHEMATRON = 26,
XML_WITH_MODULES = 27,
XML_WITH_DEBUG = 28,
XML_WITH_DEBUG_MEM = 29,
XML_WITH_DEBUG_RUN = 30,
XML_WITH_ZLIB = 31,
XML_WITH_ICU = 32,
XML_WITH_NONE = 99999 /* just to be sure of allocation size */
} xmlFeature;
XMLPUBFUN int XMLCALL
xmlHasFeature (xmlFeature feature);
#ifdef __cplusplus
}
#endif
#endif /* __XML_PARSER_H__ */
| 39,578 | 31.021845 | 85 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/xmlregexp.h
|
/*
* Summary: regular expressions handling
* Description: basic API for libxml regular expressions handling used
* for XML Schemas and validation.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_REGEXP_H__
#define __XML_REGEXP_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_REGEXP_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlRegexpPtr:
*
* A libxml regular expression, they can actually be far more complex
* thank the POSIX regex expressions.
*/
typedef struct _xmlRegexp xmlRegexp;
typedef xmlRegexp *xmlRegexpPtr;
/**
* xmlRegExecCtxtPtr:
*
* A libxml progressive regular expression evaluation context
*/
typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
#ifdef __cplusplus
}
#endif
#include <libxml/tree.h>
#include <libxml/dict.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* The POSIX like API
*/
XMLPUBFUN xmlRegexpPtr XMLCALL
xmlRegexpCompile (const xmlChar *regexp);
XMLPUBFUN void XMLCALL xmlRegFreeRegexp(xmlRegexpPtr regexp);
XMLPUBFUN int XMLCALL
xmlRegexpExec (xmlRegexpPtr comp,
const xmlChar *value);
XMLPUBFUN void XMLCALL
xmlRegexpPrint (FILE *output,
xmlRegexpPtr regexp);
XMLPUBFUN int XMLCALL
xmlRegexpIsDeterminist(xmlRegexpPtr comp);
/**
* xmlRegExecCallbacks:
* @exec: the regular expression context
* @token: the current token string
* @transdata: transition data
* @inputdata: input data
*
* Callback function when doing a transition in the automata
*/
typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
const xmlChar *token,
void *transdata,
void *inputdata);
/*
* The progressive API
*/
XMLPUBFUN xmlRegExecCtxtPtr XMLCALL
xmlRegNewExecCtxt (xmlRegexpPtr comp,
xmlRegExecCallbacks callback,
void *data);
XMLPUBFUN void XMLCALL
xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
XMLPUBFUN int XMLCALL
xmlRegExecPushString(xmlRegExecCtxtPtr exec,
const xmlChar *value,
void *data);
XMLPUBFUN int XMLCALL
xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
const xmlChar *value,
const xmlChar *value2,
void *data);
XMLPUBFUN int XMLCALL
xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
int *nbval,
int *nbneg,
xmlChar **values,
int *terminal);
XMLPUBFUN int XMLCALL
xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
const xmlChar **string,
int *nbval,
int *nbneg,
xmlChar **values,
int *terminal);
#ifdef LIBXML_EXPR_ENABLED
/*
* Formal regular expression handling
* Its goal is to do some formal work on content models
*/
/* expressions are used within a context */
typedef struct _xmlExpCtxt xmlExpCtxt;
typedef xmlExpCtxt *xmlExpCtxtPtr;
XMLPUBFUN void XMLCALL
xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
XMLPUBFUN xmlExpCtxtPtr XMLCALL
xmlExpNewCtxt (int maxNodes,
xmlDictPtr dict);
XMLPUBFUN int XMLCALL
xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt);
/* Expressions are trees but the tree is opaque */
typedef struct _xmlExpNode xmlExpNode;
typedef xmlExpNode *xmlExpNodePtr;
typedef enum {
XML_EXP_EMPTY = 0,
XML_EXP_FORBID = 1,
XML_EXP_ATOM = 2,
XML_EXP_SEQ = 3,
XML_EXP_OR = 4,
XML_EXP_COUNT = 5
} xmlExpNodeType;
/*
* 2 core expressions shared by all for the empty language set
* and for the set with just the empty token
*/
XMLPUBVAR xmlExpNodePtr forbiddenExp;
XMLPUBVAR xmlExpNodePtr emptyExp;
/*
* Expressions are reference counted internally
*/
XMLPUBFUN void XMLCALL
xmlExpFree (xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr);
XMLPUBFUN void XMLCALL
xmlExpRef (xmlExpNodePtr expr);
/*
* constructors can be either manual or from a string
*/
XMLPUBFUN xmlExpNodePtr XMLCALL
xmlExpParse (xmlExpCtxtPtr ctxt,
const char *expr);
XMLPUBFUN xmlExpNodePtr XMLCALL
xmlExpNewAtom (xmlExpCtxtPtr ctxt,
const xmlChar *name,
int len);
XMLPUBFUN xmlExpNodePtr XMLCALL
xmlExpNewOr (xmlExpCtxtPtr ctxt,
xmlExpNodePtr left,
xmlExpNodePtr right);
XMLPUBFUN xmlExpNodePtr XMLCALL
xmlExpNewSeq (xmlExpCtxtPtr ctxt,
xmlExpNodePtr left,
xmlExpNodePtr right);
XMLPUBFUN xmlExpNodePtr XMLCALL
xmlExpNewRange (xmlExpCtxtPtr ctxt,
xmlExpNodePtr subset,
int min,
int max);
/*
* The really interesting APIs
*/
XMLPUBFUN int XMLCALL
xmlExpIsNillable(xmlExpNodePtr expr);
XMLPUBFUN int XMLCALL
xmlExpMaxToken (xmlExpNodePtr expr);
XMLPUBFUN int XMLCALL
xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr,
const xmlChar**langList,
int len);
XMLPUBFUN int XMLCALL
xmlExpGetStart (xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr,
const xmlChar**tokList,
int len);
XMLPUBFUN xmlExpNodePtr XMLCALL
xmlExpStringDerive(xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr,
const xmlChar *str,
int len);
XMLPUBFUN xmlExpNodePtr XMLCALL
xmlExpExpDerive (xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr,
xmlExpNodePtr sub);
XMLPUBFUN int XMLCALL
xmlExpSubsume (xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr,
xmlExpNodePtr sub);
XMLPUBFUN void XMLCALL
xmlExpDump (xmlBufferPtr buf,
xmlExpNodePtr expr);
#endif /* LIBXML_EXPR_ENABLED */
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_REGEXP_ENABLED */
#endif /*__XML_REGEXP_H__ */
| 5,458 | 23.479821 | 70 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/xmlerror.h
|
/*
* Summary: error handling
* Description: the API used to report errors
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#include <libxml/parser.h>
#ifndef __XML_ERROR_H__
#define __XML_ERROR_H__
#ifdef __cplusplus
extern "C" {
#endif
/**
* xmlErrorLevel:
*
* Indicates the level of an error
*/
typedef enum {
XML_ERR_NONE = 0,
XML_ERR_WARNING = 1, /* A simple warning */
XML_ERR_ERROR = 2, /* A recoverable error */
XML_ERR_FATAL = 3 /* A fatal error */
} xmlErrorLevel;
/**
* xmlErrorDomain:
*
* Indicates where an error may have come from
*/
typedef enum {
XML_FROM_NONE = 0,
XML_FROM_PARSER, /* The XML parser */
XML_FROM_TREE, /* The tree module */
XML_FROM_NAMESPACE, /* The XML Namespace module */
XML_FROM_DTD, /* The XML DTD validation with parser context*/
XML_FROM_HTML, /* The HTML parser */
XML_FROM_MEMORY, /* The memory allocator */
XML_FROM_OUTPUT, /* The serialization code */
XML_FROM_IO, /* The Input/Output stack */
XML_FROM_FTP, /* The FTP module */
XML_FROM_HTTP, /* The HTTP module */
XML_FROM_XINCLUDE, /* The XInclude processing */
XML_FROM_XPATH, /* The XPath module */
XML_FROM_XPOINTER, /* The XPointer module */
XML_FROM_REGEXP, /* The regular expressions module */
XML_FROM_DATATYPE, /* The W3C XML Schemas Datatype module */
XML_FROM_SCHEMASP, /* The W3C XML Schemas parser module */
XML_FROM_SCHEMASV, /* The W3C XML Schemas validation module */
XML_FROM_RELAXNGP, /* The Relax-NG parser module */
XML_FROM_RELAXNGV, /* The Relax-NG validator module */
XML_FROM_CATALOG, /* The Catalog module */
XML_FROM_C14N, /* The Canonicalization module */
XML_FROM_XSLT, /* The XSLT engine from libxslt */
XML_FROM_VALID, /* The XML DTD validation with valid context */
XML_FROM_CHECK, /* The error checking module */
XML_FROM_WRITER, /* The xmlwriter module */
XML_FROM_MODULE, /* The dynamically loaded module module*/
XML_FROM_I18N, /* The module handling character conversion */
XML_FROM_SCHEMATRONV /* The Schematron validator module */
} xmlErrorDomain;
/**
* xmlError:
*
* An XML Error instance.
*/
typedef struct _xmlError xmlError;
typedef xmlError *xmlErrorPtr;
struct _xmlError {
int domain; /* What part of the library raised this error */
int code; /* The error code, e.g. an xmlParserError */
char *message;/* human-readable informative error message */
xmlErrorLevel level;/* how consequent is the error */
char *file; /* the filename */
int line; /* the line number if available */
char *str1; /* extra string information */
char *str2; /* extra string information */
char *str3; /* extra string information */
int int1; /* extra number information */
int int2; /* column number of the error or 0 if N/A (todo: rename this field when we would break ABI) */
void *ctxt; /* the parser context if available */
void *node; /* the node in the tree */
};
/**
* xmlParserError:
*
* This is an error that the XML (or HTML) parser can generate
*/
typedef enum {
XML_ERR_OK = 0,
XML_ERR_INTERNAL_ERROR, /* 1 */
XML_ERR_NO_MEMORY, /* 2 */
XML_ERR_DOCUMENT_START, /* 3 */
XML_ERR_DOCUMENT_EMPTY, /* 4 */
XML_ERR_DOCUMENT_END, /* 5 */
XML_ERR_INVALID_HEX_CHARREF, /* 6 */
XML_ERR_INVALID_DEC_CHARREF, /* 7 */
XML_ERR_INVALID_CHARREF, /* 8 */
XML_ERR_INVALID_CHAR, /* 9 */
XML_ERR_CHARREF_AT_EOF, /* 10 */
XML_ERR_CHARREF_IN_PROLOG, /* 11 */
XML_ERR_CHARREF_IN_EPILOG, /* 12 */
XML_ERR_CHARREF_IN_DTD, /* 13 */
XML_ERR_ENTITYREF_AT_EOF, /* 14 */
XML_ERR_ENTITYREF_IN_PROLOG, /* 15 */
XML_ERR_ENTITYREF_IN_EPILOG, /* 16 */
XML_ERR_ENTITYREF_IN_DTD, /* 17 */
XML_ERR_PEREF_AT_EOF, /* 18 */
XML_ERR_PEREF_IN_PROLOG, /* 19 */
XML_ERR_PEREF_IN_EPILOG, /* 20 */
XML_ERR_PEREF_IN_INT_SUBSET, /* 21 */
XML_ERR_ENTITYREF_NO_NAME, /* 22 */
XML_ERR_ENTITYREF_SEMICOL_MISSING, /* 23 */
XML_ERR_PEREF_NO_NAME, /* 24 */
XML_ERR_PEREF_SEMICOL_MISSING, /* 25 */
XML_ERR_UNDECLARED_ENTITY, /* 26 */
XML_WAR_UNDECLARED_ENTITY, /* 27 */
XML_ERR_UNPARSED_ENTITY, /* 28 */
XML_ERR_ENTITY_IS_EXTERNAL, /* 29 */
XML_ERR_ENTITY_IS_PARAMETER, /* 30 */
XML_ERR_UNKNOWN_ENCODING, /* 31 */
XML_ERR_UNSUPPORTED_ENCODING, /* 32 */
XML_ERR_STRING_NOT_STARTED, /* 33 */
XML_ERR_STRING_NOT_CLOSED, /* 34 */
XML_ERR_NS_DECL_ERROR, /* 35 */
XML_ERR_ENTITY_NOT_STARTED, /* 36 */
XML_ERR_ENTITY_NOT_FINISHED, /* 37 */
XML_ERR_LT_IN_ATTRIBUTE, /* 38 */
XML_ERR_ATTRIBUTE_NOT_STARTED, /* 39 */
XML_ERR_ATTRIBUTE_NOT_FINISHED, /* 40 */
XML_ERR_ATTRIBUTE_WITHOUT_VALUE, /* 41 */
XML_ERR_ATTRIBUTE_REDEFINED, /* 42 */
XML_ERR_LITERAL_NOT_STARTED, /* 43 */
XML_ERR_LITERAL_NOT_FINISHED, /* 44 */
XML_ERR_COMMENT_NOT_FINISHED, /* 45 */
XML_ERR_PI_NOT_STARTED, /* 46 */
XML_ERR_PI_NOT_FINISHED, /* 47 */
XML_ERR_NOTATION_NOT_STARTED, /* 48 */
XML_ERR_NOTATION_NOT_FINISHED, /* 49 */
XML_ERR_ATTLIST_NOT_STARTED, /* 50 */
XML_ERR_ATTLIST_NOT_FINISHED, /* 51 */
XML_ERR_MIXED_NOT_STARTED, /* 52 */
XML_ERR_MIXED_NOT_FINISHED, /* 53 */
XML_ERR_ELEMCONTENT_NOT_STARTED, /* 54 */
XML_ERR_ELEMCONTENT_NOT_FINISHED, /* 55 */
XML_ERR_XMLDECL_NOT_STARTED, /* 56 */
XML_ERR_XMLDECL_NOT_FINISHED, /* 57 */
XML_ERR_CONDSEC_NOT_STARTED, /* 58 */
XML_ERR_CONDSEC_NOT_FINISHED, /* 59 */
XML_ERR_EXT_SUBSET_NOT_FINISHED, /* 60 */
XML_ERR_DOCTYPE_NOT_FINISHED, /* 61 */
XML_ERR_MISPLACED_CDATA_END, /* 62 */
XML_ERR_CDATA_NOT_FINISHED, /* 63 */
XML_ERR_RESERVED_XML_NAME, /* 64 */
XML_ERR_SPACE_REQUIRED, /* 65 */
XML_ERR_SEPARATOR_REQUIRED, /* 66 */
XML_ERR_NMTOKEN_REQUIRED, /* 67 */
XML_ERR_NAME_REQUIRED, /* 68 */
XML_ERR_PCDATA_REQUIRED, /* 69 */
XML_ERR_URI_REQUIRED, /* 70 */
XML_ERR_PUBID_REQUIRED, /* 71 */
XML_ERR_LT_REQUIRED, /* 72 */
XML_ERR_GT_REQUIRED, /* 73 */
XML_ERR_LTSLASH_REQUIRED, /* 74 */
XML_ERR_EQUAL_REQUIRED, /* 75 */
XML_ERR_TAG_NAME_MISMATCH, /* 76 */
XML_ERR_TAG_NOT_FINISHED, /* 77 */
XML_ERR_STANDALONE_VALUE, /* 78 */
XML_ERR_ENCODING_NAME, /* 79 */
XML_ERR_HYPHEN_IN_COMMENT, /* 80 */
XML_ERR_INVALID_ENCODING, /* 81 */
XML_ERR_EXT_ENTITY_STANDALONE, /* 82 */
XML_ERR_CONDSEC_INVALID, /* 83 */
XML_ERR_VALUE_REQUIRED, /* 84 */
XML_ERR_NOT_WELL_BALANCED, /* 85 */
XML_ERR_EXTRA_CONTENT, /* 86 */
XML_ERR_ENTITY_CHAR_ERROR, /* 87 */
XML_ERR_ENTITY_PE_INTERNAL, /* 88 */
XML_ERR_ENTITY_LOOP, /* 89 */
XML_ERR_ENTITY_BOUNDARY, /* 90 */
XML_ERR_INVALID_URI, /* 91 */
XML_ERR_URI_FRAGMENT, /* 92 */
XML_WAR_CATALOG_PI, /* 93 */
XML_ERR_NO_DTD, /* 94 */
XML_ERR_CONDSEC_INVALID_KEYWORD, /* 95 */
XML_ERR_VERSION_MISSING, /* 96 */
XML_WAR_UNKNOWN_VERSION, /* 97 */
XML_WAR_LANG_VALUE, /* 98 */
XML_WAR_NS_URI, /* 99 */
XML_WAR_NS_URI_RELATIVE, /* 100 */
XML_ERR_MISSING_ENCODING, /* 101 */
XML_WAR_SPACE_VALUE, /* 102 */
XML_ERR_NOT_STANDALONE, /* 103 */
XML_ERR_ENTITY_PROCESSING, /* 104 */
XML_ERR_NOTATION_PROCESSING, /* 105 */
XML_WAR_NS_COLUMN, /* 106 */
XML_WAR_ENTITY_REDEFINED, /* 107 */
XML_ERR_UNKNOWN_VERSION, /* 108 */
XML_ERR_VERSION_MISMATCH, /* 109 */
XML_NS_ERR_XML_NAMESPACE = 200,
XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */
XML_NS_ERR_QNAME, /* 202 */
XML_NS_ERR_ATTRIBUTE_REDEFINED, /* 203 */
XML_NS_ERR_EMPTY, /* 204 */
XML_NS_ERR_COLON, /* 205 */
XML_DTD_ATTRIBUTE_DEFAULT = 500,
XML_DTD_ATTRIBUTE_REDEFINED, /* 501 */
XML_DTD_ATTRIBUTE_VALUE, /* 502 */
XML_DTD_CONTENT_ERROR, /* 503 */
XML_DTD_CONTENT_MODEL, /* 504 */
XML_DTD_CONTENT_NOT_DETERMINIST, /* 505 */
XML_DTD_DIFFERENT_PREFIX, /* 506 */
XML_DTD_ELEM_DEFAULT_NAMESPACE, /* 507 */
XML_DTD_ELEM_NAMESPACE, /* 508 */
XML_DTD_ELEM_REDEFINED, /* 509 */
XML_DTD_EMPTY_NOTATION, /* 510 */
XML_DTD_ENTITY_TYPE, /* 511 */
XML_DTD_ID_FIXED, /* 512 */
XML_DTD_ID_REDEFINED, /* 513 */
XML_DTD_ID_SUBSET, /* 514 */
XML_DTD_INVALID_CHILD, /* 515 */
XML_DTD_INVALID_DEFAULT, /* 516 */
XML_DTD_LOAD_ERROR, /* 517 */
XML_DTD_MISSING_ATTRIBUTE, /* 518 */
XML_DTD_MIXED_CORRUPT, /* 519 */
XML_DTD_MULTIPLE_ID, /* 520 */
XML_DTD_NO_DOC, /* 521 */
XML_DTD_NO_DTD, /* 522 */
XML_DTD_NO_ELEM_NAME, /* 523 */
XML_DTD_NO_PREFIX, /* 524 */
XML_DTD_NO_ROOT, /* 525 */
XML_DTD_NOTATION_REDEFINED, /* 526 */
XML_DTD_NOTATION_VALUE, /* 527 */
XML_DTD_NOT_EMPTY, /* 528 */
XML_DTD_NOT_PCDATA, /* 529 */
XML_DTD_NOT_STANDALONE, /* 530 */
XML_DTD_ROOT_NAME, /* 531 */
XML_DTD_STANDALONE_WHITE_SPACE, /* 532 */
XML_DTD_UNKNOWN_ATTRIBUTE, /* 533 */
XML_DTD_UNKNOWN_ELEM, /* 534 */
XML_DTD_UNKNOWN_ENTITY, /* 535 */
XML_DTD_UNKNOWN_ID, /* 536 */
XML_DTD_UNKNOWN_NOTATION, /* 537 */
XML_DTD_STANDALONE_DEFAULTED, /* 538 */
XML_DTD_XMLID_VALUE, /* 539 */
XML_DTD_XMLID_TYPE, /* 540 */
XML_DTD_DUP_TOKEN, /* 541 */
XML_HTML_STRUCURE_ERROR = 800,
XML_HTML_UNKNOWN_TAG, /* 801 */
XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000,
XML_RNGP_ATTR_CONFLICT, /* 1001 */
XML_RNGP_ATTRIBUTE_CHILDREN, /* 1002 */
XML_RNGP_ATTRIBUTE_CONTENT, /* 1003 */
XML_RNGP_ATTRIBUTE_EMPTY, /* 1004 */
XML_RNGP_ATTRIBUTE_NOOP, /* 1005 */
XML_RNGP_CHOICE_CONTENT, /* 1006 */
XML_RNGP_CHOICE_EMPTY, /* 1007 */
XML_RNGP_CREATE_FAILURE, /* 1008 */
XML_RNGP_DATA_CONTENT, /* 1009 */
XML_RNGP_DEF_CHOICE_AND_INTERLEAVE, /* 1010 */
XML_RNGP_DEFINE_CREATE_FAILED, /* 1011 */
XML_RNGP_DEFINE_EMPTY, /* 1012 */
XML_RNGP_DEFINE_MISSING, /* 1013 */
XML_RNGP_DEFINE_NAME_MISSING, /* 1014 */
XML_RNGP_ELEM_CONTENT_EMPTY, /* 1015 */
XML_RNGP_ELEM_CONTENT_ERROR, /* 1016 */
XML_RNGP_ELEMENT_EMPTY, /* 1017 */
XML_RNGP_ELEMENT_CONTENT, /* 1018 */
XML_RNGP_ELEMENT_NAME, /* 1019 */
XML_RNGP_ELEMENT_NO_CONTENT, /* 1020 */
XML_RNGP_ELEM_TEXT_CONFLICT, /* 1021 */
XML_RNGP_EMPTY, /* 1022 */
XML_RNGP_EMPTY_CONSTRUCT, /* 1023 */
XML_RNGP_EMPTY_CONTENT, /* 1024 */
XML_RNGP_EMPTY_NOT_EMPTY, /* 1025 */
XML_RNGP_ERROR_TYPE_LIB, /* 1026 */
XML_RNGP_EXCEPT_EMPTY, /* 1027 */
XML_RNGP_EXCEPT_MISSING, /* 1028 */
XML_RNGP_EXCEPT_MULTIPLE, /* 1029 */
XML_RNGP_EXCEPT_NO_CONTENT, /* 1030 */
XML_RNGP_EXTERNALREF_EMTPY, /* 1031 */
XML_RNGP_EXTERNAL_REF_FAILURE, /* 1032 */
XML_RNGP_EXTERNALREF_RECURSE, /* 1033 */
XML_RNGP_FORBIDDEN_ATTRIBUTE, /* 1034 */
XML_RNGP_FOREIGN_ELEMENT, /* 1035 */
XML_RNGP_GRAMMAR_CONTENT, /* 1036 */
XML_RNGP_GRAMMAR_EMPTY, /* 1037 */
XML_RNGP_GRAMMAR_MISSING, /* 1038 */
XML_RNGP_GRAMMAR_NO_START, /* 1039 */
XML_RNGP_GROUP_ATTR_CONFLICT, /* 1040 */
XML_RNGP_HREF_ERROR, /* 1041 */
XML_RNGP_INCLUDE_EMPTY, /* 1042 */
XML_RNGP_INCLUDE_FAILURE, /* 1043 */
XML_RNGP_INCLUDE_RECURSE, /* 1044 */
XML_RNGP_INTERLEAVE_ADD, /* 1045 */
XML_RNGP_INTERLEAVE_CREATE_FAILED, /* 1046 */
XML_RNGP_INTERLEAVE_EMPTY, /* 1047 */
XML_RNGP_INTERLEAVE_NO_CONTENT, /* 1048 */
XML_RNGP_INVALID_DEFINE_NAME, /* 1049 */
XML_RNGP_INVALID_URI, /* 1050 */
XML_RNGP_INVALID_VALUE, /* 1051 */
XML_RNGP_MISSING_HREF, /* 1052 */
XML_RNGP_NAME_MISSING, /* 1053 */
XML_RNGP_NEED_COMBINE, /* 1054 */
XML_RNGP_NOTALLOWED_NOT_EMPTY, /* 1055 */
XML_RNGP_NSNAME_ATTR_ANCESTOR, /* 1056 */
XML_RNGP_NSNAME_NO_NS, /* 1057 */
XML_RNGP_PARAM_FORBIDDEN, /* 1058 */
XML_RNGP_PARAM_NAME_MISSING, /* 1059 */
XML_RNGP_PARENTREF_CREATE_FAILED, /* 1060 */
XML_RNGP_PARENTREF_NAME_INVALID, /* 1061 */
XML_RNGP_PARENTREF_NO_NAME, /* 1062 */
XML_RNGP_PARENTREF_NO_PARENT, /* 1063 */
XML_RNGP_PARENTREF_NOT_EMPTY, /* 1064 */
XML_RNGP_PARSE_ERROR, /* 1065 */
XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME, /* 1066 */
XML_RNGP_PAT_ATTR_ATTR, /* 1067 */
XML_RNGP_PAT_ATTR_ELEM, /* 1068 */
XML_RNGP_PAT_DATA_EXCEPT_ATTR, /* 1069 */
XML_RNGP_PAT_DATA_EXCEPT_ELEM, /* 1070 */
XML_RNGP_PAT_DATA_EXCEPT_EMPTY, /* 1071 */
XML_RNGP_PAT_DATA_EXCEPT_GROUP, /* 1072 */
XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE, /* 1073 */
XML_RNGP_PAT_DATA_EXCEPT_LIST, /* 1074 */
XML_RNGP_PAT_DATA_EXCEPT_ONEMORE, /* 1075 */
XML_RNGP_PAT_DATA_EXCEPT_REF, /* 1076 */
XML_RNGP_PAT_DATA_EXCEPT_TEXT, /* 1077 */
XML_RNGP_PAT_LIST_ATTR, /* 1078 */
XML_RNGP_PAT_LIST_ELEM, /* 1079 */
XML_RNGP_PAT_LIST_INTERLEAVE, /* 1080 */
XML_RNGP_PAT_LIST_LIST, /* 1081 */
XML_RNGP_PAT_LIST_REF, /* 1082 */
XML_RNGP_PAT_LIST_TEXT, /* 1083 */
XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME, /* 1084 */
XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME, /* 1085 */
XML_RNGP_PAT_ONEMORE_GROUP_ATTR, /* 1086 */
XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR, /* 1087 */
XML_RNGP_PAT_START_ATTR, /* 1088 */
XML_RNGP_PAT_START_DATA, /* 1089 */
XML_RNGP_PAT_START_EMPTY, /* 1090 */
XML_RNGP_PAT_START_GROUP, /* 1091 */
XML_RNGP_PAT_START_INTERLEAVE, /* 1092 */
XML_RNGP_PAT_START_LIST, /* 1093 */
XML_RNGP_PAT_START_ONEMORE, /* 1094 */
XML_RNGP_PAT_START_TEXT, /* 1095 */
XML_RNGP_PAT_START_VALUE, /* 1096 */
XML_RNGP_PREFIX_UNDEFINED, /* 1097 */
XML_RNGP_REF_CREATE_FAILED, /* 1098 */
XML_RNGP_REF_CYCLE, /* 1099 */
XML_RNGP_REF_NAME_INVALID, /* 1100 */
XML_RNGP_REF_NO_DEF, /* 1101 */
XML_RNGP_REF_NO_NAME, /* 1102 */
XML_RNGP_REF_NOT_EMPTY, /* 1103 */
XML_RNGP_START_CHOICE_AND_INTERLEAVE, /* 1104 */
XML_RNGP_START_CONTENT, /* 1105 */
XML_RNGP_START_EMPTY, /* 1106 */
XML_RNGP_START_MISSING, /* 1107 */
XML_RNGP_TEXT_EXPECTED, /* 1108 */
XML_RNGP_TEXT_HAS_CHILD, /* 1109 */
XML_RNGP_TYPE_MISSING, /* 1110 */
XML_RNGP_TYPE_NOT_FOUND, /* 1111 */
XML_RNGP_TYPE_VALUE, /* 1112 */
XML_RNGP_UNKNOWN_ATTRIBUTE, /* 1113 */
XML_RNGP_UNKNOWN_COMBINE, /* 1114 */
XML_RNGP_UNKNOWN_CONSTRUCT, /* 1115 */
XML_RNGP_UNKNOWN_TYPE_LIB, /* 1116 */
XML_RNGP_URI_FRAGMENT, /* 1117 */
XML_RNGP_URI_NOT_ABSOLUTE, /* 1118 */
XML_RNGP_VALUE_EMPTY, /* 1119 */
XML_RNGP_VALUE_NO_CONTENT, /* 1120 */
XML_RNGP_XMLNS_NAME, /* 1121 */
XML_RNGP_XML_NS, /* 1122 */
XML_XPATH_EXPRESSION_OK = 1200,
XML_XPATH_NUMBER_ERROR, /* 1201 */
XML_XPATH_UNFINISHED_LITERAL_ERROR, /* 1202 */
XML_XPATH_START_LITERAL_ERROR, /* 1203 */
XML_XPATH_VARIABLE_REF_ERROR, /* 1204 */
XML_XPATH_UNDEF_VARIABLE_ERROR, /* 1205 */
XML_XPATH_INVALID_PREDICATE_ERROR, /* 1206 */
XML_XPATH_EXPR_ERROR, /* 1207 */
XML_XPATH_UNCLOSED_ERROR, /* 1208 */
XML_XPATH_UNKNOWN_FUNC_ERROR, /* 1209 */
XML_XPATH_INVALID_OPERAND, /* 1210 */
XML_XPATH_INVALID_TYPE, /* 1211 */
XML_XPATH_INVALID_ARITY, /* 1212 */
XML_XPATH_INVALID_CTXT_SIZE, /* 1213 */
XML_XPATH_INVALID_CTXT_POSITION, /* 1214 */
XML_XPATH_MEMORY_ERROR, /* 1215 */
XML_XPTR_SYNTAX_ERROR, /* 1216 */
XML_XPTR_RESOURCE_ERROR, /* 1217 */
XML_XPTR_SUB_RESOURCE_ERROR, /* 1218 */
XML_XPATH_UNDEF_PREFIX_ERROR, /* 1219 */
XML_XPATH_ENCODING_ERROR, /* 1220 */
XML_XPATH_INVALID_CHAR_ERROR, /* 1221 */
XML_TREE_INVALID_HEX = 1300,
XML_TREE_INVALID_DEC, /* 1301 */
XML_TREE_UNTERMINATED_ENTITY, /* 1302 */
XML_TREE_NOT_UTF8, /* 1303 */
XML_SAVE_NOT_UTF8 = 1400,
XML_SAVE_CHAR_INVALID, /* 1401 */
XML_SAVE_NO_DOCTYPE, /* 1402 */
XML_SAVE_UNKNOWN_ENCODING, /* 1403 */
XML_REGEXP_COMPILE_ERROR = 1450,
XML_IO_UNKNOWN = 1500,
XML_IO_EACCES, /* 1501 */
XML_IO_EAGAIN, /* 1502 */
XML_IO_EBADF, /* 1503 */
XML_IO_EBADMSG, /* 1504 */
XML_IO_EBUSY, /* 1505 */
XML_IO_ECANCELED, /* 1506 */
XML_IO_ECHILD, /* 1507 */
XML_IO_EDEADLK, /* 1508 */
XML_IO_EDOM, /* 1509 */
XML_IO_EEXIST, /* 1510 */
XML_IO_EFAULT, /* 1511 */
XML_IO_EFBIG, /* 1512 */
XML_IO_EINPROGRESS, /* 1513 */
XML_IO_EINTR, /* 1514 */
XML_IO_EINVAL, /* 1515 */
XML_IO_EIO, /* 1516 */
XML_IO_EISDIR, /* 1517 */
XML_IO_EMFILE, /* 1518 */
XML_IO_EMLINK, /* 1519 */
XML_IO_EMSGSIZE, /* 1520 */
XML_IO_ENAMETOOLONG, /* 1521 */
XML_IO_ENFILE, /* 1522 */
XML_IO_ENODEV, /* 1523 */
XML_IO_ENOENT, /* 1524 */
XML_IO_ENOEXEC, /* 1525 */
XML_IO_ENOLCK, /* 1526 */
XML_IO_ENOMEM, /* 1527 */
XML_IO_ENOSPC, /* 1528 */
XML_IO_ENOSYS, /* 1529 */
XML_IO_ENOTDIR, /* 1530 */
XML_IO_ENOTEMPTY, /* 1531 */
XML_IO_ENOTSUP, /* 1532 */
XML_IO_ENOTTY, /* 1533 */
XML_IO_ENXIO, /* 1534 */
XML_IO_EPERM, /* 1535 */
XML_IO_EPIPE, /* 1536 */
XML_IO_ERANGE, /* 1537 */
XML_IO_EROFS, /* 1538 */
XML_IO_ESPIPE, /* 1539 */
XML_IO_ESRCH, /* 1540 */
XML_IO_ETIMEDOUT, /* 1541 */
XML_IO_EXDEV, /* 1542 */
XML_IO_NETWORK_ATTEMPT, /* 1543 */
XML_IO_ENCODER, /* 1544 */
XML_IO_FLUSH, /* 1545 */
XML_IO_WRITE, /* 1546 */
XML_IO_NO_INPUT, /* 1547 */
XML_IO_BUFFER_FULL, /* 1548 */
XML_IO_LOAD_ERROR, /* 1549 */
XML_IO_ENOTSOCK, /* 1550 */
XML_IO_EISCONN, /* 1551 */
XML_IO_ECONNREFUSED, /* 1552 */
XML_IO_ENETUNREACH, /* 1553 */
XML_IO_EADDRINUSE, /* 1554 */
XML_IO_EALREADY, /* 1555 */
XML_IO_EAFNOSUPPORT, /* 1556 */
XML_XINCLUDE_RECURSION=1600,
XML_XINCLUDE_PARSE_VALUE, /* 1601 */
XML_XINCLUDE_ENTITY_DEF_MISMATCH, /* 1602 */
XML_XINCLUDE_NO_HREF, /* 1603 */
XML_XINCLUDE_NO_FALLBACK, /* 1604 */
XML_XINCLUDE_HREF_URI, /* 1605 */
XML_XINCLUDE_TEXT_FRAGMENT, /* 1606 */
XML_XINCLUDE_TEXT_DOCUMENT, /* 1607 */
XML_XINCLUDE_INVALID_CHAR, /* 1608 */
XML_XINCLUDE_BUILD_FAILED, /* 1609 */
XML_XINCLUDE_UNKNOWN_ENCODING, /* 1610 */
XML_XINCLUDE_MULTIPLE_ROOT, /* 1611 */
XML_XINCLUDE_XPTR_FAILED, /* 1612 */
XML_XINCLUDE_XPTR_RESULT, /* 1613 */
XML_XINCLUDE_INCLUDE_IN_INCLUDE, /* 1614 */
XML_XINCLUDE_FALLBACKS_IN_INCLUDE, /* 1615 */
XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE, /* 1616 */
XML_XINCLUDE_DEPRECATED_NS, /* 1617 */
XML_XINCLUDE_FRAGMENT_ID, /* 1618 */
XML_CATALOG_MISSING_ATTR = 1650,
XML_CATALOG_ENTRY_BROKEN, /* 1651 */
XML_CATALOG_PREFER_VALUE, /* 1652 */
XML_CATALOG_NOT_CATALOG, /* 1653 */
XML_CATALOG_RECURSION, /* 1654 */
XML_SCHEMAP_PREFIX_UNDEFINED = 1700,
XML_SCHEMAP_ATTRFORMDEFAULT_VALUE, /* 1701 */
XML_SCHEMAP_ATTRGRP_NONAME_NOREF, /* 1702 */
XML_SCHEMAP_ATTR_NONAME_NOREF, /* 1703 */
XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF, /* 1704 */
XML_SCHEMAP_ELEMFORMDEFAULT_VALUE, /* 1705 */
XML_SCHEMAP_ELEM_NONAME_NOREF, /* 1706 */
XML_SCHEMAP_EXTENSION_NO_BASE, /* 1707 */
XML_SCHEMAP_FACET_NO_VALUE, /* 1708 */
XML_SCHEMAP_FAILED_BUILD_IMPORT, /* 1709 */
XML_SCHEMAP_GROUP_NONAME_NOREF, /* 1710 */
XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI, /* 1711 */
XML_SCHEMAP_IMPORT_REDEFINE_NSNAME, /* 1712 */
XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI, /* 1713 */
XML_SCHEMAP_INVALID_BOOLEAN, /* 1714 */
XML_SCHEMAP_INVALID_ENUM, /* 1715 */
XML_SCHEMAP_INVALID_FACET, /* 1716 */
XML_SCHEMAP_INVALID_FACET_VALUE, /* 1717 */
XML_SCHEMAP_INVALID_MAXOCCURS, /* 1718 */
XML_SCHEMAP_INVALID_MINOCCURS, /* 1719 */
XML_SCHEMAP_INVALID_REF_AND_SUBTYPE, /* 1720 */
XML_SCHEMAP_INVALID_WHITE_SPACE, /* 1721 */
XML_SCHEMAP_NOATTR_NOREF, /* 1722 */
XML_SCHEMAP_NOTATION_NO_NAME, /* 1723 */
XML_SCHEMAP_NOTYPE_NOREF, /* 1724 */
XML_SCHEMAP_REF_AND_SUBTYPE, /* 1725 */
XML_SCHEMAP_RESTRICTION_NONAME_NOREF, /* 1726 */
XML_SCHEMAP_SIMPLETYPE_NONAME, /* 1727 */
XML_SCHEMAP_TYPE_AND_SUBTYPE, /* 1728 */
XML_SCHEMAP_UNKNOWN_ALL_CHILD, /* 1729 */
XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD, /* 1730 */
XML_SCHEMAP_UNKNOWN_ATTR_CHILD, /* 1731 */
XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD, /* 1732 */
XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP, /* 1733 */
XML_SCHEMAP_UNKNOWN_BASE_TYPE, /* 1734 */
XML_SCHEMAP_UNKNOWN_CHOICE_CHILD, /* 1735 */
XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD, /* 1736 */
XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD, /* 1737 */
XML_SCHEMAP_UNKNOWN_ELEM_CHILD, /* 1738 */
XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD, /* 1739 */
XML_SCHEMAP_UNKNOWN_FACET_CHILD, /* 1740 */
XML_SCHEMAP_UNKNOWN_FACET_TYPE, /* 1741 */
XML_SCHEMAP_UNKNOWN_GROUP_CHILD, /* 1742 */
XML_SCHEMAP_UNKNOWN_IMPORT_CHILD, /* 1743 */
XML_SCHEMAP_UNKNOWN_LIST_CHILD, /* 1744 */
XML_SCHEMAP_UNKNOWN_NOTATION_CHILD, /* 1745 */
XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD, /* 1746 */
XML_SCHEMAP_UNKNOWN_REF, /* 1747 */
XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD, /* 1748 */
XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD, /* 1749 */
XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD, /* 1750 */
XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD, /* 1751 */
XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD, /* 1752 */
XML_SCHEMAP_UNKNOWN_TYPE, /* 1753 */
XML_SCHEMAP_UNKNOWN_UNION_CHILD, /* 1754 */
XML_SCHEMAP_ELEM_DEFAULT_FIXED, /* 1755 */
XML_SCHEMAP_REGEXP_INVALID, /* 1756 */
XML_SCHEMAP_FAILED_LOAD, /* 1757 */
XML_SCHEMAP_NOTHING_TO_PARSE, /* 1758 */
XML_SCHEMAP_NOROOT, /* 1759 */
XML_SCHEMAP_REDEFINED_GROUP, /* 1760 */
XML_SCHEMAP_REDEFINED_TYPE, /* 1761 */
XML_SCHEMAP_REDEFINED_ELEMENT, /* 1762 */
XML_SCHEMAP_REDEFINED_ATTRGROUP, /* 1763 */
XML_SCHEMAP_REDEFINED_ATTR, /* 1764 */
XML_SCHEMAP_REDEFINED_NOTATION, /* 1765 */
XML_SCHEMAP_FAILED_PARSE, /* 1766 */
XML_SCHEMAP_UNKNOWN_PREFIX, /* 1767 */
XML_SCHEMAP_DEF_AND_PREFIX, /* 1768 */
XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD, /* 1769 */
XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI, /* 1770 */
XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI, /* 1771 */
XML_SCHEMAP_NOT_SCHEMA, /* 1772 */
XML_SCHEMAP_UNKNOWN_MEMBER_TYPE, /* 1773 */
XML_SCHEMAP_INVALID_ATTR_USE, /* 1774 */
XML_SCHEMAP_RECURSIVE, /* 1775 */
XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE, /* 1776 */
XML_SCHEMAP_INVALID_ATTR_COMBINATION, /* 1777 */
XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION, /* 1778 */
XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD, /* 1779 */
XML_SCHEMAP_INVALID_ATTR_NAME, /* 1780 */
XML_SCHEMAP_REF_AND_CONTENT, /* 1781 */
XML_SCHEMAP_CT_PROPS_CORRECT_1, /* 1782 */
XML_SCHEMAP_CT_PROPS_CORRECT_2, /* 1783 */
XML_SCHEMAP_CT_PROPS_CORRECT_3, /* 1784 */
XML_SCHEMAP_CT_PROPS_CORRECT_4, /* 1785 */
XML_SCHEMAP_CT_PROPS_CORRECT_5, /* 1786 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, /* 1787 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, /* 1788 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, /* 1789 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, /* 1790 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, /* 1791 */
XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER, /* 1792 */
XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE, /* 1793 */
XML_SCHEMAP_UNION_NOT_EXPRESSIBLE, /* 1794 */
XML_SCHEMAP_SRC_IMPORT_3_1, /* 1795 */
XML_SCHEMAP_SRC_IMPORT_3_2, /* 1796 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, /* 1797 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, /* 1798 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, /* 1799 */
XML_SCHEMAP_COS_CT_EXTENDS_1_3, /* 1800 */
XML_SCHEMAV_NOROOT = 1801,
XML_SCHEMAV_UNDECLAREDELEM, /* 1802 */
XML_SCHEMAV_NOTTOPLEVEL, /* 1803 */
XML_SCHEMAV_MISSING, /* 1804 */
XML_SCHEMAV_WRONGELEM, /* 1805 */
XML_SCHEMAV_NOTYPE, /* 1806 */
XML_SCHEMAV_NOROLLBACK, /* 1807 */
XML_SCHEMAV_ISABSTRACT, /* 1808 */
XML_SCHEMAV_NOTEMPTY, /* 1809 */
XML_SCHEMAV_ELEMCONT, /* 1810 */
XML_SCHEMAV_HAVEDEFAULT, /* 1811 */
XML_SCHEMAV_NOTNILLABLE, /* 1812 */
XML_SCHEMAV_EXTRACONTENT, /* 1813 */
XML_SCHEMAV_INVALIDATTR, /* 1814 */
XML_SCHEMAV_INVALIDELEM, /* 1815 */
XML_SCHEMAV_NOTDETERMINIST, /* 1816 */
XML_SCHEMAV_CONSTRUCT, /* 1817 */
XML_SCHEMAV_INTERNAL, /* 1818 */
XML_SCHEMAV_NOTSIMPLE, /* 1819 */
XML_SCHEMAV_ATTRUNKNOWN, /* 1820 */
XML_SCHEMAV_ATTRINVALID, /* 1821 */
XML_SCHEMAV_VALUE, /* 1822 */
XML_SCHEMAV_FACET, /* 1823 */
XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, /* 1824 */
XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2, /* 1825 */
XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3, /* 1826 */
XML_SCHEMAV_CVC_TYPE_3_1_1, /* 1827 */
XML_SCHEMAV_CVC_TYPE_3_1_2, /* 1828 */
XML_SCHEMAV_CVC_FACET_VALID, /* 1829 */
XML_SCHEMAV_CVC_LENGTH_VALID, /* 1830 */
XML_SCHEMAV_CVC_MINLENGTH_VALID, /* 1831 */
XML_SCHEMAV_CVC_MAXLENGTH_VALID, /* 1832 */
XML_SCHEMAV_CVC_MININCLUSIVE_VALID, /* 1833 */
XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID, /* 1834 */
XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID, /* 1835 */
XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID, /* 1836 */
XML_SCHEMAV_CVC_TOTALDIGITS_VALID, /* 1837 */
XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID, /* 1838 */
XML_SCHEMAV_CVC_PATTERN_VALID, /* 1839 */
XML_SCHEMAV_CVC_ENUMERATION_VALID, /* 1840 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1, /* 1841 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2, /* 1842 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3, /* 1843 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4, /* 1844 */
XML_SCHEMAV_CVC_ELT_1, /* 1845 */
XML_SCHEMAV_CVC_ELT_2, /* 1846 */
XML_SCHEMAV_CVC_ELT_3_1, /* 1847 */
XML_SCHEMAV_CVC_ELT_3_2_1, /* 1848 */
XML_SCHEMAV_CVC_ELT_3_2_2, /* 1849 */
XML_SCHEMAV_CVC_ELT_4_1, /* 1850 */
XML_SCHEMAV_CVC_ELT_4_2, /* 1851 */
XML_SCHEMAV_CVC_ELT_4_3, /* 1852 */
XML_SCHEMAV_CVC_ELT_5_1_1, /* 1853 */
XML_SCHEMAV_CVC_ELT_5_1_2, /* 1854 */
XML_SCHEMAV_CVC_ELT_5_2_1, /* 1855 */
XML_SCHEMAV_CVC_ELT_5_2_2_1, /* 1856 */
XML_SCHEMAV_CVC_ELT_5_2_2_2_1, /* 1857 */
XML_SCHEMAV_CVC_ELT_5_2_2_2_2, /* 1858 */
XML_SCHEMAV_CVC_ELT_6, /* 1859 */
XML_SCHEMAV_CVC_ELT_7, /* 1860 */
XML_SCHEMAV_CVC_ATTRIBUTE_1, /* 1861 */
XML_SCHEMAV_CVC_ATTRIBUTE_2, /* 1862 */
XML_SCHEMAV_CVC_ATTRIBUTE_3, /* 1863 */
XML_SCHEMAV_CVC_ATTRIBUTE_4, /* 1864 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1, /* 1865 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, /* 1866 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, /* 1867 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_4, /* 1868 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1, /* 1869 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2, /* 1870 */
XML_SCHEMAV_ELEMENT_CONTENT, /* 1871 */
XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING, /* 1872 */
XML_SCHEMAV_CVC_COMPLEX_TYPE_1, /* 1873 */
XML_SCHEMAV_CVC_AU, /* 1874 */
XML_SCHEMAV_CVC_TYPE_1, /* 1875 */
XML_SCHEMAV_CVC_TYPE_2, /* 1876 */
XML_SCHEMAV_CVC_IDC, /* 1877 */
XML_SCHEMAV_CVC_WILDCARD, /* 1878 */
XML_SCHEMAV_MISC, /* 1879 */
XML_XPTR_UNKNOWN_SCHEME = 1900,
XML_XPTR_CHILDSEQ_START, /* 1901 */
XML_XPTR_EVAL_FAILED, /* 1902 */
XML_XPTR_EXTRA_OBJECTS, /* 1903 */
XML_C14N_CREATE_CTXT = 1950,
XML_C14N_REQUIRES_UTF8, /* 1951 */
XML_C14N_CREATE_STACK, /* 1952 */
XML_C14N_INVALID_NODE, /* 1953 */
XML_C14N_UNKNOW_NODE, /* 1954 */
XML_C14N_RELATIVE_NAMESPACE, /* 1955 */
XML_FTP_PASV_ANSWER = 2000,
XML_FTP_EPSV_ANSWER, /* 2001 */
XML_FTP_ACCNT, /* 2002 */
XML_FTP_URL_SYNTAX, /* 2003 */
XML_HTTP_URL_SYNTAX = 2020,
XML_HTTP_USE_IP, /* 2021 */
XML_HTTP_UNKNOWN_HOST, /* 2022 */
XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000,
XML_SCHEMAP_SRC_SIMPLE_TYPE_2, /* 3001 */
XML_SCHEMAP_SRC_SIMPLE_TYPE_3, /* 3002 */
XML_SCHEMAP_SRC_SIMPLE_TYPE_4, /* 3003 */
XML_SCHEMAP_SRC_RESOLVE, /* 3004 */
XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, /* 3005 */
XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE, /* 3006 */
XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES, /* 3007 */
XML_SCHEMAP_ST_PROPS_CORRECT_1, /* 3008 */
XML_SCHEMAP_ST_PROPS_CORRECT_2, /* 3009 */
XML_SCHEMAP_ST_PROPS_CORRECT_3, /* 3010 */
XML_SCHEMAP_COS_ST_RESTRICTS_1_1, /* 3011 */
XML_SCHEMAP_COS_ST_RESTRICTS_1_2, /* 3012 */
XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1, /* 3013 */
XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2, /* 3014 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_1, /* 3015 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1, /* 3016 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2, /* 3017 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1, /* 3018 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2, /* 3019 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3, /* 3020 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4, /* 3021 */
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5, /* 3022 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_1, /* 3023 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1, /* 3024 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2, /* 3025 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2, /* 3026 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1, /* 3027 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3, /* 3028 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4, /* 3029 */
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5, /* 3030 */
XML_SCHEMAP_COS_ST_DERIVED_OK_2_1, /* 3031 */
XML_SCHEMAP_COS_ST_DERIVED_OK_2_2, /* 3032 */
XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, /* 3033 */
XML_SCHEMAP_S4S_ELEM_MISSING, /* 3034 */
XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, /* 3035 */
XML_SCHEMAP_S4S_ATTR_MISSING, /* 3036 */
XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, /* 3037 */
XML_SCHEMAP_SRC_ELEMENT_1, /* 3038 */
XML_SCHEMAP_SRC_ELEMENT_2_1, /* 3039 */
XML_SCHEMAP_SRC_ELEMENT_2_2, /* 3040 */
XML_SCHEMAP_SRC_ELEMENT_3, /* 3041 */
XML_SCHEMAP_P_PROPS_CORRECT_1, /* 3042 */
XML_SCHEMAP_P_PROPS_CORRECT_2_1, /* 3043 */
XML_SCHEMAP_P_PROPS_CORRECT_2_2, /* 3044 */
XML_SCHEMAP_E_PROPS_CORRECT_2, /* 3045 */
XML_SCHEMAP_E_PROPS_CORRECT_3, /* 3046 */
XML_SCHEMAP_E_PROPS_CORRECT_4, /* 3047 */
XML_SCHEMAP_E_PROPS_CORRECT_5, /* 3048 */
XML_SCHEMAP_E_PROPS_CORRECT_6, /* 3049 */
XML_SCHEMAP_SRC_INCLUDE, /* 3050 */
XML_SCHEMAP_SRC_ATTRIBUTE_1, /* 3051 */
XML_SCHEMAP_SRC_ATTRIBUTE_2, /* 3052 */
XML_SCHEMAP_SRC_ATTRIBUTE_3_1, /* 3053 */
XML_SCHEMAP_SRC_ATTRIBUTE_3_2, /* 3054 */
XML_SCHEMAP_SRC_ATTRIBUTE_4, /* 3055 */
XML_SCHEMAP_NO_XMLNS, /* 3056 */
XML_SCHEMAP_NO_XSI, /* 3057 */
XML_SCHEMAP_COS_VALID_DEFAULT_1, /* 3058 */
XML_SCHEMAP_COS_VALID_DEFAULT_2_1, /* 3059 */
XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1, /* 3060 */
XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2, /* 3061 */
XML_SCHEMAP_CVC_SIMPLE_TYPE, /* 3062 */
XML_SCHEMAP_COS_CT_EXTENDS_1_1, /* 3063 */
XML_SCHEMAP_SRC_IMPORT_1_1, /* 3064 */
XML_SCHEMAP_SRC_IMPORT_1_2, /* 3065 */
XML_SCHEMAP_SRC_IMPORT_2, /* 3066 */
XML_SCHEMAP_SRC_IMPORT_2_1, /* 3067 */
XML_SCHEMAP_SRC_IMPORT_2_2, /* 3068 */
XML_SCHEMAP_INTERNAL, /* 3069 non-W3C */
XML_SCHEMAP_NOT_DETERMINISTIC, /* 3070 non-W3C */
XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1, /* 3071 */
XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2, /* 3072 */
XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, /* 3073 */
XML_SCHEMAP_MG_PROPS_CORRECT_1, /* 3074 */
XML_SCHEMAP_MG_PROPS_CORRECT_2, /* 3075 */
XML_SCHEMAP_SRC_CT_1, /* 3076 */
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, /* 3077 */
XML_SCHEMAP_AU_PROPS_CORRECT_2, /* 3078 */
XML_SCHEMAP_A_PROPS_CORRECT_2, /* 3079 */
XML_SCHEMAP_C_PROPS_CORRECT, /* 3080 */
XML_SCHEMAP_SRC_REDEFINE, /* 3081 */
XML_SCHEMAP_SRC_IMPORT, /* 3082 */
XML_SCHEMAP_WARN_SKIP_SCHEMA, /* 3083 */
XML_SCHEMAP_WARN_UNLOCATED_SCHEMA, /* 3084 */
XML_SCHEMAP_WARN_ATTR_REDECL_PROH, /* 3085 */
XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, /* 3085 */
XML_SCHEMAP_AG_PROPS_CORRECT, /* 3086 */
XML_SCHEMAP_COS_CT_EXTENDS_1_2, /* 3087 */
XML_SCHEMAP_AU_PROPS_CORRECT, /* 3088 */
XML_SCHEMAP_A_PROPS_CORRECT_3, /* 3089 */
XML_SCHEMAP_COS_ALL_LIMITED, /* 3090 */
XML_SCHEMATRONV_ASSERT = 4000, /* 4000 */
XML_SCHEMATRONV_REPORT,
XML_MODULE_OPEN = 4900, /* 4900 */
XML_MODULE_CLOSE, /* 4901 */
XML_CHECK_FOUND_ELEMENT = 5000,
XML_CHECK_FOUND_ATTRIBUTE, /* 5001 */
XML_CHECK_FOUND_TEXT, /* 5002 */
XML_CHECK_FOUND_CDATA, /* 5003 */
XML_CHECK_FOUND_ENTITYREF, /* 5004 */
XML_CHECK_FOUND_ENTITY, /* 5005 */
XML_CHECK_FOUND_PI, /* 5006 */
XML_CHECK_FOUND_COMMENT, /* 5007 */
XML_CHECK_FOUND_DOCTYPE, /* 5008 */
XML_CHECK_FOUND_FRAGMENT, /* 5009 */
XML_CHECK_FOUND_NOTATION, /* 5010 */
XML_CHECK_UNKNOWN_NODE, /* 5011 */
XML_CHECK_ENTITY_TYPE, /* 5012 */
XML_CHECK_NO_PARENT, /* 5013 */
XML_CHECK_NO_DOC, /* 5014 */
XML_CHECK_NO_NAME, /* 5015 */
XML_CHECK_NO_ELEM, /* 5016 */
XML_CHECK_WRONG_DOC, /* 5017 */
XML_CHECK_NO_PREV, /* 5018 */
XML_CHECK_WRONG_PREV, /* 5019 */
XML_CHECK_NO_NEXT, /* 5020 */
XML_CHECK_WRONG_NEXT, /* 5021 */
XML_CHECK_NOT_DTD, /* 5022 */
XML_CHECK_NOT_ATTR, /* 5023 */
XML_CHECK_NOT_ATTR_DECL, /* 5024 */
XML_CHECK_NOT_ELEM_DECL, /* 5025 */
XML_CHECK_NOT_ENTITY_DECL, /* 5026 */
XML_CHECK_NOT_NS_DECL, /* 5027 */
XML_CHECK_NO_HREF, /* 5028 */
XML_CHECK_WRONG_PARENT,/* 5029 */
XML_CHECK_NS_SCOPE, /* 5030 */
XML_CHECK_NS_ANCESTOR, /* 5031 */
XML_CHECK_NOT_UTF8, /* 5032 */
XML_CHECK_NO_DICT, /* 5033 */
XML_CHECK_NOT_NCNAME, /* 5034 */
XML_CHECK_OUTSIDE_DICT, /* 5035 */
XML_CHECK_WRONG_NAME, /* 5036 */
XML_CHECK_NAME_NOT_NULL, /* 5037 */
XML_I18N_NO_NAME = 6000,
XML_I18N_NO_HANDLER, /* 6001 */
XML_I18N_EXCESS_HANDLER, /* 6002 */
XML_I18N_CONV_FAILED, /* 6003 */
XML_I18N_NO_OUTPUT /* 6004 */
#if 0
XML_CHECK_, /* 5033 */
XML_CHECK_X /* 503 */
#endif
} xmlParserErrors;
/**
* xmlGenericErrorFunc:
* @ctx: a parsing context
* @msg: the message
* @...: the extra arguments of the varags to format the message
*
* Signature of the function to use when there is an error and
* no parsing or validity context available .
*/
typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
/**
* xmlStructuredErrorFunc:
* @userData: user provided data for the error callback
* @error: the error being raised.
*
* Signature of the function to use when there is an error and
* the module handles the new error reporting mechanism.
*/
typedef void (XMLCALL *xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
/*
* Use the following function to reset the two global variables
* xmlGenericError and xmlGenericErrorContext.
*/
XMLPUBFUN void XMLCALL
xmlSetGenericErrorFunc (void *ctx,
xmlGenericErrorFunc handler);
XMLPUBFUN void XMLCALL
initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler);
XMLPUBFUN void XMLCALL
xmlSetStructuredErrorFunc (void *ctx,
xmlStructuredErrorFunc handler);
/*
* Default message routines used by SAX and Valid context for error
* and warning reporting.
*/
XMLPUBFUN void XMLCDECL
xmlParserError (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
XMLPUBFUN void XMLCDECL
xmlParserWarning (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
XMLPUBFUN void XMLCDECL
xmlParserValidityError (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
XMLPUBFUN void XMLCDECL
xmlParserValidityWarning (void *ctx,
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3);
XMLPUBFUN void XMLCALL
xmlParserPrintFileInfo (xmlParserInputPtr input);
XMLPUBFUN void XMLCALL
xmlParserPrintFileContext (xmlParserInputPtr input);
/*
* Extended error information routines
*/
XMLPUBFUN xmlErrorPtr XMLCALL
xmlGetLastError (void);
XMLPUBFUN void XMLCALL
xmlResetLastError (void);
XMLPUBFUN xmlErrorPtr XMLCALL
xmlCtxtGetLastError (void *ctx);
XMLPUBFUN void XMLCALL
xmlCtxtResetLastError (void *ctx);
XMLPUBFUN void XMLCALL
xmlResetError (xmlErrorPtr err);
XMLPUBFUN int XMLCALL
xmlCopyError (xmlErrorPtr from,
xmlErrorPtr to);
#ifdef IN_LIBXML
/*
* Internal callback reporting routine
*/
XMLPUBFUN void XMLCALL
__xmlRaiseError (xmlStructuredErrorFunc schannel,
xmlGenericErrorFunc channel,
void *data,
void *ctx,
void *node,
int domain,
int code,
xmlErrorLevel level,
const char *file,
int line,
const char *str1,
const char *str2,
const char *str3,
int int1,
int col,
const char *msg,
...) LIBXML_ATTR_FORMAT(16,17);
XMLPUBFUN void XMLCALL
__xmlSimpleError (int domain,
int code,
xmlNodePtr node,
const char *msg,
const char *extra);
#endif
#ifdef __cplusplus
}
#endif
#endif /* __XML_ERROR_H__ */
| 36,676 | 37.81164 | 109 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/debugXML.h
|
/*
* Summary: Tree debugging APIs
* Description: Interfaces to a set of routines used for debugging the tree
* produced by the XML parser.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __DEBUG_XML__
#define __DEBUG_XML__
#include <stdio.h>
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#ifdef LIBXML_DEBUG_ENABLED
#include <libxml/xpath.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* The standard Dump routines.
*/
XMLPUBFUN void XMLCALL
xmlDebugDumpString (FILE *output,
const xmlChar *str);
XMLPUBFUN void XMLCALL
xmlDebugDumpAttr (FILE *output,
xmlAttrPtr attr,
int depth);
XMLPUBFUN void XMLCALL
xmlDebugDumpAttrList (FILE *output,
xmlAttrPtr attr,
int depth);
XMLPUBFUN void XMLCALL
xmlDebugDumpOneNode (FILE *output,
xmlNodePtr node,
int depth);
XMLPUBFUN void XMLCALL
xmlDebugDumpNode (FILE *output,
xmlNodePtr node,
int depth);
XMLPUBFUN void XMLCALL
xmlDebugDumpNodeList (FILE *output,
xmlNodePtr node,
int depth);
XMLPUBFUN void XMLCALL
xmlDebugDumpDocumentHead(FILE *output,
xmlDocPtr doc);
XMLPUBFUN void XMLCALL
xmlDebugDumpDocument (FILE *output,
xmlDocPtr doc);
XMLPUBFUN void XMLCALL
xmlDebugDumpDTD (FILE *output,
xmlDtdPtr dtd);
XMLPUBFUN void XMLCALL
xmlDebugDumpEntities (FILE *output,
xmlDocPtr doc);
/****************************************************************
* *
* Checking routines *
* *
****************************************************************/
XMLPUBFUN int XMLCALL
xmlDebugCheckDocument (FILE * output,
xmlDocPtr doc);
/****************************************************************
* *
* XML shell helpers *
* *
****************************************************************/
XMLPUBFUN void XMLCALL
xmlLsOneNode (FILE *output, xmlNodePtr node);
XMLPUBFUN int XMLCALL
xmlLsCountNode (xmlNodePtr node);
XMLPUBFUN const char * XMLCALL
xmlBoolToText (int boolval);
/****************************************************************
* *
* The XML shell related structures and functions *
* *
****************************************************************/
#ifdef LIBXML_XPATH_ENABLED
/**
* xmlShellReadlineFunc:
* @prompt: a string prompt
*
* This is a generic signature for the XML shell input function.
*
* Returns a string which will be freed by the Shell.
*/
typedef char * (* xmlShellReadlineFunc)(char *prompt);
/**
* xmlShellCtxt:
*
* A debugging shell context.
* TODO: add the defined function tables.
*/
typedef struct _xmlShellCtxt xmlShellCtxt;
typedef xmlShellCtxt *xmlShellCtxtPtr;
struct _xmlShellCtxt {
char *filename;
xmlDocPtr doc;
xmlNodePtr node;
xmlXPathContextPtr pctxt;
int loaded;
FILE *output;
xmlShellReadlineFunc input;
};
/**
* xmlShellCmd:
* @ctxt: a shell context
* @arg: a string argument
* @node: a first node
* @node2: a second node
*
* This is a generic signature for the XML shell functions.
*
* Returns an int, negative returns indicating errors.
*/
typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN void XMLCALL
xmlShellPrintXPathError (int errorType,
const char *arg);
XMLPUBFUN void XMLCALL
xmlShellPrintXPathResult(xmlXPathObjectPtr list);
XMLPUBFUN int XMLCALL
xmlShellList (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN int XMLCALL
xmlShellBase (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN int XMLCALL
xmlShellDir (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN int XMLCALL
xmlShellLoad (xmlShellCtxtPtr ctxt,
char *filename,
xmlNodePtr node,
xmlNodePtr node2);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
xmlShellPrintNode (xmlNodePtr node);
XMLPUBFUN int XMLCALL
xmlShellCat (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN int XMLCALL
xmlShellWrite (xmlShellCtxtPtr ctxt,
char *filename,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN int XMLCALL
xmlShellSave (xmlShellCtxtPtr ctxt,
char *filename,
xmlNodePtr node,
xmlNodePtr node2);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_VALID_ENABLED
XMLPUBFUN int XMLCALL
xmlShellValidate (xmlShellCtxtPtr ctxt,
char *dtd,
xmlNodePtr node,
xmlNodePtr node2);
#endif /* LIBXML_VALID_ENABLED */
XMLPUBFUN int XMLCALL
xmlShellDu (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr tree,
xmlNodePtr node2);
XMLPUBFUN int XMLCALL
xmlShellPwd (xmlShellCtxtPtr ctxt,
char *buffer,
xmlNodePtr node,
xmlNodePtr node2);
/*
* The Shell interface.
*/
XMLPUBFUN void XMLCALL
xmlShell (xmlDocPtr doc,
char *filename,
xmlShellReadlineFunc input,
FILE *output);
#endif /* LIBXML_XPATH_ENABLED */
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_DEBUG_ENABLED */
#endif /* __DEBUG_XML__ */
| 5,181 | 22.770642 | 75 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/HTMLtree.h
|
/*
* Summary: specific APIs to process HTML tree, especially serialization
* Description: this module implements a few function needed to process
* tree in an HTML specific way.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __HTML_TREE_H__
#define __HTML_TREE_H__
#include <stdio.h>
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#include <libxml/HTMLparser.h>
#ifdef LIBXML_HTML_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/**
* HTML_TEXT_NODE:
*
* Macro. A text node in a HTML document is really implemented
* the same way as a text node in an XML document.
*/
#define HTML_TEXT_NODE XML_TEXT_NODE
/**
* HTML_ENTITY_REF_NODE:
*
* Macro. An entity reference in a HTML document is really implemented
* the same way as an entity reference in an XML document.
*/
#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
/**
* HTML_COMMENT_NODE:
*
* Macro. A comment in a HTML document is really implemented
* the same way as a comment in an XML document.
*/
#define HTML_COMMENT_NODE XML_COMMENT_NODE
/**
* HTML_PRESERVE_NODE:
*
* Macro. A preserved node in a HTML document is really implemented
* the same way as a CDATA section in an XML document.
*/
#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
/**
* HTML_PI_NODE:
*
* Macro. A processing instruction in a HTML document is really implemented
* the same way as a processing instruction in an XML document.
*/
#define HTML_PI_NODE XML_PI_NODE
XMLPUBFUN htmlDocPtr XMLCALL
htmlNewDoc (const xmlChar *URI,
const xmlChar *ExternalID);
XMLPUBFUN htmlDocPtr XMLCALL
htmlNewDocNoDtD (const xmlChar *URI,
const xmlChar *ExternalID);
XMLPUBFUN const xmlChar * XMLCALL
htmlGetMetaEncoding (htmlDocPtr doc);
XMLPUBFUN int XMLCALL
htmlSetMetaEncoding (htmlDocPtr doc,
const xmlChar *encoding);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
htmlDocDumpMemory (xmlDocPtr cur,
xmlChar **mem,
int *size);
XMLPUBFUN void XMLCALL
htmlDocDumpMemoryFormat (xmlDocPtr cur,
xmlChar **mem,
int *size,
int format);
XMLPUBFUN int XMLCALL
htmlDocDump (FILE *f,
xmlDocPtr cur);
XMLPUBFUN int XMLCALL
htmlSaveFile (const char *filename,
xmlDocPtr cur);
XMLPUBFUN int XMLCALL
htmlNodeDump (xmlBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur);
XMLPUBFUN void XMLCALL
htmlNodeDumpFile (FILE *out,
xmlDocPtr doc,
xmlNodePtr cur);
XMLPUBFUN int XMLCALL
htmlNodeDumpFileFormat (FILE *out,
xmlDocPtr doc,
xmlNodePtr cur,
const char *encoding,
int format);
XMLPUBFUN int XMLCALL
htmlSaveFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding);
XMLPUBFUN int XMLCALL
htmlSaveFileFormat (const char *filename,
xmlDocPtr cur,
const char *encoding,
int format);
XMLPUBFUN void XMLCALL
htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
const char *encoding,
int format);
XMLPUBFUN void XMLCALL
htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding);
XMLPUBFUN void XMLCALL
htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding,
int format);
XMLPUBFUN void XMLCALL
htmlNodeDumpOutput (xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
const char *encoding);
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN int XMLCALL
htmlIsBooleanAttr (const xmlChar *name);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_HTML_ENABLED */
#endif /* __HTML_TREE_H__ */
| 3,685 | 23.905405 | 75 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/schemasInternals.h
|
/*
* Summary: internal interfaces for XML Schemas
* Description: internal interfaces for the XML Schemas handling
* and schema validity checking
* The Schemas development is a Work In Progress.
* Some of those interfaces are not garanteed to be API or ABI stable !
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_SCHEMA_INTERNALS_H__
#define __XML_SCHEMA_INTERNALS_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_SCHEMAS_ENABLED
#include <libxml/xmlregexp.h>
#include <libxml/hash.h>
#include <libxml/dict.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
XML_SCHEMAS_UNKNOWN = 0,
XML_SCHEMAS_STRING,
XML_SCHEMAS_NORMSTRING,
XML_SCHEMAS_DECIMAL,
XML_SCHEMAS_TIME,
XML_SCHEMAS_GDAY,
XML_SCHEMAS_GMONTH,
XML_SCHEMAS_GMONTHDAY,
XML_SCHEMAS_GYEAR,
XML_SCHEMAS_GYEARMONTH,
XML_SCHEMAS_DATE,
XML_SCHEMAS_DATETIME,
XML_SCHEMAS_DURATION,
XML_SCHEMAS_FLOAT,
XML_SCHEMAS_DOUBLE,
XML_SCHEMAS_BOOLEAN,
XML_SCHEMAS_TOKEN,
XML_SCHEMAS_LANGUAGE,
XML_SCHEMAS_NMTOKEN,
XML_SCHEMAS_NMTOKENS,
XML_SCHEMAS_NAME,
XML_SCHEMAS_QNAME,
XML_SCHEMAS_NCNAME,
XML_SCHEMAS_ID,
XML_SCHEMAS_IDREF,
XML_SCHEMAS_IDREFS,
XML_SCHEMAS_ENTITY,
XML_SCHEMAS_ENTITIES,
XML_SCHEMAS_NOTATION,
XML_SCHEMAS_ANYURI,
XML_SCHEMAS_INTEGER,
XML_SCHEMAS_NPINTEGER,
XML_SCHEMAS_NINTEGER,
XML_SCHEMAS_NNINTEGER,
XML_SCHEMAS_PINTEGER,
XML_SCHEMAS_INT,
XML_SCHEMAS_UINT,
XML_SCHEMAS_LONG,
XML_SCHEMAS_ULONG,
XML_SCHEMAS_SHORT,
XML_SCHEMAS_USHORT,
XML_SCHEMAS_BYTE,
XML_SCHEMAS_UBYTE,
XML_SCHEMAS_HEXBINARY,
XML_SCHEMAS_BASE64BINARY,
XML_SCHEMAS_ANYTYPE,
XML_SCHEMAS_ANYSIMPLETYPE
} xmlSchemaValType;
/*
* XML Schemas defines multiple type of types.
*/
typedef enum {
XML_SCHEMA_TYPE_BASIC = 1, /* A built-in datatype */
XML_SCHEMA_TYPE_ANY,
XML_SCHEMA_TYPE_FACET,
XML_SCHEMA_TYPE_SIMPLE,
XML_SCHEMA_TYPE_COMPLEX,
XML_SCHEMA_TYPE_SEQUENCE = 6,
XML_SCHEMA_TYPE_CHOICE,
XML_SCHEMA_TYPE_ALL,
XML_SCHEMA_TYPE_SIMPLE_CONTENT,
XML_SCHEMA_TYPE_COMPLEX_CONTENT,
XML_SCHEMA_TYPE_UR,
XML_SCHEMA_TYPE_RESTRICTION,
XML_SCHEMA_TYPE_EXTENSION,
XML_SCHEMA_TYPE_ELEMENT,
XML_SCHEMA_TYPE_ATTRIBUTE,
XML_SCHEMA_TYPE_ATTRIBUTEGROUP,
XML_SCHEMA_TYPE_GROUP,
XML_SCHEMA_TYPE_NOTATION,
XML_SCHEMA_TYPE_LIST,
XML_SCHEMA_TYPE_UNION,
XML_SCHEMA_TYPE_ANY_ATTRIBUTE,
XML_SCHEMA_TYPE_IDC_UNIQUE,
XML_SCHEMA_TYPE_IDC_KEY,
XML_SCHEMA_TYPE_IDC_KEYREF,
XML_SCHEMA_TYPE_PARTICLE = 25,
XML_SCHEMA_TYPE_ATTRIBUTE_USE,
XML_SCHEMA_FACET_MININCLUSIVE = 1000,
XML_SCHEMA_FACET_MINEXCLUSIVE,
XML_SCHEMA_FACET_MAXINCLUSIVE,
XML_SCHEMA_FACET_MAXEXCLUSIVE,
XML_SCHEMA_FACET_TOTALDIGITS,
XML_SCHEMA_FACET_FRACTIONDIGITS,
XML_SCHEMA_FACET_PATTERN,
XML_SCHEMA_FACET_ENUMERATION,
XML_SCHEMA_FACET_WHITESPACE,
XML_SCHEMA_FACET_LENGTH,
XML_SCHEMA_FACET_MAXLENGTH,
XML_SCHEMA_FACET_MINLENGTH,
XML_SCHEMA_EXTRA_QNAMEREF = 2000,
XML_SCHEMA_EXTRA_ATTR_USE_PROHIB
} xmlSchemaTypeType;
typedef enum {
XML_SCHEMA_CONTENT_UNKNOWN = 0,
XML_SCHEMA_CONTENT_EMPTY = 1,
XML_SCHEMA_CONTENT_ELEMENTS,
XML_SCHEMA_CONTENT_MIXED,
XML_SCHEMA_CONTENT_SIMPLE,
XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */
XML_SCHEMA_CONTENT_BASIC,
XML_SCHEMA_CONTENT_ANY
} xmlSchemaContentType;
typedef struct _xmlSchemaVal xmlSchemaVal;
typedef xmlSchemaVal *xmlSchemaValPtr;
typedef struct _xmlSchemaType xmlSchemaType;
typedef xmlSchemaType *xmlSchemaTypePtr;
typedef struct _xmlSchemaFacet xmlSchemaFacet;
typedef xmlSchemaFacet *xmlSchemaFacetPtr;
/**
* Annotation
*/
typedef struct _xmlSchemaAnnot xmlSchemaAnnot;
typedef xmlSchemaAnnot *xmlSchemaAnnotPtr;
struct _xmlSchemaAnnot {
struct _xmlSchemaAnnot *next;
xmlNodePtr content; /* the annotation */
};
/**
* XML_SCHEMAS_ANYATTR_SKIP:
*
* Skip unknown attribute from validation
* Obsolete, not used anymore.
*/
#define XML_SCHEMAS_ANYATTR_SKIP 1
/**
* XML_SCHEMAS_ANYATTR_LAX:
*
* Ignore validation non definition on attributes
* Obsolete, not used anymore.
*/
#define XML_SCHEMAS_ANYATTR_LAX 2
/**
* XML_SCHEMAS_ANYATTR_STRICT:
*
* Apply strict validation rules on attributes
* Obsolete, not used anymore.
*/
#define XML_SCHEMAS_ANYATTR_STRICT 3
/**
* XML_SCHEMAS_ANY_SKIP:
*
* Skip unknown attribute from validation
*/
#define XML_SCHEMAS_ANY_SKIP 1
/**
* XML_SCHEMAS_ANY_LAX:
*
* Used by wildcards.
* Validate if type found, don't worry if not found
*/
#define XML_SCHEMAS_ANY_LAX 2
/**
* XML_SCHEMAS_ANY_STRICT:
*
* Used by wildcards.
* Apply strict validation rules
*/
#define XML_SCHEMAS_ANY_STRICT 3
/**
* XML_SCHEMAS_ATTR_USE_PROHIBITED:
*
* Used by wildcards.
* The attribute is prohibited.
*/
#define XML_SCHEMAS_ATTR_USE_PROHIBITED 0
/**
* XML_SCHEMAS_ATTR_USE_REQUIRED:
*
* The attribute is required.
*/
#define XML_SCHEMAS_ATTR_USE_REQUIRED 1
/**
* XML_SCHEMAS_ATTR_USE_OPTIONAL:
*
* The attribute is optional.
*/
#define XML_SCHEMAS_ATTR_USE_OPTIONAL 2
/**
* XML_SCHEMAS_ATTR_GLOBAL:
*
* allow elements in no namespace
*/
#define XML_SCHEMAS_ATTR_GLOBAL 1 << 0
/**
* XML_SCHEMAS_ATTR_NSDEFAULT:
*
* allow elements in no namespace
*/
#define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7
/**
* XML_SCHEMAS_ATTR_INTERNAL_RESOLVED:
*
* this is set when the "type" and "ref" references
* have been resolved.
*/
#define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED 1 << 8
/**
* XML_SCHEMAS_ATTR_FIXED:
*
* the attribute has a fixed value
*/
#define XML_SCHEMAS_ATTR_FIXED 1 << 9
/**
* xmlSchemaAttribute:
* An attribute definition.
*/
typedef struct _xmlSchemaAttribute xmlSchemaAttribute;
typedef xmlSchemaAttribute *xmlSchemaAttributePtr;
struct _xmlSchemaAttribute {
xmlSchemaTypeType type;
struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */
const xmlChar *name; /* the name of the declaration */
const xmlChar *id; /* Deprecated; not used */
const xmlChar *ref; /* Deprecated; not used */
const xmlChar *refNs; /* Deprecated; not used */
const xmlChar *typeName; /* the local name of the type definition */
const xmlChar *typeNs; /* the ns URI of the type definition */
xmlSchemaAnnotPtr annot;
xmlSchemaTypePtr base; /* Deprecated; not used */
int occurs; /* Deprecated; not used */
const xmlChar *defValue; /* The initial value of the value constraint */
xmlSchemaTypePtr subtypes; /* the type definition */
xmlNodePtr node;
const xmlChar *targetNamespace;
int flags;
const xmlChar *refPrefix; /* Deprecated; not used */
xmlSchemaValPtr defVal; /* The compiled value constraint */
xmlSchemaAttributePtr refDecl; /* Deprecated; not used */
};
/**
* xmlSchemaAttributeLink:
* Used to build a list of attribute uses on complexType definitions.
* WARNING: Deprecated; not used.
*/
typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink;
typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr;
struct _xmlSchemaAttributeLink {
struct _xmlSchemaAttributeLink *next;/* the next attribute link ... */
struct _xmlSchemaAttribute *attr;/* the linked attribute */
};
/**
* XML_SCHEMAS_WILDCARD_COMPLETE:
*
* If the wildcard is complete.
*/
#define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0
/**
* xmlSchemaCharValueLink:
* Used to build a list of namespaces on wildcards.
*/
typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs;
typedef xmlSchemaWildcardNs *xmlSchemaWildcardNsPtr;
struct _xmlSchemaWildcardNs {
struct _xmlSchemaWildcardNs *next;/* the next constraint link ... */
const xmlChar *value;/* the value */
};
/**
* xmlSchemaWildcard.
* A wildcard.
*/
typedef struct _xmlSchemaWildcard xmlSchemaWildcard;
typedef xmlSchemaWildcard *xmlSchemaWildcardPtr;
struct _xmlSchemaWildcard {
xmlSchemaTypeType type; /* The kind of type */
const xmlChar *id; /* Deprecated; not used */
xmlSchemaAnnotPtr annot;
xmlNodePtr node;
int minOccurs; /* Deprecated; not used */
int maxOccurs; /* Deprecated; not used */
int processContents;
int any; /* Indicates if the ns constraint is of ##any */
xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */
xmlSchemaWildcardNsPtr negNsSet; /* The negated namespace */
int flags;
};
/**
* XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED:
*
* The attribute wildcard has been already builded.
*/
#define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0
/**
* XML_SCHEMAS_ATTRGROUP_GLOBAL:
*
* The attribute wildcard has been already builded.
*/
#define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1
/**
* XML_SCHEMAS_ATTRGROUP_MARKED:
*
* Marks the attr group as marked; used for circular checks.
*/
#define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2
/**
* XML_SCHEMAS_ATTRGROUP_REDEFINED:
*
* The attr group was redefined.
*/
#define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3
/**
* XML_SCHEMAS_ATTRGROUP_HAS_REFS:
*
* Whether this attr. group contains attr. group references.
*/
#define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4
/**
* An attribute group definition.
*
* xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
* must be kept similar
*/
typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup;
typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr;
struct _xmlSchemaAttributeGroup {
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
const xmlChar *name;
const xmlChar *id;
const xmlChar *ref; /* Deprecated; not used */
const xmlChar *refNs; /* Deprecated; not used */
xmlSchemaAnnotPtr annot;
xmlSchemaAttributePtr attributes; /* Deprecated; not used */
xmlNodePtr node;
int flags;
xmlSchemaWildcardPtr attributeWildcard;
const xmlChar *refPrefix; /* Deprecated; not used */
xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */
const xmlChar *targetNamespace;
void *attrUses;
};
/**
* xmlSchemaTypeLink:
* Used to build a list of types (e.g. member types of
* simpleType with variety "union").
*/
typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink;
typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr;
struct _xmlSchemaTypeLink {
struct _xmlSchemaTypeLink *next;/* the next type link ... */
xmlSchemaTypePtr type;/* the linked type */
};
/**
* xmlSchemaFacetLink:
* Used to build a list of facets.
*/
typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink;
typedef xmlSchemaFacetLink *xmlSchemaFacetLinkPtr;
struct _xmlSchemaFacetLink {
struct _xmlSchemaFacetLink *next;/* the next facet link ... */
xmlSchemaFacetPtr facet;/* the linked facet */
};
/**
* XML_SCHEMAS_TYPE_MIXED:
*
* the element content type is mixed
*/
#define XML_SCHEMAS_TYPE_MIXED 1 << 0
/**
* XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION:
*
* the simple or complex type has a derivation method of "extension".
*/
#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION 1 << 1
/**
* XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION:
*
* the simple or complex type has a derivation method of "restriction".
*/
#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION 1 << 2
/**
* XML_SCHEMAS_TYPE_GLOBAL:
*
* the type is global
*/
#define XML_SCHEMAS_TYPE_GLOBAL 1 << 3
/**
* XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD:
*
* the complexType owns an attribute wildcard, i.e.
* it can be freed by the complexType
*/
#define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD 1 << 4 /* Obsolete. */
/**
* XML_SCHEMAS_TYPE_VARIETY_ABSENT:
*
* the simpleType has a variety of "absent".
* TODO: Actually not necessary :-/, since if
* none of the variety flags occur then it's
* automatically absent.
*/
#define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5
/**
* XML_SCHEMAS_TYPE_VARIETY_LIST:
*
* the simpleType has a variety of "list".
*/
#define XML_SCHEMAS_TYPE_VARIETY_LIST 1 << 6
/**
* XML_SCHEMAS_TYPE_VARIETY_UNION:
*
* the simpleType has a variety of "union".
*/
#define XML_SCHEMAS_TYPE_VARIETY_UNION 1 << 7
/**
* XML_SCHEMAS_TYPE_VARIETY_ATOMIC:
*
* the simpleType has a variety of "union".
*/
#define XML_SCHEMAS_TYPE_VARIETY_ATOMIC 1 << 8
/**
* XML_SCHEMAS_TYPE_FINAL_EXTENSION:
*
* the complexType has a final of "extension".
*/
#define XML_SCHEMAS_TYPE_FINAL_EXTENSION 1 << 9
/**
* XML_SCHEMAS_TYPE_FINAL_RESTRICTION:
*
* the simpleType/complexType has a final of "restriction".
*/
#define XML_SCHEMAS_TYPE_FINAL_RESTRICTION 1 << 10
/**
* XML_SCHEMAS_TYPE_FINAL_LIST:
*
* the simpleType has a final of "list".
*/
#define XML_SCHEMAS_TYPE_FINAL_LIST 1 << 11
/**
* XML_SCHEMAS_TYPE_FINAL_UNION:
*
* the simpleType has a final of "union".
*/
#define XML_SCHEMAS_TYPE_FINAL_UNION 1 << 12
/**
* XML_SCHEMAS_TYPE_FINAL_DEFAULT:
*
* the simpleType has a final of "default".
*/
#define XML_SCHEMAS_TYPE_FINAL_DEFAULT 1 << 13
/**
* XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE:
*
* Marks the item as a builtin primitive.
*/
#define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE 1 << 14
/**
* XML_SCHEMAS_TYPE_MARKED:
*
* Marks the item as marked; used for circular checks.
*/
#define XML_SCHEMAS_TYPE_MARKED 1 << 16
/**
* XML_SCHEMAS_TYPE_BLOCK_DEFAULT:
*
* the complexType did not specify 'block' so use the default of the
* <schema> item.
*/
#define XML_SCHEMAS_TYPE_BLOCK_DEFAULT 1 << 17
/**
* XML_SCHEMAS_TYPE_BLOCK_EXTENSION:
*
* the complexType has a 'block' of "extension".
*/
#define XML_SCHEMAS_TYPE_BLOCK_EXTENSION 1 << 18
/**
* XML_SCHEMAS_TYPE_BLOCK_RESTRICTION:
*
* the complexType has a 'block' of "restriction".
*/
#define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION 1 << 19
/**
* XML_SCHEMAS_TYPE_ABSTRACT:
*
* the simple/complexType is abstract.
*/
#define XML_SCHEMAS_TYPE_ABSTRACT 1 << 20
/**
* XML_SCHEMAS_TYPE_FACETSNEEDVALUE:
*
* indicates if the facets need a computed value
*/
#define XML_SCHEMAS_TYPE_FACETSNEEDVALUE 1 << 21
/**
* XML_SCHEMAS_TYPE_INTERNAL_RESOLVED:
*
* indicates that the type was typefixed
*/
#define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED 1 << 22
/**
* XML_SCHEMAS_TYPE_INTERNAL_INVALID:
*
* indicates that the type is invalid
*/
#define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23
/**
* XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE:
*
* a whitespace-facet value of "preserve"
*/
#define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE 1 << 24
/**
* XML_SCHEMAS_TYPE_WHITESPACE_REPLACE:
*
* a whitespace-facet value of "replace"
*/
#define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE 1 << 25
/**
* XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE:
*
* a whitespace-facet value of "collapse"
*/
#define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE 1 << 26
/**
* XML_SCHEMAS_TYPE_HAS_FACETS:
*
* has facets
*/
#define XML_SCHEMAS_TYPE_HAS_FACETS 1 << 27
/**
* XML_SCHEMAS_TYPE_NORMVALUENEEDED:
*
* indicates if the facets (pattern) need a normalized value
*/
#define XML_SCHEMAS_TYPE_NORMVALUENEEDED 1 << 28
/**
* XML_SCHEMAS_TYPE_FIXUP_1:
*
* First stage of fixup was done.
*/
#define XML_SCHEMAS_TYPE_FIXUP_1 1 << 29
/**
* XML_SCHEMAS_TYPE_REDEFINED:
*
* The type was redefined.
*/
#define XML_SCHEMAS_TYPE_REDEFINED 1 << 30
/**
* XML_SCHEMAS_TYPE_REDEFINING:
*
* The type redefines an other type.
*/
/* #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 */
/**
* _xmlSchemaType:
*
* Schemas type definition.
*/
struct _xmlSchemaType {
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaType *next; /* the next type if in a sequence ... */
const xmlChar *name;
const xmlChar *id ; /* Deprecated; not used */
const xmlChar *ref; /* Deprecated; not used */
const xmlChar *refNs; /* Deprecated; not used */
xmlSchemaAnnotPtr annot;
xmlSchemaTypePtr subtypes;
xmlSchemaAttributePtr attributes; /* Deprecated; not used */
xmlNodePtr node;
int minOccurs; /* Deprecated; not used */
int maxOccurs; /* Deprecated; not used */
int flags;
xmlSchemaContentType contentType;
const xmlChar *base; /* Base type's local name */
const xmlChar *baseNs; /* Base type's target namespace */
xmlSchemaTypePtr baseType; /* The base type component */
xmlSchemaFacetPtr facets; /* Local facets */
struct _xmlSchemaType *redef; /* Deprecated; not used */
int recurse; /* Obsolete */
xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */
xmlSchemaWildcardPtr attributeWildcard;
int builtInType; /* Type of built-in types. */
xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */
xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */
const xmlChar *refPrefix; /* Deprecated; not used */
xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types.
Could we use @subtypes for this? */
xmlRegexpPtr contModel; /* Holds the automaton of the content model */
const xmlChar *targetNamespace;
void *attrUses;
};
/*
* xmlSchemaElement:
* An element definition.
*
* xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of
* structures must be kept similar
*/
/**
* XML_SCHEMAS_ELEM_NILLABLE:
*
* the element is nillable
*/
#define XML_SCHEMAS_ELEM_NILLABLE 1 << 0
/**
* XML_SCHEMAS_ELEM_GLOBAL:
*
* the element is global
*/
#define XML_SCHEMAS_ELEM_GLOBAL 1 << 1
/**
* XML_SCHEMAS_ELEM_DEFAULT:
*
* the element has a default value
*/
#define XML_SCHEMAS_ELEM_DEFAULT 1 << 2
/**
* XML_SCHEMAS_ELEM_FIXED:
*
* the element has a fixed value
*/
#define XML_SCHEMAS_ELEM_FIXED 1 << 3
/**
* XML_SCHEMAS_ELEM_ABSTRACT:
*
* the element is abstract
*/
#define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4
/**
* XML_SCHEMAS_ELEM_TOPLEVEL:
*
* the element is top level
* obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead
*/
#define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5
/**
* XML_SCHEMAS_ELEM_REF:
*
* the element is a reference to a type
*/
#define XML_SCHEMAS_ELEM_REF 1 << 6
/**
* XML_SCHEMAS_ELEM_NSDEFAULT:
*
* allow elements in no namespace
* Obsolete, not used anymore.
*/
#define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7
/**
* XML_SCHEMAS_ELEM_INTERNAL_RESOLVED:
*
* this is set when "type", "ref", "substitutionGroup"
* references have been resolved.
*/
#define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED 1 << 8
/**
* XML_SCHEMAS_ELEM_CIRCULAR:
*
* a helper flag for the search of circular references.
*/
#define XML_SCHEMAS_ELEM_CIRCULAR 1 << 9
/**
* XML_SCHEMAS_ELEM_BLOCK_ABSENT:
*
* the "block" attribute is absent
*/
#define XML_SCHEMAS_ELEM_BLOCK_ABSENT 1 << 10
/**
* XML_SCHEMAS_ELEM_BLOCK_EXTENSION:
*
* disallowed substitutions are absent
*/
#define XML_SCHEMAS_ELEM_BLOCK_EXTENSION 1 << 11
/**
* XML_SCHEMAS_ELEM_BLOCK_RESTRICTION:
*
* disallowed substitutions: "restriction"
*/
#define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION 1 << 12
/**
* XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION:
*
* disallowed substitutions: "substituion"
*/
#define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION 1 << 13
/**
* XML_SCHEMAS_ELEM_FINAL_ABSENT:
*
* substitution group exclusions are absent
*/
#define XML_SCHEMAS_ELEM_FINAL_ABSENT 1 << 14
/**
* XML_SCHEMAS_ELEM_FINAL_EXTENSION:
*
* substitution group exclusions: "extension"
*/
#define XML_SCHEMAS_ELEM_FINAL_EXTENSION 1 << 15
/**
* XML_SCHEMAS_ELEM_FINAL_RESTRICTION:
*
* substitution group exclusions: "restriction"
*/
#define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16
/**
* XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD:
*
* the declaration is a substitution group head
*/
#define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD 1 << 17
/**
* XML_SCHEMAS_ELEM_INTERNAL_CHECKED:
*
* this is set when the elem decl has been checked against
* all constraints
*/
#define XML_SCHEMAS_ELEM_INTERNAL_CHECKED 1 << 18
typedef struct _xmlSchemaElement xmlSchemaElement;
typedef xmlSchemaElement *xmlSchemaElementPtr;
struct _xmlSchemaElement {
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaType *next; /* Not used? */
const xmlChar *name;
const xmlChar *id; /* Deprecated; not used */
const xmlChar *ref; /* Deprecated; not used */
const xmlChar *refNs; /* Deprecated; not used */
xmlSchemaAnnotPtr annot;
xmlSchemaTypePtr subtypes; /* the type definition */
xmlSchemaAttributePtr attributes;
xmlNodePtr node;
int minOccurs; /* Deprecated; not used */
int maxOccurs; /* Deprecated; not used */
int flags;
const xmlChar *targetNamespace;
const xmlChar *namedType;
const xmlChar *namedTypeNs;
const xmlChar *substGroup;
const xmlChar *substGroupNs;
const xmlChar *scope;
const xmlChar *value; /* The original value of the value constraint. */
struct _xmlSchemaElement *refDecl; /* This will now be used for the
substitution group affiliation */
xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */
xmlSchemaContentType contentType;
const xmlChar *refPrefix; /* Deprecated; not used */
xmlSchemaValPtr defVal; /* The compiled value contraint. */
void *idcs; /* The identity-constraint defs */
};
/*
* XML_SCHEMAS_FACET_UNKNOWN:
*
* unknown facet handling
*/
#define XML_SCHEMAS_FACET_UNKNOWN 0
/*
* XML_SCHEMAS_FACET_PRESERVE:
*
* preserve the type of the facet
*/
#define XML_SCHEMAS_FACET_PRESERVE 1
/*
* XML_SCHEMAS_FACET_REPLACE:
*
* replace the type of the facet
*/
#define XML_SCHEMAS_FACET_REPLACE 2
/*
* XML_SCHEMAS_FACET_COLLAPSE:
*
* collapse the types of the facet
*/
#define XML_SCHEMAS_FACET_COLLAPSE 3
/**
* A facet definition.
*/
struct _xmlSchemaFacet {
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */
const xmlChar *value; /* The original value */
const xmlChar *id; /* Obsolete */
xmlSchemaAnnotPtr annot;
xmlNodePtr node;
int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */
int whitespace;
xmlSchemaValPtr val; /* The compiled value */
xmlRegexpPtr regexp; /* The regex for patterns */
};
/**
* A notation definition.
*/
typedef struct _xmlSchemaNotation xmlSchemaNotation;
typedef xmlSchemaNotation *xmlSchemaNotationPtr;
struct _xmlSchemaNotation {
xmlSchemaTypeType type; /* The kind of type */
const xmlChar *name;
xmlSchemaAnnotPtr annot;
const xmlChar *identifier;
const xmlChar *targetNamespace;
};
/*
* TODO: Actually all those flags used for the schema should sit
* on the schema parser context, since they are used only
* during parsing an XML schema document, and not available
* on the component level as per spec.
*/
/**
* XML_SCHEMAS_QUALIF_ELEM:
*
* Reflects elementFormDefault == qualified in
* an XML schema document.
*/
#define XML_SCHEMAS_QUALIF_ELEM 1 << 0
/**
* XML_SCHEMAS_QUALIF_ATTR:
*
* Reflects attributeFormDefault == qualified in
* an XML schema document.
*/
#define XML_SCHEMAS_QUALIF_ATTR 1 << 1
/**
* XML_SCHEMAS_FINAL_DEFAULT_EXTENSION:
*
* the schema has "extension" in the set of finalDefault.
*/
#define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION 1 << 2
/**
* XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION:
*
* the schema has "restriction" in the set of finalDefault.
*/
#define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION 1 << 3
/**
* XML_SCHEMAS_FINAL_DEFAULT_LIST:
*
* the cshema has "list" in the set of finalDefault.
*/
#define XML_SCHEMAS_FINAL_DEFAULT_LIST 1 << 4
/**
* XML_SCHEMAS_FINAL_DEFAULT_UNION:
*
* the schema has "union" in the set of finalDefault.
*/
#define XML_SCHEMAS_FINAL_DEFAULT_UNION 1 << 5
/**
* XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION:
*
* the schema has "extension" in the set of blockDefault.
*/
#define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION 1 << 6
/**
* XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION:
*
* the schema has "restriction" in the set of blockDefault.
*/
#define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION 1 << 7
/**
* XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION:
*
* the schema has "substitution" in the set of blockDefault.
*/
#define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION 1 << 8
/**
* XML_SCHEMAS_INCLUDING_CONVERT_NS:
*
* the schema is currently including an other schema with
* no target namespace.
*/
#define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9
/**
* _xmlSchema:
*
* A Schemas definition
*/
struct _xmlSchema {
const xmlChar *name; /* schema name */
const xmlChar *targetNamespace; /* the target namespace */
const xmlChar *version;
const xmlChar *id; /* Obsolete */
xmlDocPtr doc;
xmlSchemaAnnotPtr annot;
int flags;
xmlHashTablePtr typeDecl;
xmlHashTablePtr attrDecl;
xmlHashTablePtr attrgrpDecl;
xmlHashTablePtr elemDecl;
xmlHashTablePtr notaDecl;
xmlHashTablePtr schemasImports;
void *_private; /* unused by the library for users or bindings */
xmlHashTablePtr groupDecl;
xmlDictPtr dict;
void *includes; /* the includes, this is opaque for now */
int preserve; /* whether to free the document */
int counter; /* used to give ononymous components unique names */
xmlHashTablePtr idcDef; /* All identity-constraint defs. */
void *volatiles; /* Obsolete */
};
XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type);
XMLPUBFUN void XMLCALL xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_SCHEMAS_ENABLED */
#endif /* __XML_SCHEMA_INTERNALS_H__ */
| 26,023 | 26.136601 | 85 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/xmlschemas.h
|
/*
* Summary: incomplete XML Schemas structure implementation
* Description: interface to the XML Schemas handling and schema validity
* checking, it is incomplete right now.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_SCHEMA_H__
#define __XML_SCHEMA_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_SCHEMAS_ENABLED
#include <libxml/tree.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* This error codes are obsolete; not used any more.
*/
typedef enum {
XML_SCHEMAS_ERR_OK = 0,
XML_SCHEMAS_ERR_NOROOT = 1,
XML_SCHEMAS_ERR_UNDECLAREDELEM,
XML_SCHEMAS_ERR_NOTTOPLEVEL,
XML_SCHEMAS_ERR_MISSING,
XML_SCHEMAS_ERR_WRONGELEM,
XML_SCHEMAS_ERR_NOTYPE,
XML_SCHEMAS_ERR_NOROLLBACK,
XML_SCHEMAS_ERR_ISABSTRACT,
XML_SCHEMAS_ERR_NOTEMPTY,
XML_SCHEMAS_ERR_ELEMCONT,
XML_SCHEMAS_ERR_HAVEDEFAULT,
XML_SCHEMAS_ERR_NOTNILLABLE,
XML_SCHEMAS_ERR_EXTRACONTENT,
XML_SCHEMAS_ERR_INVALIDATTR,
XML_SCHEMAS_ERR_INVALIDELEM,
XML_SCHEMAS_ERR_NOTDETERMINIST,
XML_SCHEMAS_ERR_CONSTRUCT,
XML_SCHEMAS_ERR_INTERNAL,
XML_SCHEMAS_ERR_NOTSIMPLE,
XML_SCHEMAS_ERR_ATTRUNKNOWN,
XML_SCHEMAS_ERR_ATTRINVALID,
XML_SCHEMAS_ERR_VALUE,
XML_SCHEMAS_ERR_FACET,
XML_SCHEMAS_ERR_,
XML_SCHEMAS_ERR_XXX
} xmlSchemaValidError;
/*
* ATTENTION: Change xmlSchemaSetValidOptions's check
* for invalid values, if adding to the validation
* options below.
*/
/**
* xmlSchemaValidOption:
*
* This is the set of XML Schema validation options.
*/
typedef enum {
XML_SCHEMA_VAL_VC_I_CREATE = 1<<0
/* Default/fixed: create an attribute node
* or an element's text node on the instance.
*/
} xmlSchemaValidOption;
/*
XML_SCHEMA_VAL_XSI_ASSEMBLE = 1<<1,
* assemble schemata using
* xsi:schemaLocation and
* xsi:noNamespaceSchemaLocation
*/
/**
* The schemas related types are kept internal
*/
typedef struct _xmlSchema xmlSchema;
typedef xmlSchema *xmlSchemaPtr;
/**
* xmlSchemaValidityErrorFunc:
* @ctx: the validation context
* @msg: the message
* @...: extra arguments
*
* Signature of an error callback from an XSD validation
*/
typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* xmlSchemaValidityWarningFunc:
* @ctx: the validation context
* @msg: the message
* @...: extra arguments
*
* Signature of a warning callback from an XSD validation
*/
typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* A schemas validation context
*/
typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
/*
* Interfaces for parsing.
*/
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
xmlSchemaNewParserCtxt (const char *URL);
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
xmlSchemaNewMemParserCtxt (const char *buffer,
int size);
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
xmlSchemaNewDocParserCtxt (xmlDocPtr doc);
XMLPUBFUN void XMLCALL
xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt,
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void *ctx);
XMLPUBFUN void XMLCALL
xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void *ctx);
XMLPUBFUN int XMLCALL
xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
xmlSchemaValidityErrorFunc * err,
xmlSchemaValidityWarningFunc * warn,
void **ctx);
XMLPUBFUN int XMLCALL
xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
XMLPUBFUN xmlSchemaPtr XMLCALL
xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
xmlSchemaFree (xmlSchemaPtr schema);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
xmlSchemaDump (FILE *output,
xmlSchemaPtr schema);
#endif /* LIBXML_OUTPUT_ENABLED */
/*
* Interfaces for validating
*/
XMLPUBFUN void XMLCALL
xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void *ctx);
XMLPUBFUN void XMLCALL
xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror,
void *ctx);
XMLPUBFUN int XMLCALL
xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
xmlSchemaValidityErrorFunc *err,
xmlSchemaValidityWarningFunc *warn,
void **ctx);
XMLPUBFUN int XMLCALL
xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt,
int options);
XMLPUBFUN int XMLCALL
xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
XMLPUBFUN xmlSchemaValidCtxtPtr XMLCALL
xmlSchemaNewValidCtxt (xmlSchemaPtr schema);
XMLPUBFUN void XMLCALL
xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
xmlDocPtr instance);
XMLPUBFUN int XMLCALL
xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
xmlNodePtr elem);
XMLPUBFUN int XMLCALL
xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
xmlParserInputBufferPtr input,
xmlCharEncoding enc,
xmlSAXHandlerPtr sax,
void *user_data);
XMLPUBFUN int XMLCALL
xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,
const char * filename,
int options);
XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt);
/*
* Interface to insert Schemas SAX validation in a SAX stream
*/
typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;
XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL
xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt,
xmlSAXHandlerPtr *sax,
void **user_data);
XMLPUBFUN int XMLCALL
xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_SCHEMAS_ENABLED */
#endif /* __XML_SCHEMA_H__ */
| 6,202 | 27.324201 | 112 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/dict.h
|
/*
* Summary: string dictionnary
* Description: dictionary of reusable strings, just used to avoid allocation
* and freeing operations.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_DICT_H__
#define __XML_DICT_H__
#include <libxml/xmlversion.h>
#include <libxml/tree.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* The dictionnary.
*/
typedef struct _xmlDict xmlDict;
typedef xmlDict *xmlDictPtr;
/*
* Constructor and destructor.
*/
XMLPUBFUN xmlDictPtr XMLCALL
xmlDictCreate (void);
XMLPUBFUN xmlDictPtr XMLCALL
xmlDictCreateSub(xmlDictPtr sub);
XMLPUBFUN int XMLCALL
xmlDictReference(xmlDictPtr dict);
XMLPUBFUN void XMLCALL
xmlDictFree (xmlDictPtr dict);
/*
* Lookup of entry in the dictionnary.
*/
XMLPUBFUN const xmlChar * XMLCALL
xmlDictLookup (xmlDictPtr dict,
const xmlChar *name,
int len);
XMLPUBFUN const xmlChar * XMLCALL
xmlDictExists (xmlDictPtr dict,
const xmlChar *name,
int len);
XMLPUBFUN const xmlChar * XMLCALL
xmlDictQLookup (xmlDictPtr dict,
const xmlChar *prefix,
const xmlChar *name);
XMLPUBFUN int XMLCALL
xmlDictOwns (xmlDictPtr dict,
const xmlChar *str);
XMLPUBFUN int XMLCALL
xmlDictSize (xmlDictPtr dict);
/*
* Cleanup function
*/
XMLPUBFUN void XMLCALL
xmlDictCleanup (void);
#ifdef __cplusplus
}
#endif
#endif /* ! __XML_DICT_H__ */
| 1,582 | 21.614286 | 77 |
h
|
cba-pipeline-public
|
cba-pipeline-public-master/containernet/ndn-containers/ndn_headless-player/code/ndn-dash/libdash/libxml2/include/libxml/xpathInternals.h
|
/*
* Summary: internal interfaces for XML Path Language implementation
* Description: internal interfaces for XML Path Language implementation
* used to build new modules on top of XPath like XPointer and
* XSLT
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_XPATH_INTERNALS_H__
#define __XML_XPATH_INTERNALS_H__
#include <libxml/xmlversion.h>
#include <libxml/xpath.h>
#ifdef LIBXML_XPATH_ENABLED
#ifdef __cplusplus
extern "C" {
#endif
/************************************************************************
* *
* Helpers *
* *
************************************************************************/
/*
* Many of these macros may later turn into functions. They
* shouldn't be used in #ifdef's preprocessor instructions.
*/
/**
* xmlXPathSetError:
* @ctxt: an XPath parser context
* @err: an xmlXPathError code
*
* Raises an error.
*/
#define xmlXPathSetError(ctxt, err) \
{ xmlXPatherror((ctxt), __FILE__, __LINE__, (err)); \
if ((ctxt) != NULL) (ctxt)->error = (err); }
/**
* xmlXPathSetArityError:
* @ctxt: an XPath parser context
*
* Raises an XPATH_INVALID_ARITY error.
*/
#define xmlXPathSetArityError(ctxt) \
xmlXPathSetError((ctxt), XPATH_INVALID_ARITY)
/**
* xmlXPathSetTypeError:
* @ctxt: an XPath parser context
*
* Raises an XPATH_INVALID_TYPE error.
*/
#define xmlXPathSetTypeError(ctxt) \
xmlXPathSetError((ctxt), XPATH_INVALID_TYPE)
/**
* xmlXPathGetError:
* @ctxt: an XPath parser context
*
* Get the error code of an XPath context.
*
* Returns the context error.
*/
#define xmlXPathGetError(ctxt) ((ctxt)->error)
/**
* xmlXPathCheckError:
* @ctxt: an XPath parser context
*
* Check if an XPath error was raised.
*
* Returns true if an error has been raised, false otherwise.
*/
#define xmlXPathCheckError(ctxt) ((ctxt)->error != XPATH_EXPRESSION_OK)
/**
* xmlXPathGetDocument:
* @ctxt: an XPath parser context
*
* Get the document of an XPath context.
*
* Returns the context document.
*/
#define xmlXPathGetDocument(ctxt) ((ctxt)->context->doc)
/**
* xmlXPathGetContextNode:
* @ctxt: an XPath parser context
*
* Get the context node of an XPath context.
*
* Returns the context node.
*/
#define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node)
XMLPUBFUN int XMLCALL
xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt);
XMLPUBFUN double XMLCALL
xmlXPathPopNumber (xmlXPathParserContextPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
xmlXPathPopString (xmlXPathParserContextPtr ctxt);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt);
XMLPUBFUN void * XMLCALL
xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
/**
* xmlXPathReturnBoolean:
* @ctxt: an XPath parser context
* @val: a boolean
*
* Pushes the boolean @val on the context stack.
*/
#define xmlXPathReturnBoolean(ctxt, val) \
valuePush((ctxt), xmlXPathNewBoolean(val))
/**
* xmlXPathReturnTrue:
* @ctxt: an XPath parser context
*
* Pushes true on the context stack.
*/
#define xmlXPathReturnTrue(ctxt) xmlXPathReturnBoolean((ctxt), 1)
/**
* xmlXPathReturnFalse:
* @ctxt: an XPath parser context
*
* Pushes false on the context stack.
*/
#define xmlXPathReturnFalse(ctxt) xmlXPathReturnBoolean((ctxt), 0)
/**
* xmlXPathReturnNumber:
* @ctxt: an XPath parser context
* @val: a double
*
* Pushes the double @val on the context stack.
*/
#define xmlXPathReturnNumber(ctxt, val) \
valuePush((ctxt), xmlXPathNewFloat(val))
/**
* xmlXPathReturnString:
* @ctxt: an XPath parser context
* @str: a string
*
* Pushes the string @str on the context stack.
*/
#define xmlXPathReturnString(ctxt, str) \
valuePush((ctxt), xmlXPathWrapString(str))
/**
* xmlXPathReturnEmptyString:
* @ctxt: an XPath parser context
*
* Pushes an empty string on the stack.
*/
#define xmlXPathReturnEmptyString(ctxt) \
valuePush((ctxt), xmlXPathNewCString(""))
/**
* xmlXPathReturnNodeSet:
* @ctxt: an XPath parser context
* @ns: a node-set
*
* Pushes the node-set @ns on the context stack.
*/
#define xmlXPathReturnNodeSet(ctxt, ns) \
valuePush((ctxt), xmlXPathWrapNodeSet(ns))
/**
* xmlXPathReturnEmptyNodeSet:
* @ctxt: an XPath parser context
*
* Pushes an empty node-set on the context stack.
*/
#define xmlXPathReturnEmptyNodeSet(ctxt) \
valuePush((ctxt), xmlXPathNewNodeSet(NULL))
/**
* xmlXPathReturnExternal:
* @ctxt: an XPath parser context
* @val: user data
*
* Pushes user data on the context stack.
*/
#define xmlXPathReturnExternal(ctxt, val) \
valuePush((ctxt), xmlXPathWrapExternal(val))
/**
* xmlXPathStackIsNodeSet:
* @ctxt: an XPath parser context
*
* Check if the current value on the XPath stack is a node set or
* an XSLT value tree.
*
* Returns true if the current object on the stack is a node-set.
*/
#define xmlXPathStackIsNodeSet(ctxt) \
(((ctxt)->value != NULL) \
&& (((ctxt)->value->type == XPATH_NODESET) \
|| ((ctxt)->value->type == XPATH_XSLT_TREE)))
/**
* xmlXPathStackIsExternal:
* @ctxt: an XPath parser context
*
* Checks if the current value on the XPath stack is an external
* object.
*
* Returns true if the current object on the stack is an external
* object.
*/
#define xmlXPathStackIsExternal(ctxt) \
((ctxt->value != NULL) && (ctxt->value->type == XPATH_USERS))
/**
* xmlXPathEmptyNodeSet:
* @ns: a node-set
*
* Empties a node-set.
*/
#define xmlXPathEmptyNodeSet(ns) \
{ while ((ns)->nodeNr > 0) (ns)->nodeTab[(ns)->nodeNr--] = NULL; }
/**
* CHECK_ERROR:
*
* Macro to return from the function if an XPath error was detected.
*/
#define CHECK_ERROR \
if (ctxt->error != XPATH_EXPRESSION_OK) return
/**
* CHECK_ERROR0:
*
* Macro to return 0 from the function if an XPath error was detected.
*/
#define CHECK_ERROR0 \
if (ctxt->error != XPATH_EXPRESSION_OK) return(0)
/**
* XP_ERROR:
* @X: the error code
*
* Macro to raise an XPath error and return.
*/
#define XP_ERROR(X) \
{ xmlXPathErr(ctxt, X); return; }
/**
* XP_ERROR0:
* @X: the error code
*
* Macro to raise an XPath error and return 0.
*/
#define XP_ERROR0(X) \
{ xmlXPathErr(ctxt, X); return(0); }
/**
* CHECK_TYPE:
* @typeval: the XPath type
*
* Macro to check that the value on top of the XPath stack is of a given
* type.
*/
#define CHECK_TYPE(typeval) \
if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
XP_ERROR(XPATH_INVALID_TYPE)
/**
* CHECK_TYPE0:
* @typeval: the XPath type
*
* Macro to check that the value on top of the XPath stack is of a given
* type. Return(0) in case of failure
*/
#define CHECK_TYPE0(typeval) \
if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
XP_ERROR0(XPATH_INVALID_TYPE)
/**
* CHECK_ARITY:
* @x: the number of expected args
*
* Macro to check that the number of args passed to an XPath function matches.
*/
#define CHECK_ARITY(x) \
if (ctxt == NULL) return; \
if (nargs != (x)) \
XP_ERROR(XPATH_INVALID_ARITY);
/**
* CAST_TO_STRING:
*
* Macro to try to cast the value on the top of the XPath stack to a string.
*/
#define CAST_TO_STRING \
if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_STRING)) \
xmlXPathStringFunction(ctxt, 1);
/**
* CAST_TO_NUMBER:
*
* Macro to try to cast the value on the top of the XPath stack to a number.
*/
#define CAST_TO_NUMBER \
if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_NUMBER)) \
xmlXPathNumberFunction(ctxt, 1);
/**
* CAST_TO_BOOLEAN:
*
* Macro to try to cast the value on the top of the XPath stack to a boolean.
*/
#define CAST_TO_BOOLEAN \
if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_BOOLEAN)) \
xmlXPathBooleanFunction(ctxt, 1);
/*
* Variable Lookup forwarding.
*/
XMLPUBFUN void XMLCALL
xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt,
xmlXPathVariableLookupFunc f,
void *data);
/*
* Function Lookup forwarding.
*/
XMLPUBFUN void XMLCALL
xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt,
xmlXPathFuncLookupFunc f,
void *funcCtxt);
/*
* Error reporting.
*/
XMLPUBFUN void XMLCALL
xmlXPatherror (xmlXPathParserContextPtr ctxt,
const char *file,
int line,
int no);
XMLPUBFUN void XMLCALL
xmlXPathErr (xmlXPathParserContextPtr ctxt,
int error);
#ifdef LIBXML_DEBUG_ENABLED
XMLPUBFUN void XMLCALL
xmlXPathDebugDumpObject (FILE *output,
xmlXPathObjectPtr cur,
int depth);
XMLPUBFUN void XMLCALL
xmlXPathDebugDumpCompExpr(FILE *output,
xmlXPathCompExprPtr comp,
int depth);
#endif
/**
* NodeSet handling.
*/
XMLPUBFUN int XMLCALL
xmlXPathNodeSetContains (xmlNodeSetPtr cur,
xmlNodePtr val);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathDifference (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathIntersection (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathDistinctSorted (xmlNodeSetPtr nodes);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathDistinct (xmlNodeSetPtr nodes);
XMLPUBFUN int XMLCALL
xmlXPathHasSameNodes (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes,
xmlNodePtr node);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathLeadingSorted (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathNodeLeading (xmlNodeSetPtr nodes,
xmlNodePtr node);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathLeading (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes,
xmlNodePtr node);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathTrailingSorted (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathNodeTrailing (xmlNodeSetPtr nodes,
xmlNodePtr node);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathTrailing (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
/**
* Extending a context.
*/
XMLPUBFUN int XMLCALL
xmlXPathRegisterNs (xmlXPathContextPtr ctxt,
const xmlChar *prefix,
const xmlChar *ns_uri);
XMLPUBFUN const xmlChar * XMLCALL
xmlXPathNsLookup (xmlXPathContextPtr ctxt,
const xmlChar *prefix);
XMLPUBFUN void XMLCALL
xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt);
XMLPUBFUN int XMLCALL
xmlXPathRegisterFunc (xmlXPathContextPtr ctxt,
const xmlChar *name,
xmlXPathFunction f);
XMLPUBFUN int XMLCALL
xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt,
const xmlChar *name,
const xmlChar *ns_uri,
xmlXPathFunction f);
XMLPUBFUN int XMLCALL
xmlXPathRegisterVariable (xmlXPathContextPtr ctxt,
const xmlChar *name,
xmlXPathObjectPtr value);
XMLPUBFUN int XMLCALL
xmlXPathRegisterVariableNS (xmlXPathContextPtr ctxt,
const xmlChar *name,
const xmlChar *ns_uri,
xmlXPathObjectPtr value);
XMLPUBFUN xmlXPathFunction XMLCALL
xmlXPathFunctionLookup (xmlXPathContextPtr ctxt,
const xmlChar *name);
XMLPUBFUN xmlXPathFunction XMLCALL
xmlXPathFunctionLookupNS (xmlXPathContextPtr ctxt,
const xmlChar *name,
const xmlChar *ns_uri);
XMLPUBFUN void XMLCALL
xmlXPathRegisteredFuncsCleanup (xmlXPathContextPtr ctxt);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathVariableLookup (xmlXPathContextPtr ctxt,
const xmlChar *name);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt,
const xmlChar *name,
const xmlChar *ns_uri);
XMLPUBFUN void XMLCALL
xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt);
/**
* Utilities to extend XPath.
*/
XMLPUBFUN xmlXPathParserContextPtr XMLCALL
xmlXPathNewParserContext (const xmlChar *str,
xmlXPathContextPtr ctxt);
XMLPUBFUN void XMLCALL
xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt);
/* TODO: remap to xmlXPathValuePop and Push. */
XMLPUBFUN xmlXPathObjectPtr XMLCALL
valuePop (xmlXPathParserContextPtr ctxt);
XMLPUBFUN int XMLCALL
valuePush (xmlXPathParserContextPtr ctxt,
xmlXPathObjectPtr value);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathNewString (const xmlChar *val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathNewCString (const char *val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathWrapString (xmlChar *val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathWrapCString (char * val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathNewFloat (double val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathNewBoolean (int val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathNewNodeSet (xmlNodePtr val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathNewValueTree (xmlNodePtr val);
XMLPUBFUN void XMLCALL
xmlXPathNodeSetAdd (xmlNodeSetPtr cur,
xmlNodePtr val);
XMLPUBFUN void XMLCALL
xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur,
xmlNodePtr val);
XMLPUBFUN void XMLCALL
xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
xmlNodePtr node,
xmlNsPtr ns);
XMLPUBFUN void XMLCALL
xmlXPathNodeSetSort (xmlNodeSetPtr set);
XMLPUBFUN void XMLCALL
xmlXPathRoot (xmlXPathParserContextPtr ctxt);
XMLPUBFUN void XMLCALL
xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
xmlXPathParseName (xmlXPathParserContextPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
xmlXPathParseNCName (xmlXPathParserContextPtr ctxt);
/*
* Existing functions.
*/
XMLPUBFUN double XMLCALL
xmlXPathStringEvalNumber (const xmlChar *str);
XMLPUBFUN int XMLCALL
xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
xmlXPathObjectPtr res);
XMLPUBFUN void XMLCALL
xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathNodeSetMerge (xmlNodeSetPtr val1,
xmlNodeSetPtr val2);
XMLPUBFUN void XMLCALL
xmlXPathNodeSetDel (xmlNodeSetPtr cur,
xmlNodePtr val);
XMLPUBFUN void XMLCALL
xmlXPathNodeSetRemove (xmlNodeSetPtr cur,
int val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathNewNodeSetList (xmlNodeSetPtr val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathWrapNodeSet (xmlNodeSetPtr val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathWrapExternal (void *val);
XMLPUBFUN int XMLCALL xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
XMLPUBFUN int XMLCALL xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt);
XMLPUBFUN int XMLCALL xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict);
XMLPUBFUN void XMLCALL xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt);
XMLPUBFUN void XMLCALL xmlXPathAddValues(xmlXPathParserContextPtr ctxt);
XMLPUBFUN void XMLCALL xmlXPathSubValues(xmlXPathParserContextPtr ctxt);
XMLPUBFUN void XMLCALL xmlXPathMultValues(xmlXPathParserContextPtr ctxt);
XMLPUBFUN void XMLCALL xmlXPathDivValues(xmlXPathParserContextPtr ctxt);
XMLPUBFUN void XMLCALL xmlXPathModValues(xmlXPathParserContextPtr ctxt);
XMLPUBFUN int XMLCALL xmlXPathIsNodeType(const xmlChar *name);
/*
* Some of the axis navigation routines.
*/
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextSelf(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextChild(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextParent(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur);
/*
* The official core of XPath functions.
*/
XMLPUBFUN void XMLCALL xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs);
XMLPUBFUN void XMLCALL xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs);
/**
* Really internal functions
*/
XMLPUBFUN void XMLCALL xmlXPathNodeSetFreeNs(xmlNsPtr ns);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_XPATH_ENABLED */
#endif /* ! __XML_XPATH_INTERNALS_H__ */
| 19,448 | 29.822504 | 97 |
h
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.