1 //%2003////////////////////////////////////////////////////////////////////////
3 // 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 // IBM Corp.; EMC Corporation, The Open Group.
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to
10 // deal in the Software without restriction, including without limitation the
11 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12 // sell copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
15 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
16 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
17 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
18 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 //==============================================================================
26 // Author: Paulo F. Borges (pfborges@wowmail.com)
29 // Modified By: Jair Francisco T. dos Santos (t.dos.santos.francisco@non.hp.com)
30 //==============================================================================
31 // Based on DNSAdminDomain_Stub.cpp file
32 //%////////////////////////////////////////////////////////////////////////////
34 //------------------------------------------------------------------------------
36 //------------------------------------------------------------------------------
37 #include "NTPAdminDomain.h"
39 //------------------------------------------------------------------------------
40 PEGASUS_USING_PEGASUS;
43 //==============================================================================
45 // Class [NTPAdminDomain] methods
47 //==============================================================================
49 //------------------------------------------------------------------------------
51 //------------------------------------------------------------------------------
52 NTPAdminDomain::NTPAdminDomain(void)
56 //------------------------------------------------------------------------------
58 //------------------------------------------------------------------------------
59 NTPAdminDomain::~NTPAdminDomain(void)
63 //------------------------------------------------------------------------------
64 // FUNCTION: getNTPInfo
66 // REMARKS: Retrieves the NTP information from the "/etc/ntp.conf" file,
67 // and sets private variables to hold the data read.
70 //------------------------------------------------------------------------------
72 NTPAdminDomain::getNTPInfo()
77 //------------------------------------------------------------------------------
78 // FUNCTION: getLocalHostName
80 // REMARKS: Retrieves the local host name
82 // PARAMETERS: [OUT] hostName -> string that will contain the local host name
84 // RETURN: TRUE if local hostname is valid, FALSE otherwise
85 //------------------------------------------------------------------------------
87 NTPAdminDomain::getLocalHostName(String & hostName)
92 //------------------------------------------------------------------------------
93 // FUNCTION: getCreationClassName
95 // REMARKS: returns the CreationClassName property
97 // PARAMETERS: [OUT] strValue -> string that will receive the CreationClassName
101 //------------------------------------------------------------------------------
103 NTPAdminDomain::getCreationClassName(String & strValue)
108 //------------------------------------------------------------------------------
111 // REMARKS: returns the Name property
113 // PARAMETERS: [OUT] strValue -> string that will receive the Name property value
116 //------------------------------------------------------------------------------
118 NTPAdminDomain::getName(String & strValue)
123 //------------------------------------------------------------------------------
124 // FUNCTION: getCaption
126 // REMARKS: returns the Caption property
128 // PARAMETERS: [OUT] strValue -> string that will receive the Caption property
132 //------------------------------------------------------------------------------
134 NTPAdminDomain::getCaption(String & strValue)
139 //------------------------------------------------------------------------------
140 // FUNCTION: getDescription
142 // REMARKS: returns the Description property
144 // PARAMETERS: [OUT] strValue -> string that will receive the Description
148 //------------------------------------------------------------------------------
150 NTPAdminDomain::getDescription(String & strValue)
155 //------------------------------------------------------------------------------
156 // FUNCTION: getServerAddress
158 // REMARKS: returns the ServerAddress property
160 // PARAMETERS: [OUT] strValue -> string that will receive the ServerAddress
164 //------------------------------------------------------------------------------
166 NTPAdminDomain::getServerAddress(Array<String> & strValue)
171 //------------------------------------------------------------------------------
172 // FUNCTION: getNameFormat
174 // REMARKS: returns the NameFormat property
176 // PARAMETERS: [OUT] strValue -> string that will receive the NameFormat
180 //------------------------------------------------------------------------------
182 NTPAdminDomain::getNameFormat(String & strValue)