2014-05-16 18:51:01 +08:00
|
|
|
//===-- CMIUtilSystemLinux.h ------------------------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2015-02-11 01:16:13 +08:00
|
|
|
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__linux__)
|
2014-05-16 18:51:01 +08:00
|
|
|
|
|
|
|
// In-house headers:
|
2014-11-18 02:06:21 +08:00
|
|
|
#include "MIUtilString.h"
|
2014-05-16 18:51:01 +08:00
|
|
|
|
|
|
|
//++ ============================================================================
|
2014-11-18 02:06:21 +08:00
|
|
|
// Details: MI common code utility class. Used to set or retrieve information
|
|
|
|
// about the current system or user.
|
|
|
|
// *** If you change, remove or add functionality it must be replicated
|
|
|
|
// *** for the all platforms supported; Windows, OSX, LINUX
|
|
|
|
// Gotchas: None.
|
|
|
|
// Authors: Illya Rudkin 29/01/2014.
|
|
|
|
// Changes: None.
|
2014-05-16 18:51:01 +08:00
|
|
|
//--
|
|
|
|
class CMIUtilSystemLinux
|
|
|
|
{
|
2014-11-18 02:06:21 +08:00
|
|
|
// Methods:
|
|
|
|
public:
|
|
|
|
/* ctor */ CMIUtilSystemLinux(void);
|
|
|
|
|
|
|
|
bool GetOSErrorMsg(const MIint vError, CMIUtilString &vrwErrorMsg) const;
|
|
|
|
CMIUtilString GetOSLastError(void) const;
|
|
|
|
bool GetExecutablesPath(CMIUtilString &vrwFileNamePath) const;
|
|
|
|
bool GetLogFilesPath(CMIUtilString &vrwFileNamePath) const;
|
|
|
|
|
|
|
|
// Overrideable:
|
|
|
|
public:
|
|
|
|
// From CMICmnBase
|
|
|
|
/* dtor */ virtual ~CMIUtilSystemLinux(void);
|
2014-05-16 18:51:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef CMIUtilSystemLinux CMIUtilSystem;
|
|
|
|
|
2014-08-09 01:39:47 +08:00
|
|
|
#endif // #if defined( __linux__ )
|