multi/SampleObserver2/SampleObserver.cc

Go to the documentation of this file.
00001 //
00002 // Copyright 2002,2004 Sony Corporation 
00003 //
00004 // Permission to use, copy, modify, and redistribute this software for
00005 // non-commercial use is hereby granted.
00006 //
00007 // This software is provided "as is" without warranty of any kind,
00008 // either expressed or implied, including but not limited to the
00009 // implied warranties of fitness for a particular purpose.
00010 //
00011 
00012 #include <OPENR/OSyslog.h>
00013 #include <OPENR/core_macro.h>
00014 #include "SampleObserver.h"
00015 
00016 SampleObserver::SampleObserver()
00017 {
00018 }
00019 
00020 OStatus
00021 SampleObserver::DoInit(const OSystemEvent& event)
00022 {
00023     NEW_ALL_SUBJECT_AND_OBSERVER;
00024     REGISTER_ALL_ENTRY;
00025     SET_ALL_READY_AND_NOTIFY_ENTRY;
00026     return oSUCCESS;
00027 }
00028 
00029 OStatus
00030 SampleObserver::DoStart(const OSystemEvent& event)
00031 {
00032     ENABLE_ALL_SUBJECT;
00033     ASSERT_READY_TO_ALL_OBSERVER;
00034     return oSUCCESS;
00035 }
00036 
00037 OStatus
00038 SampleObserver::DoStop(const OSystemEvent& event)
00039 {
00040     DISABLE_ALL_SUBJECT;
00041     DEASSERT_READY_TO_ALL_OBSERVER;
00042     return oSUCCESS;
00043 }
00044 
00045 OStatus
00046 SampleObserver::DoDestroy(const OSystemEvent& event)
00047 {
00048     DELETE_ALL_SUBJECT_AND_OBSERVER;
00049     return oSUCCESS;
00050 }
00051 
00052 void
00053 SampleObserver::Notify(const ONotifyEvent& event)
00054 {
00055     const char* text = (const char *)event.Data(0);
00056     OSYSPRINT(("SampleObserver2::Notify() %s\n", text));
00057 }

Generated on Sun Dec 2 23:04:30 2007 for openSDK by  doxygen 1.3.9.1