#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <getopt.h>
#include <signal.h>
#include <glib.h>
#include <glib-object.h>
#include <unistd.h>
#include <wlancond-dbus.h>
#include "dbus-helper.h"
#include "daemon.h"
#include "common.h"
#include "dbus.h"
#include "dbus-handler.h"
#include "log.h"
Go to the source code of this file.
Defines | |
#define | PIDFILE "/var/run/wlancond.pid" |
Functions | |
static void | usage (int status) __attribute__((noreturn)) |
static int | decode_switches (int argc, char *argv[]) |
static void | clean_data (void) |
static void | signal_exit (int sig) |
static void | pid_cleanup (void) |
int | main (int argc, char *argv[]) |
Variables | |
static char * | program_name |
static gboolean | daemon_mode = FALSE |
static GMainLoop * | event_loop = NULL |
static struct option const | long_options [] |
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Definition in file main.c.
static int decode_switches | ( | int | argc, | |
char * | argv[] | |||
) | [static] |
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Main function for this program. Initializes D-BUS and Wireless extensions
Definition at line 141 of file main.c.
References decode_switches(), destroy_dbus_handlers(), get_we_device_name(), init_dbus_handler(), init_dbus_handlers(), mode_change(), monitor_wi(), pid_cleanup(), set_wlan_state(), and signal_exit().
static void pid_cleanup | ( | void | ) | [static] |
static void signal_exit | ( | int | sig | ) | [static] |
static void usage | ( | int | status | ) | [static] |
Print usage information and exit with status
Definition at line 63 of file main.c.
Referenced by decode_switches().
struct option const long_options[] [static] |