home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Derive plugin from another plugin?
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="bartmanson" data-source="post: 104128" data-attributes="member: 10748"><p>Hi everybody,</p><p></p><p>first of all: Many thanks to the mp team (developers, testers, docu writers). You are doing an awesome job!</p><p></p><p>I think that some of MPs very few problems that users still experience come from standby or hibernate issues due to faulty drivers or whatever. At least this is what I experience... So I decided to program a plugin that replaces PowerScheduler. It would allow to shutdown the computer completely and call an external program (CMOSTimer - see: <a href="http://www.boraxsoft.de/CMOSTimer_eng.html" target="_blank">http://www.boraxsoft.de/CMOSTimer_eng.html</a>). This program would write the wakeup time to my pc's BIOS (like nvram-wakeup in linux). But I did not want to program everything from scratch because I thought that I would only have to override PowerSchedulers "Stop()" method in order to achieve my goals. The body of the Stop() method would call the external program CMOSTimer with the protected PowerScheduler variable "_wakeupTime" as parameter.</p><p></p><p>So I decided to derive a class called "BIOSScheduler" from "MediaPortal.PowerScheduler.Powerscheduler" and overrode some methods with the "new" keyword (e.g. PluginName(), Stop(), ...). But it seems that the respective methods from the base class "PowerScheduler" are called when configuration.exe and mediaportal.exe load the plugins. I think this is because the methods in the base classes are not declared as "virtual" and thus i cannot use the "override" keyword when I define the methods in the derived class (cf. Knowing When to Use Override and New Keywords (C# Programming Guide) in C# Visual Express Online Help).</p><p></p><p>Question to the mp team:</p><p>Am I doing something wrong or do you agree that it is currently not possible to derive a plugin from another plugin? If so: Would it be possible or do you think it is desirable to change maybe the IPlugin interface so that all methods are declared as virtual? I want to avoid copying the entire powerscheduler source just to add a small change to its functionality.</p><p></p><p>Hope that is not too confusing. Do you get my point?</p><p></p><p>Thanks in advance!</p><p>BartManson</p></blockquote><p></p>
[QUOTE="bartmanson, post: 104128, member: 10748"] Hi everybody, first of all: Many thanks to the mp team (developers, testers, docu writers). You are doing an awesome job! I think that some of MPs very few problems that users still experience come from standby or hibernate issues due to faulty drivers or whatever. At least this is what I experience... So I decided to program a plugin that replaces PowerScheduler. It would allow to shutdown the computer completely and call an external program (CMOSTimer - see: [url]http://www.boraxsoft.de/CMOSTimer_eng.html[/url]). This program would write the wakeup time to my pc's BIOS (like nvram-wakeup in linux). But I did not want to program everything from scratch because I thought that I would only have to override PowerSchedulers "Stop()" method in order to achieve my goals. The body of the Stop() method would call the external program CMOSTimer with the protected PowerScheduler variable "_wakeupTime" as parameter. So I decided to derive a class called "BIOSScheduler" from "MediaPortal.PowerScheduler.Powerscheduler" and overrode some methods with the "new" keyword (e.g. PluginName(), Stop(), ...). But it seems that the respective methods from the base class "PowerScheduler" are called when configuration.exe and mediaportal.exe load the plugins. I think this is because the methods in the base classes are not declared as "virtual" and thus i cannot use the "override" keyword when I define the methods in the derived class (cf. Knowing When to Use Override and New Keywords (C# Programming Guide) in C# Visual Express Online Help). Question to the mp team: Am I doing something wrong or do you agree that it is currently not possible to derive a plugin from another plugin? If so: Would it be possible or do you think it is desirable to change maybe the IPlugin interface so that all methods are declared as virtual? I want to avoid copying the entire powerscheduler source just to add a small change to its functionality. Hope that is not too confusing. Do you get my point? Thanks in advance! BartManson [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Derive plugin from another plugin?
Contact us
RSS
Top
Bottom