author | yz157939@agc105 |
Fri, 25 Apr 2008 17:13:57 +0800 | |
changeset 149 | 0014c9b031e9 |
parent 147 | 8c4ef02c14b8 |
permissions | -rw-r--r-- |
147
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
1 |
/* |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
2 |
* CDDL HEADER START |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
3 |
* |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
4 |
* The contents of this file are subject to the terms of the |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
5 |
* Common Development and Distribution License (the "License"). |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
6 |
* You may not use this file except in compliance with the License. |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
7 |
* |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
8 |
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
9 |
* or http://www.opensolaris.org/os/licensing. |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
10 |
* See the License for the specific language governing permissions |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
11 |
* and limitations under the License. |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
12 |
* |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
13 |
* When distributing Covered Code, include this CDDL HEADER in each |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
14 |
* file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
15 |
* If applicable, add the following below this CDDL HEADER, with the |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
16 |
* fields enclosed by brackets "[]" replaced with your own identifying |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
17 |
* information: Portions Copyright [yyyy] [name of copyright owner] |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
18 |
* |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
19 |
* CDDL HEADER END |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
20 |
*/ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
21 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
22 |
/* |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
23 |
* Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
24 |
* Use is subject to license terms. |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
25 |
*/ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
26 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
27 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
28 |
#ifndef _FSEXAM_SETTING_H |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
29 |
#define _FSEXAM_SETTING_H |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
30 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
31 |
/* Use same serial for history item or not */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
32 |
#define FSEXAM_SETTING_FLAGS_DIFF_SERIAL (1<<0) |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
33 |
/* Don't write history information during UNDO */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
34 |
#define FSEXAM_SETTING_FLAGS_UNDO (1<<1) |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
35 |
#define FSEXAM_SETTING_FLAGS_SCENARIO (1<<2) |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
36 |
#define FSEXAM_SETTING_FLAGS_STOP (1<<3) |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
37 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
38 |
typedef struct _FSEXAM_setting FSEXAM_setting; |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
39 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
40 |
struct _FSEXAM_setting { |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
41 |
FSEXAM_pref *pref; /* Config preferences */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
42 |
guint flags; /* Flags for one pass of conversion */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
43 |
/* encoding index for current pass, -1 means nop */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
44 |
gint gold_index; |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
45 |
gchar *utf8_locale; /* UTF-8 locale name */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
46 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
47 |
Hist_info *hist_info; /* For history */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
48 |
Log_info *log_info; /* For log */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
49 |
FsexamDryrun *dryrun_info; /* For dryrun */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
50 |
GList *remote_path; /* For NFS/Local file */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
51 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
52 |
/* The number of files passed in by user */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
53 |
guint passin_num; |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
54 |
/* The total number of files processed */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
55 |
guint total_num; |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
56 |
/* The number of files are ignored, including no hist, doesn't exist ...*/ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
57 |
guint ignore_num; |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
58 |
/* The number of files which are converted successfully */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
59 |
guint succ_num; |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
60 |
/* The No. of files which met error during converting: such as no rights */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
61 |
guint fail_num; |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
62 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
63 |
/* Function pointer to handle GUI/CMD diff */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
64 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
65 |
/* get the candidate index */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
66 |
gint (*get_index) (GList *encoding_list, gboolean forname); |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
67 |
/* update GUI after conversion */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
68 |
void (*update_gui) (FSEXAM_setting *setting, |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
69 |
const gchar *path, |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
70 |
const gchar *oldname, |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
71 |
const gchar *newname); |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
72 |
/* display information */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
73 |
void (*display_msg) (const gchar *fname, const gchar *msg); |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
74 |
/* display statistics information */ |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
75 |
void (*display_stats) (FSEXAM_setting *setting); |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
76 |
}; |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
77 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
78 |
FSEXAM_setting *fsexam_setting_init (gboolean cmd_mode); |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
79 |
void fsexam_setting_destroy (FSEXAM_setting *setting); |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
80 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
81 |
void fsexam_setting_reset_stats (FSEXAM_setting *setting); |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
82 |
void fsexam_setting_display_stats (FSEXAM_setting *setting); |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
83 |
void fsexam_setting_print (FSEXAM_setting *setting); |
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
84 |
|
8c4ef02c14b8
replace new version of fsexam, old version 0.3.1 is not used any more
yz157939@agc105
parents:
diff
changeset
|
85 |
#endif //_FSEXAM_SETTING_H |