home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / include / gdict-1.0 / gdict / gdict-utils.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-04-09  |  2.9 KB  |  82 lines

  1. /* gdict-utils.h - Utility functions for Gdict
  2.  *
  3.  * Copyright (C) 2005  Emmanuele Bassi <ebassi@gmail.com>
  4.  *
  5.  * This library is free software; you can redistribute it and/or
  6.  * modify it under the terms of the GNU Library General Public
  7.  * License as published by the Free Software Foundation; either
  8.  * version 2 of the License, or (at your option) any later version.
  9.  *
  10.  * This library is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.  * Library General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU Library General Public
  16.  * License along with this library; if not, write to the
  17.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  18.  */
  19.  
  20. #ifndef __GDICT_UTILS_H__
  21. #define __GDICT_UTILS_H__
  22.  
  23. #include <glib-object.h>
  24. #include <gtk/gtkwidget.h>
  25.  
  26. G_BEGIN_DECLS
  27.  
  28. #define GDICT_DEFAULT_DATABASE    "*"
  29. #define GDICT_DEFAULT_STRATEGY    "."
  30.  
  31. #define GDICT_DEFAULT_FONT_NAME "Sans 10"
  32.  
  33. /* properties shared between GdictContext implementations */
  34. typedef enum {
  35.   GDICT_CONTEXT_PROP_FIRST      = 0x1000,
  36.   GDICT_CONTEXT_PROP_LOCAL_ONLY = GDICT_CONTEXT_PROP_FIRST,
  37.   GDICT_CONTEXT_PROP_LAST
  38. } GdictContextProp;
  39.  
  40. /* Status codes as defined by RFC 2229 */
  41. typedef enum {
  42.   GDICT_STATUS_INVALID                   = 0,
  43.     
  44.   GDICT_STATUS_N_DATABASES_PRESENT       = 110,
  45.   GDICT_STATUS_N_STRATEGIES_PRESENT      = 111,
  46.   GDICT_STATUS_DATABASE_INFO             = 112,
  47.   GDICT_STATUS_HELP_TEXT                 = 113,
  48.   GDICT_STATUS_SERVER_INFO               = 114,
  49.   GDICT_STATUS_CHALLENGE                 = 130,
  50.   GDICT_STATUS_N_DEFINITIONS_RETRIEVED   = 150,
  51.   GDICT_STATUS_WORD_DB_NAME              = 151,
  52.   GDICT_STATUS_N_MATCHES_FOUND           = 152,
  53.   GDICT_STATUS_CONNECT                   = 220,
  54.   GDICT_STATUS_QUIT                      = 221,
  55.   GDICT_STATUS_AUTH_OK                   = 230,
  56.   GDICT_STATUS_OK                        = 250,
  57.   GDICT_STATUS_SEND_RESPONSE             = 330,
  58.   /* Connect response codes */
  59.   GDICT_STATUS_SERVER_DOWN               = 420,
  60.   GDICT_STATUS_SHUTDOWN                  = 421,
  61.   /* Error codes */
  62.   GDICT_STATUS_BAD_COMMAND               = 500,
  63.   GDICT_STATUS_BAD_PARAMETERS            = 501,
  64.   GDICT_STATUS_COMMAND_NOT_IMPLEMENTED   = 502,
  65.   GDICT_STATUS_PARAMETER_NOT_IMPLEMENTED = 503,
  66.   GDICT_STATUS_NO_ACCESS                 = 530,
  67.   GDICT_STATUS_USE_SHOW_INFO             = 531,
  68.   GDICT_STATUS_UNKNOWN_MECHANISM         = 532,
  69.   GDICT_STATUS_BAD_DATABASE              = 550,
  70.   GDICT_STATUS_BAD_STRATEGY              = 551,
  71.   GDICT_STATUS_NO_MATCH                  = 552,
  72.   GDICT_STATUS_NO_DATABASES_PRESENT      = 554,
  73.   GDICT_STATUS_NO_STRATEGIES_PRESENT     = 555
  74. } GdictStatusCode;
  75.  
  76. #define GDICT_IS_VALID_STATUS_CODE(x)    (((x) > GDICT_STATUS_INVALID) && \
  77.                                          ((x) <= GDICT_STATUS_NO_STRATEGIES_PRESENT))
  78.  
  79. G_END_DECLS
  80.  
  81. #endif /* __GDICT_UTILS_H__ */
  82.