actions.h File Reference

Action handling header file. More...

#include "global.h"
Include dependency graph for actions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  actionlist_t
 Definition of an action. More...

Defines

#define ac__Usage_dflt()   do { ac__Usage(NULL, 0, NULL); } while (0)
 For convenience: general help, and help for the current action.
#define ac__Usage_this()   do { ac__Usage(NULL, 1, (char**)action->name); } while (0)
 Print help for the current action.

Typedefs

callbacks Action callbacks.



typedef int( action_t )(struct estat *sts)
 Callback that gets called for each entry.
typedef int( work_t )(struct estat *root, int argc, char *argv[])
 Callback for initializing the action.
typedef int( action_uninit_t )(void)
 One after all progress has been made.

Functions

int act__find_action_by_name (const char *cmd, struct actionlist_t **action_p)
 Find the action structure by name.

Variables

action_t ac__dispatch
 The action wrapper.
work_t ac__Usage
 The always allowed action - printing general or specific help.
struct actionlist_t action_list []
 Array of all known actions.
struct actionlist_taction
 Gets set to the current action after commandline parsing.
const int action_list_count
 How many actions we know.

Detailed Description

Action handling header file.

Definition in file actions.h.


Define Documentation

 
#define ac__Usage_dflt (  )     do { ac__Usage(NULL, 0, NULL); } while (0)

For convenience: general help, and help for the current action.

Definition at line 53 of file actions.h.

Referenced by main().

 
#define ac__Usage_this (  )     do { ac__Usage(NULL, 1, (char**)action->name); } while (0)

Print help for the current action.

Definition at line 55 of file actions.h.

Referenced by cm__uncopy(), ign__rign(), ign__work(), main(), prp__g_work(), prp__l_work(), prp__s_work(), res__work(), and rev__work().


Typedef Documentation

typedef int( action_t)(struct estat *sts)

Callback that gets called for each entry.

Entries get read from the entry list in global [device, inode] order; in the normal action callback (actionlist_t::local_callback and actionlist_t::repos_feedback) the parent entries are handled after child entries (but the parent struct estats exist, of course), so that the list of children is correct.

See also waa__update_tree.

The full (wc-based) path can be built as required by ops__build_path().

Definition at line 39 of file actions.h.

typedef int( action_uninit_t)(void)

One after all progress has been made.

Definition at line 43 of file actions.h.

typedef int( work_t)(struct estat *root, int argc, char *argv[])

Callback for initializing the action.

Definition at line 41 of file actions.h.


Function Documentation

int act__find_action_by_name ( const char *  cmd,
struct actionlist_t **  action_p 
)

Find the action structure by name.

Returns in * action_p the action matching (a prefix of) cmd.

Find the action structure by name.

Used by commandline parsing - finding the current action, and which help text to show.

Definition at line 68 of file actions.c.

References action_list, action_list_count, actionlist_t::name, and STOPIF_CODE_ERR.

Referenced by ac__Usage(), and main().

Here is the caller graph for this function:


Variable Documentation

action_t ac__dispatch
work_t ac__Usage

The always allowed action - printing general or specific help.

Definition at line 51 of file actions.h.

Array of all known actions.

Definition at line 98 of file ac_list.c.

Referenced by ac__Usage(), act__find_action_by_name(), and main().

const int action_list_count

How many actions we know.

Definition at line 135 of file ac_list.c.

Referenced by ac__Usage(), and act__find_action_by_name().


Generated for fsvs by  doxygen 1.6.1