imsd-messages/implementations/main.cpp

24 lines
807 B
C++
Raw Normal View History

// SPDX-License-Identifier: GPL-3.0-only
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
/*
imsd-messages — the SMS app for imsd's Messaging interface
(net.catcrafts.IMS1.Messaging on the system bus). This is the executable:
it parses the command line and wires the bus layer to the window. Nothing
runs yet beyond --version.
*/
import std;
import ImsdMessages;
import ImsdMessages.Bus;
int main(int argc, char** argv) {
for (std::int32_t i = 1; i < argc; ++i) {
const std::string_view arg = argv[i];
if (arg == "--version") {
std::println("imsd-messages {} (glib {})", ImsdMessages::version, ImsdMessages::Bus::glibVersion);
return 0;
}
}
std::println("imsd-messages {}: nothing to run yet", ImsdMessages::version);
return 0;
}