diff options
Diffstat (limited to 'qtlicensetool/qtlicensetool.h')
-rw-r--r-- | qtlicensetool/qtlicensetool.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/qtlicensetool/qtlicensetool.h b/qtlicensetool/qtlicensetool.h new file mode 100644 index 0000000..c92c33c --- /dev/null +++ b/qtlicensetool/qtlicensetool.h @@ -0,0 +1,53 @@ +/* Copyright (C) 2022 The Qt Company Ltd. + * + * SPDX-License-Identifier: GPL-3.0-only WITH Qt-GPL-exception-1.0 +*/ + +#pragma once + +#include <cstring> +#include <iostream> +#include <string> +#include <sstream> +#include <fstream> +#include <map> +#if __APPLE__ || __MACH__ || __linux__ + #include <sys/types.h> + #include <netdb.h> + #include <sys/socket.h> + #include <netinet/in.h> + #include <arpa/inet.h> + #include <unistd.h> +#else + #define WIN32_LEAN_AND_MEAN + #include <windows.h> + #include <winsock2.h> + #include <ws2tcpip.h> + // Need to link with Ws2_32.lib + #pragma comment (lib, "Ws2_32.lib") + + typedef size_t ssize_t; +#endif + +enum qt_tool_action_type { + e_action_tool_version = 1, + e_action_server_version = 2, + e_action_longterm = 3, + e_action_license_query = 4 +}; + +#include "tcpclient.h" +#include "utils.h" +#include "commonsetup.h" +#include "licdsetup.h" + +#define APP_NAME "Qt long-term license CLI" +#define BUFFER_SIZE 1024 + +int main(int argc, char *argv[]); +void showVersion(); +int askStatus(const std::string &statusRequest, LicdSetup *setup); +int doLongtermRequest(LicdSetup *setup); +void overrideSetup(LicdSetup *setup, int argc, char *argv[]); +void errorAndExit(const std::string &reason = ""); +void helpAndExit(); |