DSignatureConfig.swift 4.2 KB

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