3 karl 1.2 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
9 schuur 1.1 //
10 // Permission is hereby granted, free of charge, to any person obtaining a copy
11 // of this software and associated documentation files (the "Software"), to
12 // deal in the Software without restriction, including without limitation the
13 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
14 // sell copies of the Software, and to permit persons to whom the Software is
15 // furnished to do so, subject to the following conditions:
16 //
17 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
18 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
19 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
20 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
21 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
23 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 //
26 //==============================================================================
27 //
28 // Author: Chip Vincent (cvincent@us.ibm.com)
29 //
30 schuur 1.1 // Modified By:
|
39 brian.campbell 1.3 void SimpleResponseHandler::send(Boolean isComplete)
40 {
41 // If this was NOT instantiated as a derived OperationResponseHandle class,
42 // then this will be null but is NOT an error. In this case, there is no
43 // response attached, hence no data,so there is nothing to send. else we have
44 // a valid "cross-cast" to the operation side
45
46 OperationResponseHandler *operation =
47 dynamic_cast<OperationResponseHandler*>(this);
48
49 if (operation)
50 operation->send(isComplete);
51 }
52
53
54 ContentLanguages SimpleResponseHandler::getLanguages(void)
55 {
56 Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE,
57 "SimpleResponseHandler: getLanguages()");
58
59 ContentLanguages langs;
60 brian.campbell 1.3 try
61 {
62 // Try to get the ContentLanguages out of the OperationContext
63 // in the base ResponseHandler.
64 OperationContext context = getContext();
65 ContentLanguageListContainer cntr = context.get
66 (ContentLanguageListContainer::NAME);
67 langs = cntr.getLanguages();
68 }
69 catch (const Exception &)
70 {
71 // The content language container must not exist.
72 // Return the empty ContentLanguages.
73 }
74
75 return langs;
76 }
77
|