summaryrefslogtreecommitdiff
path: root/ACE/apps/JAWS/clients/Caching/Locator_Request_Reply.h
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/apps/JAWS/clients/Caching/Locator_Request_Reply.h')
-rw-r--r--ACE/apps/JAWS/clients/Caching/Locator_Request_Reply.h167
1 files changed, 87 insertions, 80 deletions
diff --git a/ACE/apps/JAWS/clients/Caching/Locator_Request_Reply.h b/ACE/apps/JAWS/clients/Caching/Locator_Request_Reply.h
index a4e6e5f993a..055f5269c98 100644
--- a/ACE/apps/JAWS/clients/Caching/Locator_Request_Reply.h
+++ b/ACE/apps/JAWS/clients/Caching/Locator_Request_Reply.h
@@ -1,80 +1,84 @@
/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// none
-//
-// = FILENAME
-// Locator_Request_Response.h
-//
-// = AUTHOR
-// Nanbor Wang
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file Locator_Request_Reply.h
+ *
+ * $Id$
+ *
+ * @author Nanbor Wang
+ */
+//=============================================================================
+
#ifndef ACE_LOCATOR_REQUEST_REPLY_H
#define ACE_LOCATOR_REQUEST_REPLY_H
#include "URL_Properties.h"
+/**
+ * @class ACE_URL_Locator_Request
+ *
+ * @brief A URL request message formater/wrapper.
+ *
+ * This class defines a URL request data. It is used
+ * to transform requests to an object so that we can
+ * ship them across network.
+ */
class ACE_Svc_Export ACE_URL_Locator_Request
- // = TITLE
- // A URL request message formater/wrapper.
- //
- // = DESCRIPTION
- // This class defines a URL request data. It is used
- // to transform requests to an object so that we can
- // ship them across network.
{
public:
+ /// Default ctor.
ACE_URL_Locator_Request (void);
- // Default ctor.
+ /// Default dtor.
~ACE_URL_Locator_Request (void);
- // Default dtor.
+ /**
+ * Query the locator for HTTP with designate properties (none, some,
+ * or all). The locator being queried will return a sequence of
+ * offers with <how_many> offers in it. This interface allocates
+ * <offer> so users must deallocate it after use.
+ */
int url_query (const int how,
const ACE_URL_Property_Seq &pseq,
const int how_many);
- // Query the locator for HTTP with designate properties (none, some,
- // or all). The locator being queried will return a sequence of
- // offers with <how_many> offers in it. This interface allocates
- // <offer> so users must deallocate it after use.
+ /// Export an offer to the locator.
int export_offer (const ACE_URL_Offer &offer);
- // Export an offer to the locator.
+ /// Withdraw an offer. return 0 if succeed, -1 otherwise.
int withdraw_offer (const ACE_WString &offer_id);
- // Withdraw an offer. return 0 if succeed, -1 otherwise.
+ /// Query a specific offer.
int describe_offer (const ACE_WString &offer_id);
- // Query a specific offer.
+ /// Modify a previously registered offer.
int modify_offer (const ACE_WString &offer_id,
const char *url = 0,
const ACE_URL_Property_Seq &del = 0,
const ACE_URL_Property_Seq &modify = 0);
- // Modify a previously registered offer.
+ /// Modify a previously registered offer.
int modify_offer (const ACE_WString &offer_id,
const ACE_WString *url = 0,
const ACE_URL_Property_Seq &del = 0,
const ACE_URL_Property_Seq &modify = 0);
- // Modify a previously registered offer.
+ /// Encode request for network communication. If succeed,
+ /// returns the size of the buffer, otherwise, return 0.
size_t encode (void);
- // Encode request for network communication. If succeed,
- // returns the size of the buffer, otherwise, return 0.
+ /**
+ * Restore from network data. Returns size of the buffer
+ * if succeed, 0 otherwise. When passing in a buffer,
+ * caller must take the responsibility to delete the buffer
+ * afterward, if so needed.
+ */
size_t decode (void *buffer);
- // Restore from network data. Returns size of the buffer
- // if succeed, 0 otherwise. When passing in a buffer,
- // caller must take the responsibility to delete the buffer
- // afterward, if so needed.
+ /// A bunch of methods to access internal data.
const int how (void) const;
const int how_many (void) const;
const u_int opcode (void) const;
@@ -85,15 +89,14 @@ public:
const ACE_WString &id (void) const;
const ACE_WString &url (void) const;
const char *buffer (void) const;
- // A bunch of methods to access internal data.
+ /// Print out this object.
void dump (void) const;
- // Print out this object.
protected:
+ /// Return the size of the buffer required to encode
+ /// this request.
size_t size (void);
- // Return the size of the buffer required to encode
- // this request.
enum {
VALID_SEQ1 = 0x1,
@@ -102,73 +105,77 @@ protected:
};
// These constants used to indicate which pointers are valid.
+ /// Request type code.
u_int code_;
- // Request type code.
+ /// Query method (if code_ == QUERY.)
int how_;
- // Query method (if code_ == QUERY.)
+ /// How many offers are we interested in in this query.
int how_many_;
- // How many offers are we interested in in this query.
+ /// Bit flag to mark valid pointers within this object.
int valid_ptr_;
- // Bit flag to mark valid pointers within this object.
+ /// For query or del in modify_offer.
ACE_URL_Property_Seq *seq1_;
- // For query or del in modify_offer.
+ /// For modify seq. in modify_offer.
ACE_URL_Property_Seq *seq2_;
- // For modify seq. in modify_offer.
+ /// Offer to export.
ACE_URL_Offer *offer_;
- // Offer to export.
+ /// Offer ID.
ACE_WString id_;
- // Offer ID.
+ /// URL of this offer.
ACE_WString url_;
- // URL of this offer.
+ /// Buffer to store encoded data.
char *buffer_;
- // Buffer to store encoded data.
};
+/**
+ * @class ACE_URL_Locator_Reply
+ *
+ * @brief A URL reply message formater/wrapper.
+ *
+ * This class defines a URL reply data. It is used
+ * to transform reply messages to an object so that we can
+ * ship them across network.
+ */
class ACE_Svc_Export ACE_URL_Locator_Reply
- // = TITLE
- // A URL reply message formater/wrapper.
- //
- // = DESCRIPTION
- // This class defines a URL reply data. It is used
- // to transform reply messages to an object so that we can
- // ship them across network.
{
public:
+ /// Default ctor.
ACE_URL_Locator_Reply (void);
- // Default ctor.
+ /// Default dtor.
~ACE_URL_Locator_Reply (void);
- // Default dtor.
+ /// Setup a reply message for EXPORT, WITHDRAW, or MODIFY operations.
int status_reply (u_int op, int result);
- // Setup a reply message for EXPORT, WITHDRAW, or MODIFY operations.
+ /// Setup a reply for QUERY operation.
int query_reply (int result, size_t num,
const ACE_URL_Offer_Seq &offers);
- // Setup a reply for QUERY operation.
+ /// Construct a reply for DESCRIBE operation.
int describe_reply (int result,
const ACE_URL_Offer &offer);
- // Construct a reply for DESCRIBE operation.
+ /// Encode request for network communication. If succeed,
+ /// returns the size of the buffer, otherwise, return 0.
size_t encode (void);
- // Encode request for network communication. If succeed,
- // returns the size of the buffer, otherwise, return 0.
+ /**
+ * Restore from network data. Returns size of the buffer
+ * if succeed, 0 otherwise. When passing in a buffer,
+ * caller must take the responsibility to delete the buffer
+ * afterward, if so needed.
+ */
size_t decode (void *buffer);
- // Restore from network data. Returns size of the buffer
- // if succeed, 0 otherwise. When passing in a buffer,
- // caller must take the responsibility to delete the buffer
- // afterward, if so needed.
// Accessor function.
const size_t num_offers (void) const;
@@ -178,13 +185,13 @@ public:
const u_int status (void) const;
const char *buffer (void) const ;
+ /// Print out this object.
void dump (void) const ;
- // Print out this object.
protected:
+ /// Return the size of the buffer required to encode
+ /// this request.
size_t size (void);
- // Return the size of the buffer required to encode
- // this request.
enum {
VALID_OFFER = 0x1,
@@ -192,26 +199,26 @@ protected:
};
// Valid pointer masks.
+ /// Holds the original op code.
u_int code_;
- // Holds the original op code.
+ /// Holds the result of an operation from the Location Server.
int status_;
- // Holds the result of an operation from the Location Server.
+ /// Holds the number of valid offers in the offers_ sequence.
size_t num_offers_;
- // Holds the number of valid offers in the offers_ sequence.
+ /// Flag that marks valid internal pointers.
int valid_ptr_;
- // Flag that marks valid internal pointers.
+ /// Holds a single offer. Used in query offer property.
ACE_URL_Offer *offer_;
- // Holds a single offer. Used in query offer property.
+ /// Holds the replying offer sequence from a Locator.
ACE_URL_Offer_Seq *offers_;
- // Holds the replying offer sequence from a Locator.
+ /// Buffer to store encoded data.
char *buffer_;
- // Buffer to store encoded data.
};
#if defined (__ACE_INLINE__)
#include "Locator_Request_Reply.inl"