2014 snapchat source code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.3 KiB

  1. //
  2. // SCBlackCameraReporter.h
  3. // Snapchat
  4. //
  5. // Created by Derek Wang on 09/01/2018.
  6. //
  7. #import <SCBase/SCMacros.h>
  8. #import <Foundation/Foundation.h>
  9. typedef NS_ENUM(NSInteger, SCBlackCameraCause) {
  10. SCBlackCameraStartRunningNotCalled, // 1. View is visible, but session startRunning is not called
  11. SCBlackCameraSessionNotRunning, // 2. Session startRunning is called, but isRunning is still false
  12. SCBlackCameraRenderingPaused, // 3.1 View is visible, but capture preview rendering is paused
  13. SCBlackCameraPreviewIsHidden, // 3.2 For non-metal devices, capture preview is hidden
  14. SCBlackCameraSessionStartRunningBlocked, // 4.1 AVCaptureSession is blocked at startRunning
  15. SCBlackCameraSessionConfigurationBlocked, // 4.2 AVCaptureSession is blocked at commitConfiguration
  16. SCBlackCameraNoOutputData, // 5. Session is running, but no data output
  17. };
  18. @protocol SCManiphestTicketCreator;
  19. @interface SCBlackCameraReporter : NSObject
  20. SC_INIT_AND_NEW_UNAVAILABLE
  21. - (instancetype)initWithTicketCreator:(id<SCManiphestTicketCreator>)ticketCreator;
  22. - (NSString *)causeNameFor:(SCBlackCameraCause)cause;
  23. - (void)reportBlackCameraWithCause:(SCBlackCameraCause)cause;
  24. - (void)fileShakeTicketWithCause:(SCBlackCameraCause)cause;
  25. @end