MythTV  master
Macros | Functions | Variables
mythcommandlineparser.cpp File Reference
#include <algorithm>
#include <csignal>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <unistd.h>
#include <sys/types.h>
#include <QCoreApplication>
#include <QDateTime>
#include <QDir>
#include <QFile>
#include <QFileInfo>
#include <QSize>
#include <QString>
#include <QTextStream>
#include <QVariant>
#include <QVariantList>
#include <QVariantMap>
#include <utility>
#include "mythcommandlineparser.h"
#include "mythcorecontext.h"
#include "exitcodes.h"
#include "mythconfig.h"
#include "mythlogging.h"
#include "mythversion.h"
#include "logging.h"
#include "mythmiscutil.h"
#include "mythdate.h"
Include dependency graph for mythcommandlineparser.cpp:

Go to the source code of this file.

Macros

#define TERMWIDTH   79
 

Functions

const char * NamedOptType (int type)
 
bool openPidfile (ofstream &pidfs, const QString &pidfile)
 
bool setUser (const QString &username)
 Drop permissions to the specified user. More...
 
int GetTermWidth (void)
 returns terminal width, or 79 on error More...
 

Variables

const int kEnd = 0
 
const int kEmpty = 1
 
const int kOptOnly = 2
 
const int kOptVal = 3
 
const int kCombOptVal = 4
 
const int kArg = 5
 
const int kPassthrough = 6
 
const int kInvalid = 7
 

Macro Definition Documentation

◆ TERMWIDTH

#define TERMWIDTH   79

Definition at line 68 of file mythcommandlineparser.cpp.

Function Documentation

◆ NamedOptType()

const char * NamedOptType ( int  type)

Definition at line 104 of file mythcommandlineparser.cpp.

Referenced by MythCommandLineParser::Parse().

◆ openPidfile()

bool openPidfile ( ofstream &  pidfs,
const QString &  pidfile 
)

Definition at line 2636 of file mythcommandlineparser.cpp.

Referenced by MythCommandLineParser::Daemonize().

◆ setUser()

bool setUser ( const QString &  username)

Drop permissions to the specified user.

Definition at line 2652 of file mythcommandlineparser.cpp.

Referenced by MythCommandLineParser::Daemonize().

◆ GetTermWidth()

int GetTermWidth ( void  )

returns terminal width, or 79 on error

Definition at line 87 of file mythcommandlineparser.cpp.

Referenced by CommandLineArg::GetHelpString(), and CommandLineArg::GetLongHelpString().

Variable Documentation

◆ kEnd

const int kEnd = 0

◆ kEmpty

const int kEmpty = 1

◆ kOptOnly

const int kOptOnly = 2

◆ kOptVal

const int kOptVal = 3

◆ kCombOptVal

const int kCombOptVal = 4

◆ kArg

const int kArg = 5

◆ kPassthrough

const int kPassthrough = 6

◆ kInvalid

const int kInvalid = 7