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

 1 mike  1.4 //%/////////////////////////////////////////////////////////////////////////////
 2 mike  1.1 //
 3           // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM
 4           //
 5           // Permission is hereby granted, free of charge, to any person obtaining a
 6           // copy of this software and associated documentation files (the "Software"),
 7           // to deal in the Software without restriction, including without limitation
 8           // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 9           // and/or sell copies of the Software, and to permit persons to whom the
10           // Software is furnished to do so, subject to the following conditions:
11           //
12           // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13           // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14           // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
15           // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16           // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17           // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18           // DEALINGS IN THE SOFTWARE.
19           //
20 mike  1.4 //==============================================================================
21 mike  1.1 //
22 mike  1.4 // Author: Mike Brasher (mbrasher@bmc.com)
23 mike  1.1 //
24 mike  1.4 // Modified By:
25 mike  1.2 //
26 mike  1.4 //%/////////////////////////////////////////////////////////////////////////////
27 mike  1.1 
28           #ifndef Pegasus_System_h
29           #define Pegasus_System_h
30           
31           #include <Pegasus/Common/Config.h>
32           
33           PEGASUS_NAMESPACE_BEGIN
34           
35 mike  1.3 /** This is an opaque type which is used to represent dynamic library
36               handles returned by the System::loadDynamicLibrary() method and
37               accepted by the System::loadDynamicProcedure() method.
38           */
39           typedef struct DynamicLibraryHandle_* DynamicLibraryHandle;
40           
41           /** This is an opaque type which is returned by System::loadDynamicSymbol().
42               Values of this type may be casted to the appropriate target type.
43           */
44           typedef struct DynamicSymbolHandle_* DynamicSymbolHandle;
45               
46           
47 mike  1.1 /** The System class defines wrappers for operating system related calls.
48               These are only placed here if they are extremely light. These are
49               usually just direct wrappers which map more or less one to one to the
50               underlying function.
51           */
52           class PEGASUS_COMMON_LINKAGE System
53           {
54           public:
55           
56               static void getCurrentTime(Uint32& seconds, Uint32& milliseconds);
57           
58               static void sleep(Uint32 seconds);
59 mike  1.2 
60               static Boolean exists(const char* path);
61           
62               static Boolean canRead(const char* path);
63           
64               static Boolean canWrite(const char* path);
65           
66               static Boolean getCurrentDirectory(char* path, Uint32 size);
67           
68               static Boolean isDirectory(const char* path);
69           
70               static Boolean changeDirectory(const char* path);
71           
72               static Boolean makeDirectory(const char* path);
73           
74               static Boolean getFileSize(const char* path, Uint32& size);
75           
76               static Boolean removeDirectory(const char* path);
77           
78               static Boolean removeFile(const char* path);
79           
80 mike  1.2     static Boolean renameFile(const char* oldPath, const char* newPath);
81 mike  1.3 
82               static DynamicLibraryHandle loadDynamicLibrary(const char* fileName);
83           
84               static DynamicSymbolHandle loadDynamicSymbol(
85           	DynamicLibraryHandle libraryHandle,
86           	const char* symbolName);
87 mike  1.1 };
88           
89           PEGASUS_NAMESPACE_END
90           
91           #endif /* Pegasus_System_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2