FBCommandHandler.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. */
  9. #import <Foundation/Foundation.h>
  10. #import <WebDriverAgentLib/FBCommandStatus.h>
  11. #import <WebDriverAgentLib/FBResponsePayload.h>
  12. #import <WebDriverAgentLib/FBRoute.h>
  13. #import <WebDriverAgentLib/FBResponsePayload.h>
  14. NS_ASSUME_NONNULL_BEGIN
  15. /**
  16. Protocol for Classes to declare intent to implement responses to commands
  17. */
  18. @protocol FBCommandHandler <NSObject>
  19. /**
  20. * Should return map of FBRouteCommandHandler block with keys as supported routes
  21. *
  22. * @return map an NSArray<FBRoute *> of routes.
  23. */
  24. + (NSArray *)routes;
  25. @optional
  26. /**
  27. * @return BOOL deciding if class should be added to route handlers automatically, default (if not implemented) is YES
  28. */
  29. + (BOOL)shouldRegisterAutomatically;
  30. @end
  31. NS_ASSUME_NONNULL_END