libqi  1.12
Classes | Namespaces | Functions
qi/os.hpp File Reference
#include <string>
#include <qi/config.hpp>

Go to the source code of this file.

Classes

struct  qi::os::timeval
 qi::os::timeval struct similar to POSIX timeval More...

Namespaces

namespace  qi
 

SDKLayout implementation.


namespace  qi::os
 

OS abstraction layer.


Functions

QI_API FILE * qi::os::fopen (const char *filename, const char *mode)
 Open a file.
QI_API int qi::os::stat (const char *filename, struct stat *pstat)
 Get file status.
QI_API int qi::os::checkdbg ()
 Check if the current program is running under a debugger.
QI_API std::string qi::os::home ()
 Return path to the current user's HOME.
QI_API std::string qi::os::tmpdir (const char *prefix="")
 Return a temporary directoryThe directory is writeable and exits. The caller is responsible of destroying the temporary directory.
Environment Functions
QI_API std::string qi::os::getenv (const char *var)
 Get an environment variable.
QI_API int qi::os::setenv (const char *var, const char *value)
 Change or add an environment variable.
Time Functions
QI_API void qi::os::sleep (unsigned int seconds)
 Sleep for the specified number of seconds.
QI_API void qi::os::msleep (unsigned int milliseconds)
 Sleep for the specified number of milliseconds.
QI_API int qi::os::gettimeofday (qi::os::timeval *tp)
 The gettimeofday() function shall obtain the current time, expressed as seconds and microseconds since the Epoch, and store it in the timeval structure pointed to by tp. The resolution of the system clock is unspecified. This clock is subject to NTP adjustments.
Shared Library Functions
QI_API void * qi::os::dlopen (const char *filename, int flag=-1)
 Loads dynamic library.
QI_API int qi::os::dlclose (void *handle)
 Decrements the reference count on the dynamic library.
QI_API void * qi::os::dlsym (void *handle, const char *symbol)
 Get the address where the symbol is loaded into memory.
QI_API const char * qi::os::dlerror (void)
 Returns a human readable string.
Process Functions
QI_API int qi::os::spawnvp (char *const argv[])
 Create and execute a new process.
QI_API int qi::os::spawnlp (const char *argv,...)
 Create and execute a new process.
QI_API int qi::os::system (const char *command)
 Execute a shell command.
QI_API int qi::os::waitpid (int pid, int *status)
 Wait for process to change state.

Detailed Description

Definition in file os.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines