JSON RPC and the old HTTP API notification events?

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
solariz Offline
Junior Member
Posts: 15
Joined: Apr 2010
Reputation: 0
Question  JSON RPC and the old HTTP API notification events? Post: #1
Hi,

due to the old HTTP API is deprecated I wonder if the old notification
windows are still in XBMC and if they can be triggered by a RPC request ?

In the old API it was easy possible to give a onscreen notification by requesting:

/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification(<title>,<msg>))



In the JSON RPC Docu of Dharma I cant find a Notification or Exec function.

So onscreen Notification over JSONRPC impossible ? Would be a shame.


regards
find quote
Montellese Online
Team-XBMC Developer
Posts: 2,782
Joined: Jan 2009
Reputation: 20
Location: Switzerland
Post: #2
"Impossible" is a strong word. It just hasn't been implemented yet Wink

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
solariz Offline
Junior Member
Posts: 15
Joined: Apr 2010
Reputation: 0
Post: #3
damn - I doubt this.
So at least for now - impossible Sad
find quote
ncarthy Offline
Junior Member
Posts: 24
Joined: Aug 2010
Reputation: 0
Post: #4
It's not JSON Sad ...but you can use the EventServer api to send a notification to the window. You can even send an icon apparently but I never got that to work.

Heres the function signature in C Sharp
/************************************************************/
/* SendNotification - Payload format */
/* %s - caption */
/* %s - message */
/* %c - icontype ( 0=>NOICON, 1=>JPEG , 2=>PNG , 3=>GIF ) */
/* %d - reserved ( 0 ) */
/* XX - imagedata ( can span multiple packets ) */
/************************************************************************/
public bool SendNotification(string Caption, string Message, IconType IconType, string IconFile)
find quote
darkscout Offline
Posting Freak
Posts: 2,148
Joined: Jul 2008
Reputation: 12
Post: #5
xbmc-send -a "Notification(Testing,XBMC Command Success.)"

[Image: aeKO.jpeg]
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
find quote
solariz Offline
Junior Member
Posts: 15
Joined: Apr 2010
Reputation: 0
Post: #6
Thanks to ncarthy & darkscout didn`t worked with the eventserver so far but seems
exactly what I`m looking for. A "fire and forget" solution is fine, JSON of course would
be better but I guess I`m fine with the Eventserver.

Those Examples looking good:

http://xbmc.svn.sourceforge.net/viewvc/x...iew=markup
find quote
topfs2 Online
Team-XBMC Developer
Posts: 3,825
Joined: Dec 2007
Reputation: 8
Post: #7
solariz Wrote:Hi,

due to the old HTTP API is deprecated I wonder if the old notification
windows are still in XBMC and if they can be triggered by a RPC request ?

In the old API it was easy possible to give a onscreen notification by requesting:

/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification(<title>,<msg>))



In the JSON RPC Docu of Dharma I cant find a Notification or Exec function.

So onscreen Notification over JSONRPC impossible ? Would be a shame.


regards

Exec will never happen but notification might .submit a track ticket for each missing method with as much detail possible with parameters and expected outcome from a call and result from the call.

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
find quote
fidoboy Offline
Fan
Posts: 404
Joined: Oct 2008
Reputation: 0
Post: #8
There is any changes on this issue? There is no way to show on screen notifications using JSON RPC? There is any alternative way to do this from PHP sripts?
find quote
topfs2 Online
Team-XBMC Developer
Posts: 3,825
Joined: Dec 2007
Reputation: 8
Post: #9
No way currently, please submit a feature request trac ticket for it and cc me and Montellese.

Its a feature we want, but its easy to forget about it Smile

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
find quote
fidoboy Offline
Fan
Posts: 404
Joined: Oct 2008
Reputation: 0
Post: #10
Ok, i've created it: http://trac.xbmc.org/ticket/11443 I don't know how to cc it to other users, sorry..
find quote