NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 35 36 37 38 39 … 93 Next »
WebService for GBPVR

 
  • 0 Vote(s) - 0 Average
WebService for GBPVR
jtalvio
Offline

Junior Member

Posts: 5
Threads: 1
Joined: Dec 2005
#1
2005-12-31, 04:02 PM
First of all, thanks for a great piece of software. I've struggled with VDR and MVP until I finally found GBPVR.

I think there has been some kind of discussion on webservices -as in SOAP and XML- before, but nobody really got interested in it(?). I think having a webservice interface offering similar functionalities than the -very nice- web admin would be great.

What I am aiming for is enabling developers to implement language independent client apps for controlling GBPVR. Mainly I am interested in client apps for mobile devices, such as smart phones which quite widely support J2ME -and webservices.

Smart phones commonly have browsers in them, but using those really suck. I don't know if I am the only one but to me a client running in my Series 60 phone for controlling GBPVR would really be a killer application.

I havent' done sw with C# before but am looking into it. I'd appreciate any comments regarding to this idea and of course some pointers how to get started. Also if anyone thinks there's a better away for approaching this that'd be nice to hear too.

br,
-jTalvio
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,949
Threads: 770
Joined: Nov 2003
#2
2005-12-31, 04:18 PM
It should be reasonably easy for you to do. The web admin code can be used as an example of how to use the API to do this stuff, and then you just need to create yourself a set of webservice wrappers.
jtalvio
Offline

Junior Member

Posts: 5
Threads: 1
Joined: Dec 2005
#3
2005-12-31, 06:00 PM
Yep, it looks like so to me too. I might need some pointers on how to deploy the webservice in to the GBPVR web server though. I'll be back with some questions if I run into problems.

thanks,
-jTalvio
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#4
2005-12-31, 08:46 PM
I had thought about doing something similiar a long time ago, but there wasn't much interest. Personally, I'd prefer a REST implementation over a SOAP/WSDL implementation, but again that's just my preference.
jtalvio
Offline

Junior Member

Posts: 5
Threads: 1
Joined: Dec 2005
#5
2006-01-01, 07:25 PM
It looks like doing atleast the basic stuff -like getting the channel list and programs- is really easy to do with C#. I use the web admin as a basis and Visual Studio pretty much does everything else (builds WSDLs, etc). Nice.

How do you think I should go with the authentication? Should I add a authentication token to every function or is there a better way to do it? I thought something like adding MD5(salt+credentials+timestamp) and timestamp to the call parameters, how does that sound?

BTW, how do I disable current form based authentication for webservice files (which I'm planning to put in a 'webservice' folder under 'web' folder)?
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#6
2006-01-01, 08:01 PM
Personally, I wouldn't include authentication for GBPVR web services. Mainly because I think it adds an extra layer of complication that doesn't need to be there.

If however, you want to add authentication, here is an article that describes the basics.

http://www.codeproject.com/cs/webservice...cation.asp

Code project has several different articles with sample code that explains various aspects of SOAP webservices with .Net.
jtalvio
Offline

Junior Member

Posts: 5
Threads: 1
Joined: Dec 2005
#7
2006-01-01, 08:56 PM
I agree that the interface should be as simple as possible. I think I still want to add authentication just to prevent people scheduling recordings for me. ;-)

I had a similar approach in mind that is described in the link you sent. A function based authentication should keep it fairly simple.

I'll send the function signatures here for commenting once I have something to show.
jtalvio
Offline

Junior Member

Posts: 5
Threads: 1
Joined: Dec 2005
#8
2006-01-02, 06:29 PM
I now have some basic stuff working. Probably not the optimal solutions but atleast I am getting something working. Currently following SOAP functions have some kind of working implementations:
public string authenticate(string hash, string GUID);
public ChannelWrapper[] getChannels(string token);
public ProgrammeWrapper[] getProgramList(int channelOID, DateTime startTime, DateTime endTime, string token)

What I still need is:
public ScheduleRecordingWrapper getSchedule(int recoid, string token);
public int updateRecording(...);
public int createRecording(...);

And those shouldn't be much work either. I can shortly start to implement a simple J2ME client. I've currently tested the functions with browser and Flash and they seem to work ok.

Authentication is now done so that the client needs to give MD5(GUID/salt+login+password) and gets a token including timestamp and other stuff which can be later used to validate a token. Same password and login are used as in web admin. Token needs to be given with all function calls. I think a single token could be valid from a few minutes to an hour or so. Haven't really done any checking to it yet.

Wrapper classes are -as you could probably guess- just wrappers for related info. Makes SOAP implementations easier. I decided to fetch the programs one channel at a time because of the idea I have for the client. Let's see how it ends up being and change that if necessary.

Figured out how to disable that Form authentication. Comments are welcome.
normanr
Offline

Posting Freak

Posts: 855
Threads: 3
Joined: Dec 2004
#9
2006-02-25, 11:10 PM
To disable the forms auth: create a webservice folder, and copy the web.config from public to webservice Smile

I would rather see session based authentication - i.e. call the authenticate method once, which will set a session based variable to let the other calls know the user is allowed. You have to mark the webservice as having session data in the WebService attribute. This way you don't need to pass the token around, but you do need a client that supports cookies. (in .net just add a cookiejar to the soap proxy object)

If you want to keep going with the token based approach, I would rather see the token always passed as the first parameter. A good reson to stick with the token method: change the token to 'ref string token' - and make the webservice update it during each call. Keep a request counter in the token - this way you can reduce reply attacks by keeping track of which request number is expected, and cancel the call if the token is duplicated.
tsandstr
Offline

Junior Member

Posts: 22
Threads: 3
Joined: Feb 2006
#10
2006-03-07, 09:23 PM
jTalvio: Your idea sounds great! Webservices is just the way to go and the J2ME app sounds very interesting indeed. Let us know when you have something working. Is there already perhaps a plugin available?
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  TitanTv Remote Schedule For GBPVR UncleJohnsBand 51 35,899 2015-08-20, 05:11 PM
Last Post: sub
  Roku & GBPVR pvruser 16 12,068 2011-10-16, 08:31 PM
Last Post: pvruser
  (Yet Another) Rename Helper script for GBPVR & NPVR pvruser 2 2,931 2011-07-22, 01:27 AM
Last Post: pvruser
  Webservice API to support Android App development Barsk 4 3,542 2010-10-19, 07:31 AM
Last Post: Barsk
  Live GBPVR CD/DVD/Thumb drive :D pBS 101 32,176 2010-01-03, 06:22 AM
Last Post: pBS
  some help on basic gbpvr plugin code Etacovda 12 5,133 2009-06-14, 08:24 PM
Last Post: Etacovda
  Linking gbpvr.db3 to Access 2003: get readonly tables Khurram 5 4,204 2008-09-11, 08:35 AM
Last Post: Khurram
  UAC and Vista with GBPVR systemshark 2 2,123 2008-08-03, 07:20 AM
Last Post: systemshark
  Controlling an Audio Receiver with the GBPVR remote erik 7 3,055 2008-06-01, 08:31 PM
Last Post: erik
  SkipTool, do you use the GBPVR SQLite database? mkenyon2 1 1,735 2008-04-21, 07:30 PM
Last Post: pastro

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

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

Linear Mode
Threaded Mode