|
31 | 31 | import android.telephony.TelephonyManager;
|
32 | 32 | import android.util.Log;
|
33 | 33 |
|
| 34 | +import com.smartdevicelink.proxy.RPCRequestFactory; |
| 35 | +import com.smartdevicelink.proxy.rpc.PutFile; |
34 | 36 | import com.smartdevicelink.Dispatcher.IDispatchingStrategy;
|
35 | 37 | import com.smartdevicelink.Dispatcher.IncomingProtocolMessageComparitor;
|
36 | 38 | import com.smartdevicelink.Dispatcher.InternalProxyMessageComparitor;
|
@@ -4142,7 +4144,47 @@ public OutputStream PutFileStream(String sdlFileName, Integer iOffset, Integer i
|
4142 | 4144 | PutFile msg = RPCRequestFactory.buildPutFile(sdlFileName, iOffset, iLength);
|
4143 | 4145 | return startRPCStream(msg);
|
4144 | 4146 | }
|
| 4147 | + |
| 4148 | + /** |
| 4149 | + * Used to push a binary stream of file data onto the module from a mobile device. |
| 4150 | + * Responses are captured through callback on IProxyListener. |
| 4151 | + * |
| 4152 | + * @param is - The input stream of byte data that PutFileStream will read from |
| 4153 | + * @param syncFileName - The file reference name used by the putFile RPC. |
| 4154 | + * @param iOffset - The data offset in bytes, a value of zero is used to indicate data starting from the beginging of the file. |
| 4155 | + * A value greater than zero is used for resuming partial data chunks. |
| 4156 | + * @param iLength - The total length of the file being sent. |
| 4157 | + * @param fileType - The selected file type -- see the FileType enumeration for details |
| 4158 | + * @param bPersistentFile - Indicates if the file is meant to persist between sessions / ignition cycles. |
| 4159 | + * @param bSystemFile - Indicates if the file is meant to be passed thru core to elsewhere on the system. |
| 4160 | + * @throws SyncException |
| 4161 | + */ |
| 4162 | + public void PutFileStream(InputStream is, String syncFileName, Integer iOffset, Integer iLength, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile) throws SdlException |
| 4163 | + { |
| 4164 | + PutFile msg = RPCRequestFactory.buildPutFile(syncFileName, iOffset, iLength, fileType, bPersistentFile, bSystemFile); |
| 4165 | + startRPCStream(is, msg); |
| 4166 | + } |
4145 | 4167 |
|
| 4168 | + /** |
| 4169 | + * Used to push a binary stream of file data onto the module from a mobile device. |
| 4170 | + * Responses are captured through callback on IProxyListener. |
| 4171 | + * |
| 4172 | + * @param syncFileName - The file reference name used by the putFile RPC. |
| 4173 | + * @param iOffset - The data offset in bytes, a value of zero is used to indicate data starting from the beginging of a file. |
| 4174 | + * A value greater than zero is used for resuming partial data chunks. |
| 4175 | + * @param iLength - The total length of the file being sent. |
| 4176 | + * @param fileType - The selected file type -- see the FileType enumeration for details |
| 4177 | + * @param bPersistentFile - Indicates if the file is meant to persist between sessions / ignition cycles. |
| 4178 | + * @param bSystemFile - Indicates if the file is meant to be passed thru core to elsewhere on the system. |
| 4179 | + * @return OutputStream - The output stream of byte data that is written to by the app developer |
| 4180 | + * @throws SyncException |
| 4181 | + */ |
| 4182 | + public OutputStream PutFileStream(String syncFileName, Integer iOffset, Integer iLength, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile) throws SdlException |
| 4183 | + { |
| 4184 | + PutFile msg = RPCRequestFactory.buildPutFile(syncFileName, iOffset, iLength, fileType, bPersistentFile, bSystemFile); |
| 4185 | + return startRPCStream(msg); |
| 4186 | + } |
| 4187 | + |
4146 | 4188 | /**
|
4147 | 4189 | *
|
4148 | 4190 | * Used to end an existing PutFileStream that was previously initiated with any PutFileStream method.
|
|
0 commit comments