mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 05:07:35 +00:00
Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte string. As the null state has already been removed, there are no other particularly hairy blockers in repurposing this type as a byte string (what it _really_ is). This commit is auto-generated: $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \ Meta Ports Ladybird Tests Kernel) $ perl -pie 's/\bDeprecatedString\b/ByteString/g; s/deprecated_string/byte_string/g' $xs $ clang-format --style=file -i \ $(git diff --name-only | grep \.cpp\|\.h) $ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
parent
38d62563b3
commit
5e1499d104
1615 changed files with 10257 additions and 10257 deletions
|
@ -22,15 +22,15 @@ struct Handler {
|
|||
UserDefault
|
||||
};
|
||||
Type handler_type;
|
||||
DeprecatedString name;
|
||||
DeprecatedString executable;
|
||||
HashTable<DeprecatedString> mime_types {};
|
||||
HashTable<DeprecatedString> file_types {};
|
||||
HashTable<DeprecatedString> protocols {};
|
||||
ByteString name;
|
||||
ByteString executable;
|
||||
HashTable<ByteString> mime_types {};
|
||||
HashTable<ByteString> file_types {};
|
||||
HashTable<ByteString> protocols {};
|
||||
|
||||
static DeprecatedString name_from_executable(StringView);
|
||||
void from_executable(Type, DeprecatedString const&);
|
||||
DeprecatedString to_details_str() const;
|
||||
static ByteString name_from_executable(StringView);
|
||||
void from_executable(Type, ByteString const&);
|
||||
ByteString to_details_str() const;
|
||||
};
|
||||
|
||||
class Launcher {
|
||||
|
@ -38,25 +38,25 @@ public:
|
|||
Launcher();
|
||||
static Launcher& the();
|
||||
|
||||
void load_handlers(DeprecatedString const& af_dir = Desktop::AppFile::APP_FILES_DIRECTORY);
|
||||
void load_handlers(ByteString const& af_dir = Desktop::AppFile::APP_FILES_DIRECTORY);
|
||||
void load_config(Core::ConfigFile const&);
|
||||
bool open_url(const URL&, DeprecatedString const& handler_name);
|
||||
Vector<DeprecatedString> handlers_for_url(const URL&);
|
||||
Vector<DeprecatedString> handlers_with_details_for_url(const URL&);
|
||||
bool open_url(const URL&, ByteString const& handler_name);
|
||||
Vector<ByteString> handlers_for_url(const URL&);
|
||||
Vector<ByteString> handlers_with_details_for_url(const URL&);
|
||||
|
||||
private:
|
||||
HashMap<DeprecatedString, Handler> m_handlers;
|
||||
HashMap<DeprecatedString, DeprecatedString> m_protocol_handlers;
|
||||
HashMap<DeprecatedString, DeprecatedString> m_file_handlers;
|
||||
HashMap<DeprecatedString, DeprecatedString> m_mime_handlers;
|
||||
HashMap<ByteString, Handler> m_handlers;
|
||||
HashMap<ByteString, ByteString> m_protocol_handlers;
|
||||
HashMap<ByteString, ByteString> m_file_handlers;
|
||||
HashMap<ByteString, ByteString> m_mime_handlers;
|
||||
|
||||
bool has_mime_handlers(DeprecatedString const&);
|
||||
Optional<StringView> mime_type_for_file(DeprecatedString path);
|
||||
Handler get_handler_for_executable(Handler::Type, DeprecatedString const&) const;
|
||||
size_t for_each_handler(DeprecatedString const& key, HashMap<DeprecatedString, DeprecatedString> const& user_preferences, Function<bool(Handler const&)> f);
|
||||
void for_each_handler_for_path(DeprecatedString const&, Function<bool(Handler const&)> f);
|
||||
bool has_mime_handlers(ByteString const&);
|
||||
Optional<StringView> mime_type_for_file(ByteString path);
|
||||
Handler get_handler_for_executable(Handler::Type, ByteString const&) const;
|
||||
size_t for_each_handler(ByteString const& key, HashMap<ByteString, ByteString> const& user_preferences, Function<bool(Handler const&)> f);
|
||||
void for_each_handler_for_path(ByteString const&, Function<bool(Handler const&)> f);
|
||||
bool open_file_url(const URL&);
|
||||
bool open_with_user_preferences(HashMap<DeprecatedString, DeprecatedString> const& user_preferences, DeprecatedString const& key, Vector<DeprecatedString> const& arguments, DeprecatedString const& default_program = {});
|
||||
bool open_with_handler_name(const URL&, DeprecatedString const& handler_name);
|
||||
bool open_with_user_preferences(HashMap<ByteString, ByteString> const& user_preferences, ByteString const& key, Vector<ByteString> const& arguments, ByteString const& default_program = {});
|
||||
bool open_with_handler_name(const URL&, ByteString const& handler_name);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue