code::GLibUtils Class Reference

List of all members.

Detailed Description

Utility class for glib clients (code_LBInterface_glib, code_FileReader_glib) to emulate RSSD calls without using the rssd library.

Only rssd_notifier code should need to call this class.

Author:
Charles Kerr
Version:
Id
code_GLibUtils.h,v 1.2 2009/06/02 20:17:38 lakshman Exp


Public Types

typedef std::vector< char > chars_t
typedef std::vector< std::string > strings_t
 RSS_OPEN = 1
 RSS_READ = 2
 RSS_CLOSE = 4
 RSS_LSEEK = 5
 RSS_LB_OPEN = 13
 RSS_LB_READ = 14
 RSS_LB_WRITE = 15
 RSS_LB_GENERIC = 16
 RSS_LB_SEEK = 18
 RSS_LB_STAT = 20
 RSS_LB_LIST = 21
enum  Action {
  RSS_OPEN = 1, RSS_READ = 2, RSS_CLOSE = 4, RSS_LSEEK = 5,
  RSS_LB_OPEN = 13, RSS_LB_READ = 14, RSS_LB_WRITE = 15, RSS_LB_GENERIC = 16,
  RSS_LB_SEEK = 18, RSS_LB_STAT = 20, RSS_LB_LIST = 21
}

Static Public Member Functions

static void checkin_channel (GLibChannel &)
static GIOChannel * checkout_channel (const std::string &host)
 Create an rss connection to the specified server.
static void checkin_channel (const std::string &host, GIOChannel *channel)
static int doAction (GIOChannel *io, Action action, const char *req_msg, int req_msg_len, chars_t &setme_response)
static int doAction (GIOChannel *io, Action action, const char *req_msg, int req_msg_len, strings_t &setme_response, int &setme_rmt_ret, int &setme_rmt_err)

Classes

struct  GLibSocket


Member Typedef Documentation

typedef std::vector<char> code::GLibUtils::chars_t

typedef std::vector<std::string> code::GLibUtils::strings_t


Member Enumeration Documentation

enum code::GLibUtils::Action

Enumerator:
RSS_OPEN 
RSS_READ 
RSS_CLOSE 
RSS_LSEEK 
RSS_LB_OPEN 
RSS_LB_READ 
RSS_LB_WRITE 
RSS_LB_GENERIC 
RSS_LB_SEEK 
RSS_LB_STAT 
RSS_LB_LIST 


Member Function Documentation

static void code::GLibUtils::checkin_channel ( const std::string &  host,
GIOChannel *  channel 
) [static]

static void code::GLibUtils::checkin_channel ( GLibChannel &   )  [static]

static GIOChannel* code::GLibUtils::checkout_channel ( const std::string &  host  )  [static]

Create an rss connection to the specified server.

If a connection already exists, the existing connection will be returned.

Parameters:
server name
setme_fd the resulting socket fd if the connection is successful.
Returns:
the GIOChannel, or NULL if a connection could not be made.

static int code::GLibUtils::doAction ( GIOChannel *  io,
Action  action,
const char *  req_msg,
int  req_msg_len,
strings_t setme_response,
int &  setme_rmt_ret,
int &  setme_rmt_err 
) [static]

static int code::GLibUtils::doAction ( GIOChannel *  io,
Action  action,
const char *  req_msg,
int  req_msg_len,
chars_t setme_response 
) [static]


Generated on Fri May 4 13:40:12 2012 for WDSS-IIw2 by  doxygen 1.4.7