From 85f2616ef78700cf2639992abaf1011ecaa897bd Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Sat, 31 Dec 2005 00:23:01 +0000 Subject: [PATCH] make many constructors and destructors invisible for python --- lib/actions/action.h | 4 +++ lib/driver/avswitch.h | 8 ++++-- lib/driver/rfmod.h | 8 ++++-- lib/dvb/dvbtime.h | 4 +++ lib/dvb/epgcache.h | 3 +++ lib/dvb/sec.h | 39 +++++++++++++++++++++++------ lib/dvb/volume.h | 4 ++- lib/dvb_ci/dvbci_ui.h | 8 ++++-- lib/gdi/font.h | 5 +++- lib/gdi/lcd.h | 19 ++++++++++++--- lib/gui/ewindowstyle.h | 6 +++++ lib/service/iservice.h | 66 +++++++++++++++++++++++++++++++++++++++++++++++++- lib/service/service.h | 7 +++++- 13 files changed, 160 insertions(+), 21 deletions(-) diff --git a/lib/actions/action.h b/lib/actions/action.h index 63a2f34..e43e48a 100644 --- a/lib/actions/action.h +++ b/lib/actions/action.h @@ -17,6 +17,10 @@ class eWidget; class eActionMap: public iObject { DECLARE_REF(eActionMap); +#ifdef SWIG + eActionMap(); + ~eActionMap(); +#endif public: #ifndef SWIG eActionMap(); diff --git a/lib/driver/avswitch.h b/lib/driver/avswitch.h index 9f6eccb..d765e02 100644 --- a/lib/driver/avswitch.h +++ b/lib/driver/avswitch.h @@ -4,12 +4,16 @@ class eAVSwitch { static eAVSwitch *instance; - +#ifdef SWIG + eAVSwitch(); + ~eAVSwitch(); +#endif protected: public: +#ifndef SWIG eAVSwitch(); ~eAVSwitch(); - +#endif static eAVSwitch *getInstance(); void setFastBlank(int val); diff --git a/lib/driver/rfmod.h b/lib/driver/rfmod.h index c95c47a..909a08d 100644 --- a/lib/driver/rfmod.h +++ b/lib/driver/rfmod.h @@ -6,11 +6,15 @@ class eRFmod static eRFmod *instance; int fd; -protected: +#ifdef SWIG + eRFmod(); + ~eRFmod(); +#endif public: +#ifndef SWIG eRFmod(); ~eRFmod(); - +#endif static eRFmod *getInstance(); void setFunction(int val); //0=Enable 1=Disable diff --git a/lib/dvb/dvbtime.h b/lib/dvb/dvbtime.h index a0b570d..ec47de4 100644 --- a/lib/dvb/dvbtime.h +++ b/lib/dvb/dvbtime.h @@ -60,6 +60,10 @@ class eDVBLocalTimeHandler: public Object void writeTimeOffsetData(const char*); void updateTime(time_t tp_time, eDVBChannel*, int updateCount); static eDVBLocalTimeHandler *instance; +#ifdef SWIG + eDVBLocalTimeHandler(); + ~eDVBLocalTimeHandler(); +#endif public: #ifndef SWIG PSignal0 m_timeUpdated; diff --git a/lib/dvb/epgcache.h b/lib/dvb/epgcache.h index 9429bf3..cca66d6 100644 --- a/lib/dvb/epgcache.h +++ b/lib/dvb/epgcache.h @@ -218,6 +218,9 @@ private: timeMap::iterator m_timemap_cursor, m_timemap_end; int currentQueryTsidOnid; // needed for getNextTimeEntry.. only valid until next startTimeQuery call +#else + eEPGCache(); + ~eEPGCache(); #endif // SWIG public: static eEPGCache *getInstance() { return instance; } diff --git a/lib/dvb/sec.h b/lib/dvb/sec.h index aa9c027..0720bee 100644 --- a/lib/dvb/sec.h +++ b/lib/dvb/sec.h @@ -109,17 +109,21 @@ public: return secSequence.size(); } }; +#endif class eDVBSatelliteDiseqcParameters { +#ifdef SWIG + eDVBSatelliteDiseqcParameters(); + ~eDVBSatelliteDiseqcParameters(); +#endif public: enum { AA=0, AB=1, BA=2, BB=3, SENDNO=4 /* and 0xF0 .. 0xFF*/ }; // DiSEqC Parameter - __u8 m_committed_cmd; - enum t_diseqc_mode { NONE=0, V1_0=1, V1_1=2, V1_2=3, SMATV=4 }; // DiSEqC Mode - t_diseqc_mode m_diseqc_mode; - enum t_toneburst_param { NO=0, A=1, B=2 }; +#ifndef SWIG + __u8 m_committed_cmd; + t_diseqc_mode m_diseqc_mode; t_toneburst_param m_toneburst_param; __u8 m_repeats; // for cascaded switches @@ -135,23 +139,34 @@ public: 4) uncommitted, committed, toneburst 5) toneburst, uncommitted, committed */ __u8 m_uncommitted_cmd; // state of the 4 uncommitted switches.. +#endif }; class eDVBSatelliteSwitchParameters { +#ifdef SWIG + eDVBSatelliteSwitchParameters(); + ~eDVBSatelliteSwitchParameters(); +#endif public: enum t_22khz_signal { HILO=0, ON=1, OFF=2 }; // 22 Khz enum t_voltage_mode { HV=0, _14V=1, _18V=2, _0V=3 }; // 14/18 V +#ifndef SWIG t_voltage_mode m_voltage_mode; t_22khz_signal m_22khz_signal; __u8 m_rotorPosNum; // 0 is disable.. then use gotoxx +#endif }; class eDVBSatelliteRotorParameters { +#ifdef SWIG + eDVBSatelliteRotorParameters(); + ~eDVBSatelliteRotorParameters(); +#endif public: enum { NORTH, SOUTH, EAST, WEST }; - +#ifndef SWIG eDVBSatelliteRotorParameters() { setDefaultOptions(); } struct eDVBSatelliteRotorInputpowerParameters @@ -179,12 +194,18 @@ public: m_gotoxx_parameters.m_longitude = 0.0; m_gotoxx_parameters.m_latitude = 0.0; } +#endif }; class eDVBSatelliteLNBParameters { +#ifdef SWIG + eDVBSatelliteLNBParameters(); + ~eDVBSatelliteLNBParameters(); +#endif public: enum t_12V_relais_state { OFF=0, ON }; +#ifndef SWIG t_12V_relais_state m_12V_relais_state; // 12V relais output on/off __u8 tuner_mask; // useable by tuner ( 1 | 2 | 4...) @@ -198,8 +219,8 @@ public: std::map m_satellites; eDVBSatelliteDiseqcParameters m_diseqc_parameters; eDVBSatelliteRotorParameters m_rotor_parameters; -}; #endif +}; class eDVBRegisteredFrontend; @@ -213,9 +234,13 @@ class eDVBSatelliteEquipmentControl: public iDVBSatelliteEquipmentControl eSmartPtrList &m_avail_frontends; bool m_rotorMoving; #endif +#ifdef SWIG + eDVBSatelliteEquipmentControl(); + ~eDVBSatelliteEquipmentControl(); +#endif public: - eDVBSatelliteEquipmentControl(eSmartPtrList &avail_frontends); #ifndef SWIG + eDVBSatelliteEquipmentControl(eSmartPtrList &avail_frontends); DECLARE_REF(eDVBSatelliteEquipmentControl); RESULT prepare(iDVBFrontend &frontend, FRONTENDPARAMETERS &parm, eDVBFrontendParametersSatellite &sat, int frontend_id); int canTune(const eDVBFrontendParametersSatellite &feparm, iDVBFrontend *, int frontend_id); diff --git a/lib/dvb/volume.h b/lib/dvb/volume.h index cee3140..084cb6e 100644 --- a/lib/dvb/volume.h +++ b/lib/dvb/volume.h @@ -8,7 +8,9 @@ class eDVBVolumecontrol private: static eDVBVolumecontrol *instance; eDVBVolumecontrol(); - +#ifdef SWIG + ~eDVBVolumecontrol(); +#endif int openMixer(); void closeMixer(int fd); diff --git a/lib/dvb_ci/dvbci_ui.h b/lib/dvb_ci/dvbci_ui.h index 1974d65..3b606d6 100644 --- a/lib/dvb_ci/dvbci_ui.h +++ b/lib/dvb_ci/dvbci_ui.h @@ -11,11 +11,15 @@ class eDVBCI_UI int state[MAX_SLOTS]; static eDVBCI_UI *instance; std::string appName; -protected: +#ifdef SWIG + eDVBCI_UI(); + ~eDVBCI_UI(); +#endif public: +#ifndef SWIG eDVBCI_UI(); ~eDVBCI_UI(); - +#endif static eDVBCI_UI *getInstance(); int getState(int slot); diff --git a/lib/gdi/font.h b/lib/gdi/font.h index 0f3bf71..7c8211b 100644 --- a/lib/gdi/font.h +++ b/lib/gdi/font.h @@ -46,6 +46,9 @@ class fontRenderClass FTC_FaceID getFaceID(const std::string &face); FT_Error getGlyphBitmap(FTC_Image_Desc *font, FT_ULong glyph_index, FTC_SBit *sbit); static fontRenderClass *instance; +#else + fontRenderClass(); + ~fontRenderClass(); #endif public: float getLineHeight(const gFont& font); @@ -54,9 +57,9 @@ public: std::string AddFont(const std::string &filename, const std::string &name, int scale); FT_Error FTC_Face_Requester(FTC_FaceID face_id, FT_Face* aface); int getFont(ePtr &font, const std::string &face, int size, int tabwidth=-1); -#endif fontRenderClass(); ~fontRenderClass(); +#endif }; #ifndef SWIG diff --git a/lib/gdi/lcd.h b/lib/gdi/lcd.h index f2e707f..11749c6 100644 --- a/lib/gdi/lcd.h +++ b/lib/gdi/lcd.h @@ -12,38 +12,49 @@ class eLCD { +#ifdef SWIG + eLCD(eSize size); + ~eLCD(); +#else protected: eSize res; unsigned char *_buffer; int lcdfd; int _stride; int locked; +#endif public: int lock(); void unlock(); int islocked() { return locked; } - +#ifndef SWIG eLCD(eSize size); virtual ~eLCD(); - __u8 *buffer() { return (__u8*)_buffer; } int stride() { return _stride; } eSize size() { return res; } virtual void update()=0; +#endif }; class eDBoxLCD: public eLCD { static eDBoxLCD *instance; unsigned char inverted; +#ifdef SWIG + eDBoxLCD(); + ~eDBoxLCD(); +#endif public: +#ifndef SWIG + eDBoxLCD(); + ~eDBoxLCD(); +#endif static eDBoxLCD *getInstance(); int eDBoxLCD::setLCDContrast(int contrast); int eDBoxLCD::setLCDBrightness(int brightness); void setInverted( unsigned char ); - eDBoxLCD(); - ~eDBoxLCD(); void update(); }; diff --git a/lib/gui/ewindowstyle.h b/lib/gui/ewindowstyle.h index 08ea0a4..04d9d44 100644 --- a/lib/gui/ewindowstyle.h +++ b/lib/gui/ewindowstyle.h @@ -41,9 +41,15 @@ public: class eWindowStyleManager: public iObject { DECLARE_REF(eWindowStyleManager); +#ifdef SWIG + eWindowStyleManager(); + ~eWindowStyleManager(); +#endif public: +#ifndef SWIG eWindowStyleManager(); ~eWindowStyleManager(); +#endif void getStyle(ePtr &style); void setStyle(eWindowStyle *style); static int getInstance(ePtr &mgr) { mgr = m_instance; if (!mgr) return -1; return 0; } diff --git a/lib/service/iservice.h b/lib/service/iservice.h index 3c3248c..d234b6a 100644 --- a/lib/service/iservice.h +++ b/lib/service/iservice.h @@ -191,12 +191,16 @@ typedef long long pts_t; class iStaticServiceInformation: public iObject { +#ifdef SWIG + iStaticServiceInformation(); + ~iStaticServiceInformation(); +#endif public: virtual SWIG_VOID(RESULT) getName(const eServiceReference &ref, std::string &SWIG_OUTPUT)=0; // doesn't need to be implemented, should return -1 then. virtual int getLength(const eServiceReference &ref); - virtual SWIG_VOID(RESULT) getEvent(const eServiceReference &ref, ePtr &SWIG_OUTPUT, time_t start_time=0); + virtual SWIG_VOID(RESULT) getEvent(const eServiceReference &ref, ePtr &SWIG_OUTPUT, time_t start_time=-1); // returns true when not implemented virtual bool isPlayable(const eServiceReference &ref, const eServiceReference &ignore); @@ -210,6 +214,10 @@ TEMPLATE_TYPEDEF(ePtr, eServiceEventPtr); class iServiceInformation: public iObject { +#ifdef SWIG + iServiceInformation(); + ~iServiceInformation(); +#endif public: virtual SWIG_VOID(RESULT) getName(std::string &SWIG_OUTPUT)=0; virtual SWIG_VOID(RESULT) getEvent(ePtr &SWIG_OUTPUT, int nownext); @@ -252,6 +260,10 @@ TEMPLATE_TYPEDEF(ePtr, iServiceInformationPtr); class iFrontendStatusInformation: public iObject { +#ifdef SWIG + iFrontendStatusInformation(); + ~iFrontendStatusInformation(); +#endif public: enum { bitErrorRate, @@ -265,6 +277,10 @@ TEMPLATE_TYPEDEF(ePtr, iFrontendStatusInformationPtr class iPauseableService: public iObject { +#ifdef SWIG + iPausableService(); + ~iPausableService(); +#endif public: virtual RESULT pause()=0; virtual RESULT unpause()=0; @@ -278,6 +294,10 @@ TEMPLATE_TYPEDEF(ePtr, iPauseableServicePtr); class iSeekableService: public iObject { +#ifdef SWIG + iSeekableService(); + ~iSeekableService(); +#endif public: virtual RESULT getLength(pts_t &SWIG_OUTPUT)=0; virtual RESULT seekTo(pts_t to)=0; @@ -293,6 +313,12 @@ TEMPLATE_TYPEDEF(ePtr, iSeekableServicePtr); struct iAudioTrackInfo { +#ifdef SWIG +private: + iAudioTrackInfo(); + ~iAudioTrackInfo(); +public: +#endif #ifndef SWIG std::string m_description; std::string m_language; /* iso639 */ @@ -305,6 +331,10 @@ SWIG_ALLOW_OUTPUT_SIMPLE(iAudioTrackInfo); class iAudioTrackSelection: public iObject { +#ifdef SWIG + iAudioTrackSelection(); + ~iAudioTrackSelection(); +#endif public: virtual int getNumberOfTracks()=0; virtual RESULT selectTrack(unsigned int i)=0; @@ -315,6 +345,10 @@ TEMPLATE_TYPEDEF(ePtr, iAudioTrackSelectionPtr); class iSubserviceList: public iObject { +#ifdef SWIG + iSubserviceList(); + ~iSubserviceList(); +#endif public: virtual int getNumberOfSubservices()=0; virtual SWIG_VOID(RESULT) getSubservice(eServiceReference &SWIG_OUTPUT, unsigned int n)=0; @@ -324,6 +358,10 @@ TEMPLATE_TYPEDEF(ePtr, iSubserviceListPtr); class iTimeshiftService: public iObject { +#ifdef SWIG + iTimeshiftService(); + ~iTimeshiftService(); +#endif public: virtual RESULT startTimeshift()=0; virtual RESULT stopTimeshift()=0; @@ -333,6 +371,10 @@ TEMPLATE_TYPEDEF(ePtr, iTimeshiftServicePtr); class iPlayableService: public iObject { +#ifdef SWIG + iPlayableService(); + ~iPlaybleService(); +#endif friend class iServiceHandler; public: enum @@ -361,6 +403,10 @@ TEMPLATE_TYPEDEF(ePtr, iPlayableServicePtr); class iRecordableService: public iObject { +#ifdef SWIG + iRecordableService(); + ~iRecordableService(); +#endif public: virtual RESULT prepare(const char *filename)=0; virtual RESULT start()=0; @@ -373,6 +419,10 @@ TEMPLATE_TYPEDEF(ePtr, iRecordableServicePtr); class iMutableServiceList: public iObject { +#ifdef SWIG + iMutableServiceList(); + ~iMutableServiceList(); +#endif public: /* flush changes */ virtual RESULT flushChanges()=0; @@ -389,6 +439,10 @@ TEMPLATE_TYPEDEF(ePtr, iMutableServiceListPtr); class iListableService: public iObject { +#ifdef SWIG + iListableService(); + ~iListableService(); +#endif public: /* legacy interface: get a list */ virtual RESULT getContent(std::list &list)=0; @@ -408,6 +462,7 @@ public: TEMPLATE_TYPEDEF(ePtr, iListableServicePtr); +#ifndef SWIG /* a helper class which can be used as argument to stl's sort(). */ class iListableServiceCompare { @@ -419,9 +474,14 @@ public: return m_list->compareLessEqual(a, b); } }; +#endif class iServiceOfflineOperations: public iObject { +#ifdef SWIG + iServiceOfflineOperations(); + ~iServiceOfflineOperations(); +#endif public: /* to delete a service, forever. */ virtual RESULT deleteFromDisk(int simulate=1)=0; @@ -436,6 +496,10 @@ TEMPLATE_TYPEDEF(ePtr, iServiceOfflineOperationsPtr); class iServiceHandler: public iObject { +#ifdef SWIG + iServiceHandler(); + ~iServiceHandler(); +#endif public: virtual SWIG_VOID(RESULT) play(const eServiceReference &, ePtr &SWIG_OUTPUT)=0; virtual SWIG_VOID(RESULT) record(const eServiceReference &, ePtr &SWIG_OUTPUT)=0; diff --git a/lib/service/service.h b/lib/service/service.h index 17614c2..813da24 100644 --- a/lib/service/service.h +++ b/lib/service/service.h @@ -15,10 +15,15 @@ DECLARE_REF(eServiceCenter); private: std::map handler; static eServiceCenter *instance; +#ifdef SWIG + eServiceCenter(); + ~eServiceCenter(); +#endif public: +#ifndef SWIG eServiceCenter(); virtual ~eServiceCenter(); - +#endif // iServiceHandler RESULT play(const eServiceReference &, iPlayableServicePtr &ptr); RESULT record(const eServiceReference &, iRecordableServicePtr &ptr); -- 2.7.4