libqi-api  2.1.4.13
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Functions
os.hpp File Reference
#include <cstdio>
#include <string>
#include <map>
#include <vector>
#include <qi/api.hpp>
#include <qi/types.hpp>

Go to the source code of this file.

Classes

struct  qi::os::timeval
 

Namespaces

 qi
 qi general namespace
 
 qi::os
 OS abstraction layer.
 

Macros

#define _QI_OS_HPP_
 

Functions

FILE * qi::os::fopen (const char *filename, const char *mode)
 Open a file and returns and handle on it. More...
 
int qi::os::stat (const char *filename, struct stat *pstat)
 
int qi::os::checkdbg ()
 
std::string qi::os::home ()
 Return path to the current user's HOME. More...
 
std::string qi::os::mktmpdir (const char *prefix="")
 Return a writable temporary directory. More...
 
std::string qi::os::tmp ()
 
std::string qi::os::gethostname ()
 Get the system's hostname. More...
 
int qi::os::isatty (int fd=1)
 
bool qi::os::fnmatch (const std::string &pattern, const std::string &string)
 
char * qi::os::strdup (const char *src)
 
int qi::os::snprintf (char *str, size_t size, const char *format,...)
 
std::string qi::os::getenv (const char *var)
 Get an environment variable. More...
 
int qi::os::setenv (const char *var, const char *value)
 
std::string qi::os::timezone ()
 
void qi::os::sleep (unsigned int seconds)
 
void qi::os::msleep (unsigned int milliseconds)
 Sleep for the specified number of milliseconds. More...
 
int qi::os::gettimeofday (qi::os::timeval *tp)
 The gettimeofday() function shall obtain the current time. More...
 
qi::int64_t qi::os::ustime ()
 
std::pair< int64_t, int64_t > qi::os::cputime ()
 
qi::os::timeval qi::os::operator+ (const qi::os::timeval &lhs, const qi::os::timeval &rhs)
 
qi::os::timeval qi::os::operator+ (const qi::os::timeval &lhs, long us)
 
qi::os::timeval qi::os::operator- (const qi::os::timeval &lhs, const qi::os::timeval &rhs)
 
qi::os::timeval qi::os::operator- (const qi::os::timeval &lhs, long us)
 
void * qi::os::dlopen (const char *filename, int flag=-1)
 Load a dynamic library. More...
 
int qi::os::dlclose (void *handle)
 Decrements the reference count on the dynamic library. More...
 
void * qi::os::dlsym (void *handle, const char *symbol)
 Get the address where the symbol is loaded into memory. More...
 
const char * qi::os::dlerror (void)
 Returns a human readable string of the error code. More...
 
int qi::os::spawnvp (char *const argv[])
 
int qi::os::spawnlp (const char *argv,...)
 
int qi::os::system (const char *command)
 
int qi::os::getpid ()
 Get the process identifier. More...
 
int qi::os::gettid ()
 Get the thread identifier. More...
 
int qi::os::waitpid (int pid, int *status)
 
int qi::os::kill (int pid, int sig)
 Send a signal to a process. More...
 
unsigned short qi::os::findAvailablePort (unsigned short port)
 Find the first available port starting at port number in parameter. More...
 
std::map< std::string,
std::vector< std::string > > 
qi::os::hostIPAddrs (bool ipv6Addr=false)
 Find all network adapters and corresponding IPs. More...
 
void qi::os::setCurrentThreadName (const std::string &name)
 Set the current thread name to the string in parameter. More...
 
std::string qi::os::currentThreadName ()
 
bool qi::os::setCurrentThreadCPUAffinity (const std::vector< int > &cpus)
 
long qi::os::numberOfCPUs ()
 
std::string qi::os::getMachineId ()
 Returns an unique uuid for the machine. More...
 
std::string qi::os::generateUuid ()
 
size_t qi::os::memoryUsage (unsigned int pid)
 
QI_API_DEPRECATED std::string qi::os::tmpdir (const char *prefix="")
 

Macro Definition Documentation

#define _QI_OS_HPP_

Definition at line 9 of file os.hpp.