summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/receiver.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/receiver.h')
-rw-r--r--TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/receiver.h53
1 files changed, 27 insertions, 26 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/receiver.h b/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/receiver.h
index dc0eeb47472..f197cbae818 100644
--- a/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/receiver.h
+++ b/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/receiver.h
@@ -1,5 +1,6 @@
/* -*- C++ -*- */
// $Id$
+
// ============================================================================
//
// = LIBRARY
@@ -9,16 +10,14 @@
// receiver.h
//
// = DESCRIPTION
-// Receiver to receive data from the distributer
+// This application receives data from a AV sender and writes it to
+// a file.
//
// = AUTHOR
// Yamuna Krishnamurthy <yamuna@cs.wustl.edu>
//
// ============================================================================
-#ifndef RECEIVER_H
-#define RECEIVER_H
-
#include "orbsvcs/Naming/Naming_Utils.h"
#include "orbsvcs/AV/AVStreams_i.h"
#include "orbsvcs/AV/Endpoint_Strategy.h"
@@ -27,51 +26,55 @@
class Receiver_Callback : public TAO_AV_Callback
{
// = TITLE
- // Defines a class for the application callback.
+ // Application defined callback object.
//
// = DESCRIPTION
- // This class overides the methods of the TAO_AV_Callback so the
- // AVStreams can make upcalls to the application.
-
+ // AVStreams calls this class when data shows up from a sender.
public:
- // Method that is called when there is data to be received from the distributer
+ Receiver_Callback (void);
+ // Constructor.
+
+ // Method that is called when there is data to be received from a
+ // sender.
int receive_frame (ACE_Message_Block *frame,
TAO_AV_frame_info *frame_info,
const ACE_Addr &peer_address);
- // Called when the distributer has finished sending the data and wants
- // to close down the connection.
+ // Called when the sender is done sending data and wants to close
+ // down the connection.
int handle_destroy (void);
+private:
+ int frame_count_;
+ // Keeping a count of the incoming frames.
};
class Receiver_StreamEndPoint : public TAO_Server_StreamEndPoint
{
// = TITLE
- // Defines the aplication stream endpoint
+ // Application defined stream endpoint object.
//
// = DESCRIPTION
- // This is the class that overrides the tao_server_enpodint to handle
- // pre and post connect processing.
+ // AVStreams calls this class during connection setup.
public:
- // Create the application callback.
+ // Create a receiver application callback.
int get_callback (const char *flowname,
TAO_AV_Callback *&callback);
private:
Receiver_Callback callback_;
- // reference to the server application callback.
+ // Receiver application callback.
};
class Receiver
{
// = TITLE
- // Defines the receiver application class.
- //
+ // Receiver application class.
+ //
// = DESCRIPTION
- // The receiver progarm that receives data
- // sent by the distributer.
+ // This class receives data from a AV sender and writes it to
+ // a file.
public:
Receiver (void);
// Constructor
@@ -83,17 +86,15 @@ public:
char **argv,
CORBA::Environment &);
// Initialize data components.
-
+
protected:
- TAO_Naming_Client my_naming_client_;
+ TAO_Naming_Client naming_client_;
// The Naming Service Client.
TAO_AV_Endpoint_Reactive_Strategy_B
<Receiver_StreamEndPoint,TAO_VDev,AV_Null_MediaCtrl> reactive_strategy_;
// The endpoint reactive strategy.
-
+
TAO_MMDevice *mmdevice_;
- // The receiver MMDevice.
+ // Receiver MMDevice.
};
-
-#endif /*RECEIVER_H*/