mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-07 16:26:09 +00:00
* Add command line parameters. Fixes #30 * Fixed compile errors * Fixed code review findings * Fixed code review findings, take 2
This commit is contained in:
committed by
Cameron Gutman
parent
c99b4f1559
commit
d14cfb577b
41
app/cli/commandlineparser.h
Normal file
41
app/cli/commandlineparser.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
|
||||
#include "settings/streamingpreferences.h"
|
||||
|
||||
#include <QMap>
|
||||
#include <QString>
|
||||
|
||||
class GlobalCommandLineParser
|
||||
{
|
||||
public:
|
||||
enum ParseResult {
|
||||
NormalStartRequested,
|
||||
StreamRequested,
|
||||
};
|
||||
|
||||
GlobalCommandLineParser();
|
||||
virtual ~GlobalCommandLineParser();
|
||||
|
||||
ParseResult parse(const QStringList &args);
|
||||
|
||||
};
|
||||
|
||||
class StreamCommandLineParser
|
||||
{
|
||||
public:
|
||||
StreamCommandLineParser();
|
||||
virtual ~StreamCommandLineParser();
|
||||
|
||||
void parse(const QStringList &args, StreamingPreferences *preferences);
|
||||
|
||||
QString getHost() const;
|
||||
QString getAppName() const;
|
||||
|
||||
private:
|
||||
QString m_Host;
|
||||
QString m_AppName;
|
||||
QMap<QString, StreamingPreferences::WindowMode> m_WindowModeMap;
|
||||
QMap<QString, StreamingPreferences::AudioConfig> m_AudioConfigMap;
|
||||
QMap<QString, StreamingPreferences::VideoCodecConfig> m_VideoCodecMap;
|
||||
QMap<QString, StreamingPreferences::VideoDecoderSelection> m_VideoDecoderMap;
|
||||
};
|
||||
Reference in New Issue
Block a user