NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 50 51 52 53 54 … 93 Next »
Plugin Newbie Question ..

 
  • 0 Vote(s) - 0 Average
Plugin Newbie Question ..
pt-1
Offline

Member

Posts: 50
Threads: 6
Joined: Jan 2006
#1
2006-09-26, 01:23 PM
Hi,
I tried to follow Jasons GBPvr Plug-in PDF Tutorial abut I already struggle at the beginning...

I downloaded Microsoft Visual C# 2005 Express edition

I added the following Code
Code:
using System;
using GBPVR.Public;

namespace FritzBoxPlugin
{
    /// <summary>
    /// Description for FritzBoxPlugin.
    /// </summary>
    public class FritzBoxPlugin : IMenuTask
    {

        #region IMenuTask Members

        public void Activate()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void Deactivate()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public System.Windows.Forms.Form GetConfigFormInstance(System.Xml.XmlDocument document)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void OnClick(System.Drawing.Point location)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void OnDoubleClick(System.Drawing.Point location)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public bool OnKeyDown(System.Windows.Forms.KeyEventArgs e)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void OnMouseWheel(System.Windows.Forms.MouseEventArgs e)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public string getDescription()
        {
            return " This is the Fritz!BoxPlugin";
        }

        public string getName()
        {
            return "Fritz!Box Plugin";
        }

        public string getSkinSubdirectory()
        {
            return "FritzBoxPlugin";
        }

        public System.Drawing.Image getTaskImage()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public bool needsRendering()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public System.Drawing.Image render(out bool requiresMoreRendering)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        #endregion
    }
}


just to get the very first steps but I get attached JPG error message ...

Anyone or is it a hopeless start for me ;-)
Carlito
Offline

Posting Freak

Posts: 817
Threads: 41
Joined: May 2006
#2
2006-09-26, 01:49 PM
This is exactly what your program is telling it to do.
You need to override those methods, otherwise they are just throwing exceptions.
----------------------
[SIZE="1"]PVRX2 1.3.11
Shuttle SG33G5 Case
Core2Duo E8400 3Ghz -- 4 GB RAM
Hauppauge PVR-150
Adaptec AVC-3610 Dual Tuner
Onboard Intel GMA 3100 through HDMI -- 500GB
37" Westinghouse LCD (1920 x 1080p)

Projects
Program Image Tool[/SIZE]
Jeff
Offline

Posting Freak

Posts: 1,933
Threads: 69
Joined: Oct 2004
#3
2006-09-26, 01:57 PM
Your GetConfigFormInstance method needs some code. You can return null if you don't have a configuration form for your plug-in.

Code:
/// <summary>
        /// This method is gets a form that can be used to config the plugin.
        /// </summary>        
        /// <param name="document"></param>
        /// <returns>Configuration Form, or null if there are no user configurable settings.</returns>
        public Form GetConfigFormInstance(XmlDocument document)
        {
            return null;
        }

Jeff
Carlito
Offline

Posting Freak

Posts: 817
Threads: 41
Joined: May 2006
#4
2006-09-26, 01:59 PM
The code shows he has a GetConfigFormInstance method, it is just throwing an exception.
Quote:public System.Windows.Forms.Form GetConfigFormInstance(System.Xml.XmlDocument document)
{
throw new Exception("The method or operation is not implemented.");
}
----------------------
[SIZE="1"]PVRX2 1.3.11
Shuttle SG33G5 Case
Core2Duo E8400 3Ghz -- 4 GB RAM
Hauppauge PVR-150
Adaptec AVC-3610 Dual Tuner
Onboard Intel GMA 3100 through HDMI -- 500GB
37" Westinghouse LCD (1920 x 1080p)

Projects
Program Image Tool[/SIZE]
Snarky
Offline

Junior Member

Posts: 43
Threads: 7
Joined: Oct 2005
#5
2006-09-26, 07:15 PM
Visual Studio 2005 generates stub code for all the required methods for the class, similar to that shown above. You need to replace these stubs with something that doesn't throw an exception. In this case, "return null" is perfectly fine.
pt-1
Offline

Member

Posts: 50
Threads: 6
Joined: Jan 2006
#6
2006-09-26, 07:25 PM
I will give it another try tomorrow ;-)

What I basically tyr to archive is a Plugin simular to the UKCinema Plugin.

It's supposed to be for a Telephone switch/Router/Gateway called Fritz!Fon

What you can do is retrieve a caller list for missed/made and incoming calls

The Linux Commands from a simular apllication are:

Code:
wget -q -O /dev/null "http://fritz.box/cgi-bin/webcm?getpage=../html/de/menus/menu2.html&var:lang=de&var:menu=fon&var:pagename=foncalls"
to refresh the list and then
Code:
wget -q -O - "http://fritz.box/cgi-bin/webcm?getpage=../html/de/FRITZ!Box_Anrufliste.csv"

That generates a list like this:
Code:
Typ;Datum;Rufnummer;Nebenstelle;Eigene Rufnummer;Dauer
1;25.09.06 20:51;008452574457;FON 1;Festnetz;0:01

where

1 is incoming
2 is missed
3 is outgoing

For example if you just wanted the missed ones:

Code:
wget -q -O - "http://fritz.box/cgi-bin/webcm?getpage=../html/de/menus/menu2.html&var:lang=de&var:menu=fon&var:pagename=foncalls" | grep "ll(\"2" | cut -d '"' -f 6,8,10 > /tmp/anruf2.txt

I have asked here for another feature that an incoming call is displayed in an Infobox.

This feature could also be used for other things...

I will have a dig at above tomorrow but if any C Crack is bored you are more than welcome to give me a few hints... Might save me spamming the forum...

Usefull Info:

sometimes fritz.box needs to be replace with the actual IP of the Gateway

Again, the cinema id number in the cinema plugin might be used for this feature ...
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP plugin for Kodi sgilani 2 2,717 2022-10-17, 12:44 AM
Last Post: sgilani
  Web API only_new Question Gazavant 6 2,582 2021-04-04, 06:54 PM
Last Post: sub
  New Systems Plugin kirschey 10 3,291 2020-11-14, 08:01 PM
Last Post: sub
  Another Artwork question scJohn 15 8,035 2019-09-10, 05:33 PM
Last Post: nonob
  WEB API GuidService/Listing question(s) scJohn 6 4,215 2017-08-09, 02:18 PM
Last Post: scJohn
  skin question pBS 2 3,304 2016-06-18, 07:03 PM
Last Post: pBS
  VIdeo playback from plugin mvallevand 5 3,420 2015-08-06, 10:43 PM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 2,856 2014-11-14, 02:05 AM
Last Post: Benoire
  Another SQL question bgowland 15 7,143 2014-05-21, 08:09 AM
Last Post: bgowland
  Absolute newbie trying to realize an idea - where to start? Oopsjoppe 13 5,497 2013-11-11, 05:33 PM
Last Post: Oopsjoppe

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode