Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync: Add a protobuf for the existing sync protocol #1359

Merged
merged 12 commits into from
May 29, 2024
39 changes: 28 additions & 11 deletions Source/santasyncservice/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@build_bazel_rules_apple//apple:macos.bzl", "macos_command_line_application")
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("//:helper.bzl", "santa_unit_test")

licenses(["notice"])
Expand All @@ -7,6 +8,16 @@ package(
default_visibility = ["//:santa_package_group"],
)

proto_library(
name = "sync_v1_proto",
srcs = ["syncv1.proto"],
)

cc_proto_library(
name = "sync_v1_cc_proto",
deps = [":sync_v1_proto"],
)

objc_library(
name = "FCM_lib",
srcs = ["SNTSyncFCM.m"],
Expand All @@ -27,18 +38,18 @@ objc_library(
"SNTPushNotificationsTracker.h",
"SNTPushNotificationsTracker.m",
"SNTSyncEventUpload.h",
"SNTSyncEventUpload.m",
"SNTSyncEventUpload.mm",
"SNTSyncLogging.h",
"SNTSyncLogging.m",
"SNTSyncManager.m",
"SNTSyncPostflight.h",
"SNTSyncPostflight.m",
"SNTSyncPostflight.mm",
"SNTSyncPreflight.h",
"SNTSyncPreflight.m",
"SNTSyncPreflight.mm",
"SNTSyncRuleDownload.h",
"SNTSyncRuleDownload.m",
"SNTSyncRuleDownload.mm",
"SNTSyncStage.h",
"SNTSyncStage.m",
"SNTSyncStage.mm",
"SNTSyncState.h",
"SNTSyncState.m",
],
Expand All @@ -47,6 +58,7 @@ objc_library(
deps = [
":FCM_lib",
":broadcaster_lib",
":sync_v1_cc_proto",
"//Source/common:SNTCommonEnums",
"//Source/common:SNTConfigurator",
"//Source/common:SNTFileInfo",
Expand All @@ -58,9 +70,11 @@ objc_library(
"//Source/common:SNTSystemInfo",
"//Source/common:SNTXPCControlInterface",
"//Source/common:SNTXPCSyncServiceInterface",
"//Source/common:String",
"@MOLAuthenticatingURLSession",
"@MOLCertificate",
"@MOLXPCConnection",
"@com_google_protobuf//src/google/protobuf/json",
],
)

Expand All @@ -77,20 +91,20 @@ santa_unit_test(
"SNTPushNotificationsTracker.h",
"SNTPushNotificationsTracker.m",
"SNTSyncEventUpload.h",
"SNTSyncEventUpload.m",
"SNTSyncEventUpload.mm",
"SNTSyncLogging.h",
"SNTSyncLogging.m",
"SNTSyncPostflight.h",
"SNTSyncPostflight.m",
"SNTSyncPostflight.mm",
"SNTSyncPreflight.h",
"SNTSyncPreflight.m",
"SNTSyncPreflight.mm",
"SNTSyncRuleDownload.h",
"SNTSyncRuleDownload.m",
"SNTSyncRuleDownload.mm",
"SNTSyncStage.h",
"SNTSyncStage.m",
"SNTSyncStage.mm",
"SNTSyncState.h",
"SNTSyncState.m",
"SNTSyncTest.m",
"SNTSyncTest.mm",
],
resources = glob([
"testdata/*.json",
Expand All @@ -100,6 +114,7 @@ santa_unit_test(
deps = [
":FCM_lib",
":broadcaster_lib",
":sync_v1_cc_proto",
"//Source/common:SNTCommonEnums",
"//Source/common:SNTConfigurator",
"//Source/common:SNTDropRootPrivs",
Expand All @@ -111,10 +126,12 @@ santa_unit_test(
"//Source/common:SNTSyncConstants",
"//Source/common:SNTSystemInfo",
"//Source/common:SNTXPCControlInterface",
"//Source/common:String",
"@MOLAuthenticatingURLSession",
"@MOLCertificate",
"@MOLXPCConnection",
"@OCMock",
"@com_google_protobuf//src/google/protobuf/json",
],
)

Expand Down
167 changes: 0 additions & 167 deletions Source/santasyncservice/SNTSyncEventUpload.m

This file was deleted.

Loading
Loading