mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 03:28:07 +00:00
- Add examples for each command - Add the --dump-commands-help option to output the entire help
25 lines
668 B
C++
25 lines
668 B
C++
#include "version.h"
|
|
|
|
using namespace std;
|
|
|
|
class VersionResponse : public Response {
|
|
public:
|
|
VersionResponse(LinphoneCore *core);
|
|
};
|
|
|
|
VersionResponse::VersionResponse(LinphoneCore *core) : Response() {
|
|
ostringstream ost;
|
|
ost << "Version: " << linphone_core_get_version();
|
|
setBody(ost.str().c_str());
|
|
}
|
|
|
|
VersionCommand::VersionCommand() :
|
|
DaemonCommand("version", "version", "Get the version number.") {
|
|
addExample(new DaemonCommandExample("version",
|
|
"Status: Ok\n\n"
|
|
"Version: 3.5.99.0_6c2f4b9312fd4717b2f8ae0a7d7c97b752768c7c"));
|
|
}
|
|
|
|
void VersionCommand::exec(Daemon *app, const char *args) {
|
|
app->sendResponse(VersionResponse(app->getCore()));
|
|
}
|