Advertisement
Guest User

Untitled

a guest
Feb 15th, 2010
1,145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 14.00 KB | None | 0 0
  1. Command CJSONRPC::m_commands[] = {
  2. // JSON-RPC
  3.   { "JSONRPC.Introspect",               CJSONRPC::Introspect,                   Response,     ReadData,        "Enumerates all actions and descriptions. Parameter example {\"getdescriptions\": true, \"getpermissions\": true, \"filterbytransport\": true }. All parameters optional" },
  4.   { "JSONRPC.Version",                  CJSONRPC::Version,                      Response,     ReadData,        "Retrieve the jsonrpc protocol version" },
  5.   { "JSONRPC.Permission",               CJSONRPC::Permission,                   Response,     ReadData,        "Retrieve the clients permissions" },
  6.   { "JSONRPC.Ping",                     CJSONRPC::Ping,                         Response,     ReadData,        "Ping responder" },
  7.   { "JSONRPC.GetAnnouncementFlags",     CJSONRPC::GetAnnouncementFlags,         Announcing,   ReadData,        "Get announcement flags" },
  8.   { "JSONRPC.SetAnnouncementFlags",     CJSONRPC::SetAnnouncementFlags,         Announcing,   ControlAnnounce, "Change the announcement flags. Parameter example {\"playback\": true, \"gui\": false }" },
  9.   { "JSONRPC.Announce",                 CJSONRPC::Announce,                     Response,     ReadData,        "Announce to other connected clients. Parameter example {\"sender\": \"foo\", \"message\": \"bar\", \"data\": \"somedata\" }. data is optional" },
  10.  
  11. // Player
  12.   { "Player.GetActivePlayers",          CPlayerOperations::GetActivePlayers,    Response,     ReadData,        "Returns all active players IDs"},
  13.  
  14. // Music player
  15.   { "MusicPlayer.PlayPause",            CAVPlayerOperations::PlayPause,         Response,     ControlPlayback, "Pauses or unpause playback" },
  16.   { "MusicPlayer.Stop",                 CAVPlayerOperations::Stop,              Response,     ControlPlayback, "Stops playback" },
  17.   { "MusicPlayer.SkipPrevious",         CAVPlayerOperations::SkipPrevious,      Response,     ControlPlayback, "Skips to previous item on the playlist" },
  18.   { "MusicPlayer.SkipNext",             CAVPlayerOperations::SkipNext,          Response,     ControlPlayback, "Skips to next item on the playlist" },
  19.  
  20.   { "MusicPlayer.BigSkipBackward",      CAVPlayerOperations::BigSkipBackward,   Response,     ControlPlayback, "" },
  21.   { "MusicPlayer.BigSkipForward",       CAVPlayerOperations::BigSkipForward,    Response,     ControlPlayback, "" },
  22.   { "MusicPlayer.SmallSkipBackward",    CAVPlayerOperations::SmallSkipBackward, Response,     ControlPlayback, "" },
  23.   { "MusicPlayer.SmallSkipForward",     CAVPlayerOperations::SmallSkipForward,  Response,     ControlPlayback, "" },
  24.  
  25.   { "MusicPlayer.Rewind",               CAVPlayerOperations::Rewind,            Response,     ControlPlayback, "Rewind current playback" },
  26.   { "MusicPlayer.Forward",              CAVPlayerOperations::Forward,           Response,     ControlPlayback, "Forward current playback" },
  27.  
  28.   { "MusicPlayer.GetTime",              CAVPlayerOperations::GetTime,           Response,     ReadData,        "Retrieve time" },
  29.   { "MusicPlayer.GetTimeMS",            CAVPlayerOperations::GetTimeMS,         Response,     ReadData,        "Retrieve time in MS" },
  30.   { "MusicPlayer.GetPercentage",        CAVPlayerOperations::GetPercentage,     Response,     ReadData,        "Retrieve percentage" },
  31.   { "MusicPlayer.SeekTime",             CAVPlayerOperations::SeekTime,          Response,     ControlPlayback, "Seek to a specific time. Parameter integer in MS" },
  32.  
  33.   { "MusicPlayer.GetPlaylist",          CAVPlayerOperations::GetPlaylist,       Response,     ReadData,        "Retrieve active playlist" },
  34.  
  35.   { "MusicPlayer.Record",               CAVPlayerOperations::Record,            Response,     ControlPlayback, "" },
  36.  
  37. // Video player
  38.   { "VideoPlayer.PlayPause",            CAVPlayerOperations::PlayPause,         Response,     ControlPlayback, "Pauses or unpause playback" },
  39.   { "VideoPlayer.Stop",                 CAVPlayerOperations::Stop,              Response,     ControlPlayback, "Stops playback" },
  40.   { "VideoPlayer.SkipPrevious",         CAVPlayerOperations::SkipPrevious,      Response,     ControlPlayback, "Skips to previous item on the playlist" },
  41.   { "VideoPlayer.SkipNext",             CAVPlayerOperations::SkipNext,          Response,     ControlPlayback, "Skips to next item on the playlist" },
  42.  
  43.   { "VideoPlayer.BigSkipBackward",      CAVPlayerOperations::BigSkipBackward,   Response,     ControlPlayback, "" },
  44.   { "VideoPlayer.BigSkipForward",       CAVPlayerOperations::BigSkipForward,    Response,     ControlPlayback, "" },
  45.   { "VideoPlayer.SmallSkipBackward",    CAVPlayerOperations::SmallSkipBackward, Response,     ControlPlayback, "" },
  46.   { "VideoPlayer.SmallSkipForward",     CAVPlayerOperations::SmallSkipForward,  Response,     ControlPlayback, "" },
  47.  
  48.   { "VideoPlayer.Rewind",               CAVPlayerOperations::Rewind,            Response,     ControlPlayback, "Rewind current playback" },
  49.   { "VideoPlayer.Forward",              CAVPlayerOperations::Forward,           Response,     ControlPlayback, "Forward current playback" },
  50.  
  51.   { "VideoPlayer.GetTime",              CAVPlayerOperations::GetTime,           Response,     ReadData,        "Retrieve time" },
  52.   { "VideoPlayer.GetTimeMS",            CAVPlayerOperations::GetTimeMS,         Response,     ReadData,        "Retrieve time in MS" },
  53.   { "VideoPlayer.GetPercentage",        CAVPlayerOperations::GetPercentage,     Response,     ReadData,        "Retrieve percentage" },
  54.   { "VideoPlayer.SeekTime",             CAVPlayerOperations::SeekTime,          Response,     ControlPlayback, "Seek to a specific time. Parameter integer in MS" },
  55.  
  56.   { "VideoPlayer.GetPlaylist",          CAVPlayerOperations::GetPlaylist,       Response,     ReadData,        "Retrieve active playlist" },
  57.  
  58. // Picture player
  59.   { "PicturePlayer.PlayPause",          CPicturePlayerOperations::PlayPause,    Response,     ControlPlayback, "Pauses or unpause slideshow" },
  60.   { "PicturePlayer.Stop",               CPicturePlayerOperations::Stop,         Response,     ControlPlayback, "Stops slideshow" },
  61.   { "PicturePlayer.SkipPrevious",       CPicturePlayerOperations::SkipPrevious, Response,     ControlPlayback, "Skips to previous picture in the slideshow" },
  62.   { "PicturePlayer.SkipNext",           CPicturePlayerOperations::SkipNext,     Response,     ControlPlayback, "Skips to next picture in the slideshow" },
  63.  
  64.   { "PicturePlayer.MoveLeft",           CPicturePlayerOperations::MoveLeft,     Response,     ControlPlayback, "If picture is zoomed move viewport left otherwise skip previous" },
  65.   { "PicturePlayer.MoveRight",          CPicturePlayerOperations::MoveRight,    Response,     ControlPlayback, "If picture is zoomed move viewport right otherwise skip previous" },
  66.   { "PicturePlayer.MoveDown",           CPicturePlayerOperations::MoveDown,     Response,     ControlPlayback, "If picture is zoomed move viewport down" },
  67.   { "PicturePlayer.MoveUp",             CPicturePlayerOperations::MoveUp,       Response,     ControlPlayback, "If picture is zoomed move viewport up" },
  68.  
  69.   { "PicturePlayer.ZoomOut",            CPicturePlayerOperations::ZoomOut,      Response,     ControlPlayback, "Zoom out once" },
  70.   { "PicturePlayer.ZoomIn",             CPicturePlayerOperations::ZoomIn,       Response,     ControlPlayback, "Zoom in once" },
  71.   { "PicturePlayer.Zoom",               CPicturePlayerOperations::Zoom,         Response,     ControlPlayback, "Zooms current picture. Parameter integer of zoom level" },
  72.   { "PicturePlayer.Rotate",             CPicturePlayerOperations::Rotate,       Response,     ControlPlayback, "Rotates current picture" },
  73.  
  74. // Playlist
  75.   { "Playlist.GetItems",                CPlaylistOperations::GetItems,          Response,     ReadData,        "Retrieve items in the playlist. Parameter example {\"playlist\": \"music\" }. playlist optional." },
  76.   { "Playlist.Add",                     CPlaylistOperations::Add,               Response,     ControlPlayback, "Add items to the playlist. Parameter example {\"playlist\": \"music\", \"file\": \"/foo/bar.mp3\" }. playlist optional." },
  77.   { "Playlist.Remove",                  CPlaylistOperations::Remove,            Response,     ControlPlayback, "Remove items in the playlist. Parameter example {\"playlist\": \"music\", \"item\": 0 }. playlist optional." },
  78.   { "Playlist.Swap",                    CPlaylistOperations::Swap,              Response,     ControlPlayback, "Swap items in the playlist. Parameter example {\"playlist\": \"music\", \"item1\": 0, \"item2\": 1 }. playlist optional." },
  79.   { "Playlist.Shuffle",                 CPlaylistOperations::Shuffle,           Response,     ControlPlayback, "Shuffle playlist" },
  80.  
  81. // File
  82.   { "Files.GetShares",                  CFileOperations::GetRootDirectory,      Response,     ReadData,        "Get the root directory of the media windows" },
  83.   { "Files.Download",                   CFileOperations::Download,              FileDownload, ReadData,        "Specify a file to download to get info about how to download it, i.e a proper URL" },
  84.  
  85.   { "Files.GetDirectory",               CFileOperations::GetDirectory,          Response,     ReadData,        "Retrieve the specified directory" },
  86.  
  87. // Music library
  88.   { "MusicLibrary.GetArtists",          CMusicLibrary::GetArtists,              Response,     ReadData,        "Retrieve all artists" },
  89.   { "MusicLibrary.GetAlbums",           CMusicLibrary::GetAlbums,               Response,     ReadData,        "Retrieve all albums from specified artist or genre" },
  90.   { "MusicLibrary.GetSongs",            CMusicLibrary::GetSongs,                Response,     ReadData,        "Retrieve all songs from specified album, artist or genre" },
  91.  
  92.   { "MusicLibrary.GetSongInfo",         CMusicLibrary::GetSongInfo,             Response,     ReadData,        "Retrieve the wanted info from the specified song" },
  93.  
  94. // Video library
  95.   { "VideoLibrary.GetMovies",           CVideoLibrary::GetMovies,               Response,     ReadData,        "Retrieve all movies. Parameter example { \"fields\": [\"plot\"], \"sortmethod\": \"title\", \"sortorder\": \"ascending\", \"start\": 0, \"end\": 3}. fields, sortorder, sortmethod, start and end are optional" },
  96.  
  97.   { "VideoLibrary.GetTVShows",          CVideoLibrary::GetTVShows,              Response,     ReadData,        "Parameter example { \"fields\": [\"plot\"], \"sortmethod\": \"artistignorethe\", \"sortorder\": \"ascending\", \"start\": 0, \"end\": 3}. sortorder, sortmethod, start and end are optional" },
  98.   { "VideoLibrary.GetSeasons",          CVideoLibrary::GetSeasons,              Response,     ReadData,        "Parameter example { \"tvshowid\": 0, \"fields\": [\"plot\"], \"sortmethod\": \"artistignorethe\", \"sortorder\": \"ascending\", \"start\": 0, \"end\": 3}. sortorder, sortmethod, start and end are optional" },
  99.   { "VideoLibrary.GetEpisodes",         CVideoLibrary::GetEpisodes,             Response,     ReadData,        "Parameter example { \"tvshowid\": 0, \"seasonid\": 0, \"fields\": [\"plot\"], \"sortmethod\": \"artistignorethe\", \"sortorder\": \"ascending\", \"start\": 0, \"end\": 3}. sortorder, sortmethod, start and end are optional" },
  100.  
  101.   { "VideoLibrary.GetMusicVideoAlbums", CVideoLibrary::GetMusicVideoAlbums,     Response,     ReadData,        "" },
  102.   { "VideoLibrary.GetMusicVideos",      CVideoLibrary::GetMusicVideos,          Response,     ReadData,        "Parameter example { \"artistid\": 0, \"albumid\": 0, \"fields\": [\"plot\"], \"sortmethod\": \"artistignorethe\", \"sortorder\": \"ascending\", \"start\": 0, \"end\": 3}. sortorder, sortmethod, start and end are optional" },
  103.  
  104.   { "VideoLibrary.GetMovieInfo",        CVideoLibrary::GetMovieInfo,            Response,     ReadData,        "Parameter example { \"movieid\": 0, \"fields\": [\"plot\"] }" },
  105.   { "VideoLibrary.GetTVShowInfo",       CVideoLibrary::GetTVShowInfo,           Response,     ReadData,        "Parameter example { \"tvshowid\": 0, \"fields\": [\"plot\"] }" },
  106.   { "VideoLibrary.GetEpisodeInfo",      CVideoLibrary::GetEpisodeInfo,          Response,     ReadData,        "Parameter example { \"episodeinfo\": 0, \"fields\": [\"plot\"] }" },
  107.   { "VideoLibrary.GetMusicVideoInfo",   CVideoLibrary::GetMusicVideoInfo,       Response,     ReadData,        "Parameter example { \"musicvideoid\": 0, \"fields\": [\"plot\"] }" },
  108.  
  109. // System operations
  110.   { "System.Shutdown",                  CSystemOperations::Shutdown,            Response,     ControlPower,    "" },
  111.   { "System.Suspend",                   CSystemOperations::Suspend,             Response,     ControlPower,    "" },
  112.   { "System.Hibernate",                 CSystemOperations::Hibernate,           Response,     ControlPower,    "" },
  113.   { "System.Reboot",                    CSystemOperations::Reboot,              Response,     ControlPower,    "" },
  114.  
  115.   { "System.GetInfo",                   CSystemOperations::GetInfo,             Response,     ReadData,        "Retrieve info about the system" },
  116.  
  117. // XBMC Operations
  118.   { "XBMC.GetVolume",                   CXBMCOperations::GetVolume,             Response,     ReadData,        "Retrieve the current volume" },
  119.   { "XBMC.SetVolume",                   CXBMCOperations::SetVolume,             Response,     ControlPlayback, "Set volume. Parameter integer between 0 amd 100" },
  120.   { "XBMC.ToggleMute",                  CXBMCOperations::ToggleMute,            Response,     ControlPlayback, "Toggle mute" },
  121.  
  122.   { "XBMC.Play",                        CXBMCOperations::Play,                  Response,     ControlPlayback, "Starts playback" },
  123.   { "XBMC.StartSlideshow",              CXBMCOperations::StartSlideshow,        Response,     ControlPlayback, "Starts slideshow. Parameter example {\"directory\": \"/foo/\", \"random\": true, \"recursive\": true} or just string to recursively and random run directory" },
  124.  
  125.   { "XBMC.Log",                         CXBMCOperations::Log,                   Response,     Logging,         "Logs a line in the xbmc.log. Parameter example {\"message\": \"foo\", \"level\": \"info\"} or just a string to log message with level debug" },
  126.  
  127.   { "XBMC.Quit",                        CXBMCOperations::Quit,                  Response,     ControlPower,    "Quit xbmc" }
  128. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement