Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / DevGuideExamples / PortableInterceptors / PICurrent / Messenger_i.cpp
blobeb6e11477fe2585637a38652b8e16121517515a9
1 /* -*- C++ -*- */
3 // ****** Code generated by the The ACE ORB (TAO) IDL Compiler *******
4 // TAO and the TAO IDL Compiler have been developed by the Center for
5 // Distributed Object Computing at Washington University, St. Louis.
6 //
7 // Information about TAO is available at:
8 // http://www.dre.vanderbilt.edu/~schmidt/TAO.html
10 #include "Messenger_i.h"
11 #include "ace/OS_NS_time.h"
12 #if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && (ACE_HAS_STANDARD_CPP_LIBRARY == 1)
13 #include <iostream>
14 #else
15 #include <iostream.h>
16 #endif
18 // Implementation skeleton constructor
19 Messenger_i::Messenger_i (void)
23 // Implementation skeleton destructor
24 Messenger_i::~Messenger_i (void)
28 CORBA::Boolean Messenger_i::send_message (
29 const char * user_name,
30 const char * subject,
31 char *& message)
34 //Add your implementation here
35 std::cerr << "Message from: " << user_name << std::endl;
36 std::cerr << "Subject: " << subject << std::endl;
37 std::cerr << "Message: " << message << std::endl;
38 return true;
41 char * Messenger_i::get_time (void)
43 time_t thetime;
44 struct tm * timeinfo = 0;
46 ACE_OS::time(&thetime);
47 timeinfo = ACE_OS::localtime(&thetime);
48 char *timestring = CORBA::string_dup(ACE_OS::asctime(timeinfo));
50 return timestring;