Skip to content

Commit

Permalink
add some #if VDRVERSNUM to compile with older vdr
Browse files Browse the repository at this point in the history
  • Loading branch information
flensrocker committed Mar 12, 2012
1 parent 125d35e commit 436919f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dbus2vdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ bool cPluginDbus2vdr::Start(void)
{
// Start any background activities the plugin shall perform.
new cDBusDispatcherEpg;
#if VDRVERSNUM >= 10717
new cDBusDispatcherOsd;
#endif
new cDBusDispatcherPlugin;
new cDBusDispatcherRecording;
new cDBusDispatcherRemote;
Expand All @@ -139,8 +141,10 @@ bool cPluginDbus2vdr::Start(void)
new cDBusDispatcherSkin;
new cDBusDispatcherTimer;
cDBusMonitor::StartMonitor();
#if VDRVERSNUM >= 10717
if (enable_osd)
new cDBusOsdProvider();
#endif
return true;
}

Expand Down
2 changes: 2 additions & 0 deletions epg.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ static void sAddEvent(DBusMessageIter &array, const cEvent &event)
ti = event.RunningStatus();
cDBusHelper::AddKeyValue(arr, "RunningStatus", DBUS_TYPE_INT32, DBUS_TYPE_INT32_AS_STRING, &ti);

#if VDRVERSNUM >= 10711
ti = event.ParentalRating();
cDBusHelper::AddKeyValue(arr, "ParentalRating", DBUS_TYPE_INT32, DBUS_TYPE_INT32_AS_STRING, &ti);

Expand All @@ -279,6 +280,7 @@ static void sAddEvent(DBusMessageIter &array, const cEvent &event)
cDBusHelper::AddKeyValue(arr, *cString::sprintf("Content[%d]", i), DBUS_TYPE_STRING, DBUS_TYPE_STRING_AS_STRING, &c);
}
}
#endif

if (!dbus_message_iter_close_container(&array, &arr))
esyslog("dbus2vdr: sAddEvent: can't close array container");
Expand Down
4 changes: 4 additions & 0 deletions osd.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "osd.h"

#if VDRVERSNUM >= 10717

#include "common.h"
#include "helper.h"
#include "monitor.h"
Expand Down Expand Up @@ -290,3 +292,5 @@ bool cDBusDispatcherOsd::OnIntrospect(DBusMessage *msg, cString &Data)
"</node>\n";
return true;
}

#endif
4 changes: 4 additions & 0 deletions osd.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef __DBUS2VDR_OSD_H
#define __DBUS2VDR_OSD_H

#if VDRVERSNUM >= 10717

#include "message.h"

#include <vdr/osd.h>
Expand Down Expand Up @@ -136,3 +138,5 @@ class cDBusDispatcherOsd : public cDBusMessageDispatcher
};

#endif

#endif
8 changes: 8 additions & 0 deletions setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ cDBusMessageSetup::cDBusMessageSetup(cDBusMessageSetup::eAction action, DBusConn
_bindings.Add(cSetupBinding::NewInt32(&Setup.UseVps, "UseVps", 0, 1));
_bindings.Add(cSetupBinding::NewInt32(&Setup.VpsMargin, "VpsMargin", 0));
_bindings.Add(cSetupBinding::NewInt32(&Setup.RecordingDirs, "RecordingDirs", 0, 1));
#if VDRVERSNUM >= 10712
_bindings.Add(cSetupBinding::NewInt32(&Setup.FoldersInTimerMenu, "FoldersInTimerMenu", 0, 1));
#endif
#if VDRVERSNUM >= 10715
_bindings.Add(cSetupBinding::NewInt32(&Setup.NumberKeysForChars, "NumberKeysForChars", 0, 1));
#endif
//_bindings.Add(cSetupBinding::NewInt32(&Setup.VideoDisplayFormat, "VideoDisplayFormat"));
//_bindings.Add(cSetupBinding::NewInt32(&Setup.VideoFormat, "VideoFormat"));
//_bindings.Add(cSetupBinding::NewInt32(&Setup.UpdateChannels, "UpdateChannels"));
Expand All @@ -78,7 +82,9 @@ cDBusMessageSetup::cDBusMessageSetup(cDBusMessageSetup::eAction action, DBusConn
//_bindings.Add(cSetupBinding::NewInt32(&Setup.FontOsdSize, "FontOsdSize"));
//_bindings.Add(cSetupBinding::NewInt32(&Setup.FontSmlSize, "FontSmlSize"));
//_bindings.Add(cSetupBinding::NewInt32(&Setup.FontFixSize, "FontFixSize"));
#if VDRVERSNUM >= 10704
_bindings.Add(cSetupBinding::NewInt32(&Setup.MaxVideoFileSize, "MaxVideoFileSize", MINVIDEOFILESIZE, MAXVIDEOFILESIZETS));
#endif
_bindings.Add(cSetupBinding::NewInt32(&Setup.SplitEditedFiles, "SplitEditedFiles", 0, 1));
//_bindings.Add(cSetupBinding::NewInt32(&Setup.DelTimeshiftRec, "DelTimeshiftRec"));
_bindings.Add(cSetupBinding::NewInt32(&Setup.MinEventTimeout, "MinEventTimeout"));
Expand All @@ -87,7 +93,9 @@ cDBusMessageSetup::cDBusMessageSetup(cDBusMessageSetup::eAction action, DBusConn
_bindings.Add(cSetupBinding::NewInt32(&Setup.ShowReplayMode, "ShowReplayMode", 0, 1));
_bindings.Add(cSetupBinding::NewInt32(&Setup.ResumeID, "ResumeID", 0, 99));
_bindings.Add(cSetupBinding::NewInt32(&Setup.InitialVolume, "InitialVolume", -1, 255));
#if VDRVERSNUM >= 10712
_bindings.Add(cSetupBinding::NewInt32(&Setup.ChannelsWrap, "ChannelsWrap", 0, 1));
#endif
_bindings.Add(cSetupBinding::NewInt32(&Setup.EmergencyExit, "EmergencyExit", 0, 1));
}
}
Expand Down

0 comments on commit 436919f

Please sign in to comment.