summaryrefslogtreecommitdiff
path: root/SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/DeleteFile.java
blob: 9ddc93f00a3f644d37c77be798609651c2f127ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package com.smartdevicelink.proxy.rpc;

import java.util.Hashtable;

import com.smartdevicelink.proxy.RPCRequest;
import com.smartdevicelink.proxy.constants.Names;

/**
 * Used to delete a file resident on the SMARTDEVICELINK module in the app's local cache.
 * Not supported on first generation SMARTDEVICELINK vehicles
 * <p>
 * 
 * @since SmartDeviceLink 2.0
 * @see PutFile
 * @see ListFiles
 */
public class DeleteFile extends RPCRequest {

	/**
	 * Constructs a new DeleteFile object
	 */
    public DeleteFile() {
        super("DeleteFile");
    }

	/**
	 * Constructs a new DeleteFile object indicated by the Hashtable parameter
	 * <p>
	 * 
	 * @param hash
	 *            The Hashtable to use
	 */
    public DeleteFile(Hashtable hash) {
        super(hash);
    }

	/**
	 * Sets a file reference name
	 * 
	 * @param smartDeviceLinkFileName
	 *            a String value representing a file reference name
	 */
    public void setSmartDeviceLinkFileName(String smartDeviceLinkFileName) {
        if (smartDeviceLinkFileName != null) {
            parameters.put(Names.smartDeviceLinkFileName, smartDeviceLinkFileName);
        } else {
        	parameters.remove(Names.smartDeviceLinkFileName);
        }
    }

	/**
	 * Gets a file reference name
	 * 
	 * @return String -a String value representing a file reference name
	 */
    public String getSmartDeviceLinkFileName() {
        return (String) parameters.get(Names.smartDeviceLinkFileName);
    }
}