remove non-UTF8 Windows platform support

This commit is contained in:
Günter Obiltschnig
2020-02-14 09:52:50 +01:00
parent 76012717b0
commit 4f59aef815
25 changed files with 1 additions and 2785 deletions

View File

@@ -1,73 +0,0 @@
//
// DirectoryIterator_WIN32.h
//
// Library: Foundation
// Package: Filesystem
// Module: DirectoryIterator
//
// Definition of the DirectoryIteratorImpl class for WIN32.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_DirectoryIterator_WIN32_INCLUDED
#define Foundation_DirectoryIterator_WIN32_INCLUDED
#include "Poco/Foundation.h"
#include "Poco/UnWindows.h"
namespace Poco {
class Foundation_API DirectoryIteratorImpl
{
public:
DirectoryIteratorImpl(const std::string& path);
~DirectoryIteratorImpl();
void duplicate();
void release();
const std::string& get() const;
const std::string& next();
private:
HANDLE _fh;
WIN32_FIND_DATA _fd;
std::string _current;
int _rc;
};
//
// inlines
//
const std::string& DirectoryIteratorImpl::get() const
{
return _current;
}
inline void DirectoryIteratorImpl::duplicate()
{
++_rc;
}
inline void DirectoryIteratorImpl::release()
{
if (--_rc == 0)
delete this;
}
} // namespace Poco
#endif // Foundation_DirectoryIterator_WIN32_INCLUDED

View File

@@ -1,48 +0,0 @@
//
// Environment_WIN32.h
//
// Library: Foundation
// Package: Core
// Module: Environment
//
// Definition of the EnvironmentImpl class for WIN32.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_Environment_WIN32_INCLUDED
#define Foundation_Environment_WIN32_INCLUDED
#include "Poco/Foundation.h"
namespace Poco {
class Foundation_API EnvironmentImpl
{
public:
typedef UInt8 NodeId[6]; /// Ethernet address.
static std::string getImpl(const std::string& name);
static bool hasImpl(const std::string& name);
static void setImpl(const std::string& name, const std::string& value);
static std::string osNameImpl();
static std::string osDisplayNameImpl();
static std::string osVersionImpl();
static std::string osArchitectureImpl();
static std::string nodeNameImpl();
static void nodeIdImpl(NodeId& id);
static unsigned processorCountImpl();
};
} // namespace Poco
#endif // Foundation_Environment_WIN32_INCLUDED

View File

@@ -1,92 +0,0 @@
//
// File_WIN32.h
//
// Library: Foundation
// Package: Filesystem
// Module: File
//
// Definition of the FileImpl class for WIN32.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_File_WIN32_INCLUDED
#define Foundation_File_WIN32_INCLUDED
#include "Poco/Foundation.h"
#include "Poco/Timestamp.h"
namespace Poco {
class Foundation_API FileImpl
{
protected:
enum Options
{
OPT_FAIL_ON_OVERWRITE_IMPL = 0x01
};
typedef UInt64 FileSizeImpl;
FileImpl();
FileImpl(const std::string& path);
virtual ~FileImpl();
void swapImpl(FileImpl& file);
void setPathImpl(const std::string& path);
const std::string& getPathImpl() const;
bool existsImpl() const;
bool canReadImpl() const;
bool canWriteImpl() const;
bool canExecuteImpl() const;
bool isFileImpl() const;
bool isDirectoryImpl() const;
bool isLinkImpl() const;
bool isDeviceImpl() const;
bool isHiddenImpl() const;
Timestamp createdImpl() const;
Timestamp getLastModifiedImpl() const;
void setLastModifiedImpl(const Timestamp& ts);
FileSizeImpl getSizeImpl() const;
void setSizeImpl(FileSizeImpl size);
void setWriteableImpl(bool flag = true);
void setExecutableImpl(bool flag = true);
void copyToImpl(const std::string& path, int options = 0) const;
void renameToImpl(const std::string& path, int options = 0);
void linkToImpl(const std::string& path, int type) const;
void removeImpl();
bool createFileImpl();
bool createDirectoryImpl();
FileSizeImpl totalSpaceImpl() const;
FileSizeImpl usableSpaceImpl() const;
FileSizeImpl freeSpaceImpl() const;
static void handleLastErrorImpl(const std::string& path);
private:
std::string _path;
friend class FileHandle;
friend class DirectoryIteratorImpl;
friend class WindowsDirectoryWatcherStrategy;
};
//
// inlines
//
inline const std::string& FileImpl::getPathImpl() const
{
return _path;
}
} // namespace Poco
#endif // Foundation_File_WIN32_INCLUDED

View File

@@ -1,54 +0,0 @@
//
// LogFile_WIN32.h
//
// Library: Foundation
// Package: Logging
// Module: LogFile
//
// Definition of the LogFileImpl class using the Windows file APIs.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_LogFile_WIN32_INCLUDED
#define Foundation_LogFile_WIN32_INCLUDED
#include "Poco/Foundation.h"
#include "Poco/Timestamp.h"
#include "Poco/UnWindows.h"
namespace Poco {
class Foundation_API LogFileImpl
/// The implementation of LogFile for Windows.
/// The native filesystem APIs are used for
/// total control over locking behavior.
{
public:
LogFileImpl(const std::string& path);
~LogFileImpl();
void writeImpl(const std::string& text, bool flush);
UInt64 sizeImpl() const;
Timestamp creationDateImpl() const;
const std::string& pathImpl() const;
private:
void createFile();
std::string _path;
HANDLE _hFile;
Timestamp _creationDate;
};
} // namespace Poco
#endif // Foundation_LogFile_WIN32_INCLUDED

View File

@@ -1,45 +0,0 @@
//
// NamedEvent_WIN32.h
//
// Library: Foundation
// Package: Processes
// Module: NamedEvent
//
// Definition of the NamedEventImpl class for Windows.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_NamedEvent_WIN32_INCLUDED
#define Foundation_NamedEvent_WIN32_INCLUDED
#include "Poco/Foundation.h"
#include "Poco/UnWindows.h"
namespace Poco {
class Foundation_API NamedEventImpl
{
protected:
NamedEventImpl(const std::string& name);
~NamedEventImpl();
void setImpl();
void waitImpl();
private:
std::string _name;
HANDLE _event;
};
} // namespace Poco
#endif // Foundation_NamedEvent_WIN32_INCLUDED

View File

@@ -1,46 +0,0 @@
//
// NamedMutex_WIN32.h
//
// Library: Foundation
// Package: Processes
// Module: NamedMutex
//
// Definition of the NamedMutexImpl class for Windows.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_NamedMutex_WIN32_INCLUDED
#define Foundation_NamedMutex_WIN32_INCLUDED
#include "Poco/Foundation.h"
#include "Poco/UnWindows.h"
namespace Poco {
class Foundation_API NamedMutexImpl
{
protected:
NamedMutexImpl(const std::string& name);
~NamedMutexImpl();
void lockImpl();
bool tryLockImpl();
void unlockImpl();
private:
std::string _name;
HANDLE _mutex;
};
} // namespace Poco
#endif // Foundation_NamedMutex_WIN32_INCLUDED

View File

@@ -1,49 +0,0 @@
//
// Path_WIN32.h
//
// Library: Foundation
// Package: Filesystem
// Module: Path
//
// Definition of the PathImpl class for WIN32.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_Path_WIN32_INCLUDED
#define Foundation_Path_WIN32_INCLUDED
#include "Poco/Foundation.h"
#include <vector>
namespace Poco {
class Foundation_API PathImpl
{
public:
static std::string currentImpl();
static std::string homeImpl();
static std::string configHomeImpl();
static std::string dataHomeImpl();
static std::string cacheHomeImpl();
static std::string tempHomeImpl();
static std::string tempImpl();
static std::string configImpl();
static std::string nullImpl();
static std::string systemImpl();
static std::string expandImpl(const std::string& path);
static void listRootsImpl(std::vector<std::string>& roots);
};
} // namespace Poco
#endif // Foundation_Path_WIN32_INCLUDED

View File

@@ -1,84 +0,0 @@
//
// Process_WIN32.h
//
// Library: Foundation
// Package: Processes
// Module: Process
//
// Definition of the ProcessImpl class for WIN32.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_Process_WIN32_INCLUDED
#define Foundation_Process_WIN32_INCLUDED
#include "Poco/Foundation.h"
#include "Poco/RefCountedObject.h"
#include <vector>
#include <map>
#include "Poco/UnWindows.h"
namespace Poco {
class Pipe;
class Foundation_API ProcessHandleImpl: public RefCountedObject
{
public:
ProcessHandleImpl(HANDLE _hProcess, UInt32 pid);
~ProcessHandleImpl();
UInt32 id() const;
HANDLE process() const;
int wait() const;
int tryWait() const;
void closeHandle();
private:
HANDLE _hProcess;
UInt32 _pid;
ProcessHandleImpl(const ProcessHandleImpl&);
ProcessHandleImpl& operator = (const ProcessHandleImpl&);
};
class Foundation_API ProcessImpl
{
public:
typedef UInt32 PIDImpl;
typedef std::vector<std::string> ArgsImpl;
typedef std::map<std::string, std::string> EnvImpl;
static PIDImpl idImpl();
static void timesImpl(long& userTime, long& kernelTime);
static ProcessHandleImpl* launchImpl(
const std::string& command,
const ArgsImpl& args,
const std::string& initialDirectory,
Pipe* inPipe,
Pipe* outPipe,
Pipe* errPipe,
const EnvImpl& env);
static void killImpl(ProcessHandleImpl& handle);
static void killImpl(PIDImpl pid);
static bool isRunningImpl(const ProcessHandleImpl& handle);
static bool isRunningImpl(PIDImpl pid);
static void requestTerminationImpl(PIDImpl pid);
static std::string terminationEventName(PIDImpl pid);
};
} // namespace Poco
#endif // Foundation_Process_WIN32_INCLUDED

View File

@@ -1,51 +0,0 @@
//
// SharedLibrary_WIN32.h
//
// Library: Foundation
// Package: SharedLibrary
// Module: SharedLibrary
//
// Definition of the SharedLibraryImpl class for Win32.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_SharedLibrary_WIN32_INCLUDED
#define Foundation_SharedLibrary_WIN32_INCLUDED
#include "Poco/Foundation.h"
#include "Poco/Mutex.h"
namespace Poco {
class Foundation_API SharedLibraryImpl
{
protected:
SharedLibraryImpl();
~SharedLibraryImpl();
void loadImpl(const std::string& path, int flags);
void unloadImpl();
bool isLoadedImpl() const;
void* findSymbolImpl(const std::string& name);
const std::string& getPathImpl() const;
static std::string suffixImpl();
static bool setSearchPathImpl(const std::string& path);
private:
std::string _path;
void* _handle;
static FastMutex _mutex;
};
} // namespace Poco
#endif // Foundation_SharedLibrary_WIN32_INCLUDED