1 package com.smartdevicelink.proxy.rpc;
\r
3 import java.util.Hashtable;
\r
4 import java.util.Vector;
\r
6 import com.smartdevicelink.proxy.RPCResponse;
\r
7 import com.smartdevicelink.proxy.constants.Names;
\r
10 * List Files Response is sent, when ListFiles has been called
\r
12 * @since SmartDeviceLink 2.0
\r
14 public class ListFilesResponse extends RPCResponse {
\r
17 * Constructs a new ListFilesResponse object
\r
19 public ListFilesResponse() {
\r
22 public ListFilesResponse(Hashtable hash) {
\r
25 public void setFilenames(Vector<String> filenames) {
\r
26 if (filenames != null) {
\r
27 parameters.put(Names.filenames, filenames);
\r
29 parameters.remove(Names.filenames);
\r
32 public Vector<String> getFilenames() {
\r
33 if (parameters.get(Names.filenames) instanceof Vector<?>) {
\r
34 Vector<?> list = (Vector<?>)parameters.get(Names.filenames);
\r
35 if (list != null && list.size()>0) {
\r
36 Object obj = list.get(0);
\r
37 if (obj instanceof String) {
\r
38 return (Vector<String>) list;
\r
44 public void setSpaceAvailable(Integer spaceAvailable) {
\r
45 if (spaceAvailable != null) {
\r
46 parameters.put(Names.spaceAvailable, spaceAvailable);
\r
48 parameters.remove(Names.spaceAvailable);
\r
51 public Integer getSpaceAvailable() {
\r
52 return (Integer) parameters.get(Names.spaceAvailable);
\r