More style guide fixes. Removed a lot of preprocessing / conditional building, with intent to fix or remove. Moved urlwrapper class declaration to its header file. Renamed things for clarity. Removed 5 extra mimetypes for IE shortcuts. (We have one, with sniffing rule and extension.) Moved the UnurlString() back to urlwrapper.cpp and renamed it _DecodeUrlString(). Tweaked copyright clauses. A lot more needs fixing, esp. in urlwrapper but also in BUrl, and I intend to keep working on this until we're satisfied. Let me know of any remaining/added style violations! Feedback welcome.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30757 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007-2009, Haiku Inc. All Rights Reserved.
|
||||
* Copyright 2007-2009 Haiku Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _URL_H
|
||||
@@ -7,19 +7,21 @@
|
||||
|
||||
#include <String.h>
|
||||
|
||||
|
||||
namespace BPrivate {
|
||||
namespace Support {
|
||||
|
||||
class BUrl : public BString {
|
||||
public:
|
||||
BUrl(const char *url);
|
||||
BUrl(const char* url);
|
||||
~BUrl();
|
||||
|
||||
status_t InitCheck() const;
|
||||
|
||||
bool HasPreferredApplication() const;
|
||||
BString PreferredApplication() const;
|
||||
status_t OpenWithPreferredApplication(bool onProblemAskUser = true) const;
|
||||
status_t OpenWithPreferredApplication(
|
||||
bool onProblemAskUser = true) const;
|
||||
|
||||
bool HasHost() const;
|
||||
bool HasPort() const;
|
||||
@@ -27,32 +29,30 @@ public:
|
||||
bool HasPass() const;
|
||||
bool HasPath() const;
|
||||
|
||||
BString Proto() const;
|
||||
BString Full() const;
|
||||
BString Host() const;
|
||||
BString Port() const;
|
||||
BString User() const;
|
||||
BString Pass() const;
|
||||
BString Path() const;
|
||||
|
||||
status_t UnurlString(BString &string);
|
||||
const BString& Proto() const;
|
||||
const BString& Full() const;
|
||||
const BString& Host() const;
|
||||
const BString& Port() const;
|
||||
const BString& User() const;
|
||||
const BString& Pass() const;
|
||||
const BString& Path() const;
|
||||
|
||||
private:
|
||||
status_t _ParseAndSplit();
|
||||
BString _UrlMimeType() const;
|
||||
|
||||
BString proto;
|
||||
BString full;
|
||||
BString host;
|
||||
BString port;
|
||||
BString user;
|
||||
BString pass;
|
||||
BString path;
|
||||
BString fProto;
|
||||
BString fFull;
|
||||
BString fHost;
|
||||
BString fPort;
|
||||
BString fUser;
|
||||
BString fPass;
|
||||
BString fPath;
|
||||
status_t fStatus;
|
||||
};
|
||||
|
||||
}; // namespace Support
|
||||
}; // namespace BPrivate
|
||||
} // namespace Support
|
||||
} // namespace BPrivate
|
||||
|
||||
#endif // _URL_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user