From: <jc...@us...> - 2006-11-01 17:58:34
|
Revision: 1 http://svn.sourceforge.net/omc/?rev=1&view=rev Author: jcarey Date: 2006-11-01 09:58:02 -0800 (Wed, 01 Nov 2006) Log Message: ----------- Initial import Added Paths: ----------- branches/ branches/1.0/ branches/1.0/AUTHORS branches/1.0/COPYING branches/1.0/ChangeLog branches/1.0/INSTALL branches/1.0/LICENSE branches/1.0/Makefile.am branches/1.0/Makefile.incl.am branches/1.0/NEWS branches/1.0/README branches/1.0/bootstrap.sh branches/1.0/configure.ac branches/1.0/etc/ branches/1.0/etc/openwbem.conf branches/1.0/install-sh branches/1.0/src/ branches/1.0/src/Makefile.am branches/1.0/src/include/ branches/1.0/src/include/Makefile.am branches/1.0/src/include/omc/ branches/1.0/src/include/omc/Base.hpp branches/1.0/src/include/omc/CIMUtils.hpp branches/1.0/src/include/omc/FileDefs.hpp branches/1.0/src/include/omc/FileFilter.hpp branches/1.0/src/include/omc/FileTools.hpp branches/1.0/src/include/omc/LinuxProcess.hpp branches/1.0/src/include/omc/Makefile.am branches/1.0/src/include/omc/ProviderStore.hpp branches/1.0/src/lib/ branches/1.0/src/lib/Makefile.am branches/1.0/src/lib/omc/ branches/1.0/src/lib/omc/Base.cpp branches/1.0/src/lib/omc/CIMUtils.cpp branches/1.0/src/lib/omc/FileFilter.cpp branches/1.0/src/lib/omc/FileTools.cpp branches/1.0/src/lib/omc/LinuxProcess.cpp branches/1.0/src/lib/omc/Makefile.am branches/1.0/src/lib/omc/ProviderStore.cpp branches/1.0/src/providers/ branches/1.0/src/providers/Makefile.am branches/1.0/src/providers/computer-system/ branches/1.0/src/providers/computer-system/HostNameModifier.cpp branches/1.0/src/providers/computer-system/HostNameModifier.hpp branches/1.0/src/providers/computer-system/HostsFileModifier.cpp branches/1.0/src/providers/computer-system/HostsFileModifier.hpp branches/1.0/src/providers/computer-system/LinuxComputerSystem.cpp branches/1.0/src/providers/computer-system/Makefile.am branches/1.0/src/providers/file-system/ branches/1.0/src/providers/file-system/LinuxFileSystem.cpp branches/1.0/src/providers/file-system/LinuxMount.cpp branches/1.0/src/providers/file-system/LinuxResidesOnExtent.cpp branches/1.0/src/providers/file-system/Makefile.am branches/1.0/src/providers/initd/ branches/1.0/src/providers/initd/Makefile.am branches/1.0/src/providers/initd/initdprovider.cpp branches/1.0/src/providers/initd/initdprovider.hpp branches/1.0/src/providers/initd/initdprovidertest.xml branches/1.0/src/providers/operating-system/ branches/1.0/src/providers/operating-system/Makefile.am branches/1.0/src/providers/operating-system/linux_installed_os.cpp branches/1.0/src/providers/operating-system/linux_os.cpp branches/1.0/src/providers/operating-system/linux_os.hpp branches/1.0/src/providers/operating-system/linux_running_os.cpp branches/1.0/src/providers/operating-system/linuxos.cpp branches/1.0/src/providers/operating-system/linuxos.hpp branches/1.0/src/providers/operating-system/local_debug.hpp branches/1.0/src/providers/operating-system/proc.hpp branches/1.0/src/providers/operating-system/proc_meminfo.cpp branches/1.0/src/providers/operating-system/proc_meminfo.hpp branches/1.0/src/providers/operating-system/proc_stat.cpp branches/1.0/src/providers/operating-system/proc_stat.hpp branches/1.0/src/providers/operating-system/proc_vmstat.cpp branches/1.0/src/providers/operating-system/proc_vmstat.hpp branches/1.0/src/providers/posix-file-elements/ branches/1.0/src/providers/posix-file-elements/LinuxLogicalFile.cpp branches/1.0/src/providers/posix-file-elements/LinuxPosixFile.cpp branches/1.0/src/providers/posix-file-elements/Makefile.am branches/1.0/src/providers/processes/ branches/1.0/src/providers/processes/LinuxProcessProvider.cpp branches/1.0/src/providers/processes/Makefile.am branches/1.0/src/providers/syslog/ branches/1.0/src/providers/syslog/Makefile.am branches/1.0/src/providers/syslog/SyslogNGProvider.cpp branches/1.0/src/providers/syslog/SyslogNGProvider.hpp branches/1.0/src/providers/syslog/cfg-grammar.y branches/1.0/src/providers/syslog/cfg-lex.l branches/1.0/src/providers/syslog/cfgfile.c branches/1.0/src/providers/syslog/cfgfile.h branches/1.0/src/providers/syslog/syslogngprovidertest.xml branches/1.0/src/providers/time-service/ branches/1.0/src/providers/time-service/ClockConf.cpp branches/1.0/src/providers/time-service/ClockConf.hpp branches/1.0/src/providers/time-service/Makefile.am branches/1.0/src/providers/time-service/NTPConf.cpp branches/1.0/src/providers/time-service/NTPConf.hpp branches/1.0/src/providers/time-service/TimeServiceProvider.cpp branches/1.0/src/providers/time-service/Utils.cpp branches/1.0/src/providers/time-service/Utils.hpp branches/1.0/src/providers/xml-service/ branches/1.0/src/providers/xml-service/ConfigTool.cpp branches/1.0/src/providers/xml-service/ConfigTool.hpp branches/1.0/src/providers/xml-service/HealthDataItem.cpp branches/1.0/src/providers/xml-service/HealthDataItem.hpp branches/1.0/src/providers/xml-service/Makefile.am branches/1.0/src/providers/xml-service/ProcessInfo.cpp branches/1.0/src/providers/xml-service/ProcessInfo.hpp branches/1.0/src/providers/xml-service/ServiceXMLParser.cpp branches/1.0/src/providers/xml-service/ServiceXMLParser.hpp branches/1.0/src/providers/xml-service/XMLServiceProvider.cpp branches/1.0/src/providers/xml-service/XMLServiceProvider.hpp branches/1.0/src/providers/xml-service/XMLServiceProviderNonRes.cpp branches/1.0/src/providers/xml-service/XMLSvcUtils.cpp branches/1.0/src/providers/xml-service/XMLSvcUtils.hpp branches/1.0/src/providers/xml-service/example-services/ branches/1.0/src/providers/xml-service/example-services/apache/ branches/1.0/src/providers/xml-service/example-services/apache/Apache.xml branches/1.0/src/providers/xml-service/example-services/apache/how-to.txt branches/1.0/src/providers/xml-service/example-services/apache/httpdstat.awk branches/1.0/src/providers/xml-service/xmlschema/ branches/1.0/src/providers/xml-service/xmlschema/xml-service-provider.xsd branches/1.0/test/ branches/1.0/test/Makefile.am branches/1.0/test/unit/ branches/1.0/test/unit/Makefile.am tags/ trunk/ trunk/AUTHORS trunk/COPYING trunk/ChangeLog trunk/INSTALL trunk/LICENSE trunk/Makefile.am trunk/Makefile.incl.am trunk/NEWS trunk/README trunk/bootstrap.sh trunk/configure.ac trunk/etc/ trunk/etc/openwbem.conf trunk/install-sh trunk/reg.mof trunk/src/ trunk/src/Makefile.am trunk/src/include/ trunk/src/include/Makefile.am trunk/src/include/omc/ trunk/src/include/omc/Base.hpp trunk/src/include/omc/CIMUtils.hpp trunk/src/include/omc/FileDefs.hpp trunk/src/include/omc/FileFilter.hpp trunk/src/include/omc/FileTools.hpp trunk/src/include/omc/LinuxProcess.hpp trunk/src/include/omc/Makefile.am trunk/src/include/omc/ProviderStore.hpp trunk/src/lib/ trunk/src/lib/Makefile.am trunk/src/lib/omc/ trunk/src/lib/omc/Base.cpp trunk/src/lib/omc/CIMUtils.cpp trunk/src/lib/omc/FileFilter.cpp trunk/src/lib/omc/FileTools.cpp trunk/src/lib/omc/LinuxProcess.cpp trunk/src/lib/omc/Makefile.am trunk/src/lib/omc/ProviderStore.cpp trunk/src/providers/ trunk/src/providers/Makefile.am trunk/src/providers/computer-system/ trunk/src/providers/computer-system/HostNameModifier.cpp trunk/src/providers/computer-system/HostNameModifier.hpp trunk/src/providers/computer-system/HostsFileModifier.cpp trunk/src/providers/computer-system/HostsFileModifier.hpp trunk/src/providers/computer-system/LinuxComputerSystem.cpp trunk/src/providers/computer-system/Makefile.am trunk/src/providers/file-system/ trunk/src/providers/file-system/LinuxFileSystem.cpp trunk/src/providers/file-system/LinuxMount.cpp trunk/src/providers/file-system/LinuxResidesOnExtent.cpp trunk/src/providers/file-system/Makefile.am trunk/src/providers/initd/ trunk/src/providers/initd/Makefile.am trunk/src/providers/initd/initdprovider.cpp trunk/src/providers/initd/initdprovider.hpp trunk/src/providers/initd/initdprovidertest.xml trunk/src/providers/operating-system/ trunk/src/providers/operating-system/Makefile.am trunk/src/providers/operating-system/linux_installed_os.cpp trunk/src/providers/operating-system/linux_os.cpp trunk/src/providers/operating-system/linux_os.hpp trunk/src/providers/operating-system/linux_running_os.cpp trunk/src/providers/operating-system/linuxos.cpp trunk/src/providers/operating-system/linuxos.hpp trunk/src/providers/operating-system/local_debug.hpp trunk/src/providers/operating-system/proc.hpp trunk/src/providers/operating-system/proc_meminfo.cpp trunk/src/providers/operating-system/proc_meminfo.hpp trunk/src/providers/operating-system/proc_stat.cpp trunk/src/providers/operating-system/proc_stat.hpp trunk/src/providers/operating-system/proc_vmstat.cpp trunk/src/providers/operating-system/proc_vmstat.hpp trunk/src/providers/posix-file-elements/ trunk/src/providers/posix-file-elements/LinuxLogicalFile.cpp trunk/src/providers/posix-file-elements/LinuxPosixFile.cpp trunk/src/providers/posix-file-elements/Makefile.am trunk/src/providers/processes/ trunk/src/providers/processes/LinuxProcessProvider.cpp trunk/src/providers/processes/Makefile.am trunk/src/providers/syslog/ trunk/src/providers/syslog/Makefile.am trunk/src/providers/syslog/SyslogNGProvider.cpp trunk/src/providers/syslog/SyslogNGProvider.hpp trunk/src/providers/syslog/cfg-grammar.y trunk/src/providers/syslog/cfg-lex.l trunk/src/providers/syslog/cfgfile.c trunk/src/providers/syslog/cfgfile.h trunk/src/providers/syslog/syslogngprovidertest.xml trunk/src/providers/time-service/ trunk/src/providers/time-service/ClockConf.cpp trunk/src/providers/time-service/ClockConf.hpp trunk/src/providers/time-service/Makefile.am trunk/src/providers/time-service/NTPConf.cpp trunk/src/providers/time-service/NTPConf.hpp trunk/src/providers/time-service/TimeServiceProvider.cpp trunk/src/providers/time-service/Utils.cpp trunk/src/providers/time-service/Utils.hpp trunk/src/providers/xml-service/ trunk/src/providers/xml-service/ConfigTool.cpp trunk/src/providers/xml-service/ConfigTool.hpp trunk/src/providers/xml-service/HealthDataItem.cpp trunk/src/providers/xml-service/HealthDataItem.hpp trunk/src/providers/xml-service/Makefile.am trunk/src/providers/xml-service/ProcessInfo.cpp trunk/src/providers/xml-service/ProcessInfo.hpp trunk/src/providers/xml-service/ServiceXMLParser.cpp trunk/src/providers/xml-service/ServiceXMLParser.hpp trunk/src/providers/xml-service/XMLServiceProvider.cpp trunk/src/providers/xml-service/XMLServiceProvider.hpp trunk/src/providers/xml-service/XMLServiceProviderNonRes.cpp trunk/src/providers/xml-service/XMLSvcUtils.cpp trunk/src/providers/xml-service/XMLSvcUtils.hpp trunk/src/providers/xml-service/doc/ trunk/src/providers/xml-service/doc/Diagram1.dia trunk/src/providers/xml-service/doc/Diagram1.png trunk/src/providers/xml-service/doc/XMLServiceProvider-Functional-Spec.odt trunk/src/providers/xml-service/doc/XMLServiceProviderInterface-Proposal.odt trunk/src/providers/xml-service/example-services/ trunk/src/providers/xml-service/example-services/apache/ trunk/src/providers/xml-service/example-services/apache/Apache.xml trunk/src/providers/xml-service/example-services/apache/how-to.txt trunk/src/providers/xml-service/example-services/apache/httpdstat.awk trunk/src/providers/xml-service/slickproj.vpj trunk/src/providers/xml-service/slickproj.vpw trunk/src/providers/xml-service/slickproj.vpwhistu trunk/src/providers/xml-service/slickproj.vtg trunk/src/providers/xml-service/xmlschema/ trunk/src/providers/xml-service/xmlschema/xml-service-provider.xsd trunk/test/ trunk/test/Makefile.am trunk/test/unit/ trunk/test/unit/Makefile.am Added: branches/1.0/AUTHORS =================================================================== Added: branches/1.0/COPYING =================================================================== Added: branches/1.0/ChangeLog =================================================================== --- branches/1.0/ChangeLog (rev 0) +++ branches/1.0/ChangeLog 2006-11-01 17:58:02 UTC (rev 1) @@ -0,0 +1 @@ +Initial. Added: branches/1.0/INSTALL =================================================================== --- branches/1.0/INSTALL (rev 0) +++ branches/1.0/INSTALL 2006-11-01 17:58:02 UTC (rev 1) @@ -0,0 +1,229 @@ +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software +Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the `--target=TYPE' option to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + Added: branches/1.0/LICENSE =================================================================== --- branches/1.0/LICENSE (rev 0) +++ branches/1.0/LICENSE 2006-11-01 17:58:02 UTC (rev 1) @@ -0,0 +1,91 @@ +OMC-base is primarily constrained by BSD License. +However, some files have a more restrictive license (GPL): +* SysLog-NG + +Please pay attention to the license for each file. + +Below are some of the license notices you will encounter throughout the OMC project: + +Notice for Projects/Files Released Under the GPL + +/**************************************************************************** + | + | Copyright (c) [YEARS] Novell, Inc. + | All Rights Reserved. + | + | This program is free software; you can redistribute it and/or + | modify it under the terms of version 2 of the GNU General Public License as + | published by the Free Software Foundation. + | + | This program is distributed in the hope that it will be useful, + | but WITHOUT ANY WARRANTY; without even the implied warranty of + | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + | GNU General Public License for more details. + | + | You should have received a copy of the GNU General Public License + | along with this program; if not, contact Novell, Inc. + | + | To contact Novell about this file by physical or electronic mail, + | you may find current contact information at www.novell.com + | + |*************************************************************************** + + +Notice for Projects/Files Released Under the LGPL + +/**************************************************************************** + | + | Copyright (c) [YEARS] Novell, Inc. + | All Rights Reserved. + | + | This library is free software; you can redistribute it and/or + | modify it under the terms of the GNU Lesser General Public License as + | published by the Free Software Foundation; version 2.1 of the license. + | + | This library is distributed in the hope that it will be useful, + | but WITHOUT ANY WARRANTY; without even the implied warranty of + | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + | GNU Lesser General Public License for more details. + | + | You should have received a copy of the GNU Lesser General Public License + | along with this library; if not, contact Novell, Inc. + | + | To contact Novell about this file by physical or electronic mail, + | you may find current contact information at www.novell.com + | + |*************************************************************************** + + +Notice for Projects/Files Released Under the BSD License + +/****************************************************************************** +* Copyright (c) [YEARS], Novell, Inc. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. +* +* - Redistributions in binary form must reproduce the above copyright notice, +* this list of conditions and the following disclaimer in the documentation +* and/or other materials provided with the distribution. +* +* - Neither the name of the Novell nor the names of its contributors may be +* used to endorse or promote products derived from this software without +* specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +* POSSIBILITY OF SUCH DAMAGE. +******************************************************************************/ + Added: branches/1.0/Makefile.am =================================================================== --- branches/1.0/Makefile.am (rev 0) +++ branches/1.0/Makefile.am 2006-11-01 17:58:02 UTC (rev 1) @@ -0,0 +1,10 @@ +## Process this file with automake to produce Makefile.in + +AUTOMAKE_OPTIONS = gnu + +SUBDIRS = \ + . \ + src \ + test + + Added: branches/1.0/Makefile.incl.am =================================================================== --- branches/1.0/Makefile.incl.am (rev 0) +++ branches/1.0/Makefile.incl.am 2006-11-01 17:58:02 UTC (rev 1) @@ -0,0 +1,11 @@ +# *********************************************************************** +# MACROS and VARIABLES +# *********************************************************************** + +providerdir = $(libdir)/openwbem/c++providers + + +# *********************************************************************** +# TARGETS +# *********************************************************************** + Added: branches/1.0/NEWS =================================================================== --- branches/1.0/NEWS (rev 0) +++ branches/1.0/NEWS 2006-11-01 17:58:02 UTC (rev 1) @@ -0,0 +1 @@ + Added: branches/1.0/README =================================================================== Added: branches/1.0/bootstrap.sh =================================================================== --- branches/1.0/bootstrap.sh (rev 0) +++ branches/1.0/bootstrap.sh 2006-11-01 17:58:02 UTC (rev 1) @@ -0,0 +1,9 @@ +#!/bin/sh + +rm -rf config.cache config.guess config.sub depcomp missing mkinstalldirs autom4te.cache + +aclocal \ +&& autoconf \ +&& autoheader \ +&& libtoolize --force --copy \ +&& automake --add-missing Property changes on: branches/1.0/bootstrap.sh ___________________________________________________________________ Name: svn:executable + Added: branches/1.0/configure.ac =================================================================== --- branches/1.0/configure.ac (rev 0) +++ branches/1.0/configure.ac 2006-11-01 17:58:02 UTC (rev 1) @@ -0,0 +1,193 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.57) +AC_INIT(omc-base, 1.0.1) +AM_INIT_AUTOMAKE +AC_CONFIG_SRCDIR([src]) +AC_CONFIG_HEADER([config.h]) +AC_PROG_LIBTOOL + +AC_PREFIX_DEFAULT(/usr) + +# Checks for programs. +AC_PROG_CXX +AC_PROG_CC +AC_PROG_CPP +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_LEX +AC_PROG_YACC + +AC_PATH_PROG(RM, rm, rm) +AC_PATH_PROG(MV, mv, mv) +AC_PATH_PROG(CP, cp, cp) + +DEBUG_FLAGS="-DDEBUG -g" # Additional debugging flags. +FULL_DEBUG_FLAGS="-D_GLIBCXX_DEBUG" # Additional debugging flags. +OPT_FLAGS=" -DNDEBUG -O2" # Additional optimization flags. + + +##NOTE: whereever CXXFLAGS is used, we need to also use CPPFLAGS, for the AC_CHECK_HEADERS - +## It now uses compile (primarily) but still uses pre-processor for interim transition / backward compatibility +## pre-processor needs the CPPFLAGS + + +####################################################################### +# Process additional search dirs if specified +AC_ARG_WITH(search-dir, + [ --with-search-dir=PATH Specify an additional directory to look for include/ and lib/ sub dirs ], + [ + if test "x$withval" != "xno" ; then + CXXFLAGS="$CXXFLAGS -I$withval/include" + CPPFLAGS="$CPPFLAGS -I$withval/include" + CFLAGS="$CFLAGS -I$withval/include" + LDFLAGS="$LDFLAGS -L$withval/lib" + fi + ] +) + +####################################################################### +interop_namespace="root/interop" +AC_ARG_WITH(interop-namespace, + [ --with-interop-namespace=NS Specifiy the namespace for INTEROP specific data. default = root/interop ], + [ + if test "x$withval" != "xno" ; then + interop_namespace="$withval" + fi + ] +) + +AC_DEFINE_UNQUOTED(INTEROP_NAMESPACE, "${interop_namespace}", "The namespace for INTEROP specific data") + +debuglevel="0" +####################################################################### +# Set the debug flag if specified +AC_ARG_ENABLE(debug-mode, + [--enable-debug-mode Enable debugging mode], + [ + debuglevel="1" + ] +) + +AC_ARG_WITH(debug-level, + [ --with-debug-level=LEVEL Specify a debug level valid values: 0=none 1=partial debug 2=full debug ], + [ + case "x$withval" in + x0|xno) + debuglevel="0";; + x1) + debuglevel="1";; + x2) + debuglevel="2";; + *) + AC_MSG_WARN("Invalid debug level specified. Valid values are 0, 1 or 2") + exit 1;; + esac + ] +) + +case $debuglevel in +1) + AC_DEFINE(SMASH_DEBUG, 1, "Debugging flag.") + CXXFLAGS="$CXXFLAGS $DEBUG_FLAGS -Wall" + CPPFLAGS="$CPPFLAGS $DEBUG_FLAGS -Wall" + CFLAGS=" $CFLAGS $DEBUG_FLAGS -Wall" + LDFLAGS=" $LDFLAGS $DEBUG_FLAGS";; +2) + AC_DEFINE(SMASH_DEBUG, 2, "Debugging flag.") + CXXFLAGS="$CXXFLAGS $DEBUG_FLAGS $FULL_DEBUG_FLAGS -Wall" + CPPFLAGS="$CPPFLAGS $DEBUG_FLAGS $FULL_DEBUG_FLAGS -Wall" + CFLAGS=" $CFLAGS $DEBUG_FLAGS $FULL_DEBUG_FLAGS -Wall" + LDFLAGS=" $LDFLAGS $DEBUG_FLAGS $FULL_DEBUG_FLAGS";; +*) + CXXFLAGS="$CXXFLAGS $OPT_FLAGS -Wall" + CPPFLAGS="$CPPFLAGS $OPT_FLAGS -Wall" + CFLAGS=" $CFLAGS $OPT_FLAGS -Wall" + LDFLAGS=" $LDFLAGS $OPT_FLAGS";; +esac + +##################################################### + +# Checks for libraries. +#AC_CHECK_LIB([owcimomcommon], [main],[LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +#AC_CHECK_LIB([owclient], [main],[LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +#AC_CHECK_LIB([owcppprovifc], [main],[LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +#AC_CHECK_LIB([owdb], [main],[LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +#AC_CHECK_LIB([owhttpclient], [main],[LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +#AC_CHECK_LIB([owhttpcommon], [main],[LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +#AC_CHECK_LIB([owhttpxmllistener], [main],[LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +#AC_CHECK_LIB([owprovider], [main],[LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +#AC_CHECK_LIB([owrepositoryhdb], [main],[LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +#AC_CHECK_LIB([owserver], [main],[LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +#AC_CHECK_LIB([owservicehttp], [main],[LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +#AC_CHECK_LIB([owwql], [main],[LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +#AC_CHECK_LIB([owwqlcommon], [main],[LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +#AC_CHECK_LIB([owxml], [main],[LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +#AC_CHECK_LIB([pthread], [main], [LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +#AC_CHECK_LIB([crypto], [main], [LIBS="$LIBS"], [AC_MSG_ERROR(Must have libcrypto \(openssl-devel\) or build will fail)]) + +# Checks for two basic and common openwbem libraries +AC_CHECK_LIB([owcimomcommon], [main],[LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) +AC_CHECK_LIB([owclient], [main], [LIBS="$LIBS"], [AC_MSG_ERROR(Must have openwbem-devel or build will fail)]) + + +LIMAL_RUNLEVEL_LIBS=`pkg-config --libs limal-runlevel` +AC_SUBST(LIMAL_RUNLEVEL_LIBS) + +# Checks for header files. +AC_HEADER_DIRENT +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS([openwbem/OW_config.h fcntl.h stdlib.h string.h unistd.h sys/time.h openssl/evp.h sys/param.h sys/vfs.h],,[AC_MSG_ERROR(Missing headers: likely won't compile)]) + +# Only build init.d provider if limal headers are present +AC_CHECK_HEADER([limal/runlevel/config.h],[HAVE_LIMAL_RUNLEVEL="1"],[HAVE_LIMAL_RUNLEVEL="0"]) +AM_CONDITIONAL(DO_INITD_PROVIDER, test "$HAVE_LIMAL_RUNLEVEL" = 1) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_CONST +AC_TYPE_PID_T +AC_TYPE_UID_T +AC_HEADER_TIME +AC_TYPE_MODE_T +AC_TYPE_SIGNAL +AC_TYPE_SIZE_T + +# Checks for library functions. +AC_FUNC_CLOSEDIR_VOID +AC_REPLACE_FNMATCH +AC_FUNC_FORK +AC_FUNC_LSTAT +AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK +AC_FUNC_MALLOC +AC_FUNC_REALLOC +AC_FUNC_CHOWN +AC_FUNC_SETVBUF_REVERSED +AC_FUNC_STAT +AC_FUNC_STRERROR_R + +AC_CHECK_FUNCS([gettimeofday memset regcomp strchr strdup strerror strstr strtol strtoul uname]) + +AC_CONFIG_FILES([Makefile + src/Makefile + src/lib/Makefile + src/lib/omc/Makefile + src/include/Makefile + src/include/omc/Makefile + src/providers/Makefile + src/providers/processes/Makefile + src/providers/operating-system/Makefile + src/providers/computer-system/Makefile + src/providers/posix-file-elements/Makefile + src/providers/file-system/Makefile + src/providers/time-service/Makefile + src/providers/initd/Makefile + src/providers/syslog/Makefile + src/providers/xml-service/Makefile + test/Makefile + test/unit/Makefile + ]) +AC_OUTPUT Added: branches/1.0/etc/openwbem.conf =================================================================== --- branches/1.0/etc/openwbem.conf (rev 0) +++ branches/1.0/etc/openwbem.conf 2006-11-01 17:58:02 UTC (rev 1) @@ -0,0 +1,15 @@ +################################################################################ +# A space-separated list of namespaces that the providers in +# openwbem-base-providers will explicitly register for. The openwbem-provider-base +# providers will always do non-explicit namespace registration for the +# classes they instrument. This option causes them to register explicitly for +# the specified namespaces. This option will typically be used to allow +# the openwbem-provider-base providers to instrument their classes in +# namespaces that have been specified in the +# owcimomd.explicit_registration_namespaces option in the openwbem.conf file. +# Example: +# omc.register_explicitly = root/smash root/openwbem/ipmi +;omc.register_explicitly = smash + + + Added: branches/1.0/install-sh =================================================================== --- branches/1.0/install-sh (rev 0) +++ branches/1.0/install-sh 2006-11-01 17:58:02 UTC (rev 1) @@ -0,0 +1,294 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd=$cpprog + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "$0: no input file specified" >&2 + exit 1 +else + : +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d "$dst" ]; then + instcmd=: + chmodcmd="" + else + instcmd=$mkdirprog + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f "$src" ] || [ -d "$src" ] + then + : + else + echo "$0: $src does not exist" >&2 + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "$0: no destination specified" >&2 + exit 1 + else + : + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d "$dst" ] + then + dst=$dst/`basename "$src"` + else + : + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' + ' +IFS="${IFS-$defaultIFS}" + +oIFS=$IFS +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS=$oIFS + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp=$pathcomp$1 + shift + + if [ ! -d "$pathcomp" ] ; + then + $mkdirprog "$pathcomp" + else + : + fi + + pathcomp=$pathcomp/ +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd "$dst" && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename "$dst"` + else + dstfile=`basename "$dst" $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename "$dst"` + else + : + fi + +# Make a couple of temp file names in the proper directory. + + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + +# Trap to clean up temp files at exit. + + trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 + trap '(exit $?); exit' 1 2 13 15 + +# Move or copy the file name to the temp name + + $doit $instcmd "$src" "$dsttmp" && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && + +# Now remove or move aside any old file at destination location. We try this +# two ways since rm can't unlink itself on some systems and the destination +# file might be busy for other reasons. In this case, the final cleanup +# might fail but the new file should still install successfully. + +{ + if [ -f "$dstdir/$dstfile" ] + then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || + $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || + { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit + } + else + : + fi +} && + +# Now rename the file to the real destination. + + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + +fi && + +# The final little trick to "correctly" pass the exit status to the exit trap. + +{ + (exit 0); exit +} Added: branches/1.0/src/Makefile.am =================================================================== --- branches/1.0/src/Makefile.am (rev 0) +++ branches/1.0/src/Makefile.am 2006-11-01 17:58:02 UTC (rev 1) @@ -0,0 +1,8 @@ + +AUTOMAKE_OPTIONS = gnu + +SUBDIRS = \ + lib \ + providers \ + include + Added: branches/1.0/src/include/Makefile.am =================================================================== --- branches/1.0/src/include/Makefile.am (rev 0) +++ branches/1.0/src/include/Makefile.am 2006-11-01 17:58:02 UTC (rev 1) @@ -0,0 +1 @@ +SUBDIRS = omc Added: branches/1.0/src/include/omc/Base.hpp =================================================================== --- branches/1.0/src/include/omc/Base.hpp (rev 0) +++ branches/1.0/src/include/omc/Base.hpp 2006-11-01 17:58:02 UTC (rev 1) @@ -0,0 +1,141 @@ +/******************************************************************************* +* Copyright (C) 2005, 2006 Novell, Inc. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. +* +* - Redistributions in binary form must reproduce the above copyright notice, +* this list of conditions and the following disclaimer in the documentation +* and/or other materials provided with the distribution. +* +* - Neither the name of Novell, Inc. nor the names of its +* contributors may be used to endorse or promote products derived from this +* software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL Novell, Inc. OR THE CONTRIBUTORS +* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +* POSSIBILITY OF SUCH DAMAGE. +******************************************************************************/ + +// Author: Jon Carey (jc...@no...) + +#ifndef __LINUX_COMMON_HPP__ +#define __LINUX_COMMON_HPP__ + +#include <openwbem/OW_String.hpp> +#include <openwbem/OW_CIMDateTime.hpp> +#include <openwbem/OW_CIMObjectPath.hpp> + +namespace OMC +{ + +/** + * Get the class name that represents the operating system + * @return A string that contains the class name that should be used + * in OSCreationClassName properties. + */ +OpenWBEM::String getOperatingSystemClassName(); + +/** + * Get the class name that represents the ComputerSystem. + * @return A string that contains the class name that should be used + * in CSCreationClassName properties. + */ +OpenWBEM::String getComputerSystemClassName(); + +/** + * Get the common value used for the computer system. + * @return A string that contains the computer system name. To be + * used in values of the CSName property. + */ +OpenWBEM::String getComputerSystemName(); + +/** + * Get the object path of the OMC_UnitaryComputerSystem + * object. + * @param ns The name space for the object. + * @return The object path for the computer system object. + */ +OpenWBEM::CIMObjectPath getComputerSystemObjectPath( + const OpenWBEM::String& ns); + + +/** + * Get the object path of the OMC_OperatingSystem + * object. + * @param ns The name space for the object. + * @return The object path for the computer system object. + */ +OpenWBEM::CIMObjectPath getOperatingSystemObjectPath( + const OpenWBEM::String& ns); + + +/** + * Determine if an object path points to the computer + * system object path. + * @param ns The namespace we're checking for. + * @param cop The object path to check. + * @return true if the object path points to the computer + * system object. Otherwise false. + */ +bool isComputerSystemObjectPath( + const OpenWBEM::String& ns, + const OpenWBEM::CIMObjectPath& cop); + +/** + * Get the common value used for the operating system. + * @return A string that contains the OS name. To be used in values + * of the OSName property. + */ +OpenWBEM::String getOperatingSystemName(); + +/** + * Generate an instance id that has a prefix that is consistent + * with all instance IDs used as keys for various NIM classes. + * This would typically be used by providers of sub-classes + * of CIM_SettingData, but it's use is not restricted to this. + * The instance id will take the form of novell:suse:<uniquepart> + * where uniquepart is provided by the caller. + * @parm uniqueParm The unique part of the final instance id. + * @return The instance id that will be used for a key value. + */ +OpenWBEM::String makeInstanceID(const OpenWBEM::String& uniquePart); + +/** + * Get the install date of an RPM as a CIMDateTime. + * @param rpmName The name of the rpm to get the install date for. + * @param pExitStatus If specified, the exit status of the RPM + * command will be stored here. + * @return A CIMDateTime object that represents the install date + * of the given rpm on success. Otherwise a NULL CIMDateTime + * object will be returned. + */ +OpenWBEM::CIMDateTime getRPMInstallDate( + const OpenWBEM::String& rpmName, + int *pExitStatus=NULL); + + + +/** + * Get the name of the interop namespace + * @return A string that contains the name of the interop namespace + * + */ +OpenWBEM::String getInteropNamespaceName(); + +#define OMC_REG_PROV_EXPLICITLY_opt "omc.register_explicitly" + +} // End of namespace OMC + +#endif // __LINUX_COMMON_HPP__ Added: branches/1.0/src/include/omc/CIMUtils.hpp =================================================================== --- branches/1.0/src/include/omc/CIMUtils.hpp (rev 0) +++ branches/1.0/src/include/omc/CIMUtils.hpp 2006-11-01 17:58:02 UTC (rev 1) @@ -0,0 +1,116 @@ +/******************************************************************************* +* Copyright (C) 2005, 2006 Novell, Inc. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. +* +* - Redistributions in binary form must reproduce the above copyright notice, +* this list of conditions and the following disclaimer in the documentation +* and/or other materials provided with the distribution. +* +* - Neither the name of Novell, Inc. nor the names of its +* contributors may be used to endorse or promote products derived from this +* software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL Novell, Inc. OR THE CONTRIBUTORS +* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +* POSSIBILITY OF SUCH DAMAGE. +*******************************************************************************/ +#ifndef __CIMUTILS_HPP__ +#define __CIMUTILS_HPP__ + +#include <openwbem/OW_config.h> +#include <openwbem/OW_CIMFwd.hpp> +#include <openwbem/OW_String.hpp> +#include <openwbem/OW_CIMOMHandleIFC.hpp> +#include <openwbem/OW_CIMObjectPath.hpp> +#include <openwbem/OW_CIMInstance.hpp> + +namespace OMC +{ + +class CIMUtils +{ +public: + + static bool classIsDerivedFrom( + const OpenWBEM::String& derived, + const OpenWBEM::String& super, + OpenWBEM::CIMOMHandleIFCRef lch, + const OpenWBEM::String& ns); + + /** + * Get the specified string key value from the given + * object path. + * @param op The object path to get the string value from. + * @param propertyName The name of the property to get the + * value for. + * @return A String object that contains the property value. + * If the property doesn't exist or isn't a String + * data type, the returned String object will be empty. + */ + static OpenWBEM::String getStringKey( + const OpenWBEM::CIMObjectPath& op, + const OpenWBEM::String& propertyName); + + /** + * Get the specified object path key value from the given + * object path. + * @param op The object path to get the key value from. + * @param propertyName The name of the property to get the + * value for. + * @return A CIMObjectPath object that contains the property value. + * If the property doesn't exist or isn't a String + * data type, the returned CIMObjectPath will be NULL. + */ + static OpenWBEM::CIMObjectPath getObjectPathKey( + const OpenWBEM::CIMObjectPath& op, + const OpenWBEM::String& propertyName); + + /** + * Get the string value from the specified property of a given + * CIM_Instance object.. + * @param inst The instance to get the property from. + * @param propName The name of the property to get the value for. + * @param throwIfAbsent Throw an invalid parm if prop not there. + * @return A String object that contains the property value. + * If the property doesn't exist or isn't a String + * data type, the returned String object will be empty. + */ + static OpenWBEM::String getStringProp( + const OpenWBEM::CIMInstance& inst, + const OpenWBEM::String& propName, + bool throwIfAbsent=false); + + /** + * Get the boolean value from the specified property of a given + * CIM_Instance object.. + * @param inst The instance to get the property from. + * @param propName The name of the property to get the value for. + * @param throwIfAbsent Throw an invalid parm if prop not there. + * @return A boolean value that represents the property value. + * If the property doesn't exist or isn't a bool, then + * false will be returned. + */ + static bool getBoolProp( + const OpenWBEM::CIMInstance& inst, + const OpenWBEM::String& propName, + bool defaultValue=false, + bool throwIfAbsent=false); +}; + +} // End of namespace OMC + +#endif // __CIMUTILS_HPP__ + Added: branches/1.0/src/include/omc/FileDefs.hpp =================================================================== --- branches/1.0/src/include/omc/FileDefs.hpp (rev 0) +++ branches/1.0/src/include/omc/FileDefs.hpp 2006-11-01 17:58:02 UTC (rev 1) @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright (C) 2005, 2006 Novell, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * - Neither the name of Novell, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL Novell, Inc. OR THE CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************/ + +/** + * @author Bart Whiteley + */ + +#ifndef _FILE_DEFS_HPP_INCLUDE_GUARD_ +#define _FILE_DEFS_HPP_INCLUDE_GUARD_ + +#define BADORMISSINGSTR(arg) "Bad or Missing \""arg"\" Parameter" + +namespace OMC +{ +namespace FileDefs +{ + typedef const char* const sccc; + + //static sccc extern_filetool = DEFAULT_LIBEXEC_DIR"/life/lifefiletool"; + + static sccc Mount_class = "OMC_LinuxMount"; + static sccc FileStorage_class = "OMC_LinuxFileStorage"; + static sccc BootOSFromFS_class = "OMC_LinuxBootOSFromFS"; + static sccc HostedFileSystem_class = "OMC_LinuxHostedFileSystem"; + static sccc NFS_class = "OMC_LinuxNFS"; + static sccc ReiserFS_class = "OMC_LinuxReiserFileSystem"; + static sccc Ext3_class = "OMC_LinuxExt3FileSystem"; + static sccc Ext2_class = "OMC_LinuxExt2FileSystem"; + + static sccc DataFile_class = "OMC_LinuxDataFile"; + static sccc BlockDeviceFile_class = "OMC_LinuxBlockDeviceFile"; + static sccc CharacterDeviceFile_class = "OMC_LinuxCharacterDeviceFile"; + static sccc SymbolicLink_class = "OMC_LinuxSymbolicLink"; + static sccc Directory_class = "OMC_LinuxDirectory"; + static sccc FIFO_class = "OMC_LinuxFIFOPipeFile"; + static sccc UnixFile_class = "OMC_LinuxFile"; + static sccc DirectoryContainsFile_class = "OMC_LinuxDirectoryContainsFile"; + static sccc FileIdentity_class = "OMC_LinuxFileIdentity"; +} +} + +#endif // #ifndef _FILE_DEFS_HPP_INCLUDE_GUARD_ Added: branches/1.0/src/include/omc/FileFilter.hpp =================================================================== --- branches/1.0/src/include/omc/FileFilter.hpp (rev 0) +++ branches/1.0/src/include/omc/FileFilter.hpp 2006-11-01 17:58:02 UTC (rev 1) @@ -0,0 +1,173 @@ +/******************************************************************************* +* Copyright (C) 2005, 2006 Novell, Inc. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. +* +* - Redistributions in binary form must reproduce the above copyright notice, +* this list of conditions and the following disclaimer in the documentation +* and/or other materials provided with the distribution. +* +* - Neither the name of Novell, Inc. nor the names of its +* contributors may be used to endorse or promote products derived from this +* ... [truncated message content] |