summaryrefslogtreecommitdiff
path: root/ace/Token_Request_Reply.h
diff options
context:
space:
mode:
Diffstat (limited to 'ace/Token_Request_Reply.h')
-rw-r--r--ace/Token_Request_Reply.h116
1 files changed, 62 insertions, 54 deletions
diff --git a/ace/Token_Request_Reply.h b/ace/Token_Request_Reply.h
index 3391df69f53..f1f10b93ba9 100644
--- a/ace/Token_Request_Reply.h
+++ b/ace/Token_Request_Reply.h
@@ -1,23 +1,20 @@
/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// Token_Request_Reply.h
-//
-// = DESCRIPTION
-// Define the format used to exchange messages between the
-// ACE_Token Server and its clients.
-//
-// = AUTHOR
-// Douglas C. Schmidt (schmidt@cs.wustl.edu)
-// Tim Harrison (harrison@cs.wustl.edu)
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file Token_Request_Reply.h
+ *
+ * $Id$
+ *
+ * Define the format used to exchange messages between the
+ * ACE_Token Server and its clients.
+ *
+ *
+ * @author Douglas C. Schmidt (schmidt@cs.wustl.edu)
+ * @author Tim Harrison (harrison@cs.wustl.edu)
+ */
+//=============================================================================
+
#ifndef ACE_TOKEN_REQUEST_REPLY_H
#define ACE_TOKEN_REQUEST_REPLY_H
@@ -35,40 +32,49 @@
// the Transfer structure in ACE_Token_Request
#define ACE_TOKEN_REQUEST_HEADER_SIZE 40
+/**
+ * @class ACE_Token_Request
+ *
+ * @brief Message format for delivering requests to the ACE_Token Server.
+ *
+ * This class is implemented to minimize data copying.
+ * In particular, all marshaling is done in situ...
+ */
class ACE_Export ACE_Token_Request
{
- // = TITLE
- // Message format for delivering requests to the ACE_Token Server.
- //
- // = DESCRIPTION
- // This class is implemented to minimize data copying.
- // In particular, all marshaling is done in situ...
public:
+ /// Operation types.
enum OPERATION
{
- // Operation types.
- ACQUIRE, // Acquire the token.
- RELEASE, // Release the token.
- RENEW, // Renew the token.
- REMOVE, // Remove the token.
+ /// Acquire the token.
+ ACQUIRE,
+ /// Release the token.
+ RELEASE,
+ /// Renew the token.
+ RENEW,
+ /// Remove the token.
+ REMOVE,
+ // Try to acquire the token.
TRY_ACQUIRE
};
+ /// Default constructor.
ACE_Token_Request (void);
- // Default constructor.
+ /**
+ * token_type - MUTEX, RWLOCK
+ * proxy_type - MUTEX, RLOCK, WLOCK (acquires mean different things)
+ * operation - method
+ * token_name
+ * client_id
+ * options - we check USE_TIMEOUT and use the arg.
+ */
ACE_Token_Request (int token_type,
int proxy_type,
ACE_UINT32 operation,
const ACE_TCHAR token_name[],
const ACE_TCHAR client_id[],
const ACE_Synch_Options &options);
- // token_type - MUTEX, RWLOCK
- // proxy_type - MUTEX, RLOCK, WLOCK (acquires mean different things)
- // operation - method
- // token_name
- // client_id
- // options - we check USE_TIMEOUT and use the arg.
// = Set/get the length of the encoded/decoded message.
ACE_UINT32 length (void) const;
@@ -106,15 +112,15 @@ public:
ACE_TCHAR *client_id (void) const;
void token_name (const ACE_TCHAR *token_name, const ACE_TCHAR *client_id);
+ /// Encode the message before transmission.
int encode (void *&);
- // Encode the message before transmission.
+ /// Decode message after reception. This must be called to set the
+ /// internal options.
int decode (void);
- // Decode message after reception. This must be called to set the
- // internal options.
+ /// Print out the values of the message for debugging purposes.
void dump (void) const;
- // Print out the values of the message for debugging purposes.
private:
// = The 5 fields in the <Transfer> struct are transmitted to the server.
@@ -162,27 +168,29 @@ private:
// a ':', then the <clientId> including a 0 terminator
} transfer_;
+ /// Pointer to the beginning of the token name in this->data_.
ACE_TCHAR *token_name_;
- // Pointer to the beginning of the token name in this->data_.
+ /// Pointer to the beginning of the client id in this->data_;
ACE_TCHAR *client_id_;
- // Pointer to the beginning of the client id in this->data_;
+ /// Holds arg, sec, usec, etc.
ACE_Synch_Options options_;
- // Holds arg, sec, usec, etc.
};
+/**
+ * @class ACE_Token_Reply
+ *
+ * @brief Message format for delivering replies from the ACE_Token Server.
+ *
+ * This class is implemented to minimize data copying.
+ * In particular, all marshaling is done in situ...
+ */
class ACE_Export ACE_Token_Reply
{
- // = TITLE
- // Message format for delivering replies from the ACE_Token Server.
- //
- // = DESCRIPTION
- // This class is implemented to minimize data copying.
- // In particular, all marshaling is done in situ...
public:
+ /// Default constructor.
ACE_Token_Reply (void);
- // Default constructor.
// = Set/get the length of the encoded/decoded message.
ACE_UINT32 length (void) const;
@@ -196,14 +204,14 @@ public:
ACE_UINT32 arg (void) const;
void arg (ACE_UINT32);
+ /// Encode the message before transfer.
int encode (void *&);
- // Encode the message before transfer.
+ /// Decode a message after reception.
int decode (void);
- // Decode a message after reception.
+ /// Print out the values of the message for debugging purposes.
void dump (void) const;
- // Print out the values of the message for debugging purposes.
private:
// = The 2 fields in the <Transfer> struct are transmitted to the server.