XMMS2
Functions
utils_unix.c File Reference

Miscellaneous internal utility functions. More...

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <pwd.h>
#include <time.h>
#include <errno.h>
#include <xmms_configuration.h>
#include <xmmsc/xmmsc_util.h>

Functions

const char * xmms_usercachedir_get (char *buf, int len)
 Get the absolute path to the user cache dir. More...
 
const char * xmms_userconfdir_get (char *buf, int len)
 Get the absolute path to the user config dir. More...
 
const char * xmms_fallback_ipcpath_get (char *buf, int len)
 Get the fallback connection path (if XMMS_PATH is not accessible) More...
 
bool xmms_sleep_ms (int n)
 Sleep for n milliseconds. More...
 

Detailed Description

Miscellaneous internal utility functions.

Function Documentation

const char* xmms_fallback_ipcpath_get ( char *  buf,
int  len 
)

Get the fallback connection path (if XMMS_PATH is not accessible)

Parameters
bufA char buffer
lenThe length of buf (XMMS_PATH_MAX is a good choice)
Returns
A pointer to buf, or NULL if an error occured.
bool xmms_sleep_ms ( int  n)

Sleep for n milliseconds.

Parameters
nThe number of milliseconds to sleep.
Returns
true when we waited the full time, false otherwise.
const char* xmms_usercachedir_get ( char *  buf,
int  len 
)

Get the absolute path to the user cache dir.

Parameters
bufa char buffer
lenthe lenght of buf (XMMS_PATH_MAX is a good choice)
Returns
A pointer to buf, or NULL if an error occurred.
const char* xmms_userconfdir_get ( char *  buf,
int  len 
)

Get the absolute path to the user config dir.

Parameters
bufA char buffer
lenThe length of buf (XMMS_PATH_MAX is a good choice)
Returns
A pointer to buf, or NULL if an error occurred.