1 karl 1.30 //%2005////////////////////////////////////////////////////////////////////////
|
2 mike 1.2 //
|
3 karl 1.26 // 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.;
|
6 karl 1.22 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.26 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 karl 1.30 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 mike 1.2 //
12 // Permission is hereby granted, free of charge, to any person obtaining a copy
13 // of this software and associated documentation files (the "Software"), to
14 // deal in the Software without restriction, including without limitation the
15 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
16 // sell copies of the Software, and to permit persons to whom the Software is
17 // furnished to do so, subject to the following conditions:
|
18 kumpf 1.8 //
|
19 mike 1.2 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
20 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
21 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
22 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
23 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
25 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
28 //==============================================================================
29 //
30 // Author: Chip Vincent (cvincent@us.ibm.com)
31 //
|
32 kumpf 1.11 // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
|
33 kumpf 1.15 // Carol Ann Krug Graves, Hewlett-Packard Company
34 // (carolann_graves@hp.com)
|
35 kumpf 1.20 // Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com)
|
36 kumpf 1.24 // Terry Martin, Hewlett-Packard Company (terry.martin@hp.com)
|
37 mike 1.2 //
38 //%/////////////////////////////////////////////////////////////////////////////
39
40 #include "OperationContext.h"
|
41 kumpf 1.10 #include "ArrayInternal.h"
|
42 humberto 1.19 #include <Pegasus/Common/MessageLoader.h> //l10n
|
43 mike 1.2
44 PEGASUS_NAMESPACE_BEGIN
45
|
46 chip 1.5 //
47 // OperationContext
48 //
|
49 kumpf 1.11
|
50 kumpf 1.7 class OperationContextRep
51 {
52 public:
53 Array<OperationContext::Container *> containers;
54 };
55
|
56 chip 1.3 OperationContext::OperationContext(void)
|
57 mike 1.2 {
|
58 kumpf 1.7 _rep = new OperationContextRep;
|
59 mike 1.2 }
60
|
61 chip 1.4 OperationContext::OperationContext(const OperationContext & context)
62 {
|
63 kumpf 1.7 _rep = new OperationContextRep;
|
64 chip 1.6 *this = context;
|
65 chip 1.4 }
66
|
67 chip 1.3 OperationContext::~OperationContext(void)
68 {
|
69 chip 1.5 clear();
|
70 kumpf 1.7 delete _rep;
|
71 chip 1.5 }
72
73 OperationContext & OperationContext::operator=(const OperationContext & context)
74 {
75 if(this == &context)
76 {
77 return(*this);
78 }
79
80 clear();
81
|
82 kumpf 1.7 for(Uint32 i = 0, n = context._rep->containers.size(); i < n; i++)
|
83 chip 1.5 {
|
84 kumpf 1.7 _rep->containers.append(context._rep->containers[i]->clone());
|
85 chip 1.5 }
86
87 return(*this);
|
88 chip 1.3 }
89
90 void OperationContext::clear(void)
91 {
|
92 kumpf 1.7 for(Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
|
93 chip 1.5 {
|
94 kumpf 1.11 _rep->containers[i]->destroy();
|
95 chip 1.5 }
96
|
97 kumpf 1.7 _rep->containers.clear();
|
98 chip 1.3 }
99
|
100 kumpf 1.11 const OperationContext::Container & OperationContext::get(
101 const String& containerName) const
102 {
103 for(Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
104 {
105 if(containerName == _rep->containers[i]->getName())
106 {
107 Container * p = _rep->containers[i];
108
109 return(*p);
110 }
111 }
112
|
113 humberto 1.19 //l10n
114 MessageLoaderParms parms("Common.OperationContext.OBJECT_NOT_FOUND",
115 "object not found");
116 throw Exception(parms);
117 //throw Exception("object not found");
|
118 kumpf 1.11 }
119
|
120 chip 1.3 void OperationContext::set(const OperationContext::Container & container)
121 {
|
122 kumpf 1.7 for(Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
|
123 chip 1.3 {
|
124 kumpf 1.11 if(container.getName() == _rep->containers[i]->getName())
|
125 chip 1.3 {
126 // delete previous container
|
127 kumpf 1.11 _rep->containers[i]->destroy();
|
128 kumpf 1.7 _rep->containers.remove(i);
|
129 chip 1.3
130 // append current container
|
131 kumpf 1.7 _rep->containers.append(container.clone());
|
132 chip 1.3
133 return;
134 }
135 }
136
|
137 humberto 1.19 //l10n
138 MessageLoaderParms parms("Common.OperationContext.OBJECT_NOT_FOUND",
139 "object not found");
140 throw Exception(parms);
141 //throw Exception("object not found");
|
142 chip 1.3 }
143
144 void OperationContext::insert(const OperationContext::Container & container)
145 {
|
146 kumpf 1.7 for(Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
|
147 chip 1.3 {
|
148 kumpf 1.11 if(container.getName() == _rep->containers[i]->getName())
|
149 chip 1.3 {
|
150 humberto 1.19 //l10n
151 MessageLoaderParms parms("Common.OperationContext.OBJECT_ALREADY_EXISTS",
152 "object already exists.");
153 throw Exception(parms);
154 //throw Exception("object already exists.");
|
155 chip 1.3 }
156 }
157
|
158 kumpf 1.7 _rep->containers.append(container.clone());
|
159 chip 1.3 }
160
|
161 kumpf 1.11 void OperationContext::remove(const String& containerName)
162 {
163 for(Uint32 i = 0, n = _rep->containers.size(); i < n; i++)
164 {
165 if(containerName == _rep->containers[i]->getName())
166 {
167 _rep->containers[i]->destroy();
168 _rep->containers.remove(i);
169
170 return;
171 }
172 }
173
|
174 humberto 1.19 //l10n
175 MessageLoaderParms parms("Common.OperationContext.OBJECT_NOT_FOUND",
176 "object not found");
177 throw Exception(parms);
178 //throw Exception("object not found");
|
179 kumpf 1.11 }
|
180 humberto 1.19
|
181 chip 1.3
|
182 chip 1.5 //
183 // OperationContext::Container
184 //
|
185 kumpf 1.11
|
186 chip 1.3 OperationContext::Container::~Container(void)
187 {
188 }
189
|
190 chip 1.5
191 //
|
192 kumpf 1.7 // IdentityContainer
|
193 chip 1.5 //
194
|
195 kumpf 1.11 class IdentityContainerRep
|
196 chip 1.3 {
|
197 kumpf 1.11 public:
198 String userName;
199 };
|
200 chip 1.3
|
201 kumpf 1.11 const String IdentityContainer::NAME = "IdentityContainer";
|
202 chip 1.5
|
203 kumpf 1.11 IdentityContainer::IdentityContainer(const OperationContext::Container & container)
|
204 chip 1.5 {
|
205 kumpf 1.11 const IdentityContainer * p = dynamic_cast<const IdentityContainer *>(&container);
|
206 chip 1.5
207 if(p == 0)
208 {
|
209 kumpf 1.9 throw DynamicCastFailedException();
|
210 chip 1.5 }
211
|
212 kumpf 1.11 _rep = new IdentityContainerRep();
213 _rep->userName = p->_rep->userName;
|
214 mike 1.2 }
215
|
216 kumpf 1.16 IdentityContainer::IdentityContainer(const IdentityContainer & container)
|
217 w.otsuka 1.31 #if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
218 : OperationContext::Container()
219 #endif
|
220 kumpf 1.16 {
221 _rep = new IdentityContainerRep();
222 _rep->userName = container._rep->userName;
223 }
224
|
225 kumpf 1.11 IdentityContainer::IdentityContainer(const String & userName)
|
226 chip 1.3 {
|
227 kumpf 1.11 _rep = new IdentityContainerRep();
228 _rep->userName = userName;
|
229 chip 1.3 }
230
|
231 kumpf 1.11 IdentityContainer::~IdentityContainer(void)
|
232 chip 1.5 {
|
233 kumpf 1.11 delete _rep;
|
234 kumpf 1.16 }
235
236 IdentityContainer & IdentityContainer::operator=(
237 const IdentityContainer & container)
238 {
239 if (this == &container)
240 {
241 return (*this);
242 }
243
244 _rep->userName = container._rep->userName;
245
246 return (*this);
|
247 chip 1.5 }
248
|
249 kumpf 1.11 String IdentityContainer::getName(void) const
|
250 chip 1.5 {
|
251 kumpf 1.11 return(NAME);
|
252 chip 1.5 }
253
|
254 kumpf 1.11 OperationContext::Container * IdentityContainer::clone(void) const
|
255 chip 1.5 {
|
256 kumpf 1.11 return(new IdentityContainer(_rep->userName));
|
257 chip 1.5 }
258
|
259 kumpf 1.11 void IdentityContainer::destroy(void)
|
260 chip 1.5 {
|
261 kumpf 1.11 delete this;
|
262 chip 1.5 }
263
|
264 kumpf 1.11 String IdentityContainer::getUserName(void) const
|
265 chip 1.3 {
|
266 kumpf 1.11 return(_rep->userName);
|
267 kumpf 1.15 }
268
|
269 kumpf 1.24 // Unimplemented, hidden constructor not intended for actual use
270 IdentityContainer::IdentityContainer()
271 {
272 }
273
|
274 kumpf 1.15 //
275 // SubscriptionInstanceContainer
276 //
277
278 class SubscriptionInstanceContainerRep
279 {
280 public:
281 CIMInstance subscriptionInstance;
282 };
283
284 const String SubscriptionInstanceContainer::NAME =
285 "SubscriptionInstanceContainer";
286
287 SubscriptionInstanceContainer::SubscriptionInstanceContainer
288 (const OperationContext::Container & container)
289 {
290 const SubscriptionInstanceContainer * p =
291 dynamic_cast<const SubscriptionInstanceContainer *>(&container);
292
293 if(p == 0)
294 {
295 kumpf 1.15 throw DynamicCastFailedException();
296 }
297
298 _rep = new SubscriptionInstanceContainerRep();
299 _rep->subscriptionInstance = p->_rep->subscriptionInstance;
300 }
301
302 SubscriptionInstanceContainer::SubscriptionInstanceContainer
303 (const SubscriptionInstanceContainer & container)
|
304 w.otsuka 1.31 #if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
305 : OperationContext::Container()
306 #endif
|
307 kumpf 1.15 {
308 _rep = new SubscriptionInstanceContainerRep();
309 _rep->subscriptionInstance = container._rep->subscriptionInstance;
310 }
311
312 SubscriptionInstanceContainer::SubscriptionInstanceContainer
313 (const CIMInstance & subscriptionInstance)
314 {
315 _rep = new SubscriptionInstanceContainerRep();
316 _rep->subscriptionInstance = subscriptionInstance;
317 }
318
319 SubscriptionInstanceContainer::~SubscriptionInstanceContainer(void)
320 {
321 delete _rep;
322 }
323
324 SubscriptionInstanceContainer & SubscriptionInstanceContainer::operator=(
325 const SubscriptionInstanceContainer & container)
326 {
327 if (this == &container)
328 kumpf 1.15 {
329 return (*this);
330 }
331
332 _rep->subscriptionInstance = container._rep->subscriptionInstance;
333
334 return (*this);
335 }
336
337 String SubscriptionInstanceContainer::getName(void) const
338 {
339 return(NAME);
340 }
341
342 OperationContext::Container * SubscriptionInstanceContainer::clone(void) const
343 {
344 return(new SubscriptionInstanceContainer(_rep->subscriptionInstance));
345 }
346
347 void SubscriptionInstanceContainer::destroy(void)
348 {
349 kumpf 1.15 delete this;
350 }
351
352 CIMInstance SubscriptionInstanceContainer::getInstance(void) const
353 {
354 return(_rep->subscriptionInstance);
355 }
356
|
357 kumpf 1.24 // Unimplemented, hidden constructor not intended for actual use
358 SubscriptionInstanceContainer::SubscriptionInstanceContainer()
359 {
360 }
|
361 kumpf 1.15
362 //
363 // SubscriptionInstanceNamesContainer
364 //
365
366 class SubscriptionInstanceNamesContainerRep
367 {
368 public:
369 Array<CIMObjectPath> subscriptionInstanceNames;
370 };
371
372 const String SubscriptionInstanceNamesContainer::NAME =
373 "SubscriptionInstanceNamesContainer";
374
375 SubscriptionInstanceNamesContainer::SubscriptionInstanceNamesContainer
376 (const OperationContext::Container & container)
377 {
378 const SubscriptionInstanceNamesContainer * p =
379 dynamic_cast<const SubscriptionInstanceNamesContainer *>(&container);
380
381 if(p == 0)
382 kumpf 1.15 {
383 throw DynamicCastFailedException();
384 }
385
386 _rep = new SubscriptionInstanceNamesContainerRep();
387 _rep->subscriptionInstanceNames = p->_rep->subscriptionInstanceNames;
388 }
389
390 SubscriptionInstanceNamesContainer::SubscriptionInstanceNamesContainer
391 (const SubscriptionInstanceNamesContainer & container)
|
392 w.otsuka 1.31 #if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
393 : OperationContext::Container()
394 #endif
|
395 kumpf 1.15 {
396 _rep = new SubscriptionInstanceNamesContainerRep();
397 _rep->subscriptionInstanceNames = container._rep->subscriptionInstanceNames;
398 }
399
400 SubscriptionInstanceNamesContainer::SubscriptionInstanceNamesContainer
401 (const Array<CIMObjectPath> & subscriptionInstanceNames)
402 {
403 _rep = new SubscriptionInstanceNamesContainerRep();
404 _rep->subscriptionInstanceNames = subscriptionInstanceNames;
405 }
406
407 SubscriptionInstanceNamesContainer::~SubscriptionInstanceNamesContainer(void)
408 {
409 delete _rep;
410 }
411
412 SubscriptionInstanceNamesContainer &
413 SubscriptionInstanceNamesContainer::operator=(
414 const SubscriptionInstanceNamesContainer & container)
415 {
416 kumpf 1.15 if (this == &container)
417 {
418 return (*this);
419 }
420
421 _rep->subscriptionInstanceNames = container._rep->subscriptionInstanceNames;
422
423 return (*this);
424 }
425
426 String SubscriptionInstanceNamesContainer::getName(void) const
427 {
428 return(NAME);
429 }
430
431 OperationContext::Container *
432 SubscriptionInstanceNamesContainer::clone(void) const
433 {
434 return(new SubscriptionInstanceNamesContainer
435 (_rep->subscriptionInstanceNames));
436 }
437 kumpf 1.15
438 void SubscriptionInstanceNamesContainer::destroy(void)
439 {
440 delete this;
441 }
442
443 Array<CIMObjectPath>
444 SubscriptionInstanceNamesContainer::getInstanceNames(void) const
445 {
446 return(_rep->subscriptionInstanceNames);
447 }
448
|
449 kumpf 1.24 // Unimplemented, hidden constructor not intended for actual use
450 SubscriptionInstanceNamesContainer::SubscriptionInstanceNamesContainer()
451 {
452 }
453
|
454 kumpf 1.15 //
455 // SubscriptionFilterConditionContainer
456 //
457
458 class SubscriptionFilterConditionContainerRep
459 {
460 public:
461 String filterCondition;
462 String queryLanguage;
463 };
464
465 const String SubscriptionFilterConditionContainer::NAME =
466 "SubscriptionFilterConditionContainer";
467
468 SubscriptionFilterConditionContainer::SubscriptionFilterConditionContainer
469 (const OperationContext::Container & container)
470 {
471 const SubscriptionFilterConditionContainer * p =
472 dynamic_cast<const SubscriptionFilterConditionContainer *>(&container);
473
474 if(p == 0)
475 kumpf 1.15 {
476 throw DynamicCastFailedException();
477 }
478
479 _rep = new SubscriptionFilterConditionContainerRep();
480 _rep->filterCondition = p->_rep->filterCondition;
481 _rep->queryLanguage = p->_rep->queryLanguage;
482 }
483
484 SubscriptionFilterConditionContainer::SubscriptionFilterConditionContainer
485 (const SubscriptionFilterConditionContainer & container)
|
486 w.otsuka 1.31 #if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
487 : OperationContext::Container()
488 #endif
|
489 kumpf 1.15 {
490 _rep = new SubscriptionFilterConditionContainerRep();
491 _rep->filterCondition = container._rep->filterCondition;
492 _rep->queryLanguage = container._rep->queryLanguage;
493 }
494
495 SubscriptionFilterConditionContainer::SubscriptionFilterConditionContainer(
496 const String & filterCondition,
497 const String & queryLanguage)
498 {
499 _rep = new SubscriptionFilterConditionContainerRep();
500 _rep->filterCondition = filterCondition;
501 _rep->queryLanguage = queryLanguage;
502 }
503
504 SubscriptionFilterConditionContainer::~SubscriptionFilterConditionContainer
505 (void)
506 {
507 delete _rep;
508 }
509
510 kumpf 1.15 SubscriptionFilterConditionContainer &
511 SubscriptionFilterConditionContainer::operator=(
512 const SubscriptionFilterConditionContainer & container)
513 {
514 if (this == &container)
515 {
516 return (*this);
517 }
518
519 _rep->filterCondition = container._rep->filterCondition;
520 _rep->queryLanguage = container._rep->queryLanguage;
521
522 return (*this);
523 }
524
525 String SubscriptionFilterConditionContainer::getName(void) const
526 {
527 return(NAME);
528 }
529
530 OperationContext::Container * SubscriptionFilterConditionContainer::clone(void) const
531 kumpf 1.15 {
532 return(new SubscriptionFilterConditionContainer(_rep->filterCondition,
533 _rep->queryLanguage));
534 }
535
536 void SubscriptionFilterConditionContainer::destroy(void)
537 {
538 delete this;
539 }
540
541 String SubscriptionFilterConditionContainer::getFilterCondition(void) const
542 {
543 return(_rep->filterCondition);
544 }
545
546 String SubscriptionFilterConditionContainer::getQueryLanguage(void) const
547 {
548 return(_rep->queryLanguage);
|
549 chip 1.3 }
|
550 mike 1.2
|
551 kumpf 1.24 // Unimplemented, hidden constructor not intended for actual use
552 SubscriptionFilterConditionContainer::SubscriptionFilterConditionContainer()
553 {
554 }
555
556 //
|
557 chuck 1.27 // SubscriptionFilterQueryContainer
558 //
559
560 class SubscriptionFilterQueryContainerRep
561 {
562 public:
563 String filterQuery;
564 String queryLanguage;
565 CIMNamespaceName sourceNameSpace;
566 };
567
568 const String SubscriptionFilterQueryContainer::NAME =
569 "SubscriptionFilterQueryContainer";
570
571 SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer
572 (const OperationContext::Container & container)
573 {
574 const SubscriptionFilterQueryContainer * p =
575 dynamic_cast<const SubscriptionFilterQueryContainer *>(&container);
576
577 if(p == 0)
578 chuck 1.27 {
579 throw DynamicCastFailedException();
580 }
581
582 _rep = new SubscriptionFilterQueryContainerRep();
583 _rep->filterQuery = p->_rep->filterQuery;
584 _rep->queryLanguage = p->_rep->queryLanguage;
585 _rep->sourceNameSpace = p->_rep->sourceNameSpace;
586 }
587
588 SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer
589 (const SubscriptionFilterQueryContainer & container)
|
590 w.otsuka 1.31 #if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
591 : OperationContext::Container()
592 #endif
|
593 chuck 1.27 {
594 _rep = new SubscriptionFilterQueryContainerRep();
595 _rep->filterQuery = container._rep->filterQuery;
596 _rep->queryLanguage = container._rep->queryLanguage;
597 _rep->sourceNameSpace = container._rep->sourceNameSpace;
598 }
599
600 SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer(
601 const String & filterQuery,
602 const String & queryLanguage,
603 const CIMNamespaceName & sourceNameSpace)
604 {
605 _rep = new SubscriptionFilterQueryContainerRep();
606 _rep->filterQuery = filterQuery;
607 _rep->queryLanguage = queryLanguage;
608 _rep->sourceNameSpace = sourceNameSpace;
609 }
610
611 SubscriptionFilterQueryContainer::~SubscriptionFilterQueryContainer
612 (void)
613 {
614 chuck 1.27 delete _rep;
615 }
616 SubscriptionFilterQueryContainer &
617 SubscriptionFilterQueryContainer::operator=(
618 const SubscriptionFilterQueryContainer & container)
619 {
620 if (this == &container)
621 {
622 return (*this);
623 }
624
625 _rep->filterQuery = container._rep->filterQuery;
626 _rep->queryLanguage = container._rep->queryLanguage;
627 _rep->sourceNameSpace = container._rep->sourceNameSpace;
628
629 return (*this);
630 }
631
632 String SubscriptionFilterQueryContainer::getName(void) const
633 {
634 return(NAME);
635 chuck 1.27 }
636
637 OperationContext::Container * SubscriptionFilterQueryContainer::clone(void) const
638 {
639 return(new SubscriptionFilterQueryContainer(_rep->filterQuery,
640 _rep->queryLanguage,
641 _rep->sourceNameSpace));
642 }
643
644 void SubscriptionFilterQueryContainer::destroy(void)
645 {
646 delete this;
647 }
648
649 String SubscriptionFilterQueryContainer::getFilterQuery(void) const
650 {
651 return(_rep->filterQuery);
652 }
653
654 String SubscriptionFilterQueryContainer::getQueryLanguage(void) const
655 {
656 chuck 1.27 return(_rep->queryLanguage);
657 }
658
659 CIMNamespaceName SubscriptionFilterQueryContainer::getSourceNameSpace(void) const
660 {
661 return(_rep->sourceNameSpace);
662 }
663
664 // Unimplemented, hidden constructor not intended for actual use
665 SubscriptionFilterQueryContainer::SubscriptionFilterQueryContainer()
666 {
667 }
668
669 //
|
670 kumpf 1.24 // TimeoutContainer
671 //
|
672 mday 1.17
673 const String TimeoutContainer::NAME = "TimeoutContainer";
674
675 TimeoutContainer::TimeoutContainer(const OperationContext::Container & container)
676 {
677 const TimeoutContainer * p = dynamic_cast<const TimeoutContainer *>(&container);
678 if(p == 0)
679 {
680 throw DynamicCastFailedException();
681 }
682 _value = p->_value;
683 }
684
685 TimeoutContainer::TimeoutContainer(Uint32 timeout)
686 {
687 _value = timeout;
688 }
689
690 String TimeoutContainer::getName(void) const
691 {
692 return (NAME);
693 mday 1.17 }
694
695 OperationContext::Container * TimeoutContainer::clone(void) const
696 {
697 return (new TimeoutContainer(_value));
698 }
699
700 void TimeoutContainer::destroy(void)
701 {
702 delete this;
703 }
704
705 Uint32 TimeoutContainer::getTimeOut(void) const
706 {
707 return _value;
708 }
709
710
|
711 chuck 1.18 // l10n start
|
712 mday 1.17
|
713 chuck 1.18 //
714 // AcceptLanguageListContainer
715 //
|
716 mday 1.17
|
717 chuck 1.18 class AcceptLanguageListContainerRep
718 {
719 public:
720 AcceptLanguages languages;
721 };
722
723 const String AcceptLanguageListContainer::NAME =
724 "AcceptLanguageListContainer";
725
726 AcceptLanguageListContainer::AcceptLanguageListContainer
727 (const OperationContext::Container & container)
728 {
729 const AcceptLanguageListContainer * p =
730 dynamic_cast<const AcceptLanguageListContainer *>(&container);
731
732 if(p == 0)
733 {
734 throw DynamicCastFailedException();
735 }
736
737 _rep = new AcceptLanguageListContainerRep();
738 chuck 1.18 _rep->languages = p->_rep->languages;
739 }
740
741 AcceptLanguageListContainer::AcceptLanguageListContainer
742 (const AcceptLanguageListContainer & container)
|
743 w.otsuka 1.31 #if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
744 : OperationContext::Container()
745 #endif
|
746 chuck 1.18 {
747 _rep = new AcceptLanguageListContainerRep();
748 _rep->languages = container._rep->languages;
749 }
750
751 AcceptLanguageListContainer::AcceptLanguageListContainer
752 (const AcceptLanguages & languages)
753 {
754 _rep = new AcceptLanguageListContainerRep();
755 _rep->languages = languages;
756 }
757
758 AcceptLanguageListContainer::~AcceptLanguageListContainer(void)
759 {
760 delete _rep;
761 }
762
763 AcceptLanguageListContainer & AcceptLanguageListContainer::operator=(
764 const AcceptLanguageListContainer & container)
765 {
766 if (this == &container)
767 chuck 1.18 {
768 return (*this);
769 }
770
771 _rep->languages = container._rep->languages;
772
773 return (*this);
774 }
775
776 String AcceptLanguageListContainer::getName(void) const
777 {
778 return(NAME);
779 }
780
781 OperationContext::Container * AcceptLanguageListContainer::clone(void) const
782 {
783 return(new AcceptLanguageListContainer(_rep->languages));
784 }
785
786 void AcceptLanguageListContainer::destroy(void)
787 {
788 chuck 1.18 delete this;
789 }
790
791 AcceptLanguages AcceptLanguageListContainer::getLanguages(void) const
792 {
793 return(_rep->languages);
794 }
795
|
796 kumpf 1.24 // Unimplemented, hidden constructor not intended for actual use
797 AcceptLanguageListContainer::AcceptLanguageListContainer()
798 {
799 }
800
|
801 chuck 1.18 //
802 // SubscriptionLanguageListContainer
803 //
804
|
805 chuck 1.21 class SubscriptionLanguageListContainerRep
806 {
807 public:
808 AcceptLanguages languages;
809 };
810
|
811 chuck 1.18 const String SubscriptionLanguageListContainer::NAME =
812 "SubscriptionLanguageListContainer";
813
|
814 chuck 1.21 SubscriptionLanguageListContainer::SubscriptionLanguageListContainer
815 (const OperationContext::Container & container)
816 {
817 const SubscriptionLanguageListContainer * p =
818 dynamic_cast<const SubscriptionLanguageListContainer *>(&container);
819
820 if(p == 0)
821 {
822 throw DynamicCastFailedException();
823 }
824
825 _rep = new SubscriptionLanguageListContainerRep();
826 _rep->languages = p->_rep->languages;
827 }
828
829 SubscriptionLanguageListContainer::SubscriptionLanguageListContainer
830 (const SubscriptionLanguageListContainer & container)
|
831 w.otsuka 1.31 #if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
832 : OperationContext::Container()
833 #endif
|
834 chuck 1.21 {
835 _rep = new SubscriptionLanguageListContainerRep();
836 _rep->languages = container._rep->languages;
837 }
838
839 SubscriptionLanguageListContainer::SubscriptionLanguageListContainer
840 (const AcceptLanguages & languages)
841 {
842 _rep = new SubscriptionLanguageListContainerRep();
843 _rep->languages = languages;
844 }
845
846 SubscriptionLanguageListContainer::~SubscriptionLanguageListContainer(void)
847 {
848 delete _rep;
849 }
850
851 SubscriptionLanguageListContainer & SubscriptionLanguageListContainer::operator=(
852 const SubscriptionLanguageListContainer & container)
853 {
854 if (this == &container)
855 chuck 1.21 {
856 return (*this);
857 }
858
859 _rep->languages = container._rep->languages;
860
861 return (*this);
862 }
863
|
864 chuck 1.18 String SubscriptionLanguageListContainer::getName(void) const
865 {
866 return(NAME);
|
867 chuck 1.21 }
868
869 OperationContext::Container * SubscriptionLanguageListContainer::clone(void) const
870 {
871 return(new SubscriptionLanguageListContainer(_rep->languages));
872 }
873
874 void SubscriptionLanguageListContainer::destroy(void)
875 {
876 delete this;
877 }
878
879 AcceptLanguages SubscriptionLanguageListContainer::getLanguages(void) const
880 {
881 return(_rep->languages);
|
882 chuck 1.18 }
883
|
884 kumpf 1.24 // Unimplemented, hidden constructor not intended for actual use
885 SubscriptionLanguageListContainer::SubscriptionLanguageListContainer()
886 {
887 }
888
|
889 chuck 1.18 //
890 // ContentLanguageListContainer
891 //
892
893 class ContentLanguageListContainerRep
894 {
895 public:
896 ContentLanguages languages;
897 };
898
899 const String ContentLanguageListContainer::NAME =
900 "ContentLanguageListContainer";
901
902 ContentLanguageListContainer::ContentLanguageListContainer
903 (const OperationContext::Container & container)
904 {
905 const ContentLanguageListContainer * p =
906 dynamic_cast<const ContentLanguageListContainer *>(&container);
907
908 if(p == 0)
909 {
910 chuck 1.18 throw DynamicCastFailedException();
911 }
912
913 _rep = new ContentLanguageListContainerRep();
914 _rep->languages = p->_rep->languages;
915 }
916
917 ContentLanguageListContainer::ContentLanguageListContainer
918 (const ContentLanguageListContainer & container)
|
919 w.otsuka 1.31 #if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
920 : OperationContext::Container()
921 #endif
|
922 chuck 1.18 {
923 _rep = new ContentLanguageListContainerRep();
924 _rep->languages = container._rep->languages;
925 }
926
927 ContentLanguageListContainer::ContentLanguageListContainer
928 (const ContentLanguages & languages)
929 {
930 _rep = new ContentLanguageListContainerRep();
931 _rep->languages = languages;
932 }
933
934 ContentLanguageListContainer::~ContentLanguageListContainer(void)
935 {
936 delete _rep;
937 }
938
939 ContentLanguageListContainer & ContentLanguageListContainer::operator=(
940 const ContentLanguageListContainer & container)
941 {
942 if (this == &container)
943 chuck 1.18 {
944 return (*this);
945 }
946
947 _rep->languages = container._rep->languages;
948
949 return (*this);
950 }
951
952 String ContentLanguageListContainer::getName(void) const
953 {
954 return(NAME);
955 }
956
957 OperationContext::Container * ContentLanguageListContainer::clone(void) const
958 {
959 return(new ContentLanguageListContainer(_rep->languages));
960 }
961
962 void ContentLanguageListContainer::destroy(void)
963 {
964 chuck 1.18 delete this;
965 }
966
967 ContentLanguages ContentLanguageListContainer::getLanguages(void) const
968 {
969 return(_rep->languages);
970 }
971
|
972 kumpf 1.24 // Unimplemented, hidden constructor not intended for actual use
973 ContentLanguageListContainer::ContentLanguageListContainer()
974 {
975 }
|
976 chuck 1.18
977 // l10n end
|
978 mday 1.17
|
979 kumpf 1.20 //
980 // SnmpTrapOidContainer
981 //
982
983 class SnmpTrapOidContainerRep
984 {
985 public:
986 String snmpTrapOid;
987 };
988
989 const String SnmpTrapOidContainer::NAME =
990 "SnmpTrapOidContainer";
991
992 SnmpTrapOidContainer::SnmpTrapOidContainer
993 (const OperationContext::Container & container)
994 {
995 const SnmpTrapOidContainer * p =
996 dynamic_cast<const SnmpTrapOidContainer *>(&container);
997
998 if(p == 0)
999 {
1000 kumpf 1.20 throw DynamicCastFailedException();
1001 }
1002
1003 _rep = new SnmpTrapOidContainerRep();
1004 _rep->snmpTrapOid = p->_rep->snmpTrapOid;
1005 }
1006
1007 SnmpTrapOidContainer::SnmpTrapOidContainer
1008 (const SnmpTrapOidContainer & container)
|
1009 w.otsuka 1.31 #if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU)
1010 : OperationContext::Container()
1011 #endif
|
1012 kumpf 1.20 {
1013 _rep = new SnmpTrapOidContainerRep();
1014 _rep->snmpTrapOid = container._rep->snmpTrapOid;
1015 }
1016
1017 SnmpTrapOidContainer::SnmpTrapOidContainer
1018 (const String & snmpTrapOid)
1019 {
1020 _rep = new SnmpTrapOidContainerRep();
1021 _rep->snmpTrapOid = snmpTrapOid;
1022 }
1023
1024 SnmpTrapOidContainer::~SnmpTrapOidContainer(void)
1025 {
1026 delete _rep;
1027 }
1028
1029 SnmpTrapOidContainer & SnmpTrapOidContainer::operator=(
1030 const SnmpTrapOidContainer & container)
1031 {
1032 if (this == &container)
1033 kumpf 1.20 {
1034 return (*this);
1035 }
1036
1037 _rep->snmpTrapOid = container._rep->snmpTrapOid;
1038
1039 return (*this);
1040 }
1041
1042 String SnmpTrapOidContainer::getName(void) const
1043 {
1044 return(NAME);
1045 }
1046
1047 OperationContext::Container * SnmpTrapOidContainer::clone(void) const
1048 {
1049 return(new SnmpTrapOidContainer(_rep->snmpTrapOid));
1050 }
1051
1052 void SnmpTrapOidContainer::destroy(void)
1053 {
1054 kumpf 1.20 delete this;
1055 }
1056
1057 String SnmpTrapOidContainer::getSnmpTrapOid(void) const
1058 {
1059 return(_rep->snmpTrapOid);
1060 }
|
1061 kumpf 1.24
1062 // Unimplemented, hidden constructor not intended for actual use
1063 SnmpTrapOidContainer::SnmpTrapOidContainer()
1064 {
1065 }
1066
|
1067 mike 1.2 PEGASUS_NAMESPACE_END
|