(file) Return to SystemNsk.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

File: [Pegasus] / pegasus / src / Pegasus / Common / Attic / SystemNsk.cpp (download)
Revision: 1.23, Wed Aug 9 20:12:42 2006 UTC (17 years, 10 months ago) by mike
Branch: MAIN
CVS Tags: TASK-PEP362_RestfulService-merged_out_from_trunk, TASK-PEP348_SCMO-merged_out_from_trunk, TASK-PEP317_pullop-merged_out_from_trunk, TASK-PEP317_pullop-merged_in_to_trunk, TASK-PEP311_WSMan-root, TASK-PEP311_WSMan-branch, HPUX_TEST, HEAD
Changes since 1.22: +0 -0 lines
FILE REMOVED
BUG#: 5314
TITLE: IPC Refactoring

DESCRIPTION: This patch cleans up the IPC related classes. It (1) reorganizes
related classes into their own headers, (2) makes the mutex class recursive to
eliminate recursive lock exclusion logic, (3) reimplements condition variables,
renames dozens of global functions.

//%2006////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
// IBM Corp.; EMC Corporation, The Open Group.
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
// EMC Corporation; VERITAS Software Corporation; The Open Group.
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
// EMC Corporation; Symantec Corporation; The Open Group.
//
// 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 AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//==============================================================================
//
//   FILE       SystemNsk.cpp
//
//   PURPOSE    System NSK dummy class to satisfy the PEGASUS Code.
//
//   REVISION HISTORY
//
//   Date      Release   Revisor           Revision
//   04NOV01   1         Rudy Schuet       Initial creation
//   16NOV01   1         Nag Boranna       Added get login name function
//   13MAR03   2.2       Dave Rosckes      Added syslog stubs.
//   
//
// ***************************************************************************
//                                                                             

#include <cextdecs.h(NODENUMBER_TO_NODENAME_)>

PEGASUS_NAMESPACE_BEGIN

void System::getCurrentTime(Uint32& seconds, Uint32& milliseconds) {}
String System::getCurrentASCIITime() { return String(); }
void System::sleep(Uint32 seconds) {}
Boolean System::exists(const char* path) { return false; }
Boolean System::canRead(const char* path) { return false; }
Boolean System::getCurrentDirectory(char* path, Uint32 size) { return false; }
Boolean System::isDirectory(const char* path) { return false; }
Boolean System::changeDirectory(const char* path) { return false; }
Boolean System::makeDirectory(const char* path) { return false; }
Boolean System::getFileSize(const char* path, Uint32& size) { return false; }
Boolean System::removeDirectory(const char* path) { return false; }
Boolean System::removeFile(const char* path) { return false; }
Boolean System::renameFile(const char* oldPath, const char* newPath) 
    { return false; }
DynamicLibraryHandle System::loadDynamicLibrary(const char* fileName) 
    { return DynamicLibraryHandle (); }
void System::unloadDynamicLibrary(DynamicLibraryHandle libraryHandle) {}
String System::dynamicLoadError() { return String(); }

DynamicSymbolHandle System::loadDynamicSymbol(
     DynamicLibraryHandle libraryHandle,
     const char* symbolName)
  { return DynamicSymbolHandle(); }

String System::getHostName() 
{
  char node[10];
  short nodelen, ret;
  ret = NODENUMBER_TO_NODENAME_(,node,8,&nodelen);
  if (!ret) {
    node[nodelen] = 0;
    return String (&node[1]); }   // skip back slash
  else return String();                           
} 

String System::getFullyQualifiedHostName ()
{
    //
    //  ATTN: Implement this method to return the fully qualified host name
    //
    return String::EMPTY;
}

String System::getSystemCreationClassName ()
{
    //
    //  ATTN: Implement this method to return the system creation class name
    //
    return String::EMPTY;
}

Uint32 System::lookupPort(
    const char * serviceName,
    Uint32 defaultPort)
{
    return defaultPort;
}

String System::getPassword(const char* prompt)
{
    //ATTN: Implement this method to get password from User with no echo
    //      This is used in cimuser CLI
    String password("dummy");

    return password;
}

String System::getEffectiveUserName() { return String(); }

String System::encryptPassword(const char* password, const char* salt)
{
    // ATTN: Implement this method to encrypt the password
    //       This is used in User Manager
    return (String("dummy"));
}

Boolean System::isSystemUser(const char* userName)
{
    // ATTN: Implement this method to verify if user is vaild 
    //       on the local system
    //       This is used in User Manager
    return true;
}

Boolean System::isPrivilegedUser(const String& userName)
{
    // ATTN: Implement this method to verify if user executing the current
    //       command is a priviliged user, when user name is not passed as
    //       as argument. If user name is passed the function checks
    //       whether the given user is a priviliged user.
    //       This is used in cimuser CLI and CIMOperationRequestAuthorizer
    return true;
}

String System::getPrivilegedUserName()
{
    // ATTN-NB-03-20000304: Implement code to get the privileged
    // user on the system.

    return (String(""));
}

Boolean System::isGroupMember(const char* userName, const char* groupName)
{
    //ATTN: Implement this method to verify that the user name
    //      is a member of the group
    return true;
}

Boolean System::lookupUserId(
    const char* userName,
    PEGASUS_UID_T& uid,
    PEGASUS_GID_T& gid)
{
    // ATTN: Implement this method to look up the specified user
    return false;
}

Boolean System::changeUserContext(
    const PEGASUS_UID_T& uid,
    const PEGASUS_GID_T& gid)
{
    // ATTN: Implement this method to change the process user context to the
    //       specified user
    return false;
}

Uint32 System::getPID()
{
    // ATTN: Implement this to get the process ID of the current process
    //       This is used by the Tracer
    return 0;
}

// Changes file permissions on the given file.
Boolean System::changeFilePermissions(const char* path, mode_t mode)
{
    // ATTN: File permissions are not currently defined in Nsk
    return true;
}

Boolean System::verifyFileOwnership(const char* path)
{
    // ATTN: Implement this to check that the owner of the specified file is
    //       the same as the effective user for this process.
    return true;
}

void System::syslog(const String& ident, Uint32 severity, const char* message)
{
    // Not implemented
}

// System ID constants for Logger::put and Logger::trace
const String System::CIMSERVER = "cimserver";  // Server system ID
    
PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2