diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2000-06-20 20:04:04 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2000-06-20 20:04:04 +0000 |
commit | 7840e5851eb13ce0b69c4f4b0923b320ca0ab953 (patch) | |
tree | 5a5f4b167c6b9d502b6747c66fff6ad88d0e3197 | |
parent | 8f11302a6025e0eff9290048b23f16c71c42321c (diff) | |
download | ATCD-7840e5851eb13ce0b69c4f4b0923b320ca0ab953.tar.gz |
ChangeLogTag:Tue Jun 20 12:04:24 2000 Ossama Othman <ossama@uci.edu>
16 files changed, 132 insertions, 161 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index b84122c0665..12685d3c024 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,8 @@ +Tue Jun 20 15:03:07 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + + * examples/Content_Server/AMI_Observer: Fixed some more style + issues. + Tue Jun 20 10:44:07 2000 Carlos O'Ryan <coryan@uci.edu> * orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp: diff --git a/TAO/examples/Content_Server/AMI_Iterator/client.cpp b/TAO/examples/Content_Server/AMI_Iterator/client.cpp index 4b6e1a461d9..65ab63ee97c 100644 --- a/TAO/examples/Content_Server/AMI_Iterator/client.cpp +++ b/TAO/examples/Content_Server/AMI_Iterator/client.cpp @@ -137,8 +137,8 @@ get_iterator (CORBA::ORB_ptr o, ACE_CHECK_RETURN (Web_Server::Iterator_Factory::_nil ()); // Narrow to a Naming Context - CosNaming::NamingContext_var nc; - nc = CosNaming::NamingContext::_narrow (obj.in (), ACE_TRY_ENV); + CosNaming::NamingContext_var nc = + CosNaming::NamingContext::_narrow (obj.in (), ACE_TRY_ENV); ACE_CHECK_RETURN (Web_Server::Iterator_Factory::_nil ()); if (CORBA::is_nil (obj.in ())) diff --git a/TAO/examples/Content_Server/AMI_Iterator/server.cpp b/TAO/examples/Content_Server/AMI_Iterator/server.cpp index d4446720fae..e6a1262a669 100644 --- a/TAO/examples/Content_Server/AMI_Iterator/server.cpp +++ b/TAO/examples/Content_Server/AMI_Iterator/server.cpp @@ -51,8 +51,8 @@ main (int argc, char *argv[]) ACE_TRY_CHECK; // Narrow to a Naming Context - CosNaming::NamingContext_var nc; - nc = CosNaming::NamingContext::_narrow (obj.in (), ACE_TRY_ENV); + CosNaming::NamingContext_var nc = + CosNaming::NamingContext::_narrow (obj.in (), ACE_TRY_ENV); ACE_TRY_CHECK; // Create a name. diff --git a/TAO/examples/Content_Server/AMI_Observer/Callback.cpp b/TAO/examples/Content_Server/AMI_Observer/Callback.cpp index 5878f97f525..6e473ea41ba 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Callback.cpp +++ b/TAO/examples/Content_Server/AMI_Observer/Callback.cpp @@ -11,7 +11,7 @@ ACE_RCSID(AMI_Observer, Callback, "$Id$") -Callback_i::Callback_i (int * request_count) +Callback_i::Callback_i (int *request_count) : file_ (ACE_sap_any_cast (ACE_FILE_Addr &)), file_io_ (), ami_handler_ (), @@ -67,7 +67,6 @@ Callback_i::next_chunk (const Web_Server::Chunk_Type & chunk_data, ACE_TEXT ("Unable to write retrieved data to ") ACE_TEXT ("file <%s>"), this->file_.get_path_name ())); - return; } } @@ -104,7 +103,7 @@ Callback_i::next_chunk (const Web_Server::Chunk_Type & chunk_data, } void -Callback_i::metadata (const Web_Server::Metadata_Type & metadata) +Callback_i::metadata (const Web_Server::Metadata_Type &metadata) { ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY @@ -166,10 +165,11 @@ Callback_i::content_received (void) } int -Callback_i::get_viewer (char * viewer, +Callback_i::get_viewer (char *viewer, size_t length) { - const char * content_type = this->metadata_.content_type.in (); + const char *content_type = + this->metadata_.content_type.in (); if (ACE_OS::strcasecmp (content_type, "text/html") == 0) { diff --git a/TAO/examples/Content_Server/AMI_Observer/Callback.h b/TAO/examples/Content_Server/AMI_Observer/Callback.h index 3b3ba50007c..c6c230494f1 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Callback.h +++ b/TAO/examples/Content_Server/AMI_Observer/Callback.h @@ -1,7 +1,6 @@ // -*- C++ -*- // $Id$ - // ============================================================================ // // = LIBRARY @@ -37,18 +36,17 @@ class Callback_i : public virtual PortableServer::RefCountServantBase { public: - - Callback_i (int * request_count); + Callback_i (int *request_count); // Constructor - virtual void next_chunk (const Web_Server::Chunk_Type & chunk, + virtual void next_chunk (const Web_Server::Chunk_Type &chunk, CORBA::Boolean last_chunk, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)); // This operation returns the next <chunk> of the file starting at // <offset>. If there are no more bindings, false is returned. - void metadata (const Web_Server::Metadata_Type & metadata); + void metadata (const Web_Server::Metadata_Type &metadata); // Set metadata associated with received data. private: @@ -64,7 +62,7 @@ private: // Returns one if the entire content was received, and zero // otherwise. - int get_viewer (char * viewer, size_t length); + int get_viewer (char *viewer, size_t length); // Get the name of the viewer associated with the file being // retrieved. @@ -99,7 +97,7 @@ private: // Lock used to prevent race conditions when checking to see if // metadata or entire content has been received. - int * request_count_; + int *request_count_; // Pointer to external status monitoring variable. The contents (not // the pointer itself) of the <pending_data> parameter will be // decremented when file retrieval has completed. diff --git a/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.cpp b/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.cpp index 05ab430b1af..0172273b0d3 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.cpp +++ b/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.cpp @@ -9,7 +9,7 @@ ACE_RCSID(AMI_Observer, Callback_Handler, "$Id$") -Callback_Handler::Callback_Handler (const char * pathname, +Callback_Handler::Callback_Handler (const char *pathname, Web_Server::Callback_ptr client_callback) : file_ (pathname), file_io_ (), @@ -40,12 +40,11 @@ Callback_Handler::next_chunk (CORBA::Environment &ACE_TRY_ENV) } // Allocate a buffer for the file being read. - CORBA::Octet * buf = + CORBA::Octet *buf = Web_Server::Chunk_Type::allocbuf (BUFSIZ); ssize_t bytes_read = this->file_io_.recv (buf, BUFSIZ); - if (bytes_read == -1) { Web_Server::Chunk_Type::freebuf (buf); @@ -83,9 +82,9 @@ Callback_Handler::next_chunk (CORBA::Environment &ACE_TRY_ENV) } void -Callback_Handler::next_chunk_excep ( - Web_Server::AMI_CallbackExceptionHolder *excep_holder, - CORBA::Environment &) +Callback_Handler::next_chunk_excep + (Web_Server::AMI_CallbackExceptionHolder *excep_holder, + CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { this->last_chunk_ = 1; @@ -121,9 +120,9 @@ Callback_Handler::run (CORBA::Environment &ACE_TRY_ENV) this->ami_handler_ = this->_this (ACE_TRY_ENV); ACE_CHECK_RETURN (ACE_INVALID_HANDLE); - // Begin the asynchronous invocation. - // Note that the AMI "sendc_next_chunk()" call is done within the - // following call, since data must first be read into the Chunk. + // Begin the asynchronous invocation. Note that the AMI + // "sendc_next_chunk()" call is done within the following call, + // since data must first be read into the Chunk. this->next_chunk (ACE_TRY_ENV); ACE_CHECK_RETURN (ACE_INVALID_HANDLE); @@ -144,13 +143,10 @@ Callback_Handler::open_file (CORBA::Environment &ACE_TRY_ENV) ACE_Addr::sap_any, 0, O_RDONLY) == -1) - { - ACE_THROW (Web_Server::Error_Result (404)); - // HTTP 1.1 "Not Found" - } + // HTTP 1.1 "Not Found" + ACE_THROW (Web_Server::Error_Result (404)); } - void Callback_Handler::deactivate (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) diff --git a/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.h b/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.h index ac5eb7b6d63..85686a24cee 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.h +++ b/TAO/examples/Content_Server/AMI_Observer/Callback_Handler.h @@ -36,8 +36,7 @@ class Callback_Handler public virtual PortableServer::RefCountServantBase { public: - - Callback_Handler (const char * pathname, + Callback_Handler (const char *pathname, Web_Server::Callback_ptr callback); // Constructor that creates a content iterator corresponding to the // name of the file being retrieved from the web server. @@ -59,9 +58,8 @@ public: // retrieval completes. private: - ~Callback_Handler (void); - // Destructor (private to ensure that Callback_Handler is allocated + // Destructor (private to ensure that Callback_Handler is allocated // on the heap). void open_file (CORBA::Environment &ACE_TRY_ENV) diff --git a/TAO/examples/Content_Server/AMI_Observer/Callback_i.cpp b/TAO/examples/Content_Server/AMI_Observer/Callback_i.cpp index 5878f97f525..6e473ea41ba 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Callback_i.cpp +++ b/TAO/examples/Content_Server/AMI_Observer/Callback_i.cpp @@ -11,7 +11,7 @@ ACE_RCSID(AMI_Observer, Callback, "$Id$") -Callback_i::Callback_i (int * request_count) +Callback_i::Callback_i (int *request_count) : file_ (ACE_sap_any_cast (ACE_FILE_Addr &)), file_io_ (), ami_handler_ (), @@ -67,7 +67,6 @@ Callback_i::next_chunk (const Web_Server::Chunk_Type & chunk_data, ACE_TEXT ("Unable to write retrieved data to ") ACE_TEXT ("file <%s>"), this->file_.get_path_name ())); - return; } } @@ -104,7 +103,7 @@ Callback_i::next_chunk (const Web_Server::Chunk_Type & chunk_data, } void -Callback_i::metadata (const Web_Server::Metadata_Type & metadata) +Callback_i::metadata (const Web_Server::Metadata_Type &metadata) { ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY @@ -166,10 +165,11 @@ Callback_i::content_received (void) } int -Callback_i::get_viewer (char * viewer, +Callback_i::get_viewer (char *viewer, size_t length) { - const char * content_type = this->metadata_.content_type.in (); + const char *content_type = + this->metadata_.content_type.in (); if (ACE_OS::strcasecmp (content_type, "text/html") == 0) { diff --git a/TAO/examples/Content_Server/AMI_Observer/Callback_i.h b/TAO/examples/Content_Server/AMI_Observer/Callback_i.h index 3b3ba50007c..c6c230494f1 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Callback_i.h +++ b/TAO/examples/Content_Server/AMI_Observer/Callback_i.h @@ -1,7 +1,6 @@ // -*- C++ -*- // $Id$ - // ============================================================================ // // = LIBRARY @@ -37,18 +36,17 @@ class Callback_i : public virtual PortableServer::RefCountServantBase { public: - - Callback_i (int * request_count); + Callback_i (int *request_count); // Constructor - virtual void next_chunk (const Web_Server::Chunk_Type & chunk, + virtual void next_chunk (const Web_Server::Chunk_Type &chunk, CORBA::Boolean last_chunk, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)); // This operation returns the next <chunk> of the file starting at // <offset>. If there are no more bindings, false is returned. - void metadata (const Web_Server::Metadata_Type & metadata); + void metadata (const Web_Server::Metadata_Type &metadata); // Set metadata associated with received data. private: @@ -64,7 +62,7 @@ private: // Returns one if the entire content was received, and zero // otherwise. - int get_viewer (char * viewer, size_t length); + int get_viewer (char *viewer, size_t length); // Get the name of the viewer associated with the file being // retrieved. @@ -99,7 +97,7 @@ private: // Lock used to prevent race conditions when checking to see if // metadata or entire content has been received. - int * request_count_; + int *request_count_; // Pointer to external status monitoring variable. The contents (not // the pointer itself) of the <pending_data> parameter will be // decremented when file retrieval has completed. diff --git a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp index 6cd2e864b11..1667618cf4d 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp +++ b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.cpp @@ -9,10 +9,10 @@ ACE_RCSID(AMI_Observer, Push_Iterator_Factory_i, "$Id$") Web_Server::Metadata_Type * -Push_Iterator_Factory_i::register_callback ( - const char *pathname, - Web_Server::Callback_ptr client_callback, - CORBA::Environment &ACE_TRY_ENV) +Push_Iterator_Factory_i::register_callback + (const char *pathname, + Web_Server::Callback_ptr client_callback, + CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)) { if (CORBA::is_nil (client_callback)) // @@ Will it ever be nil? @@ -32,7 +32,7 @@ Push_Iterator_Factory_i::register_callback ( // Send the file to the client asynchronously. This allows the // server to service multiple file requests from clients. - Callback_Handler * handler = 0; + Callback_Handler *handler = 0; ACE_NEW_THROW_EX (handler, Callback_Handler (pathname, client_callback), @@ -49,37 +49,29 @@ Push_Iterator_Factory_i::register_callback ( if (fd == ACE_INVALID_HANDLE || ACE_OS::fstat (fd, &file_status) == -1) - { - ACE_THROW_RETURN(Web_Server::Error_Result (500), - 0); - // HTTP 1.1 "Internal Server Error" - } - - Web_Server::Metadata_Type_var metadata = new Web_Server::Metadata_Type; + // HTTP 1.1 "Internal Server Error". + ACE_THROW_RETURN (Web_Server::Error_Result (500), + 0); + Web_Server::Metadata_Type_var metadata = + new Web_Server::Metadata_Type; if (this->modification_date (&file_status, metadata.inout ()) != 0) - { - ACE_THROW_RETURN (Web_Server::Error_Result (500), - 0); - // HTTP 1.1 "Internal Server Error - } - + // HTTP 1.1 "Internal Server Error. + ACE_THROW_RETURN (Web_Server::Error_Result (500), + 0); if (this->content_type (pathname, metadata.inout ()) != 0) - { - ACE_THROW_RETURN (Web_Server::Error_Result (500), - 0); - // HTTP 1.1 "Internal Server Error - } - + // HTTP 1.1 "Internal Server Error. + ACE_THROW_RETURN (Web_Server::Error_Result (500), + 0); return metadata._retn (); } int -Push_Iterator_Factory_i::modification_date ( - struct stat * file_status, - Web_Server::Metadata_Type & metadata) +Push_Iterator_Factory_i::modification_date + (struct stat *file_status, + Web_Server::Metadata_Type & metadata) { // Get the modification time from the file status structure/ struct tm *t_gmt = gmtime (&(file_status->st_mtime)); @@ -101,8 +93,8 @@ Push_Iterator_Factory_i::modification_date ( } int -Push_Iterator_Factory_i::content_type (const char * filename, - Web_Server::Metadata_Type & metadata) +Push_Iterator_Factory_i::content_type (const char *filename, + Web_Server::Metadata_Type &metadata) { if (filename == 0) return -1; @@ -133,47 +125,31 @@ Push_Iterator_Factory_i::content_type (const char * filename, if (ACE_OS::strcasecmp (extension, "htm") == 0 || ACE_OS::strcasecmp (extension, "html") == 0) - { - metadata.content_type = CORBA::string_dup ("text/html"); - } + metadata.content_type = CORBA::string_dup ("text/html"); else if (ACE_OS::strcasecmp (extension, "txt") == 0) - { - metadata.content_type = CORBA::string_dup ("text/plain"); - } + metadata.content_type = CORBA::string_dup ("text/plain"); else if (ACE_OS::strcasecmp (extension, "ps") == 0) - { - metadata.content_type = - CORBA::string_dup ("application/postscript"); - } + metadata.content_type = + CORBA::string_dup ("application/postscript"); else if (ACE_OS::strcasecmp (extension, "pdf") == 0) - { - metadata.content_type = CORBA::string_dup ("application/pdf"); - } + metadata.content_type = CORBA::string_dup ("application/pdf"); else if (ACE_OS::strcasecmp (extension, "jpeg") == 0 || ACE_OS::strcasecmp (extension, "jpg") == 0) - { - metadata.content_type = CORBA::string_dup ("image/jpeg"); - } + metadata.content_type = CORBA::string_dup ("image/jpeg"); else if (ACE_OS::strcasecmp (extension, "tiff") == 0) - { - metadata.content_type = CORBA::string_dup ("image/tiff"); - } + metadata.content_type = CORBA::string_dup ("image/tiff"); else if (ACE_OS::strcasecmp (extension, "gif") == 0) - { - metadata.content_type = CORBA::string_dup ("image/gif"); - } + metadata.content_type = CORBA::string_dup ("image/gif"); else if (ACE_OS::strcasecmp (extension, "png") == 0) - { - metadata.content_type = CORBA::string_dup ("image/png"); - } + metadata.content_type = CORBA::string_dup ("image/png"); else { metadata.content_type = CORBA::string_dup ("text/html"); diff --git a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.h b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.h index ed526170797..d6a51ad2e9d 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.h +++ b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Factory_i.h @@ -31,37 +31,34 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ - -// Implement the Web_Server::Iterator_Factory interface. class Push_Iterator_Factory_i : virtual public POA_Web_Server::Iterator_Factory { + // = TITLE + // Implement the Web_Server::Iterator_Factory interface. public: - - // This registration method passes a <Callback> that - // the Web server uses to ``push'' data associated with - // <pathname> one ``chunk'' at a time. The <metadata> - // reports information about the <pathname>. - Web_Server::Metadata_Type * register_callback ( - const char *pathname, - Web_Server::Callback_ptr client_callback, - CORBA::Environment &ACE_TRY_ENV) + Web_Server::Metadata_Type *register_callback + (const char *pathname, + Web_Server::Callback_ptr client_callback, + CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException, Web_Server::Error_Result)); + // This registration method passes a <Callback> that the Web server + // uses to ``push'' data associated with <pathname> one ``chunk'' at + // a time. The <metadata> reports information about the <pathname>. + int modification_date (struct stat *file_status, + Web_Server::Metadata_Type &metadata); // Set the file modification date in the metadata structure. - int modification_date (struct stat * file_status, - Web_Server::Metadata_Type & metadata); + int content_type (const char *filename, + Web_Server::Metadata_Type &metadata); // Set the type of file content in the metadata structure. - int content_type (const char * filename, - Web_Server::Metadata_Type & metadata); -private: +private: Web_Server::Callback_var client_callback_; // Reference to the object that is used by the server to push chunks // of data to the client. - }; #include "ace/post.h" diff --git a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.cpp b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.cpp index 4a4f525b9d1..778cf94d274 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.cpp +++ b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.cpp @@ -24,9 +24,9 @@ Push_Iterator_Handler::~Push_Iterator_Handler (void) } void -Push_Iterator_Handler::register_callback ( - const Web_Server::Metadata_Type & metadata, - CORBA::Environment &ACE_TRY_ENV) +Push_Iterator_Handler::register_callback + (const Web_Server::Metadata_Type &metadata, + CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { this->callback_servant_->metadata (metadata); @@ -37,7 +37,7 @@ Push_Iterator_Handler::register_callback ( } void -Push_Iterator_Handler::run (int * request_count, +Push_Iterator_Handler::run (int *request_count, const char *pathname, Web_Server::Iterator_Factory_ptr factory, CORBA::Environment &ACE_TRY_ENV) @@ -53,11 +53,13 @@ Push_Iterator_Handler::run (int * request_count, PortableServer::ServantBase_var tmp (this->callback_servant_); // Activate the Callback. - this->callback_ = this->callback_servant_->_this (ACE_TRY_ENV); + this->callback_ = + this->callback_servant_->_this (ACE_TRY_ENV); ACE_CHECK; // Activate this Reply Handler. - this->ami_handler_ = this->_this (ACE_TRY_ENV); + this->ami_handler_ = + this->_this (ACE_TRY_ENV); ACE_CHECK; // Register the client callback with the server asynchronously. diff --git a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.h b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.h index 5e9444d8530..bae26e065f0 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.h +++ b/TAO/examples/Content_Server/AMI_Observer/Push_Iterator_Handler.h @@ -38,12 +38,11 @@ class Push_Iterator_Handler public virtual PortableServer::RefCountServantBase { public: - Push_Iterator_Handler (void); // Constructor that creates a content iterator corresponding to the // name of the file being retrieved from the web server. - void run (int * request_count, + void run (int *request_count, const char *pathname, Web_Server::Iterator_Factory_ptr factory, CORBA::Environment &ACE_TRY_ENV) @@ -60,23 +59,23 @@ private: // Destructor (private to ensure that Iterator_Handler is allocated // on the heap). - virtual void register_callback ( - const Web_Server::Metadata_Type & metadata, - CORBA::Environment &ACE_TRY_ENV) + virtual void register_callback + (const Web_Server::Metadata_Type &metadata, + CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)); // AMI callback that is invoked when a response from the // corresponding server method is received. - virtual void register_callback_excep ( - Web_Server::AMI_Iterator_FactoryExceptionHolder *, - CORBA::Environment &) + virtual void register_callback_excep + (Web_Server::AMI_Iterator_FactoryExceptionHolder *, + CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) {} void deactivate (CORBA::Environment &ACE_TRY_ENV); // Deactivate this handler. private: - Callback_i * callback_servant_; + Callback_i *callback_servant_; // The servant that accepts data pushed from the content server. Web_Server::Callback_var callback_; diff --git a/TAO/examples/Content_Server/AMI_Observer/Push_Web_Server.idl b/TAO/examples/Content_Server/AMI_Observer/Push_Web_Server.idl index 17bd5a44c15..06d821c9b27 100644 --- a/TAO/examples/Content_Server/AMI_Observer/Push_Web_Server.idl +++ b/TAO/examples/Content_Server/AMI_Observer/Push_Web_Server.idl @@ -1,26 +1,28 @@ // $Id$ -// IDL schema definition for Web server interface. module Web_Server +// = TITLE +// IDL schema definition for Web server interface. { typedef sequence<octet> Chunk_Type; interface Callback - { - // This operation is called back by the server to pass - // the next <chunk> of the file starting. If there are - // no more chunks, <last_chunk> is true. - void next_chunk (in Chunk_Type chunk, - in boolean last_chunk); - }; + { + // This operation is called back by the server to pass + // the next <chunk> of the file starting. If there are + // no more chunks, <last_chunk> is true. + void next_chunk (in Chunk_Type chunk, + in boolean last_chunk); + }; - exception Error_Result { - // Status of the <register_callback> operation. These - // values should map onto the normal HTTP - // status values, e.g., 200 means success, 404 - // means "file not found," etc. - short status; - }; + exception Error_Result + { + // Status of the <register_callback> operation. These + // values should map onto the normal HTTP + // status values, e.g., 200 means success, 404 + // means "file not found," etc. + short status; + }; struct Metadata_Type { @@ -32,13 +34,13 @@ module Web_Server }; interface Iterator_Factory - { - // This registration method passes a <Callback> that - // the Web server uses to ``push'' data associated with - // <pathname> one ``chunk'' at a time. The <metadata> - // reports information about the <pathname>. - Metadata_Type register_callback (in string pathname, - in Callback client_callback) - raises (Error_Result); - }; + { + // This registration method passes a <Callback> that + // the Web server uses to ``push'' data associated with + // <pathname> one ``chunk'' at a time. The <metadata> + // reports information about the <pathname>. + Metadata_Type register_callback (in string pathname, + in Callback client_callback) + raises (Error_Result); + }; }; diff --git a/TAO/examples/Content_Server/AMI_Observer/client.cpp b/TAO/examples/Content_Server/AMI_Observer/client.cpp index 112b87ee49e..53cfc089aeb 100644 --- a/TAO/examples/Content_Server/AMI_Observer/client.cpp +++ b/TAO/examples/Content_Server/AMI_Observer/client.cpp @@ -49,8 +49,8 @@ main (int argc, char *argv[]) ACE_TRY_CHECK; // Narrow to a Naming Context - CosNaming::NamingContext_var nc; - nc = CosNaming::NamingContext::_narrow (obj.in (), ACE_TRY_ENV); + CosNaming::NamingContext_var nc = + CosNaming::NamingContext::_narrow (obj.in (), ACE_TRY_ENV); ACE_TRY_CHECK; if (CORBA::is_nil (obj.in ())) @@ -90,7 +90,7 @@ main (int argc, char *argv[]) i < argc - 1; // Don't include the program name. ++i) { - Push_Iterator_Handler * handler = 0; + Push_Iterator_Handler *handler = 0; ACE_NEW_RETURN (handler, Push_Iterator_Handler, -1); diff --git a/TAO/examples/Content_Server/AMI_Observer/server.cpp b/TAO/examples/Content_Server/AMI_Observer/server.cpp index 12979948cc9..5fa713faf6e 100644 --- a/TAO/examples/Content_Server/AMI_Observer/server.cpp +++ b/TAO/examples/Content_Server/AMI_Observer/server.cpp @@ -49,8 +49,8 @@ main (int argc, char *argv[]) ACE_TRY_CHECK; // Narrow to a Naming Context - CosNaming::NamingContext_var nc; - nc = CosNaming::NamingContext::_narrow (obj.in (), ACE_TRY_ENV); + CosNaming::NamingContext_var nc = + CosNaming::NamingContext::_narrow (obj.in (), ACE_TRY_ENV); ACE_TRY_CHECK; // Create a name. |