XMMS2
Macros | Functions
xmmsc_util.h File Reference
#include <xmmsc/xmmsc_stdbool.h>
#include <xmmsc/xmmsc_compiler.h>

Macros

#define XMMS_STRINGIFY_NOEXPAND(x)   #x
 
#define XMMS_STRINGIFY(x)   XMMS_STRINGIFY_NOEXPAND(x)
 
#define XMMS_PATH_MAX   255
 
#define XMMS_DEFAULT_TCP_PORT   9667
 

Functions

const char * xmms_userconfdir_get (char *buf, int len)
 Get the absolute path to the user config dir. More...
 
const char * xmms_usercachedir_get (char *buf, int len)
 Get the absolute path to the user cache dir. More...
 
const char * xmms_default_ipcpath_get (char *buf, int len)
 Get the default connection path. 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...
 

Macro Definition Documentation

#define XMMS_DEFAULT_TCP_PORT   9667
#define XMMS_PATH_MAX   255

Referenced by main(), and xmms_build_path().

#define XMMS_STRINGIFY (   x)    XMMS_STRINGIFY_NOEXPAND(x)
#define XMMS_STRINGIFY_NOEXPAND (   x)    #x

Function Documentation

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

Get the default connection path.

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.
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.

Referenced by main(), and xmms_default_ipcpath_get().

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.

Referenced by xmms_build_path().