DSignatureConfig.swift 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. //
  2. // DSignatureConfig.swift
  3. // PDF Reader Pro Edition
  4. //
  5. // Created by Niehaoyu on 2023/9/27.
  6. //
  7. import Foundation
  8. let kNAME_KEY = NSLocalizedString("Signed by", comment: "")
  9. let DN_KEY = NSLocalizedString("DN", comment: "")
  10. let REASON_KEY = NSLocalizedString("Reason", comment: "")
  11. let LOCATION_KEY = NSLocalizedString("Location", comment: "")
  12. let DATE_KEY = NSLocalizedString("Date", comment: "")
  13. #if VERSION_FREE
  14. #if VERSION_DMG
  15. let VERSION_KEY = NSLocalizedString("PDF Reader Pro Version", comment: "")
  16. #else
  17. let VERSION_KEY = NSLocalizedString("PDF Reader Pro Lite Version", comment: "")
  18. #endif
  19. #else
  20. let VERSION_KEY = NSLocalizedString("PDF Reader Pro Version", comment: "")
  21. #endif
  22. let ISDRAW_KEY = "isDrawKey"
  23. let ISDRAWLOGO_KEY = "isDrawLogo"
  24. let ISCONTENTALGINLEGF_KEY = "isContentAlginLeft"
  25. let SAVEFILEPATH_KEY = "FilePathKey"
  26. let PASSWORD_KEY = "PassWordKey"
  27. let CAuthenticationLastNameKey = "CAuthenticationLastName"
  28. let CAuthenticationNameKey = "CAuthenticationName"
  29. let CAuthenticationTitleKey = "CAuthenticationTitle"
  30. let CAuthenticationCompanyNameKey = "CAuthenticationCompanyName"
  31. let CAuthenticationCompanyNameSealKey = "CAuthenticationCompanyNameSeal"
  32. let CAuthenticationDepartmentKey = "CAuthenticationDepartment"
  33. let CAuthenticationEmailAddressKey = "CAuthenticationEmailAddress"
  34. let KMSignatureTrustCerDidChangeNotification = "KMSignatureTrustCerDidChangeNotification"
  35. let ApplicationSupportDirectory = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.applicationSupportDirectory, FileManager.SearchPathDomainMask.userDomainMask, true).last! + "/" + Bundle.main.bundleIdentifier!
  36. let kDSignatureFolderPath = ApplicationSupportDirectory.appending("/CDSignaturesAppearance")
  37. let kDSignaturePlistPath = kDSignatureFolderPath.appending("/CDSignaturesAppearance.plist")
  38. let kDigitalSignatureFolderPath = ApplicationSupportDirectory.appending("/DigitalSignature")
  39. let kDigitalSignaturePlistPath = kDigitalSignatureFolderPath.appending("/DigitalSignature.plist")
  40. let kLastAddDSignatureDataKey = "CAddLastDSignatureDatasKey"
  41. let kDSignatureOfTextKey = "DSignatureOfNameTextKey"
  42. let kDSignatureOfIsTextKey = "DSignatureOfNameISTextKey"
  43. let kDSignatureOfImagePathKey = "DSignatureOfImagePathKey"
  44. let kDSignatureOfAppearanceKey = "DSignatureOfAppearanceKey"
  45. let kDSignatureOfDrawTypeKey = "DSignatureOfDrawTypeKey"
  46. class DSignatureConfig {
  47. }
  48. @objc public enum DSignatureViewType: NSInteger {
  49. case none = 0
  50. case fileList = 1
  51. case certifyDetail = 2
  52. case createNew = 3
  53. case createFromFile = 4
  54. case saveType = 5
  55. case createInfo = 6
  56. case saveFolderType = 7
  57. case signatureDetail = 8
  58. case edit = 9
  59. case fromFileList = 10
  60. }
  61. @objc public enum DSignatureActionType: NSInteger {
  62. case none = 0
  63. case cancel = 1
  64. case confirm = 2
  65. case createNewDsign = 3
  66. case previousStep = 4
  67. case create = 5
  68. case edit = 6
  69. case delete = 7
  70. case viewDetail = 8
  71. }
  72. @objc public enum CDSignatureCreatType: NSInteger {
  73. case createNone = 0
  74. case signCreate = 1
  75. case fromFile = 2
  76. }
  77. @objc public enum CDSignatureSaveType: NSInteger {
  78. case none = 0
  79. case folder = 1
  80. case keyChain = 2
  81. }
  82. @objc public enum CDSignatureCustomType: NSInteger {
  83. case text = 0
  84. case draw = 1
  85. case image = 2
  86. case none = 3
  87. }
  88. @objc public enum CPromptSignaturesState: NSInteger {
  89. case failure = 0
  90. case Unknown = 1
  91. case Success = 2
  92. }
  93. @objcMembers public class Swift_oc_Tool: NSObject {
  94. static let NAME_KEY_OC = kNAME_KEY
  95. static let DN_KEY_OC = DN_KEY
  96. static let REASON_KEY_OC = REASON_KEY
  97. static let LOCATION_KEY_OC = LOCATION_KEY
  98. static let DATE_KEY_OC = DATE_KEY
  99. static let VERSION_KEY_OC = VERSION_KEY
  100. static let SAVEFILEPATH_KEY_OC = SAVEFILEPATH_KEY
  101. static let PASSWORD_KEY_OC = PASSWORD_KEY
  102. static let kDSignatureFolderPath_OC = kDSignatureFolderPath
  103. static let kDSignaturePlistPath_OC = kDSignaturePlistPath
  104. static let kDigitalSignatureFolderPath_OC = kDigitalSignatureFolderPath
  105. static let kDigitalSignaturePlistPath_OC = kDigitalSignaturePlistPath
  106. }