Molybden API
Loading...
Searching...
No Matches
profile.hpp
1// Copyright (c) 2000-2024 TeamDev. All rights reserved.
2// TeamDev PROPRIETARY and CONFIDENTIAL.
3// Use is subject to license terms.
4
5#ifndef MOLYBDEN_PROFILE_HPP
6#define MOLYBDEN_PROFILE_HPP
7
8#include <string>
9#include <vector>
10
11namespace molybden {
12
13class App;
14class Browser;
15class Download;
16class ProfilePrefs;
17class Network;
18class CreditCards;
19class Cookies;
20class Proxy;
21class Passwords;
22class Permissions;
23class UserProfiles;
24class HttpAuthCache;
25class HttpCache;
26class SpellChecker;
27
32class Profile {
33 public:
40 static std::shared_ptr<Profile> create(std::shared_ptr<App> app,
41 const std::string& name);
42
55 static std::shared_ptr<Profile> createIncognito(std::shared_ptr<App> app,
56 const std::string& name);
57
61 virtual std::shared_ptr<App> app() = 0;
62
66 virtual std::string name() = 0;
67
71 virtual std::string path() = 0;
72
76 virtual bool isIncognito() = 0;
77
81 virtual bool isDefault() = 0;
82
87 virtual std::vector<std::shared_ptr<Browser>> browsers() = 0;
88
92 virtual std::vector<std::shared_ptr<Download>> downloads() = 0;
93
97 virtual std::shared_ptr<ProfilePrefs> prefs() = 0;
98
102 virtual std::shared_ptr<Network> network() = 0;
103
107 virtual std::shared_ptr<Proxy> proxy() = 0;
108
112 virtual std::shared_ptr<CreditCards> creditCards() = 0;
113
117 virtual std::shared_ptr<Cookies> cookies() = 0;
118
122 virtual std::shared_ptr<Passwords> passwords() = 0;
123
127 virtual std::shared_ptr<Permissions> permissions() = 0;
128
132 virtual std::shared_ptr<UserProfiles> userProfiles() = 0;
133
137 virtual std::shared_ptr<HttpCache> httpCache() = 0;
138
142 virtual std::shared_ptr<HttpAuthCache> httpAuthCache() = 0;
143
147 virtual std::shared_ptr<SpellChecker> spellChecker() = 0;
148};
149
150} // namespace molybden
151
152#endif // MOLYBDEN_PROFILE_HPP
The app profile that holds user data such as navigation history, proxy settings, spell checker config...
Definition profile.hpp:32
virtual std::shared_ptr< UserProfiles > userProfiles()=0
Returns the user profile store.
virtual bool isIncognito()=0
Checks if this profile is an incognito profile.
virtual bool isDefault()=0
Checks if this profile is the default profile.
virtual std::vector< std::shared_ptr< Download > > downloads()=0
Returns all downloads in this profile, both active and completed.
virtual std::shared_ptr< Cookies > cookies()=0
Returns the cookie store that allows managing cookies.
virtual std::shared_ptr< Proxy > proxy()=0
Returns a service that allows working with proxy configurations.
virtual std::shared_ptr< Permissions > permissions()=0
Returns the permissions manager.
virtual std::shared_ptr< Network > network()=0
Returns a service that allows working with network.
virtual std::shared_ptr< CreditCards > creditCards()=0
Returns the credit card store.
virtual std::string name()=0
Returns the name of this profile.
virtual std::shared_ptr< HttpAuthCache > httpAuthCache()=0
Returns the HTTP authentication cache.
virtual std::shared_ptr< SpellChecker > spellChecker()=0
Returns a service that allows working with spell checking functionality.
virtual std::vector< std::shared_ptr< Browser > > browsers()=0
Returns all alive browsers in this profile including child popup browsers or an empty set if this pro...
virtual std::shared_ptr< HttpCache > httpCache()=0
Returns the HTTP cache.
virtual std::shared_ptr< ProfilePrefs > prefs()=0
Returns the preferences for this profile.
static std::shared_ptr< Profile > create(std::shared_ptr< App > app, const std::string &name)
Creates a new profile with the given name.
virtual std::shared_ptr< Passwords > passwords()=0
Returns the password store.
static std::shared_ptr< Profile > createIncognito(std::shared_ptr< App > app, const std::string &name)
Creates a new incognito profile with the given name.
virtual std::string path()=0
Returns an absolute path to the folder where this profile stores its data.
virtual std::shared_ptr< App > app()=0
Returns the application instance for this profile.