@@ -21,7 +21,6 @@ use buttplug_core::message::{DeviceFeature, OutputType};
2121use buttplug_server:: ButtplugServer ;
2222use futures:: { Stream , StreamExt } ;
2323use serde:: Serialize ;
24- use strum:: IntoEnumIterator ;
2524use thiserror:: Error ;
2625use tokio:: net:: TcpListener ;
2726
@@ -35,6 +34,7 @@ enum IntifaceRestError {
3534 InvalidDevice ( u32 ) ,
3635 #[ error( "Device index {0} feature index {1} does not refer to a valid device feature." ) ]
3736 InvalidFeature ( u32 , u32 ) ,
37+ /*
3838 #[error("{0} is not a valid output type. Valid output types are: {1:?}")]
3939 InvalidOutputType(String, Vec<OutputType>),
4040 #[error("{0} is not a valid input type. Valid input types are: {1:?}")]
@@ -43,6 +43,7 @@ enum IntifaceRestError {
4343 InvalidInputCommand(u32, Vec<String>),
4444 #[error("Value {0} is not valid for the current command.)")]
4545 InvalidValue(u32),
46+ */
4647}
4748
4849// Tell axum how `AppError` should be converted into a response.
@@ -237,11 +238,11 @@ async fn get_feature_info(
237238 )
238239}
239240
241+ /*
240242async fn feature_input_command(
241243 State(client): State<Arc<ButtplugClient>>,
242244 Path((index, feature_index, input_type, command)): Path<(u32, u32, String, String)>,
243245) -> Result<(), IntifaceRestError> {
244- /*
245246 let cmd = convert_output_command(&command, level)?;
246247
247248 Ok(
@@ -250,9 +251,10 @@ async fn feature_input_command(
250251 .await
251252 .map_err(|e| IntifaceRestError::ButtplugClientError(e))?,
252253 )
253- */
254+
254255 Ok(())
255256}
257+ */
256258
257259async fn server_sse (
258260 State ( client) : State < Arc < ButtplugClient > > ,
@@ -297,12 +299,10 @@ impl IntifaceRestServer {
297299 "/devices/{index}/inputs/{input_type}/{input_command}",
298300 put(device_input_command),
299301 )
300- */
301302 .route(
302303 "/devices/{index}/features/{index}/inputs/{input_type}/{input_command}",
303304 put(feature_input_command),
304305 )
305- /*
306306 .route("/devices/{index}/events", get(device_sse))
307307 */
308308 . route ( "/events" , get ( server_sse) )
0 commit comments