NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 28 29 30 31 32 … 93 Next »
GetClientIdentifier + GB-PVR client

 
  • 0 Vote(s) - 0 Average
GetClientIdentifier + GB-PVR client
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#11
2008-10-09, 10:27 PM
mvallevand Wrote:What about using GBPVRInfo.RunningOnMVP or GBPVRInfo.RunningOnClient ?

Martin
Both new to me Martin, any clue on how to use them?

Alex
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#12
2008-10-10, 02:45 AM
Not sure if this will solve your problem, but WizTools looks at two things:
  1. clientID contains "MPV", means this process is running as a MVP
  2. The settings section in the config file indicates whether this MACHINE is running as a client.
Not sure what clientID returns if it is a PCH (I don't have one), but if you find out, post the result, I'd like to know in order to publish that method as well...
Code:
[SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]<summary>[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000] Is this instance supporting MVP process[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]</summary>[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]<returns>[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]True if running on MVP, False if running on PC[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]</returns>[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]static [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]bool[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] isRunningOnMVP()[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] clientID = [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]PluginHelperFactory[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getPluginHelper().GetClientIdentifier();[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] clientID.Contains([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"MVP"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2]}[/SIZE]

[SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]<summary>[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000] Get whether this instance of GPBVR is running in Client Mode.[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]</summary>[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]<returns>[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]True if this instance is running in Client mode (setting in Config.exe)[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]</returns>[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]static [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]bool[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] isClient()[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] getGBPvrRootSetting([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"ClientMode"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]).ToLower() == [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"true"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2]}[/SIZE]

[SIZE=2][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]<summary>[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000] Return setting in config file root area.[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]</summary>[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]<param name="key"></param>[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#808080][SIZE=2][COLOR=#808080]<returns></returns>[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]static [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] getGBPvrRootSetting([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] key)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] xpath = [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"/settings/"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + key ;[/SIZE]
[SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Logger.Verbose("loading " + xpath);[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]XmlDocument[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] config = GBPvrConfigDocument();[/SIZE]
[SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]XmlNode[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] node = config.SelectSingleNode(xpath);[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] node.InnerText;[/SIZE]
[SIZE=2]}[/SIZE]
[/SIZE]
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,767
Threads: 954
Joined: May 2006
#13
2008-10-10, 03:03 AM
I posted my PCH test here http://forums.gbpvr.com/showpost.php?p=2...ostcount=7

Alex those are just simple booleans so you can use them in conditions.

Martin
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#14
2008-10-10, 08:43 PM
@JavaWiz and Martin - thanks for the suggestions guys... I'm already using GetClientIdentifer() and I'm using Martin's code too.

I've now established that GetClientIdentifer() returns the full client address (including the MAC address for MVP, NMT) as soon as the user selects any menu item or the screensaver kicks in - and since I guess not much will have happened before either of those events, I can live with that.

Alex
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  Developing Android TV client fred250 2 1,757 2020-11-16, 06:33 PM
Last Post: fred250
  Web Client: Slow with separate thread and date not obscured cncb 32 15,694 2016-10-10, 02:01 PM
Last Post: mvallevand
  How to tell when video playback has finished in web client? cncb 6 4,200 2015-09-29, 08:07 PM
Last Post: cncb
  How to get edl information for videos in a web client? fred250 27 10,464 2014-12-10, 12:39 AM
Last Post: fred250
  Remote client logout timeout. mvallevand 2 2,504 2014-10-28, 12:55 AM
Last Post: mvallevand
  Tuner plugins and client id mvallevand 2 2,039 2013-07-03, 01:39 AM
Last Post: mvallevand
  Client - Tuner plugins mvallevand 53 13,406 2011-09-17, 07:19 PM
Last Post: mvallevand
  Client/server detection imilne 1 1,662 2010-08-08, 04:23 PM
Last Post: sub
  GetClientIdentifier() return values JavaWiz 3 1,818 2009-03-05, 02:11 PM
Last Post: ACTCMS
  MVP Software Client SFX Group 86 29,890 2008-11-16, 02:01 AM
Last Post: mvallevand

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

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

Linear Mode
Threaded Mode