SDL_Android/SmartDeviceLinkAndroidProxy - added the correct version of the proxy
[profile/ivi/smartdevicelink.git] / SDL_Android / SmartDeviceLinkProxyAndroid / src / com / smartdevicelink / proxy / rpc / SoftButtonCapabilities.java
1 package com.smartdevicelink.proxy.rpc;\r
2 \r
3 import java.util.Hashtable;\r
4 \r
5 import com.smartdevicelink.proxy.RPCStruct;\r
6 import com.smartdevicelink.proxy.constants.Names;\r
7 \r
8 /**\r
9  * Contains information about a SoftButton's capabilities.\r
10  * <p><b>Parameter List\r
11  * <table border="1" rules="all">\r
12  *              <tr>\r
13  *                      <th>Name</th>\r
14  *                      <th>Type</th>\r
15  *                      <th>Description</th>\r
16  *                      <th>SmartDeviceLink Ver. Available</th>\r
17  *              </tr>\r
18  *              <tr>\r
19  *                      <td>shortPressAvailable</td>\r
20  *                      <td>Boolean</td>\r
21  *                      <td>The button supports a short press.\r
22  *                                      Whenever the button is pressed short, onButtonPressed( SHORT) will be invoked.\r
23  *                      </td>\r
24  *                      <td>SmartDeviceLink 2.0</td>\r
25  *              </tr>\r
26  *              <tr>\r
27  *                      <td>longPressAvailable</td>\r
28  *                      <td>Boolean</td>\r
29  *                      <td>The button supports a LONG press.\r
30  *                                      Whenever the button is pressed long, onButtonPressed( LONG) will be invoked.\r
31  *                      </td>\r
32  *                      <td>SmartDeviceLink 2.0</td>\r
33  *              </tr>\r
34  *              <tr>\r
35  *                      <td>upDownAvailable</td>\r
36  *                      <td>Boolean</td>\r
37  *                      <td>The button supports "button down" and "button up". Whenever the button is pressed, onButtonEvent( DOWN) will be invoked.\r
38  *                                      Whenever the button is released, onButtonEvent( UP) will be invoked. *                  \r
39  *                      </td>\r
40  *                      <td>SmartDeviceLink 2.0</td>\r
41  *              </tr>\r
42  *              <tr>\r
43  *                      <td>imageSupported</td>\r
44  *                      <td>Boolean</td>\r
45  *                      <td>The button supports referencing a static or dynamic image.\r
46  *                      </td>\r
47  *                      <td>SmartDeviceLink 2.0</td>\r
48  *              </tr> \r
49  *  </table>\r
50  * @since SmartDeviceLink 2.0\r
51  */\r
52 public class SoftButtonCapabilities extends RPCStruct {\r
53 \r
54         /**\r
55          * Constructs a newly allocated SoftButtonCapabilities object\r
56          */\r
57     public SoftButtonCapabilities() { }\r
58     \r
59     /**\r
60      * Constructs a newly allocated SoftButtonCapabilities object indicated by the Hashtable parameter\r
61      * @param hash The Hashtable to use\r
62      */\r
63     public SoftButtonCapabilities(Hashtable hash) {\r
64         super(hash);\r
65     }\r
66     \r
67     /**\r
68      * set the button supports a short press.\r
69      * @param shortPressAvailable whether the button supports a short press.\r
70      */\r
71     public void setShortPressAvailable(Boolean shortPressAvailable) {\r
72         if (shortPressAvailable != null) {\r
73             store.put(Names.shortPressAvailable, shortPressAvailable);\r
74         } else {\r
75                 store.remove(Names.shortPressAvailable);\r
76         }\r
77     }\r
78     \r
79     /**\r
80      * get whether the button supports a short press.\r
81      * @return whether the button supports a short press\r
82      */\r
83     public Boolean getShortPressAvailable() {\r
84         return (Boolean) store.get( Names.shortPressAvailable);\r
85     }\r
86     \r
87     /**\r
88      * set the button supports a LONG press.\r
89      * @param longPressAvailable whether the button supports a long press\r
90      */\r
91     public void setLongPressAvailable(Boolean longPressAvailable) {\r
92         if (longPressAvailable != null) {\r
93             store.put(Names.longPressAvailable, longPressAvailable);\r
94         } else {\r
95                 store.remove(Names.longPressAvailable);\r
96         }\r
97     }\r
98     \r
99     /**\r
100      * get whether  the button supports a LONG press.\r
101      * @return whether  the button supports a LONG press\r
102      */\r
103     public Boolean getLongPressAvailable() {\r
104         return (Boolean) store.get( Names.longPressAvailable);\r
105     }\r
106     \r
107     /**\r
108      * set the button supports "button down" and "button up". \r
109      * @param upDownAvailable the button supports "button down" and "button up". \r
110      */\r
111     public void setUpDownAvailable(Boolean upDownAvailable) {\r
112         if (upDownAvailable != null) {\r
113             store.put(Names.upDownAvailable, upDownAvailable);\r
114         } else {\r
115                 store.remove(Names.upDownAvailable);\r
116         }\r
117     }\r
118     \r
119     /**\r
120      * get the button supports "button down" and "button up".\r
121      * @return the button supports "button down" and "button up".\r
122      */\r
123     public Boolean getUpDownAvailable() {\r
124         return (Boolean) store.get( Names.upDownAvailable);\r
125     }\r
126     \r
127     /**\r
128      * set the button supports referencing a static or dynamic image.\r
129      * @param imageSupported whether the button supports referencing a static or dynamic image.\r
130      */\r
131     public void setImageSupported(Boolean imageSupported) {\r
132         if (imageSupported != null) {\r
133             store.put(Names.imageSupported, imageSupported);\r
134         } else {\r
135                 store.remove(Names.imageSupported);\r
136         }\r
137     }\r
138     \r
139     /**\r
140      * get the button supports referencing a static or dynamic image.\r
141      * @return the button supports referencing a static or dynamic image.\r
142      */\r
143     public Boolean getImageSupported() {\r
144         return (Boolean) store.get( Names.imageSupported);\r
145     }\r
146 }\r