Home
last modified time | relevance | path

Searched refs:string_view (Results 1 – 25 of 122) sorted by relevance

12345

/system/incremental_delivery/incfs/
Dpath.h29 void appendNextPath(std::string& res, std::string_view c);
33 bool isAbsolute(std::string_view path);
34 std::string normalize(std::string_view path);
36 std::string_view relativize(std::string_view parent, std::string_view nested);
37 inline std::string_view relativize(const char* parent, const char* nested) { in relativize()
38 return relativize(std::string_view(parent), std::string_view(nested)); in relativize()
40 inline std::string_view relativize(std::string_view parent, const char* nested) { in relativize()
41 return relativize(parent, std::string_view(nested)); in relativize()
43 inline std::string_view relativize(const char* parent, std::string_view nested) { in relativize()
44 return relativize(std::string_view(parent), nested); in relativize()
[all …]
Dpath.cpp38 CStrWrapper(std::string_view sv) { in CStrWrapper()
60 inline CStrWrapper c_str(std::string_view sv) { in c_str()
66 bool isAbsolute(std::string_view path) { in isAbsolute()
70 std::string normalize(std::string_view path) { in normalize()
152 static void preparePathComponent(std::string_view& path, bool trimFront) { in preparePathComponent()
163 std::string_view relativize(std::string_view parent, std::string_view nested) { in relativize()
180 void details::appendNextPath(std::string& res, std::string_view path) { in appendNextPath()
191 std::string_view baseName(std::string_view path) { in baseName()
209 std::string_view dirName(std::string_view path) { in dirName()
226 std::pair<std::string_view, std::string_view> splitDirBase(std::string& full) { in splitDirBase()
[all …]
Dsplit.h33 void Split(std::string_view s, Separator delimiters, Callback&& onSplitCb) { in Split()
38 if (found == std::string_view::npos) { in Split()
52 void Split(std::string_view s, Separator delimiters, std::vector<std::string_view>* out) { in Split()
54 Split(s, delimiters, [out](std::string_view split) { out->emplace_back(split); }); in Split()
58 std::vector<std::string_view> Split(std::string_view s, Separator delimiters) { in Split()
59 std::vector<std::string_view> result; in Split()
DMountRegistry.cpp67 std::vector<std::pair<std::string_view, std::string_view>> MountRegistry::Mounts::Mount::binds() in binds()
69 std::vector<std::pair<std::string_view, std::string_view>> result; in binds()
88 std::string_view path) const { in rootIndex()
108 std::string_view MountRegistry::Mounts::rootFor(std::string_view path) const { in rootFor()
116 std::pair<std::string_view, std::string> MountRegistry::Mounts::rootAndSubpathFor( in rootAndSubpathFor()
117 std::string_view path) const { in rootAndSubpathFor()
130 void MountRegistry::Mounts::addRoot(std::string_view root, std::string_view backingDir) { in addRoot()
137 void MountRegistry::Mounts::removeRoot(std::string_view root) { in removeRoot()
164 void MountRegistry::Mounts::moveBind(std::string_view src, std::string_view dest) { in moveBind()
194 void MountRegistry::Mounts::addBind(std::string_view what, std::string_view where) { in addBind()
[all …]
/system/libbase/include/android-base/
Dstrings.h60 bool StartsWith(std::string_view s, std::string_view prefix);
61 bool StartsWith(std::string_view s, char prefix);
62 bool StartsWithIgnoreCase(std::string_view s, std::string_view prefix);
65 bool EndsWith(std::string_view s, std::string_view suffix);
66 bool EndsWith(std::string_view s, char suffix);
67 bool EndsWithIgnoreCase(std::string_view s, std::string_view suffix);
70 bool EqualsIgnoreCase(std::string_view lhs, std::string_view rhs);
74 inline bool ConsumePrefix(std::string_view* s, std::string_view prefix) { in ConsumePrefix()
82 inline bool ConsumeSuffix(std::string_view* s, std::string_view suffix) { in ConsumeSuffix()
90 [[nodiscard]] std::string StringReplace(std::string_view s, std::string_view from,
[all …]
/system/incremental_delivery/incfs/include/
DMountRegistry.h58 std::string_view root() const { return mBase->path; } in root()
59 std::string_view backingDir() const { return mBase->backing; } in backingDir()
60 std::vector<std::pair<std::string_view, std::string_view>> binds() const;
74 static Mounts load(base::borrowed_fd fd, std::string_view filesystem);
75 bool loadFrom(base::borrowed_fd fd, std::string_view filesystem);
82 std::string_view rootFor(std::string_view path) const;
83 std::pair<std::string_view, std::string> rootAndSubpathFor(std::string_view path) const;
88 void addRoot(std::string_view root, std::string_view backingDir);
89 void removeRoot(std::string_view root);
90 void addBind(std::string_view what, std::string_view where);
[all …]
Dincfs.h193 IncFsFileId toFileId(std::string_view str);
194 bool isIncFsPath(std::string_view path);
196 UniqueControl mount(std::string_view backingPath, std::string_view targetDir,
198 UniqueControl open(std::string_view dir);
203 ErrorCode bindMount(std::string_view sourceDir, std::string_view targetDir);
204 ErrorCode unmount(std::string_view dir);
208 ErrorCode makeFile(const Control& control, std::string_view path, int mode, FileId fileId,
210 ErrorCode makeDir(const Control& control, std::string_view path, int mode = 0555);
211 ErrorCode makeDirs(const Control& control, std::string_view path, int mode = 0555);
214 RawMetadata getMetadata(const Control& control, std::string_view path);
[all …]
Dincfs_inline.h37 CStrWrapper(std::string_view sv) { in CStrWrapper()
59 inline CStrWrapper c_str(std::string_view sv) { in c_str()
73 inline bool isIncFsPath(std::string_view path) { in isIncFsPath()
91 inline IncFsFileId toFileId(std::string_view str) { in toFileId()
125 inline UniqueControl mount(std::string_view backingPath, std::string_view targetDir, in mount()
131 inline UniqueControl open(std::string_view dir) { in open()
144 inline ErrorCode bindMount(std::string_view sourceDir, std::string_view targetDir) { in bindMount()
148 inline ErrorCode unmount(std::string_view dir) { in unmount()
164 inline ErrorCode makeFile(const Control& control, std::string_view path, int mode, FileId fileId, in makeFile()
168 inline ErrorCode makeDir(const Control& control, std::string_view path, int mode) { in makeDir()
[all …]
/system/libziparchive/
Dzip_cd_entry_map.h36 virtual ZipError AddToMap(std::string_view name, const uint8_t* start) = 0;
40 virtual std::pair<ZipError, uint64_t> GetCdEntryOffset(std::string_view name,
47 virtual std::pair<std::string_view, uint64_t> Next(const uint8_t* cd_start) = 0;
65 const std::string_view ToStringView(const uint8_t* start) const { in ToStringView()
66 return std::string_view{reinterpret_cast<const char*>(start + name_offset), name_length}; in ToStringView()
77 ZipError AddToMap(std::string_view name, const uint8_t* start) override;
78 std::pair<ZipError, uint64_t> GetCdEntryOffset(std::string_view name,
81 std::pair<std::string_view, uint64_t> Next(const uint8_t* cd_start) override;
102 ZipError AddToMap(std::string_view name, const uint8_t* start) override;
103 std::pair<ZipError, uint64_t> GetCdEntryOffset(std::string_view name,
[all …]
Dzip_cd_entry_map.cc39 static uint32_t ComputeHash(std::string_view name) { in ComputeHash()
40 return static_cast<uint32_t>(std::hash<std::string_view>{}(name)); in ComputeHash()
44 std::pair<ZipError, uint64_t> CdEntryMapZip32::GetCdEntryOffset(std::string_view name, in GetCdEntryOffset()
61 ZipError CdEntryMapZip32::AddToMap(std::string_view name, const uint8_t* start) { in AddToMap()
89 std::pair<std::string_view, uint64_t> CdEntryMapZip32::Next(const uint8_t* cd_start) { in Next()
125 ZipError CdEntryMapZip64::AddToMap(std::string_view name, const uint8_t* start) { in AddToMap()
135 std::pair<ZipError, uint64_t> CdEntryMapZip64::GetCdEntryOffset(std::string_view name, in GetCdEntryOffset()
150 std::pair<std::string_view, uint64_t> CdEntryMapZip64::Next(const uint8_t* /*cd_start*/) { in Next()
/system/libbase/
Dstrings.cpp90 bool StartsWith(std::string_view s, std::string_view prefix) { in StartsWith()
94 bool StartsWith(std::string_view s, char prefix) { in StartsWith()
98 bool StartsWithIgnoreCase(std::string_view s, std::string_view prefix) { in StartsWithIgnoreCase()
102 bool EndsWith(std::string_view s, std::string_view suffix) { in EndsWith()
106 bool EndsWith(std::string_view s, char suffix) { in EndsWith()
110 bool EndsWithIgnoreCase(std::string_view s, std::string_view suffix) { in EndsWithIgnoreCase()
115 bool EqualsIgnoreCase(std::string_view lhs, std::string_view rhs) { in EqualsIgnoreCase()
119 std::string StringReplace(std::string_view s, std::string_view from, std::string_view to, in StringReplace()
124 std::string_view::size_type start_pos = 0; in StringReplace()
126 std::string_view::size_type pos = s.find(from, start_pos); in StringReplace()
[all …]
/system/core/adb/
Dsocket_spec.h25 bool is_socket_spec(std::string_view spec);
26 bool is_local_socket_spec(std::string_view spec);
28 bool socket_spec_connect(unique_fd* fd, std::string_view address, int* port, std::string* serial,
30 int socket_spec_listen(std::string_view spec, std::string* error, int* resolved_tcp_port = nullptr);
32 bool parse_tcp_socket_spec(std::string_view spec, std::string* hostname, int* port,
35 int get_host_socket_spec_port(std::string_view spec, std::string* error);
Dadb_wifi.h40 MdnsInfo(std::string_view name, std::string_view type, std::string_view addr, uint16_t port) in MdnsInfo()
44 std::optional<MdnsInfo> mdns_get_connect_service_info(std::string_view name);
45 std::optional<MdnsInfo> mdns_get_pairing_service_info(std::string_view name);
Dsocket.h107 asocket* create_local_service_socket(std::string_view destination, atransport* transport);
110 void connect_to_remote(asocket* s, std::string_view destination);
120 bool parse_host_service(std::string_view* out_serial, std::string_view* out_command,
121 std::string_view service);
Dadb.h147 unique_fd service_to_fd(std::string_view name, atransport* transport);
149 unique_fd daemon_service_to_fd(std::string_view name, atransport* transport);
153 asocket* host_service_to_socket(std::string_view name, std::string_view serial,
158 asocket* daemon_service_to_socket(std::string_view name);
162 unique_fd execute_abb_command(std::string_view command);
227 HostRequestResult handle_host_request(std::string_view service, TransportType type,
Dadb_utils.h100 inline std::string_view StripTrailingNulls(std::string_view str) { in StripTrailingNulls()
115 inline bool ParseUint(T* result, std::string_view str, std::string_view* remaining = nullptr) {
125 *remaining = std::string_view(res.ptr, str.end() - res.ptr);
/system/core/adb/tls/include/adb/tls/
Dtls_connection.h63 virtual bool AddTrustedCertificate(std::string_view cert) = 0;
109 virtual bool WriteFully(std::string_view data) = 0;
113 static std::unique_ptr<TlsConnection> Create(Role role, std::string_view cert,
114 std::string_view priv_key,
119 static bool SetCertAndKey(SSL* ssl, std::string_view cert_chain, std::string_view priv_key);
Dadb_ca_list.h32 bssl::UniquePtr<X509_NAME> CreateCAIssuerFromEncodedKey(std::string_view key);
40 std::string SHA256BitsToHexString(std::string_view sha256);
44 std::optional<std::string> SHA256HexStringToBits(std::string_view sha256_str);
/system/core/adb/client/
Dmdns_utils.h31 MdnsInstance(std::string_view inst, std::string_view serv, std::string_view trans) in MdnsInstance()
52 std::optional<MdnsInstance> mdns_parse_instance_name(std::string_view name);
/system/core/adb/tls/
Dtls_connection.cpp38 explicit TlsConnectionImpl(Role role, std::string_view cert, std::string_view priv_key,
42 bool AddTrustedCertificate(std::string_view cert) override;
51 bool WriteFully(std::string_view data) override;
53 static bssl::UniquePtr<EVP_PKEY> EvpPkeyFromPEM(std::string_view pem);
54 static bssl::UniquePtr<CRYPTO_BUFFER> BufferFromPEM(std::string_view pem);
83 TlsConnectionImpl::TlsConnectionImpl(Role role, std::string_view cert, std::string_view priv_key, in TlsConnectionImpl()
108 bssl::UniquePtr<EVP_PKEY> TlsConnectionImpl::EvpPkeyFromPEM(std::string_view pem) { in EvpPkeyFromPEM()
114 bssl::UniquePtr<CRYPTO_BUFFER> TlsConnectionImpl::BufferFromPEM(std::string_view pem) { in BufferFromPEM()
153 bool TlsConnectionImpl::AddTrustedCertificate(std::string_view cert) { in AddTrustedCertificate()
340 bool TlsConnectionImpl::WriteFully(std::string_view data) { in WriteFully()
[all …]
/system/iorap/tests/src/inode2filename/
Dsearch_directories_test.cc79 static constexpr std::string_view EmptySubstringAtEnd(std::string_view what) { in EmptySubstringAtEnd()
96 static constexpr SplitIterable Iterable(std::string_view what, in Iterable()
97 std::string_view separator) { in Iterable()
103 using value_type = std::string_view;
126 constexpr std::string_view& operator*() { in operator *()
131 constexpr std::string_view* operator->() { in operator ->()
162 constexpr static SplitIterator MakeBegin(std::string_view whole, std::string_view separator) { in MakeBegin()
208 if (std::string_view::npos == pos) { in UpdateValues()
252 std::string_view current_split;
253 std::string_view rest_of_string;
[all …]
/system/core/adb/daemon/
Dabb.cpp51 std::vector<std::string_view> parseCmdArgs(std::string_view args) { in parseCmdArgs()
52 std::vector<std::string_view> argv; in parseCmdArgs()
72 static int execCmd(std::string_view args, borrowed_fd in, borrowed_fd out, borrowed_fd err) { in execCmd()
96 std::string_view name = data; in main()
/system/core/fs_mgr/liblp/include/liblp/
Dbuilder.h43 static constexpr std::string_view kDefaultGroup = "default";
113 explicit PartitionGroup(std::string_view name, uint64_t maximum_size) in PartitionGroup()
130 Partition(std::string_view name, std::string_view group_name, uint32_t attributes);
157 void set_group_name(std::string_view group_name) { group_name_ = group_name; } in set_group_name()
276 bool AddGroup(std::string_view group_name, uint64_t maximum_size);
284 Partition* AddPartition(std::string_view name, std::string_view group_name,
292 void RemovePartition(std::string_view name);
295 Partition* FindPartition(std::string_view name) const;
298 PartitionGroup* FindGroup(std::string_view name) const;
321 std::vector<Partition*> ListPartitionsInGroup(std::string_view group_name);
[all …]
/system/libziparchive/include/ziparchive/
Dzip_archive.h213 int32_t FindEntry(const ZipArchiveHandle archive, const std::string_view entryName,
230 const std::string_view optional_prefix = "",
231 const std::string_view optional_suffix = "");
240 std::function<bool(std::string_view entry_name)> matcher);
248 int32_t Next(void* cookie, ZipEntry64* data, std::string_view* name);
292 int32_t FindEntry(const ZipArchiveHandle archive, const std::string_view entryName, ZipEntry* data);
294 int32_t Next(void* cookie, ZipEntry* data, std::string_view* name);
Dzip_writer.h106 int32_t StartEntry(std::string_view path, size_t flags);
116 int32_t StartAlignedEntry(std::string_view path, size_t flags, uint32_t alignment);
121 int32_t StartEntryWithTime(std::string_view path, size_t flags, time_t time);
126 …int32_t StartAlignedEntryWithTime(std::string_view path, size_t flags, time_t time, uint32_t align…

12345