libqi  1.12
Classes | Functions
qi::os Namespace Reference

OS abstraction layer. More...

Classes

class  QiException
 Custom exception that may be thrown by QI methods. More...
struct  timeval
 qi::os::timeval struct similar to POSIX timeval More...

Functions

QI_API FILE * fopen (const char *filename, const char *mode)
 Open a file.
QI_API int stat (const char *filename, struct stat *pstat)
 Get file status.
QI_API int checkdbg ()
 Check if the current program is running under a debugger.
QI_API std::string home ()
 Return path to the current user's HOME.
QI_API std::string 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 getenv (const char *var)
 Get an environment variable.
QI_API int setenv (const char *var, const char *value)
 Change or add an environment variable.
Time Functions
QI_API void sleep (unsigned int seconds)
 Sleep for the specified number of seconds.
QI_API void msleep (unsigned int milliseconds)
 Sleep for the specified number of milliseconds.
QI_API int 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 * dlopen (const char *filename, int flag=-1)
 Loads dynamic library.
QI_API int dlclose (void *handle)
 Decrements the reference count on the dynamic library.
QI_API void * dlsym (void *handle, const char *symbol)
 Get the address where the symbol is loaded into memory.
QI_API const char * dlerror (void)
 Returns a human readable string.
Process Functions
QI_API int spawnvp (char *const argv[])
 Create and execute a new process.
QI_API int spawnlp (const char *argv,...)
 Create and execute a new process.
QI_API int system (const char *command)
 Execute a shell command.
QI_API int waitpid (int pid, int *status)
 Wait for process to change state.

Detailed Description

OS abstraction layer.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines