XMMS2
xmmsc_util.h File Reference

Macros

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

Functions

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

Macro Definition Documentation

◆ XMMS_DEFAULT_TCP_PORT

#define XMMS_DEFAULT_TCP_PORT   9667

◆ XMMS_DEFAULT_UDP_PORT

#define XMMS_DEFAULT_UDP_PORT   9667

Referenced by init_udp().

◆ XMMS_PATH_MAX

#define XMMS_PATH_MAX   255

Referenced by main(), and xmms_build_path().

◆ XMMS_STRINGIFY

◆ XMMS_STRINGIFY_NOEXPAND

#define XMMS_STRINGIFY_NOEXPAND ( x)
Value:
#x

Function Documentation

◆ xmms_default_ipcpath_get()

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.

◆ xmms_fallback_ipcpath_get()

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

◆ xmms_sleep_ms()

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.

◆ xmms_usercachedir_get()

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.

◆ xmms_userconfdir_get()

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