⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 286533 in webkit


Ignore:
Timestamp:
Dec 4, 2021, 8:08:56 AM (5 years ago)
Author:
beidson@apple.com
Message:

Add command line webpushtool for daemon development and debugging.
https://bugs.webkit.org/show_bug.cgi?id=233845

Reviewed by Tim Horton.

No behavior change.

This utility will eventually be quite fleshed out.

For now, it can act as a terminal that prints debug messages from webpushd.

  • Configurations/webpushtool.xcconfig: Added.
  • Resources/webpushtool.entitlements: Added.
  • WebKit.xcodeproj/project.pbxproj:
  • WebKit.xcodeproj/xcshareddata/xcschemes/webpushtool.xcscheme: Added.
  • webpushd/webpushtool/WebPushToolConnection.h: Added.
  • webpushd/webpushtool/WebPushToolConnection.mm: Added.

(WebPushTool::Connection::create):
(WebPushTool::maybeConnectToService):
(WebPushTool::Connection::Connection):
(WebPushTool::Connection::connectToService):
(WebPushTool::Connection::startAction):
(WebPushTool::Connection::startDebugStreamAction):
(WebPushTool::Connection::sendAuditToken):
(WebPushTool::Connection::connectionDropped):
(WebPushTool::Connection::messageReceived):

  • webpushd/webpushtool/WebPushToolMain.mm: Added.

(printUsageAndTerminate):
(main):

Location:
trunk/Source/WebKit
Files:
7 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r286527 r286533  
     12021-12-04  Brady Eidson  <beidson@apple.com>
     2
     3        Add command line `webpushtool` for daemon development and debugging.
     4        https://bugs.webkit.org/show_bug.cgi?id=233845
     5
     6        Reviewed by Tim Horton.
     7
     8        No behavior change.
     9
     10        This utility will eventually be quite fleshed out.
     11       
     12        For now, it can act as a terminal that prints debug messages from webpushd.
     13       
     14        * Configurations/webpushtool.xcconfig: Added.
     15        * Resources/webpushtool.entitlements: Added.
     16        * WebKit.xcodeproj/project.pbxproj:
     17        * WebKit.xcodeproj/xcshareddata/xcschemes/webpushtool.xcscheme: Added.
     18
     19        * webpushd/webpushtool/WebPushToolConnection.h: Added.
     20        * webpushd/webpushtool/WebPushToolConnection.mm: Added.
     21        (WebPushTool::Connection::create):
     22        (WebPushTool::maybeConnectToService):
     23        (WebPushTool::Connection::Connection):
     24        (WebPushTool::Connection::connectToService):
     25        (WebPushTool::Connection::startAction):
     26        (WebPushTool::Connection::startDebugStreamAction):
     27        (WebPushTool::Connection::sendAuditToken):
     28        (WebPushTool::Connection::connectionDropped):
     29        (WebPushTool::Connection::messageReceived):
     30        * webpushd/webpushtool/WebPushToolMain.mm: Added.
     31        (printUsageAndTerminate):
     32        (main):
     33
    1342021-12-04  Brent Fulgham  <bfulgham@apple.com>
    235
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r286527 r286533  
    1515                        );
    1616                        dependencies = (
     17                                517B5F6D275B07C3002DC22D /* PBXTargetDependency */,
    1718                                5C1579DF27165E0800ED5280 /* PBXTargetDependency */,
    1819                                5CAF7AA926F93F9F0003F19E /* PBXTargetDependency */,
     
    10241025                517B5F2E2757382A002DC22D /* WebPushDaemonConnectionConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 517B5F2D2757382A002DC22D /* WebPushDaemonConnectionConfiguration.h */; };
    10251026                517B5F2F2757382B002DC22D /* WebPushDaemonConnectionConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 517B5F2D2757382A002DC22D /* WebPushDaemonConnectionConfiguration.h */; };
     1027                517B5F65275A8D7F002DC22D /* WebPushToolMain.mm in Sources */ = {isa = PBXBuildFile; fileRef = 517B5F64275A8D7E002DC22D /* WebPushToolMain.mm */; };
     1028                517B5F68275A9A78002DC22D /* WebPushToolConnection.mm in Sources */ = {isa = PBXBuildFile; fileRef = 517B5F67275A9A78002DC22D /* WebPushToolConnection.mm */; };
    10261029                517CF0E3163A486C00C2950E /* NetworkProcessConnectionMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517CF0E1163A486C00C2950E /* NetworkProcessConnectionMessageReceiver.cpp */; };
    10271030                517CF0E3163A486C00C2950F /* CacheStorageEngineConnectionMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517CF0E1163A486C00C2950F /* CacheStorageEngineConnectionMessageReceiver.cpp */; };
     
    21272130                        remoteGlobalIDString = C0CE72851247E66800BC0EC4;
    21282131                        remoteInfo = "Derived Sources";
     2132                };
     2133                517B5F6C275B07C3002DC22D /* PBXContainerItemProxy */ = {
     2134                        isa = PBXContainerItemProxy;
     2135                        containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
     2136                        proxyType = 1;
     2137                        remoteGlobalIDString = 517B5F5A275A8D3E002DC22D;
     2138                        remoteInfo = webpushtool;
    21292139                };
    21302140                5742A2E72535613F00B7BA14 /* PBXContainerItemProxy */ = {
     
    43884398                517A530E1F47A84300DCDC0A /* WebSWClientConnectionMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebSWClientConnectionMessageReceiver.cpp; path = DerivedSources/WebKit2/WebSWClientConnectionMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
    43894399                517B5F2D2757382A002DC22D /* WebPushDaemonConnectionConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPushDaemonConnectionConfiguration.h; sourceTree = "<group>"; };
     4400                517B5F5B275A8D3E002DC22D /* webpushtool */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = webpushtool; sourceTree = BUILT_PRODUCTS_DIR; };
     4401                517B5F64275A8D7E002DC22D /* WebPushToolMain.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPushToolMain.mm; sourceTree = "<group>"; };
     4402                517B5F66275A9A78002DC22D /* WebPushToolConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPushToolConnection.h; sourceTree = "<group>"; };
     4403                517B5F67275A9A78002DC22D /* WebPushToolConnection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPushToolConnection.mm; sourceTree = "<group>"; };
     4404                517B5F6A275AA199002DC22D /* webpushtool.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = webpushtool.xcconfig; sourceTree = "<group>"; };
     4405                517B5F6B275AE50B002DC22D /* webpushtool.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; name = webpushtool.entitlements; path = Resources/webpushtool.entitlements; sourceTree = "<group>"; };
    43904406                517CF0E1163A486C00C2950E /* NetworkProcessConnectionMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkProcessConnectionMessageReceiver.cpp; path = DerivedSources/WebKit2/NetworkProcessConnectionMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
    43914407                517CF0E1163A486C00C2950F /* CacheStorageEngineConnectionMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CacheStorageEngineConnectionMessageReceiver.cpp; path = DerivedSources/WebKit2/CacheStorageEngineConnectionMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
     
    64486464                        runOnlyForDeploymentPostprocessing = 0;
    64496465                };
     6466                517B5F58275A8D3E002DC22D /* Frameworks */ = {
     6467                        isa = PBXFrameworksBuildPhase;
     6468                        buildActionMask = 2147483647;
     6469                        files = (
     6470                        );
     6471                        runOnlyForDeploymentPostprocessing = 0;
     6472                };
    64506473                5742A2ED2535613F00B7BA14 /* Frameworks */ = {
    64516474                        isa = PBXFrameworksBuildPhase;
     
    65436566                                A16E66002581930800EE1749 /* MediaFormatReader.bundle */,
    65446567                                8DC2EF5B0486A6940098B216 /* WebKit.framework */,
     6568                                517B5F5B275A8D3E002DC22D /* webpushtool */,
    65456569                        );
    65466570                        name = Products;
     
    67856809                                E1D26A4C1759634E0095BFD1 /* WebContentProcess.xib */,
    67866810                                E133FD891423DD7F00FC7BFB /* WebKit.icns */,
     6811                                517B5F6B275AE50B002DC22D /* webpushtool.entitlements */,
    67876812                        );
    67886813                        name = Resources;
     
    69366961                                37119A7C20CCB64E002C6DC9 /* WebKitTargetConditionals.xcconfig */,
    69376962                                5C1579DD27165BE500ED5280 /* webpushd.xcconfig */,
     6963                                517B5F6A275AA199002DC22D /* webpushtool.xcconfig */,
    69386964                        );
    69396965                        path = Configurations;
     
    94289454                        sourceTree = "<group>";
    94299455                };
     9456                517B5F63275A8D5C002DC22D /* webpushtool */ = {
     9457                        isa = PBXGroup;
     9458                        children = (
     9459                                517B5F66275A9A78002DC22D /* WebPushToolConnection.h */,
     9460                                517B5F67275A9A78002DC22D /* WebPushToolConnection.mm */,
     9461                                517B5F64275A8D7E002DC22D /* WebPushToolMain.mm */,
     9462                        );
     9463                        path = webpushtool;
     9464                        sourceTree = "<group>";
     9465                };
    94309466                518E8EF116B208F000E91429 /* Authentication */ = {
    94319467                        isa = PBXGroup;
     
    99069942                        isa = PBXGroup;
    99079943                        children = (
     9944                                517B5F63275A8D5C002DC22D /* webpushtool */,
    99089945                                5160E954274B887100567388 /* AppBundleRequest.h */,
    99099946                                5160E953274B887100567388 /* AppBundleRequest.mm */,
     
    1398014017                        productType = "com.apple.product-type.xpc-service";
    1398114018                };
     14019                517B5F5A275A8D3E002DC22D /* webpushtool */ = {
     14020                        isa = PBXNativeTarget;
     14021                        buildConfigurationList = 517B5F62275A8D3E002DC22D /* Build configuration list for PBXNativeTarget "webpushtool" */;
     14022                        buildPhases = (
     14023                                517B5F57275A8D3E002DC22D /* Sources */,
     14024                                517B5F58275A8D3E002DC22D /* Frameworks */,
     14025                        );
     14026                        buildRules = (
     14027                        );
     14028                        dependencies = (
     14029                        );
     14030                        name = webpushtool;
     14031                        productName = webpushtool;
     14032                        productReference = 517B5F5B275A8D3E002DC22D /* webpushtool */;
     14033                        productType = "com.apple.product-type.tool";
     14034                };
    1398214035                5742A2E52535613F00B7BA14 /* WebAuthn */ = {
    1398314036                        isa = PBXNativeTarget;
     
    1419814251                                LastUpgradeCheck = 1140;
    1419914252                                TargetAttributes = {
     14253                                        517B5F5A275A8D3E002DC22D = {
     14254                                                CreatedOnToolsVersion = 13.0;
     14255                                        };
    1420014256                                        5325BDCD21DFF47700A0DEE1 = {
    1420114257                                                CreatedOnToolsVersion = 10.1;
     
    1425514311                                5CAF7A9926F93A750003F19E /* adattributiond */,
    1425614312                                5C1579CC27165B2F00ED5280 /* webpushd */,
     14313                                517B5F5A275A8D3E002DC22D /* webpushtool */,
    1425714314                        );
    1425814315                };
     
    1500315060                                5CE912112293C278005BEC78 /* AuxiliaryProcessMain.cpp in Sources */,
    1500415061                                5C9A9112228F69CC005C5B17 /* XPCServiceMain.mm in Sources */,
     15062                        );
     15063                        runOnlyForDeploymentPostprocessing = 0;
     15064                };
     15065                517B5F57275A8D3E002DC22D /* Sources */ = {
     15066                        isa = PBXSourcesBuildPhase;
     15067                        buildActionMask = 2147483647;
     15068                        files = (
     15069                                517B5F68275A9A78002DC22D /* WebPushToolConnection.mm in Sources */,
     15070                                517B5F65275A8D7F002DC22D /* WebPushToolMain.mm in Sources */,
    1500515071                        );
    1500615072                        runOnlyForDeploymentPostprocessing = 0;
     
    1557115637                        targetProxy = 37F7407812721F740093869B /* PBXContainerItemProxy */;
    1557215638                };
     15639                517B5F6D275B07C3002DC22D /* PBXTargetDependency */ = {
     15640                        isa = PBXTargetDependency;
     15641                        target = 517B5F5A275A8D3E002DC22D /* webpushtool */;
     15642                        targetProxy = 517B5F6C275B07C3002DC22D /* PBXContainerItemProxy */;
     15643                };
    1557315644                5742A2E62535613F00B7BA14 /* PBXTargetDependency */ = {
    1557415645                        isa = PBXTargetDependency;
     
    1582015891                        name = Production;
    1582115892                };
     15893                517B5F5F275A8D3E002DC22D /* Debug */ = {
     15894                        isa = XCBuildConfiguration;
     15895                        baseConfigurationReference = 517B5F6A275AA199002DC22D /* webpushtool.xcconfig */;
     15896                        buildSettings = {
     15897                        };
     15898                        name = Debug;
     15899                };
     15900                517B5F60275A8D3E002DC22D /* Release */ = {
     15901                        isa = XCBuildConfiguration;
     15902                        baseConfigurationReference = 517B5F6A275AA199002DC22D /* webpushtool.xcconfig */;
     15903                        buildSettings = {
     15904                        };
     15905                        name = Release;
     15906                };
     15907                517B5F61275A8D3E002DC22D /* Production */ = {
     15908                        isa = XCBuildConfiguration;
     15909                        baseConfigurationReference = 517B5F6A275AA199002DC22D /* webpushtool.xcconfig */;
     15910                        buildSettings = {
     15911                        };
     15912                        name = Production;
     15913                };
    1582215914                5325BDCE21DFF47800A0DEE1 /* Debug */ = {
    1582315915                        isa = XCBuildConfiguration;
     
    1623416326                        defaultConfigurationName = Production;
    1623516327                };
     16328                517B5F62275A8D3E002DC22D /* Build configuration list for PBXNativeTarget "webpushtool" */ = {
     16329                        isa = XCConfigurationList;
     16330                        buildConfigurations = (
     16331                                517B5F5F275A8D3E002DC22D /* Debug */,
     16332                                517B5F60275A8D3E002DC22D /* Release */,
     16333                                517B5F61275A8D3E002DC22D /* Production */,
     16334                        );
     16335                        defaultConfigurationIsVisible = 0;
     16336                        defaultConfigurationName = Production;
     16337                };
    1623616338                5325BDD121DFF47800A0DEE1 /* Build configuration list for PBXAggregateTarget "Apply Configuration to XCFileLists" */ = {
    1623716339                        isa = XCConfigurationList;
Note: See TracChangeset for help on using the changeset viewer.