mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
21 lines
620 B
C++
21 lines
620 B
C++
#include "audio-stream-stop.h"
|
|
|
|
using namespace std;
|
|
|
|
AudioStreamStopCommand::AudioStreamStopCommand() :
|
|
DaemonCommand("audio-stream-stop", "audio-stream-stop <audio stream id>", "Stop an audio stream.") {
|
|
}
|
|
void AudioStreamStopCommand::exec(Daemon *app, const char *args) {
|
|
int id;
|
|
if (sscanf(args, "%d", &id) == 1) {
|
|
AudioStream *stream = app->findAudioStream(id);
|
|
if (stream == NULL) {
|
|
app->sendResponse(Response("No Audio Stream with such id."));
|
|
return;
|
|
}
|
|
audio_stream_stop(stream);
|
|
app->sendResponse(Response());
|
|
} else {
|
|
app->sendResponse(Response("Missing/Incorrect parameter(s)."));
|
|
}
|
|
}
|