smbnetfs  0.6.3
About: SMBNetFS is a Linux/FreeBSD filesystem that allow you to use samba/microsoft network in the same manner as the network neighborhood in Microsoft Windows.
  Fossies Dox: smbnetfs-0.6.3.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

event.c File Reference
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <pthread.h>
#include <libsmbclient.h>
#include <fuse/fuse.h>
#include <glib.h>
#include "common.h"
#include "smbitem.h"
#include "auth.h"
#include "process.h"
#include "samba.h"
#include "stat_workaround.h"
#include "reconfigure.h"
Include dependency graph for event.c:

Go to the source code of this file.

Functions

int event_set_query_browser_flag (int flag)
 
static int event_get_query_browser_flag (void)
 
int event_set_time_step (int step)
 
static int event_get_time_step (void)
 
int event_set_smb_tree_scan_period (int period)
 
static int event_get_smb_tree_scan_period (void)
 
int event_set_smb_tree_elements_ttl (int ttl)
 
static int event_get_smb_tree_elements_ttl (void)
 
int event_set_config_update_period (int period)
 
static void event_set_last_smb_tree_scan (time_t scan_time)
 
static int event_is_time_for_smb_tree_scan (void)
 
static void event_set_last_config_update (time_t update_time)
 
static int event_is_time_for_config_update (void)
 
static void event_scan_samba_group (const char *group)
 
static void event_scan_smb_root (void)
 
void event_scan_smb_tree (void)
 
static void * event_update_smb_tree_thread (void *data)
 
static void event_reread_config (void)
 
static void * event_thread (void *data)
 
static void * event_init (struct fuse_conn_info *conn)
 
static void event_destroy (void *private_data)
 
void event_set_event_handler (struct fuse_operations *file_oper)
 

Variables

static int event_query_browser_flag = 1
 
static int event_time_step = 10
 
static int event_smb_tree_scan_period = 300
 
static int event_smb_tree_elements_ttl = 900
 
static int event_config_update_period = 300
 
static time_t event_last_smb_tree_scan = (time_t) 0
 
static time_t event_last_config_update = (time_t) 0
 
static pthread_mutex_t m_evthread = PTHREAD_MUTEX_INITIALIZER
 
static pthread_t event_ev_thread_id
 
static pthread_t event_smb_thread_id
 

Function Documentation

◆ event_destroy()

static void event_destroy ( void *  private_data)
static

◆ event_get_query_browser_flag()

static int event_get_query_browser_flag ( void  )
inlinestatic

Definition at line 38 of file event.c.

References event_query_browser_flag.

Referenced by event_scan_smb_tree().

◆ event_get_smb_tree_elements_ttl()

static int event_get_smb_tree_elements_ttl ( void  )
inlinestatic

Definition at line 78 of file event.c.

References event_smb_tree_elements_ttl.

Referenced by event_update_smb_tree_thread().

◆ event_get_smb_tree_scan_period()

static int event_get_smb_tree_scan_period ( void  )
inlinestatic

Definition at line 62 of file event.c.

References event_smb_tree_scan_period, and m_evthread.

Referenced by event_set_smb_tree_elements_ttl().

◆ event_get_time_step()

static int event_get_time_step ( void  )
inlinestatic

◆ event_init()

static void* event_init ( struct fuse_conn_info *  conn)
static

◆ event_is_time_for_config_update()

static int event_is_time_for_config_update ( void  )
static

Definition at line 113 of file event.c.

References event_config_update_period, event_last_config_update, and m_evthread.

Referenced by event_thread().

◆ event_is_time_for_smb_tree_scan()

static int event_is_time_for_smb_tree_scan ( void  )
static

Definition at line 97 of file event.c.

References event_last_smb_tree_scan, event_smb_tree_scan_period, and m_evthread.

Referenced by event_update_smb_tree_thread().

◆ event_reread_config()

static void event_reread_config ( void  )
static

◆ event_scan_samba_group()

static void event_scan_samba_group ( const char *  group)
static

◆ event_scan_smb_root()

static void event_scan_smb_root ( void  )
static

◆ event_scan_smb_tree()

◆ event_set_config_update_period()

int event_set_config_update_period ( int  period)

◆ event_set_event_handler()

void event_set_event_handler ( struct fuse_operations *  file_oper)

Definition at line 309 of file event.c.

References event_destroy(), and event_init().

Referenced by main().

◆ event_set_last_config_update()

static void event_set_last_config_update ( time_t  update_time)
static

Definition at line 107 of file event.c.

References event_last_config_update, and m_evthread.

Referenced by event_reread_config(), and event_thread().

◆ event_set_last_smb_tree_scan()

static void event_set_last_smb_tree_scan ( time_t  scan_time)
static

Definition at line 91 of file event.c.

References event_last_smb_tree_scan, and m_evthread.

Referenced by event_update_smb_tree_thread().

◆ event_set_query_browser_flag()

int event_set_query_browser_flag ( int  flag)

Definition at line 32 of file event.c.

References DPRINTF, and event_query_browser_flag.

Referenced by reconfigure_analyse_simple_option().

◆ event_set_smb_tree_elements_ttl()

int event_set_smb_tree_elements_ttl ( int  ttl)

◆ event_set_smb_tree_scan_period()

int event_set_smb_tree_scan_period ( int  period)

◆ event_set_time_step()

int event_set_time_step ( int  step)

Definition at line 42 of file event.c.

References DPRINTF, and event_time_step.

Referenced by reconfigure_analyse_simple_option().

◆ event_thread()

static void* event_thread ( void *  data)
static

◆ event_update_smb_tree_thread()

static void* event_update_smb_tree_thread ( void *  data)
static

Variable Documentation

◆ event_config_update_period

int event_config_update_period = 300
static

Definition at line 22 of file event.c.

Referenced by event_is_time_for_config_update(), and event_set_config_update_period().

◆ event_ev_thread_id

pthread_t event_ev_thread_id
static

Definition at line 29 of file event.c.

Referenced by event_destroy(), and event_init().

◆ event_last_config_update

time_t event_last_config_update = (time_t) 0
static

Definition at line 25 of file event.c.

Referenced by event_is_time_for_config_update(), and event_set_last_config_update().

◆ event_last_smb_tree_scan

time_t event_last_smb_tree_scan = (time_t) 0
static

Definition at line 24 of file event.c.

Referenced by event_is_time_for_smb_tree_scan(), and event_set_last_smb_tree_scan().

◆ event_query_browser_flag

int event_query_browser_flag = 1
static

Definition at line 18 of file event.c.

Referenced by event_get_query_browser_flag(), and event_set_query_browser_flag().

◆ event_smb_thread_id

pthread_t event_smb_thread_id
static

Definition at line 30 of file event.c.

Referenced by event_destroy(), and event_init().

◆ event_smb_tree_elements_ttl

int event_smb_tree_elements_ttl = 900
static

Definition at line 21 of file event.c.

Referenced by event_get_smb_tree_elements_ttl(), and event_set_smb_tree_elements_ttl().

◆ event_smb_tree_scan_period

int event_smb_tree_scan_period = 300
static

◆ event_time_step

int event_time_step = 10
static

Definition at line 19 of file event.c.

Referenced by event_get_time_step(), and event_set_time_step().

◆ m_evthread