summaryrefslogtreecommitdiff
path: root/collaboration.cpp
diff options
context:
space:
mode:
authorAlexander Taylor <alex@vector35.com>2025-10-15 21:36:02 -0400
committerAlexander Taylor <alex@vector35.com>2025-10-15 22:03:27 -0400
commit96c56a41f73d9ac1a5ba7e6efd06f0145b834f24 (patch)
treed59ed094b5e0cef97c46e30e156c2ccccb748015 /collaboration.cpp
parent3f39c3fc3d5603bba111502eee26b5fbbb0077fe (diff)
Required API changes for Enterprise find files.
Diffstat (limited to 'collaboration.cpp')
-rw-r--r--collaboration.cpp29
1 files changed, 28 insertions, 1 deletions
diff --git a/collaboration.cpp b/collaboration.cpp
index b07cd845..d7d5d6e2 100644
--- a/collaboration.cpp
+++ b/collaboration.cpp
@@ -977,6 +977,34 @@ std::vector<std::pair<std::string, std::string>> Remote::SearchUsers(const std::
}
+std::vector<Remote::FileSearchMatch> Remote::FindFiles(const std::string& name)
+{
+ size_t count = 0;
+ BNRemoteFileSearchMatch* matches = BNRemoteFindFiles(m_object, name.c_str(), &count);
+ std::vector<FileSearchMatch> results;
+ if (!matches)
+ return results;
+
+ results.reserve(count);
+ for (size_t i = 0; i < count; i++)
+ {
+ FileSearchMatch match;
+ if (matches[i].projectId)
+ match.projectId = matches[i].projectId;
+ if (matches[i].projectName)
+ match.projectName = matches[i].projectName;
+ if (matches[i].fileId)
+ match.fileId = matches[i].fileId;
+ if (matches[i].fileName)
+ match.fileName = matches[i].fileName;
+ results.push_back(std::move(match));
+ }
+
+ BNFreeRemoteFileSearchMatchList(matches, count);
+ return results;
+}
+
+
void Remote::PullUsers(ProgressFunction progress)
{
ProgressContext pctxt;
@@ -2677,4 +2705,3 @@ CollabUndoEntry::CollabUndoEntry(BNCollaborationUndoEntry* entry)
{
m_object = entry;
}
-