Files
Work/CapServer/hold/MainApplication.hpp
2024-08-07 09:12:07 -04:00

56 lines
1.3 KiB
C++

#ifndef _CAPSERVER_MAINAPPLICATION_HPP_
#define _CAPSERVER_MAINAPPLICATION_HPP_
#ifndef _CAPSERVER_SOCKET_HEADER_HPP_
#include <capserver/socketheader.hpp>
#endif
#ifndef _SOCKET_WSADATA_HPP_
#include <socket/wsadata.hpp>
#endif
#ifndef _CAPSERVER_SOCKETSERVER_HPP_
#include <CapServer/SocketServer.hpp>
#endif
#ifndef _CAPSERVER_PARAMS_HPP_
#include <CapServer/Params.hpp>
#endif
#ifndef _VIDCAP_VIDREG_HPP_
#include <vidcap/vidreg.hpp>
#endif
class MainApplication
{
public:
MainApplication();
virtual ~MainApplication();
int run(int argc,char **argv);
private:
void message(const String &message);
void message(const String &message,int arg);
void message(const String &message,const String &arg);
void handleServer(const String &host,int port,int deviceIndex,bool retain,bool debug,bool showSrcDlg);
void handleClient(const String &server,int port);
void handleSettings(bool showSrcDlg);
void displayUsage(void);
WSASystem mWSASystem;
Params mParams;
};
inline
void MainApplication::message(const String &message)
{
printf("%s\n",message.str());
}
inline
void MainApplication::message(const String &message,int arg)
{
printf("%s=%d\n",message.str(),arg);
}
inline
void MainApplication::message(const String &message,const String &arg)
{
printf("%s=%s\n",message.str(),arg.str());
}
#endif