mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 19:51:58 +01:00
changes from main repository
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// AbstractDelegate.h
|
||||
//
|
||||
// $Id: //poco/svn/Foundation/include/Poco/AbstractDelegate.h#2 $
|
||||
// $Id: //poco/svn/Foundation/include/Poco/AbstractDelegate.h#3 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Events
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// ExpireStrategy.h
|
||||
//
|
||||
// $Id: //poco/svn/Foundation/include/Poco/ExpireStrategy.h#2 $
|
||||
// $Id: //poco/svn/Foundation/include/Poco/ExpireStrategy.h#3 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Cache
|
||||
@@ -122,6 +122,8 @@ public:
|
||||
args.invalidate();
|
||||
}
|
||||
}
|
||||
else //not found: probably removed by onReplace
|
||||
args.invalidate();
|
||||
}
|
||||
|
||||
void onReplace(const void*, std::set<TKey>& elemsToRemove)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// File_UNIX.h
|
||||
//
|
||||
// $Id: //poco/svn/Foundation/include/Poco/File_UNIX.h#2 $
|
||||
// $Id: //poco/svn/Foundation/include/Poco/File_UNIX.h#3 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Filesystem
|
||||
@@ -63,8 +63,8 @@ protected:
|
||||
bool canExecuteImpl() const;
|
||||
bool isFileImpl() const;
|
||||
bool isDirectoryImpl() const;
|
||||
bool isHiddenImpl() const;
|
||||
bool isLinkImpl() const;
|
||||
bool isHiddenImpl() const;
|
||||
Timestamp createdImpl() const;
|
||||
Timestamp getLastModifiedImpl() const;
|
||||
void setLastModifiedImpl(const Timestamp& ts);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// File_VMS.h
|
||||
//
|
||||
// $Id: //poco/svn/Foundation/include/Poco/File_VMS.h#2 $
|
||||
// $Id: //poco/svn/Foundation/include/Poco/File_VMS.h#3 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Filesystem
|
||||
@@ -65,6 +65,7 @@ protected:
|
||||
bool isFileImpl() const;
|
||||
bool isDirectoryImpl() const;
|
||||
bool isLinkImpl() const;
|
||||
bool isHiddenImpl() const;
|
||||
Timestamp createdImpl() const;
|
||||
Timestamp getLastModifiedImpl() const;
|
||||
void setLastModifiedImpl(const Timestamp& ts);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// File_WIN32.h
|
||||
//
|
||||
// $Id: //poco/svn/Foundation/include/Poco/File_WIN32.h#2 $
|
||||
// $Id: //poco/svn/Foundation/include/Poco/File_WIN32.h#3 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Filesystem
|
||||
@@ -65,6 +65,7 @@ protected:
|
||||
bool isFileImpl() const;
|
||||
bool isDirectoryImpl() const;
|
||||
bool isLinkImpl() const;
|
||||
bool isHiddenImpl() const;
|
||||
Timestamp createdImpl() const;
|
||||
Timestamp getLastModifiedImpl() const;
|
||||
void setLastModifiedImpl(const Timestamp& ts);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// File_WIN32U.h
|
||||
//
|
||||
// $Id: //poco/svn/Foundation/include/Poco/File_WIN32U.h#2 $
|
||||
// $Id: //poco/svn/Foundation/include/Poco/File_WIN32U.h#3 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Filesystem
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// HashFunction.h
|
||||
//
|
||||
// $Id: //poco/svn/Foundation/include/Poco/HashFunction.h#2 $
|
||||
// $Id: //poco/svn/Foundation/include/Poco/HashFunction.h#3 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Hashing
|
||||
@@ -60,6 +60,19 @@ struct HashFunction
|
||||
};
|
||||
|
||||
|
||||
//@ deprecated
|
||||
template <>
|
||||
struct HashFunction<std::string>
|
||||
/// A generic hash function.
|
||||
{
|
||||
UInt32 operator () (const std::string& key, UInt32 maxValue) const
|
||||
/// Returns the hash value for the given key.
|
||||
{
|
||||
return ((UInt32) hash(key)) % maxValue;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// URIStreamFactory.h
|
||||
//
|
||||
// $Id: //poco/svn/Foundation/include/Poco/URIStreamFactory.h#2 $
|
||||
// $Id: //poco/svn/Foundation/include/Poco/URIStreamFactory.h#3 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: URI
|
||||
@@ -66,6 +66,9 @@ public:
|
||||
///
|
||||
/// If the stream cannot be opened for whatever reason,
|
||||
/// an appropriate IOException must be thrown.
|
||||
///
|
||||
/// If opening the stream results in a redirect, a
|
||||
/// URIRedirection exception should be thrown.
|
||||
|
||||
protected:
|
||||
virtual ~URIStreamFactory();
|
||||
@@ -79,6 +82,37 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class Foundation_API URIRedirection
|
||||
/// An instance of URIRedirection is thrown by a URIStreamFactory::open()
|
||||
/// if opening the original URI resulted in a redirection response
|
||||
/// (such as a MOVED PERMANENTLY in HTTP).
|
||||
{
|
||||
public:
|
||||
URIRedirection(const std::string& uri);
|
||||
URIRedirection(const URIRedirection& redir);
|
||||
|
||||
URIRedirection& operator = (const URIRedirection& redir);
|
||||
void swap(URIRedirection& redir);
|
||||
|
||||
const std::string& uri() const;
|
||||
/// Returns the new URI.
|
||||
|
||||
private:
|
||||
URIRedirection();
|
||||
|
||||
std::string _uri;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline const std::string& URIRedirection::uri() const
|
||||
{
|
||||
return _uri;
|
||||
}
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// URIStreamOpener.h
|
||||
//
|
||||
// $Id: //poco/svn/Foundation/include/Poco/URIStreamOpener.h#2 $
|
||||
// $Id: //poco/svn/Foundation/include/Poco/URIStreamOpener.h#3 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: URI
|
||||
@@ -62,6 +62,11 @@ class Foundation_API URIStreamOpener
|
||||
/// A FileStreamFactory is automatically registered for file URIs.
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
MAX_REDIRECTS = 10
|
||||
};
|
||||
|
||||
URIStreamOpener();
|
||||
/// Creates the URIStreamOpener and registers a FileStreamFactory
|
||||
/// for file URIs.
|
||||
@@ -133,6 +138,7 @@ public:
|
||||
|
||||
protected:
|
||||
std::istream* openFile(const Path& path) const;
|
||||
std::istream* openURI(const std::string& scheme, const URI& uri) const;
|
||||
|
||||
private:
|
||||
URIStreamOpener(const URIStreamOpener&);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// UniqueAccessExpireStrategy.h
|
||||
//
|
||||
// $Id: //poco/svn/Foundation/include/Poco/UniqueAccessExpireStrategy.h#2 $
|
||||
// $Id: //poco/svn/Foundation/include/Poco/UniqueAccessExpireStrategy.h#3 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Cache
|
||||
@@ -149,6 +149,8 @@ public:
|
||||
args.invalidate();
|
||||
}
|
||||
}
|
||||
else //not found: probably removed by onReplace
|
||||
args.invalidate();
|
||||
}
|
||||
|
||||
void onReplace(const void*, std::set<TKey>& elemsToRemove)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// UniqueExpireStrategy.h
|
||||
//
|
||||
// $Id: //poco/svn/Foundation/include/Poco/UniqueExpireStrategy.h#2 $
|
||||
// $Id: //poco/svn/Foundation/include/Poco/UniqueExpireStrategy.h#3 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Cache
|
||||
@@ -130,6 +130,8 @@ public:
|
||||
args.invalidate();
|
||||
}
|
||||
}
|
||||
else //not found: probably removed by onReplace
|
||||
args.invalidate();
|
||||
}
|
||||
|
||||
void onReplace(const void*, std::set<TKey>& elemsToRemove)
|
||||
|
||||
Reference in New Issue
Block a user