main.c File Reference

#include <errno.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.

Defines

#define AUTOSAVE_INTERVAL   300

Functions

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

Variables

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

Define Documentation

#define AUTOSAVE_INTERVAL   300

Definition at line 58 of file main.c.

Referenced by main().


Function Documentation

static GList* convert_filenames ( void   )  [static]

Definition at line 310 of file main.c.

Referenced by do_commands(), and do_remote().

gboolean do_autosave ( void   ) 

Definition at line 535 of file main.c.

Referenced by main().

static void do_commands ( void   )  [static]

Definition at line 393 of file main.c.

Referenced by init_two().

static void do_remote ( void   )  [static]

Definition at line 341 of file main.c.

Referenced by main().

static gboolean get_lock ( void   )  [static]

Definition at line 284 of file main.c.

Referenced by main().

const gchar* get_path ( gint  id  ) 
static void init_one ( void   )  [static]

Definition at line 434 of file main.c.

Referenced by main().

static void init_paths ( void   )  [static]

Definition at line 206 of file main.c.

Referenced by init_one().

static void init_two ( gint p_argc,
gchar ***  p_argv 
) [static]

Definition at line 453 of file main.c.

Referenced by main().

static gchar* last_path_element ( gchar *  path  )  [static]

Definition at line 101 of file main.c.

Referenced by relocate_paths().

gint main ( gint  argc,
gchar **  argv 
)

Definition at line 544 of file main.c.

static void make_dirs ( void   )  [static]

Definition at line 75 of file main.c.

Referenced by init_one().

static void normalize_path ( gchar *  path  )  [static]

Definition at line 87 of file main.c.

Referenced by relocate_paths().

static void parse_options ( gint argc,
gchar ***  argv 
) [static]

Definition at line 256 of file main.c.

Referenced by main().

static void release_lock ( void   )  [static]

Definition at line 303 of file main.c.

Referenced by main().

static void relocate_path ( gchar **  pathp,
const gchar *  old,
const gchar *  new 
) [static]

Definition at line 119 of file main.c.

Referenced by relocate_paths().

static void relocate_paths ( void   )  [static]

Definition at line 145 of file main.c.

Referenced by init_paths().

static void shut_down ( void   )  [static]

Definition at line 503 of file main.c.

Referenced by main().

static void strip_path_element ( gchar *  path,
gchar *  elem 
) [static]

Definition at line 107 of file main.c.

Referenced by relocate_paths().


Variable Documentation

gchar* aud_paths[AUD_PATH_COUNT] [static]
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 238 of file main.c.

Referenced by parse_options().

Definition at line 66 of file main.c.

Definition at line 67 of file main.c.

gchar** filenames

Definition at line 65 of file main.c.

Definition at line 66 of file main.c.

struct { ... } options [static]

Definition at line 65 of file main.c.

Definition at line 65 of file main.c.

Referenced by drct_pl_next(), drct_pl_prev(), drct_pl_set_pos(), and end_cb().

Definition at line 65 of file main.c.

Definition at line 70 of file main.c.

Definition at line 66 of file main.c.

Definition at line 65 of file main.c.

Definition at line 64 of file main.c.

Referenced by do_remote().

Definition at line 65 of file main.c.

Definition at line 65 of file main.c.

Referenced by dir_foreach().

Definition at line 69 of file main.c.

Definition at line 68 of file main.c.


Generated on 26 Jan 2012 for Audacious by  doxygen 1.6.1