add flag for profile support in queries

dbus-notify
Zlatin Balevsky 2022-04-13 20:18:10 +01:00
parent a3f40da51c
commit 806fab9b2d
No known key found for this signature in database
GPG Key ID: A72832072D525E41
2 changed files with 8 additions and 1 deletions

View File

@ -157,6 +157,7 @@ abstract class Connection implements Closeable {
query.collections = e.searchEvent.collections
query.searchPaths = e.searchEvent.searchPaths
query.regex = e.searchEvent.regex
query.profile = e.searchEvent.profile
if (e.searchEvent.searchHash != null)
query.infohash = Base64.encode(e.searchEvent.searchHash)
query.replyTo = e.replyTo.toBase64()
@ -289,6 +290,9 @@ abstract class Connection implements Closeable {
boolean regex = false
if (search.regex != null)
regex = search.regex
boolean profile = false
if (search.profile != null)
profile = search.profile
byte[] sig
if (search.sig != null) {
@ -346,6 +350,7 @@ abstract class Connection implements Closeable {
collections : collections,
searchPaths: searchPaths,
regex: regex,
profile: profile,
persona : originator)
QueryEvent event = new QueryEvent ( searchEvent : searchEvent,
replyTo : replyTo,

View File

@ -16,6 +16,7 @@ class SearchEvent extends Event {
boolean collections
boolean searchPaths
boolean regex
boolean profile
String toString() {
def infoHash = null
@ -23,6 +24,7 @@ class SearchEvent extends Event {
infoHash = new InfoHash(searchHash)
"searchTerms: $searchTerms searchHash:$infoHash, uuid:$uuid " +
"oobInfohash:$oobInfohash searchComments:$searchComments " +
"compressedResults:$compressedResults regex:$regex"
"compressedResults:$compressedResults regex:$regex" +
"profile:$profile"
}
}