This repository has been archived by the owner on May 17, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1348 from avdleeuw/xbmx-playeropen
XBMC - Add binding option to use 'Player.open' RPC call.
- Loading branch information
Showing
3 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
...org.openhab.binding.xbmc/src/main/java/org/openhab/binding/xbmc/rpc/calls/PlayerOpen.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
* Copyright (c) 2010-2014, openHAB.org and others. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.openhab.binding.xbmc.rpc.calls; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import org.openhab.binding.xbmc.rpc.RpcCall; | ||
|
||
import com.ning.http.client.AsyncHttpClient; | ||
|
||
/** | ||
* Player.Open RPC | ||
* | ||
* @author Ard van der Leeuw | ||
* @since 1.6.0 | ||
*/ | ||
public class PlayerOpen extends RpcCall { | ||
|
||
private String file; | ||
|
||
public PlayerOpen(AsyncHttpClient client, String uri) { | ||
super(client, uri); | ||
} | ||
|
||
public void setFile(String file) { | ||
this.file = file; | ||
} | ||
|
||
@Override | ||
protected String getName() { | ||
return "Player.Open"; | ||
} | ||
|
||
@Override | ||
protected Map<String, Object> getParams() { | ||
Map<String, Object> params = new HashMap<String, Object>(); | ||
Map<String, Object> item = new HashMap<String, Object>(); | ||
|
||
item.put("file", file); | ||
params.put("item", item); | ||
return params; | ||
} | ||
|
||
@Override | ||
protected void processResponse(Map<String, Object> response) { | ||
} | ||
} |