Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

gnet_property.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2003, Richard Eckart
00003  *
00004  * THIS FILE IS AUTOGENERATED! DO NOT EDIT!
00005  * This file is generated from gnet_props.ag using autogen.
00006  * Autogen is available at http://autogen.sourceforge.net/.
00007  *
00008  *----------------------------------------------------------------------
00009  * This file is part of gtk-gnutella.
00010  *
00011  *  gtk-gnutella is free software; you can redistribute it and/or modify
00012  *  it under the terms of the GNU General Public License as published by
00013  *  the Free Software Foundation; either version 2 of the License, or
00014  *  (at your option) any later version.
00015  *
00016  *  gtk-gnutella is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU General Public License for more details.
00020  *
00021  *  You should have received a copy of the GNU General Public License
00022  *  along with gtk-gnutella; if not, write to the Free Software
00023  *  Foundation, Inc.:
00024  *      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025  *----------------------------------------------------------------------
00026  */
00027 
00028 #ifndef _gnet_property_h_
00029 #define _gnet_property_h_
00030 
00031 #include "lib/prop.h"
00032 
00033 #define GNET_PROPERTY_MIN ((NO_PROP+1))
00034 #define GNET_PROPERTY_MAX ((NO_PROP+1)+GNET_PROPERTY_END-1)
00035 #define GNET_PROPERTY_NUM (GNET_PROPERTY_END-(NO_PROP+1))
00036 
00037 typedef enum {
00038     PROP_READING_HOSTFILE=(NO_PROP+1),
00039     PROP_READING_ULTRAFILE,
00040     PROP_ANCIENT_VERSION,
00041     PROP_NEW_VERSION_STR,
00042     PROP_UP_CONNECTIONS,
00043     PROP_NORMAL_CONNECTIONS,
00044     PROP_MAX_CONNECTIONS,
00045     PROP_NODE_LEAF_COUNT,
00046     PROP_NODE_NORMAL_COUNT,
00047     PROP_NODE_ULTRA_COUNT,
00048     PROP_MAX_DOWNLOADS,
00049     PROP_MAX_HOST_DOWNLOADS,
00050     PROP_MAX_UPLOADS,
00051     PROP_MAX_UPLOADS_IP,
00052     PROP_LOCAL_IP,
00053     PROP_CURRENT_IP_STAMP,
00054     PROP_AVERAGE_IP_UPTIME,
00055     PROP_START_STAMP,
00056     PROP_AVERAGE_SERVENT_UPTIME,
00057     PROP_LISTEN_PORT,
00058     PROP_FORCED_LOCAL_IP,
00059     PROP_CONNECTION_SPEED,
00060     PROP_COMPUTE_CONNECTION_SPEED,
00061     PROP_QUERY_RESPONSE_MAX_ITEMS,
00062     PROP_UL_USAGE_MIN_PERCENTAGE,
00063     PROP_DOWNLOAD_CONNECTING_TIMEOUT,
00064     PROP_DOWNLOAD_PUSH_SENT_TIMEOUT,
00065     PROP_DOWNLOAD_CONNECTED_TIMEOUT,
00066     PROP_DOWNLOAD_RETRY_TIMEOUT_MIN,
00067     PROP_DOWNLOAD_RETRY_TIMEOUT_MAX,
00068     PROP_DOWNLOAD_MAX_RETRIES,
00069     PROP_DOWNLOAD_RETRY_TIMEOUT_DELAY,
00070     PROP_DOWNLOAD_RETRY_BUSY_DELAY,
00071     PROP_DOWNLOAD_RETRY_REFUSED_DELAY,
00072     PROP_DOWNLOAD_RETRY_STOPPED_DELAY,
00073     PROP_DOWNLOAD_OVERLAP_RANGE,
00074     PROP_UPLOAD_CONNECTING_TIMEOUT,
00075     PROP_UPLOAD_CONNECTED_TIMEOUT,
00076     PROP_SEARCH_REISSUE_TIMEOUT,
00077     PROP_BAN_RATIO_FDS,
00078     PROP_BAN_MAX_FDS,
00079     PROP_BANNED_COUNT,
00080     PROP_MAX_BANNED_FD,
00081     PROP_INCOMING_CONNECTING_TIMEOUT,
00082     PROP_NODE_CONNECTING_TIMEOUT,
00083     PROP_NODE_CONNECTED_TIMEOUT,
00084     PROP_NODE_SENDQUEUE_SIZE,
00085     PROP_NODE_TX_FLOWC_TIMEOUT,
00086     PROP_NODE_RX_FLOWC_RATIO,
00087     PROP_MAX_TTL,
00088     PROP_MY_TTL,
00089     PROP_HARD_TTL_LIMIT,
00090     PROP_DBG,
00091     PROP_BAN_DEBUG,
00092     PROP_CPU_DEBUG,
00093     PROP_DMESH_DEBUG,
00094     PROP_GMSG_DEBUG,
00095     PROP_SHARE_DEBUG,
00096     PROP_NODE_DEBUG,
00097     PROP_SOCKET_DEBUG,
00098     PROP_BOOTSTRAP_DEBUG,
00099     PROP_HTTP_DEBUG,
00100     PROP_DOWNLOAD_DEBUG,
00101     PROP_FILEINFO_DEBUG,
00102     PROP_UPLOAD_DEBUG,
00103     PROP_LIB_DEBUG,
00104     PROP_BITZI_DEBUG,
00105     PROP_GWC_DEBUG,
00106     PROP_URL_DEBUG,
00107     PROP_DH_DEBUG,
00108     PROP_DQ_DEBUG,
00109     PROP_VMSG_DEBUG,
00110     PROP_QUERY_DEBUG,
00111     PROP_SEARCH_DEBUG,
00112     PROP_UDP_DEBUG,
00113     PROP_QRP_DEBUG,
00114     PROP_ROUTING_DEBUG,
00115     PROP_GGEP_DEBUG,
00116     PROP_PCACHE_DEBUG,
00117     PROP_HSEP_DEBUG,
00118     PROP_TLS_DEBUG,
00119     PROP_PARQ_DEBUG,
00120     PROP_PARQ_OPTIMISTIC,
00121     PROP_PARQ_SIZE_ALWAYS_CONTINUE,
00122     PROP_PARQ_TIME_ALWAYS_CONTINUE,
00123     PROP_TRACK_PROPS,
00124     PROP_STOP_HOST_GET,
00125     PROP_BW_HTTP_IN_ENABLED,
00126     PROP_BW_HTTP_OUT_ENABLED,
00127     PROP_BW_GNET_IN_ENABLED,
00128     PROP_BW_GNET_LEAF_IN_ENABLED,
00129     PROP_BW_GNET_OUT_ENABLED,
00130     PROP_BW_GNET_LEAF_OUT_ENABLED,
00131     PROP_BW_UL_USAGE_ENABLED,
00132     PROP_BW_ALLOW_STEALING,
00133     PROP_AUTOCLEAR_COMPLETED_DOWNLOADS,
00134     PROP_AUTOCLEAR_FAILED_DOWNLOADS,
00135     PROP_AUTOCLEAR_UNAVAILABLE_DOWNLOADS,
00136     PROP_SEARCH_REMOVE_DOWNLOADED,
00137     PROP_FORCE_LOCAL_IP,
00138     PROP_USE_NETMASKS,
00139     PROP_ALLOW_PRIVATE_NETWORK_CONNECTION,
00140     PROP_USE_IP_TOS,
00141     PROP_DOWNLOAD_DELETE_ABORTED,
00142     PROP_PROXY_AUTH,
00143     PROP_SOCKS_USER,
00144     PROP_SOCKS_PASS,
00145     PROP_PROXY_ADDR,
00146     PROP_PROXY_HOSTNAME,
00147     PROP_PROXY_PORT,
00148     PROP_PROXY_PROTOCOL,
00149     PROP_NETWORK_PROTOCOL,
00150     PROP_HOSTS_IN_CATCHER,
00151     PROP_HOSTS_IN_ULTRA_CATCHER,
00152     PROP_HOSTS_IN_BAD_CATCHER,
00153     PROP_MAX_HOSTS_CACHED,
00154     PROP_MAX_ULTRA_HOSTS_CACHED,
00155     PROP_MAX_BAD_HOSTS_CACHED,
00156     PROP_MAX_HIGH_TTL_MSG,
00157     PROP_MAX_HIGH_TTL_RADIUS,
00158     PROP_BW_HTTP_IN,
00159     PROP_BW_HTTP_OUT,
00160     PROP_BW_GNET_IN,
00161     PROP_BW_GNET_OUT,
00162     PROP_BW_GNET_LIN,
00163     PROP_BW_GNET_LOUT,
00164     PROP_SEARCH_QUERIES_FORWARD_SIZE,
00165     PROP_SEARCH_QUERIES_KICK_SIZE,
00166     PROP_SEARCH_ANSWERS_FORWARD_SIZE,
00167     PROP_SEARCH_ANSWERS_KICK_SIZE,
00168     PROP_OTHER_MESSAGES_KICK_SIZE,
00169     PROP_HOPS_RANDOM_FACTOR,
00170     PROP_SEND_PUSHES,
00171     PROP_MIN_DUP_MSG,
00172     PROP_MIN_DUP_RATIO,
00173     PROP_SCAN_EXTENSIONS,
00174     PROP_SCAN_IGNORE_SYMLINK_DIRS,
00175     PROP_SCAN_IGNORE_SYMLINK_REGFILES,
00176     PROP_SAVE_FILE_PATH,
00177     PROP_MOVE_FILE_PATH,
00178     PROP_BAD_FILE_PATH,
00179     PROP_SHARED_DIRS_PATHS,
00180     PROP_LOCAL_NETMASKS_STRING,
00181     PROP_TOTAL_DOWNLOADS,
00182     PROP_UL_RUNNING,
00183     PROP_UL_REGISTERED,
00184     PROP_TOTAL_UPLOADS,
00185     PROP_SERVENT_GUID,
00186     PROP_USE_SWARMING,
00187     PROP_USE_AGGRESSIVE_SWARMING,
00188     PROP_DL_MINCHUNKSIZE,
00189     PROP_DL_MAXCHUNKSIZE,
00190     PROP_AUTO_DOWNLOAD_IDENTICAL,
00191     PROP_AUTO_FEED_DOWNLOAD_MESH,
00192     PROP_STRICT_SHA1_MATCHING,
00193     PROP_USE_FUZZY_MATCHING,
00194     PROP_FUZZY_THRESHOLD,
00195     PROP_IS_FIREWALLED,
00196     PROP_IS_INET_CONNECTED,
00197     PROP_IS_UDP_FIREWALLED,
00198     PROP_RECV_SOLICITED_UDP,
00199     PROP_GNET_COMPACT_QUERY,
00200     PROP_DOWNLOAD_OPTIMISTIC_START,
00201     PROP_LIBRARY_REBUILDING,
00202     PROP_SHA1_REBUILDING,
00203     PROP_SHA1_VERIFYING,
00204     PROP_FILE_MOVING,
00205     PROP_PREFER_COMPRESSED_GNET,
00206     PROP_ONLINE_MODE,
00207     PROP_DOWNLOAD_REQUIRE_URN,
00208     PROP_DOWNLOAD_REQUIRE_SERVER_NAME,
00209     PROP_MAX_ULTRAPEERS,
00210     PROP_QUICK_CONNECT_POOL_SIZE,
00211     PROP_MAX_LEAVES,
00212     PROP_SEARCH_HANDLE_IGNORED_FILES,
00213     PROP_CONFIGURED_PEERMODE,
00214     PROP_CURRENT_PEERMODE,
00215     PROP_SYS_NOFILE,
00216     PROP_SYS_PHYSMEM,
00217     PROP_DL_QUEUE_COUNT,
00218     PROP_DL_RUNNING_COUNT,
00219     PROP_DL_ACTIVE_COUNT,
00220     PROP_DL_AQUEUED_COUNT,
00221     PROP_DL_PQUEUED_COUNT,
00222     PROP_FI_ALL_COUNT,
00223     PROP_FI_WITH_SOURCE_COUNT,
00224     PROP_DL_QALIVE_COUNT,
00225     PROP_DL_BYTE_COUNT,
00226     PROP_UL_BYTE_COUNT,
00227     PROP_PFSP_SERVER,
00228     PROP_PFSP_FIRST_CHUNK,
00229     PROP_PFSP_MINIMUM_FILESIZE,
00230     PROP_FUZZY_FILTER_DMESH,
00231     PROP_CRAWLER_VISIT_COUNT,
00232     PROP_UDP_CRAWLER_VISIT_COUNT,
00233     PROP_HOST_RUNS_NTP,
00234     PROP_NTP_DETECTED,
00235     PROP_CLOCK_SKEW,
00236     PROP_NODE_MONITOR_UNSTABLE_IP,
00237     PROP_NODE_MONITOR_UNSTABLE_SERVENTS,
00238     PROP_DL_REMOVE_FILE_ON_MISMATCH,
00239     PROP_DL_MISMATCH_BACKOUT,
00240     PROP_SERVER_HOSTNAME,
00241     PROP_GIVE_SERVER_HOSTNAME,
00242     PROP_RESERVE_GTKG_NODES,
00243     PROP_UNIQUE_NODES,
00244     PROP_DOWNLOAD_RX_SIZE,
00245     PROP_NODE_RX_SIZE,
00246     PROP_DL_HTTP_LATENCY,
00247     PROP_NODE_LAST_ULTRA_CHECK,
00248     PROP_NODE_LAST_ULTRA_LEAF_SWITCH,
00249     PROP_UP_REQ_AVG_SERVENT_UPTIME,
00250     PROP_UP_REQ_AVG_IP_UPTIME,
00251     PROP_UP_REQ_NODE_UPTIME,
00252     PROP_UP_REQ_NOT_FIREWALLED,
00253     PROP_UP_REQ_ENOUGH_CONN,
00254     PROP_UP_REQ_ENOUGH_FD,
00255     PROP_UP_REQ_ENOUGH_MEM,
00256     PROP_UP_REQ_ENOUGH_BW,
00257     PROP_SEARCH_QUEUE_SIZE,
00258     PROP_SEARCH_QUEUE_SPACING,
00259     PROP_ENABLE_SHELL,
00260     PROP_ENTRY_REMOVAL_TIMEOUT,
00261     PROP_NODE_WATCH_SIMILAR_QUERIES,
00262     PROP_NODE_QUERIES_HALF_LIFE,
00263     PROP_NODE_REQUERY_THRESHOLD,
00264     PROP_LIBRARY_RESCAN_STARTED,
00265     PROP_LIBRARY_RESCAN_FINISHED,
00266     PROP_LIBRARY_RESCAN_DURATION,
00267     PROP_QRP_INDEXING_STARTED,
00268     PROP_QRP_INDEXING_DURATION,
00269     PROP_QRP_TIMESTAMP,
00270     PROP_QRP_COMPUTATION_TIME,
00271     PROP_QRP_PATCH_TIMESTAMP,
00272     PROP_QRP_PATCH_COMPUTATION_TIME,
00273     PROP_QRP_GENERATION,
00274     PROP_QRP_SLOTS,
00275     PROP_QRP_SLOTS_FILLED,
00276     PROP_QRP_FILL_RATIO,
00277     PROP_QRP_CONFLICT_RATIO,
00278     PROP_QRP_HASHED_KEYWORDS,
00279     PROP_QRP_PATCH_RAW_LENGTH,
00280     PROP_QRP_PATCH_LENGTH,
00281     PROP_QRP_PATCH_COMP_RATIO,
00282     PROP_ANCIENT_VERSION_FORCE,
00283     PROP_ANCIENT_VERSION_LEFT_DAYS,
00284     PROP_FILE_DESCRIPTOR_SHORTAGE,
00285     PROP_FILE_DESCRIPTOR_RUNOUT,
00286     PROP_ENABLE_G2_SUPPORT,
00287     PROP_CONVERT_SPACES,
00288     PROP_CONVERT_EVIL_CHARS,
00289     PROP_CONVERT_OLD_FILENAMES,
00290     PROP_TLS_ENFORCE,
00291     PROP_GNET_DEFLATE_ENABLED,
00292     PROP_ENABLE_UDP,
00293     PROP_PROCESS_OOB_QUERIES,
00294     PROP_SEND_OOB_QUERIES,
00295     PROP_PROXY_OOB_QUERIES,
00296     PROP_UPLOADS_STALLING,
00297     PROP_USE_GLOBAL_HOSTILES_TXT,
00298     PROP_USE_SO_LINGER,
00299     PROP_BROWSE_HOST_ENABLED,
00300     PROP_HTML_BROWSE_COUNT,
00301     PROP_HTML_BROWSE_SERVED,
00302     PROP_QHITS_BROWSE_COUNT,
00303     PROP_QHITS_BROWSE_SERVED,
00304     PROP_OVERLOADED_CPU,
00305     PROP_DOWNLOAD_BUFFER_SIZE,
00306     PROP_DOWNLOAD_BUFFER_READ_AHEAD,
00307     PROP_BROWSE_COPIED_TO_PASSIVE,
00308     GNET_PROPERTY_END
00309 } gnet_property_t;
00310 
00311 /*
00312  * Property set stub
00313  */
00314 prop_set_stub_t *gnet_prop_get_stub(void);
00315 
00316 /*
00317  * Property definition
00318  */
00319 prop_def_t *gnet_prop_get_def(property_t);
00320 property_t gnet_prop_get_by_name(const gchar *);
00321 GSList *gnet_prop_get_by_regex(const gchar *, gint *);
00322 const gchar *gnet_prop_name(property_t);
00323 const gchar *gnet_prop_type_to_string(property_t);
00324 const gchar *gnet_prop_to_string(property_t prop);
00325 const gchar *gnet_prop_default_to_string(property_t);
00326 const gchar *gnet_prop_description(property_t);
00327 gboolean gnet_prop_is_saved(property_t);
00328 void gnet_prop_set_from_string(property_t, const gchar *);
00329 
00330 /*
00331  * Property-change listeners
00332  */
00333 void gnet_prop_add_prop_changed_listener(
00334     property_t, prop_changed_listener_t, gboolean);
00335 void gnet_prop_remove_prop_changed_listener(
00336     property_t, prop_changed_listener_t);
00337 
00338 /*
00339  * get/set functions
00340  *
00341  * The *_val macros are shortcuts for single scalar properties.
00342  */
00343 void gnet_prop_set_boolean(
00344     property_t, const gboolean *, size_t, size_t);
00345 gboolean *gnet_prop_get_boolean(
00346     property_t, gboolean *, size_t, size_t);
00347 
00348 #define gnet_prop_set_boolean_val(p, v) do { \
00349     gboolean value = v; \
00350     gnet_prop_set_boolean(p, &value, 0, 1); \
00351 } while (0)
00352 
00353 #define gnet_prop_get_boolean_val(p, v) do { \
00354     gnet_prop_get_boolean(p, v, 0, 1); \
00355 } while (0)
00356 
00357 
00358 void gnet_prop_set_string(property_t, const gchar *);
00359 gchar *gnet_prop_get_string(property_t, gchar *, size_t);
00360 
00361 void gnet_prop_set_guint32(
00362     property_t, const guint32 *, size_t, size_t);
00363 guint32 *gnet_prop_get_guint32(
00364     property_t, guint32 *, size_t, size_t);
00365 
00366 #define gnet_prop_set_guint32_val(p, v) do { \
00367     guint32 value = v; \
00368     gnet_prop_set_guint32(p, &value, 0, 1); \
00369 } while (0)
00370 
00371 #define gnet_prop_get_guint32_val(p, v) do { \
00372     gnet_prop_get_guint32(p, v, 0, 1); \
00373 } while (0)
00374 
00375 void gnet_prop_set_guint64(
00376     property_t, const guint64 *, size_t, size_t);
00377 guint64 *gnet_prop_get_guint64(
00378     property_t, guint64 *, size_t, size_t);
00379 
00380 #define gnet_prop_set_guint64_val(p, v) do { \
00381     guint64 value = v; \
00382     gnet_prop_set_guint64(p, &value, 0, 1); \
00383 } while (0)
00384 
00385 #define gnet_prop_get_guint64_val(p, v) do { \
00386     gnet_prop_get_guint64(p, v, 0, 1); \
00387 } while (0)
00388 
00389 void gnet_prop_set_timestamp(
00390     property_t, const time_t *, size_t, size_t);
00391 time_t *gnet_prop_get_timestamp(
00392     property_t, time_t *, size_t, size_t);
00393 
00394 #define gnet_prop_set_timestamp_val(p, v) do { \
00395     time_t value = v; \
00396     gnet_prop_set_timestamp(p, &value, 0, 1); \
00397 } while (0)
00398 
00399 #define gnet_prop_get_timestamp_val(p, v) do { \
00400     gnet_prop_get_timestamp(p, v, 0, 1); \
00401 } while (0)
00402 void gnet_prop_set_storage(property_t, const gchar *, size_t);
00403 gchar *gnet_prop_get_storage(property_t, gchar *, size_t);
00404 
00405 #endif /* _gnet_property_h_ */
00406 

Generated on Sun Feb 12 10:49:56 2006 for Gtk-Gnutella by doxygen 1.3.6