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.

38 lines
1.0 KiB

  1. //
  2. // SCCaptureStateUtil.m
  3. // Snapchat
  4. //
  5. // Created by Lin Jia on 10/27/17.
  6. //
  7. //
  8. #import "SCCaptureStateUtil.h"
  9. #import <SCFoundation/SCAppEnvironment.h>
  10. #import <SCFoundation/SCAssertWrapper.h>
  11. NSString *SCCaptureStateName(SCCaptureStateMachineStateId stateId)
  12. {
  13. switch (stateId) {
  14. case SCCaptureBaseStateId:
  15. return @"SCCaptureBaseStateId";
  16. case SCCaptureUninitializedStateId:
  17. return @"SCCaptureUninitializedStateId";
  18. case SCCaptureInitializedStateId:
  19. return @"SCCaptureInitializedStateId";
  20. case SCCaptureImageStateId:
  21. return @"SCCaptureImageStateId";
  22. case SCCaptureImageWhileRecordingStateId:
  23. return @"SCCaptureImageWhileRecordingStateId";
  24. case SCCaptureRunningStateId:
  25. return @"SCCaptureRunningStateId";
  26. case SCCaptureRecordingStateId:
  27. return @"SCCaptureRecordingStateId";
  28. case SCCaptureScanningStateId:
  29. return @"SCCaptureScanningStateId";
  30. default:
  31. SCCAssert(NO, @"illegate state id");
  32. break;
  33. }
  34. return @"SCIllegalStateId";
  35. }