Skip to content

Commit 15afe9b

Browse files
BreakthroughCQ Bot
authored andcommitted
[svc] Remove obsolete functionality at NEXT
Unfortunately these symbols were never removed after API level 10, so the symbols for these still exist in `libsvc.so` at all API levels since then. To prevent them from being a part of future SDK releases, we use an API level guard to prevent them from being generated entirely. Test: No functional change. Change-Id: I70994a37524629a659e4693585ee9fafe0a52656 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1234104 Commit-Queue: Brandon Castellano <[email protected]> Reviewed-by: Adam Barth <[email protected]> Reviewed-by: James Robinson <[email protected]> API-Review: Adam Barth <[email protected]>
1 parent d3edc66 commit 15afe9b

File tree

5 files changed

+7
-28
lines changed

5 files changed

+7
-28
lines changed

sdk/history/NEXT/libsvc.ifs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,6 @@
22
IfsVersion: 3.0
33
SoName: libsvc.so
44
Symbols:
5-
- { Name: svc_dir_add_directory, Type: Func }
6-
- { Name: svc_dir_add_directory_by_path, Type: Func }
7-
- { Name: svc_dir_add_service, Type: Func }
8-
- { Name: svc_dir_add_service_by_path, Type: Func }
9-
- { Name: svc_dir_create, Type: Func }
10-
- { Name: svc_dir_create_without_serve, Type: Func }
11-
- { Name: svc_dir_destroy, Type: Func }
12-
- { Name: svc_dir_remove_directory, Type: Func }
13-
- { Name: svc_dir_remove_entry_by_path, Type: Func }
14-
- { Name: svc_dir_remove_service, Type: Func }
15-
- { Name: svc_dir_remove_service_by_path, Type: Func }
16-
- { Name: svc_dir_serve, Type: Func }
175
- { Name: svc_directory_add_directory, Type: Func }
186
- { Name: svc_directory_add_service, Type: Func }
197
- { Name: svc_directory_create, Type: Func }

sdk/lib/svc/dir.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ zx_status_t svc_directory_remove_entry(svc_dir_t* dir, const char* path, size_t
205205
return status;
206206
}
207207

208+
#if FUCHSIA_API_LEVEL_LESS_THAN(NEXT)
209+
208210
// Deprecated function implementations
209211
zx_status_t svc_dir_create(async_dispatcher_t* dispatcher, zx_handle_t dir_request,
210212
svc_dir_t** result) {
@@ -273,3 +275,5 @@ zx_status_t svc_dir_remove_entry_by_path(svc_dir_t* dir, const char* path, const
273275
}
274276

275277
zx_status_t svc_dir_destroy(svc_dir_t* dir) { return svc_directory_destroy(dir); }
278+
279+
#endif

sdk/lib/svc/dir.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ __EXPORT zx_status_t svc_directory_remove_entry(svc_dir_t* dir, const char* path
9090
// returns ZX_OK.
9191
__EXPORT zx_status_t svc_directory_destroy(svc_dir_t* dir) ZX_AVAILABLE_SINCE(10);
9292

93-
// All the functions listed below are deprecated as of Fuchsia API level 10. They should not be used
94-
// by new clients.
95-
93+
#if FUCHSIA_API_LEVEL_LESS_THAN(NEXT)
9694
__EXPORT zx_status_t svc_dir_create(async_dispatcher_t* dispatcher, zx_handle_t directory_request,
9795
svc_dir_t** out_result)
9896
ZX_REMOVED_SINCE(
@@ -147,6 +145,7 @@ __EXPORT zx_status_t svc_dir_remove_entry_by_path(svc_dir_t* dir, const char* pa
147145
const char* name)
148146
ZX_REMOVED_SINCE(/*added=*/9, /*deprecated=*/10, /*removed=*/10,
149147
"Use |svc_directory_remove_entry|");
148+
#endif
150149

151150
__END_CDECLS
152151

sdk/lib/svc/svc.api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"pkg/svc/include/lib/svc/dir.h": "7bc8ab708f65f2b2b612ab764868297a"
2+
"pkg/svc/include/lib/svc/dir.h": "592dce9cc5dba81f76a17988862f7123"
33
}

sdk/lib/svc/svc.ifs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,6 @@
22
IfsVersion: 3.0
33
SoName: libsvc.so
44
Symbols:
5-
- { Name: svc_dir_add_directory, Type: Func }
6-
- { Name: svc_dir_add_directory_by_path, Type: Func }
7-
- { Name: svc_dir_add_service, Type: Func }
8-
- { Name: svc_dir_add_service_by_path, Type: Func }
9-
- { Name: svc_dir_create, Type: Func }
10-
- { Name: svc_dir_create_without_serve, Type: Func }
11-
- { Name: svc_dir_destroy, Type: Func }
12-
- { Name: svc_dir_remove_directory, Type: Func }
13-
- { Name: svc_dir_remove_entry_by_path, Type: Func }
14-
- { Name: svc_dir_remove_service, Type: Func }
15-
- { Name: svc_dir_remove_service_by_path, Type: Func }
16-
- { Name: svc_dir_serve, Type: Func }
175
- { Name: svc_directory_add_directory, Type: Func }
186
- { Name: svc_directory_add_service, Type: Func }
197
- { Name: svc_directory_create, Type: Func }

0 commit comments

Comments
 (0)