mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 02:11:11 +02:00
eitd: move typedefs to eitd.h
This commit is contained in:
74
src/eitd/eitd.h
Normal file
74
src/eitd/eitd.h
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
//
|
||||||
|
// sectionsd.cpp (network daemon for SI-sections)
|
||||||
|
// (dbox-II-project)
|
||||||
|
//
|
||||||
|
// Copyright (C) 2001 by fnbrd
|
||||||
|
//
|
||||||
|
// Homepage: http://dbox2.elxsi.de
|
||||||
|
//
|
||||||
|
// Copyright (C) 2008, 2009 Stefan Seyfried
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation; either version 2 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program 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 General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef __eitd_h__
|
||||||
|
#define __eitd_h__
|
||||||
|
|
||||||
|
#include "SIutils.hpp"
|
||||||
|
#include "SIservices.hpp"
|
||||||
|
#include "SIevents.hpp"
|
||||||
|
#include "SIsections.hpp"
|
||||||
|
#include "SIlanguage.hpp"
|
||||||
|
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
|
typedef boost::shared_ptr<class SIevent> SIeventPtr;
|
||||||
|
|
||||||
|
struct OrderServiceUniqueKeyFirstStartTimeEventUniqueKey
|
||||||
|
{
|
||||||
|
bool operator()(const SIeventPtr &p1, const SIeventPtr &p2)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
(p1->get_channel_id() == p2->get_channel_id()) ?
|
||||||
|
(p1->times.begin()->startzeit == p2->times.begin()->startzeit ? p1->eventID < p2->eventID : p1->times.begin()->startzeit < p2->times.begin()->startzeit )
|
||||||
|
:
|
||||||
|
(p1->get_channel_id() < p2->get_channel_id());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef std::set<SIeventPtr, OrderServiceUniqueKeyFirstStartTimeEventUniqueKey > MySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey;
|
||||||
|
|
||||||
|
struct OrderFirstEndTimeServiceIDEventUniqueKey
|
||||||
|
{
|
||||||
|
bool operator()(const SIeventPtr &p1, const SIeventPtr &p2)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
p1->times.begin()->startzeit + (long)p1->times.begin()->dauer == p2->times.begin()->startzeit + (long)p2->times.begin()->dauer ?
|
||||||
|
(p1->service_id == p2->service_id ? p1->uniqueKey() > p2->uniqueKey() : p1->service_id < p2->service_id)
|
||||||
|
:
|
||||||
|
( p1->times.begin()->startzeit + (long)p1->times.begin()->dauer < p2->times.begin()->startzeit + (long)p2->times.begin()->dauer ) ;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef std::set<SIeventPtr, OrderFirstEndTimeServiceIDEventUniqueKey > MySIeventsOrderFirstEndTimeServiceIDEventUniqueKey;
|
||||||
|
|
||||||
|
typedef std::map<t_channel_id, event_id_t, std::less<t_channel_id> > MySIeventUniqueKeysMetaOrderServiceUniqueKey;
|
||||||
|
typedef std::map<event_id_t, SIeventPtr, std::less<event_id_t> > MySIeventsOrderUniqueKey;
|
||||||
|
|
||||||
|
typedef boost::shared_ptr<class SIservice> SIservicePtr;
|
||||||
|
typedef std::map<t_channel_id, SIservicePtr, std::less<t_channel_id> > MySIservicesOrderUniqueKey;
|
||||||
|
typedef std::map<t_channel_id, SIservicePtr, std::less<t_channel_id> > MySIservicesNVODorderUniqueKey;
|
||||||
|
|
||||||
|
#endif
|
Reference in New Issue
Block a user