Audacious  $Id:Doxyfile42802007-03-2104:39:00Znenolod$
Macros | Functions | Variables
main.c File Reference
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <locale.h>
#include <gtk/gtk.h>
#include <libaudcore/audstrings.h>
#include <libaudcore/hook.h>
#include <libaudtag/audtag.h>
#include "config.h"
#include "debug.h"
#include "drct.h"
#include "equalizer.h"
#include "i18n.h"
#include "interface.h"
#include "main.h"
#include "misc.h"
#include "playback.h"
#include "playlist.h"
#include "plugins.h"
#include "util.h"

Go to the source code of this file.

Macros

#define AUTOSAVE_INTERVAL   300 /* seconds */
 

Functions

static void make_dirs (void)
 
static void normalize_path (char *path)
 
static char * last_path_element (char *path)
 
static void strip_path_element (char *path, char *elem)
 
static void relocate_path (char **pathp, const char *old, const char *new)
 
static void relocate_paths (void)
 
static void init_paths (void)
 
const char * get_path (int id)
 
static void parse_options (int *argc, char ***argv)
 
static bool_t get_lock (void)
 
static void release_lock (void)
 
static Index * convert_filenames (void)
 
static void do_remote (void)
 
static void do_commands (void)
 
static void init_one (void)
 
static void init_two (int *p_argc, char ***p_argv)
 
static void shut_down (void)
 
bool_t do_autosave (void)
 
int main (int argc, char **argv)
 

Variables

bool_t headless
 
struct {
   char **   filenames
 
   int   session
 
   bool_t   play
 
   bool_t   stop
 
   bool_t   pause
 
   bool_t   fwd
 
   bool_t   rew
 
   bool_t   play_pause
 
   bool_t   show_jump_box
 
   bool_t   enqueue
 
   bool_t   mainwin
 
   bool_t   remote
 
   bool_t   enqueue_to_temp
 
   bool_t   version
 
   bool_t   verbose
 
   char *   previous_session_id
 
options
 
static char * aud_paths [AUD_PATH_COUNT]
 
static GOptionEntry cmd_entries []
 

Macro Definition Documentation

#define AUTOSAVE_INTERVAL   300 /* seconds */

Definition at line 53 of file main.c.

Referenced by main().

Function Documentation

static Index* convert_filenames ( void  )
static

Definition at line 301 of file main.c.

Referenced by do_commands(), and do_remote().

bool_t do_autosave ( void  )

Definition at line 533 of file main.c.

Referenced by main().

static void do_commands ( void  )
static

Definition at line 400 of file main.c.

Referenced by init_two().

static void do_remote ( void  )
static

Definition at line 339 of file main.c.

Referenced by main().

static bool_t get_lock ( void  )
static

Definition at line 275 of file main.c.

Referenced by main().

const char* get_path ( int  id)
static void init_one ( void  )
static

Definition at line 438 of file main.c.

Referenced by main().

static void init_paths ( void  )
static

Definition at line 201 of file main.c.

Referenced by init_one().

static void init_two ( int p_argc,
char ***  p_argv 
)
static

Definition at line 451 of file main.c.

Referenced by main().

static char* last_path_element ( char *  path)
static

Definition at line 96 of file main.c.

Referenced by relocate_paths().

int main ( int  argc,
char **  argv 
)

Definition at line 542 of file main.c.

static void make_dirs ( void  )
static

Definition at line 70 of file main.c.

Referenced by init_one().

static void normalize_path ( char *  path)
static

Definition at line 82 of file main.c.

Referenced by relocate_paths().

static void parse_options ( int argc,
char ***  argv 
)
static

Definition at line 250 of file main.c.

Referenced by main().

static void release_lock ( void  )
static

Definition at line 294 of file main.c.

Referenced by main().

static void relocate_path ( char **  pathp,
const char *  old,
const char *  new 
)
static

Definition at line 114 of file main.c.

Referenced by relocate_paths().

static void relocate_paths ( void  )
static

Definition at line 140 of file main.c.

Referenced by init_paths().

static void shut_down ( void  )
static

Definition at line 493 of file main.c.

Referenced by main().

static void strip_path_element ( char *  path,
char *  elem 
)
static

Definition at line 102 of file main.c.

Referenced by relocate_paths().

Variable Documentation

char* aud_paths[AUD_PATH_COUNT]
static

Definition at line 68 of file main.c.

Referenced by get_lock(), get_path(), init_one(), init_paths(), make_dirs(), release_lock(), and relocate_paths().

GOptionEntry cmd_entries[]
static
Initial value:
= {
{"rew", 'r', 0, G_OPTION_ARG_NONE, &options.rew, N_("Skip backwards in playlist"), NULL},
{"play", 'p', 0, G_OPTION_ARG_NONE, &options.play, N_("Start playing current playlist"), NULL},
{"pause", 'u', 0, G_OPTION_ARG_NONE, &options.pause, N_("Pause current song"), NULL},
{"stop", 's', 0, G_OPTION_ARG_NONE, &options.stop, N_("Stop current song"), NULL},
{"play-pause", 't', 0, G_OPTION_ARG_NONE, &options.play_pause, N_("Pause if playing, play otherwise"), NULL},
{"fwd", 'f', 0, G_OPTION_ARG_NONE, &options.fwd, N_("Skip forward in playlist"), NULL},
{"show-jump-box", 'j', 0, G_OPTION_ARG_NONE, &options.show_jump_box, N_("Display Jump to File dialog"), NULL},
{"enqueue", 'e', 0, G_OPTION_ARG_NONE, &options.enqueue, N_("Add files to the playlist"), NULL},
{"enqueue-to-temp", 'E', 0, G_OPTION_ARG_NONE, &options.enqueue_to_temp, N_("Add new files to a temporary playlist"), NULL},
{"show-main-window", 'm', 0, G_OPTION_ARG_NONE, &options.mainwin, N_("Display the main window"), NULL},
{"version", 'v', 0, G_OPTION_ARG_NONE, &options.version, N_("Show version"), NULL},
{"verbose", 'V', 0, G_OPTION_ARG_NONE, &options.verbose, N_("Print debugging messages"), NULL},
{"headless", 'h', 0, G_OPTION_ARG_NONE, & headless, N_("Headless mode (beta)"), NULL},
{G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &options.filenames, N_("FILE..."), NULL},
{NULL},
}

Definition at line 232 of file main.c.

Referenced by parse_options().

bool_t enqueue

Definition at line 61 of file main.c.

bool_t enqueue_to_temp

Definition at line 62 of file main.c.

char** filenames
bool_t fwd

Definition at line 60 of file main.c.

bool_t headless

Definition at line 55 of file main.c.

Referenced by init_two(), start_plugins(), status_cb(), status_done_locked(), and stop_plugins().

bool_t mainwin

Definition at line 61 of file main.c.

struct { ... } options
bool_t pause

Definition at line 60 of file main.c.

Referenced by apply_pause(), output_pause(), and playback_start().

bool_t play

Definition at line 60 of file main.c.

Referenced by add_result_new(), add_task_new(), drct_pl_next(), drct_pl_prev(), and end_cb().

bool_t play_pause

Definition at line 60 of file main.c.

char* previous_session_id

Definition at line 65 of file main.c.

bool_t remote

Definition at line 61 of file main.c.

bool_t rew

Definition at line 60 of file main.c.

int session

Definition at line 59 of file main.c.

Referenced by do_remote().

bool_t show_jump_box

Definition at line 60 of file main.c.

bool_t stop

Definition at line 60 of file main.c.

Referenced by dir_foreach().

bool_t verbose

Definition at line 64 of file main.c.

bool_t version

Definition at line 63 of file main.c.