@aptos-scp/scp-component-rn-device-services 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit +0 -0
  2. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/Info.plist +0 -0
  3. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/VersionInfo.plist +0 -0
  4. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.2.mom +0 -0
  5. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.3.mom +0 -0
  6. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.4.mom +0 -0
  7. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.4.omo +0 -0
  8. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.mom +0 -0
  9. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.8.6.mom +0 -0
  10. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.9.mom +0 -0
  11. package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit.mom +0 -0
  12. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYAccountData.h +26 -0
  13. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYAdditionalDataRequest.h +38 -0
  14. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYAmount.h +16 -0
  15. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYAppData.h +26 -0
  16. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYBalance.h +13 -0
  17. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYCashTransactionRequest.h +35 -0
  18. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYConstants.h +688 -0
  19. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYCurrency.h +33 -0
  20. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDevice.h +308 -0
  21. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDeviceData.h +52 -0
  22. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDeviceManagerDelegate.h +66 -0
  23. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDeviceRegistry.h +125 -0
  24. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDynamicCurrencyConversionData.h +22 -0
  25. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYErrors.h +153 -0
  26. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCard.h +41 -0
  27. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardBalanceRequest.h +50 -0
  28. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardBalanceResponse.h +38 -0
  29. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardLoadRequest.h +78 -0
  30. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardLoadRequestDelegate.h +25 -0
  31. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardLoadResponse.h +31 -0
  32. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardMask.h +31 -0
  33. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardRequest.h +13 -0
  34. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYLocationManager.h +14 -0
  35. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYLoginDelegate.h +80 -0
  36. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYPrintReceiptRequest.h +57 -0
  37. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYReceipt.h +33 -0
  38. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYReceiptLine.h +92 -0
  39. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYReferralRequest.h +16 -0
  40. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYRefundData.h +54 -0
  41. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYServerSynchronization.h +18 -0
  42. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYSignatureRequest.h +117 -0
  43. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYSpecialTransactionRequest.h +63 -0
  44. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYToneGenerator.h +45 -0
  45. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYTransactionData.h +416 -0
  46. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYTransactionDetails.h +45 -0
  47. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYTransactionProcessorDelegate.h +279 -0
  48. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYTransactionRequest.h +108 -0
  49. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYUIKit.h +30 -0
  50. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/Adyen.h +591 -0
  51. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/AdyenToolkit-umbrella.h +59 -0
  52. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/AdyenToolkit.h +79 -0
  53. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/NSData+ADY.h +31 -0
  54. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/NSString+ADY.h +19 -0
  55. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/adylog.h +176 -0
  56. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Info.plist +0 -0
  57. package/ios/Frameworks/Adyen/AdyenToolkit.framework/Modules/module.modulemap +6 -0
  58. package/ios/SCPRNDeviceServices/Adyen/AdyenConstants.h +40 -0
  59. package/ios/SCPRNDeviceServices/Adyen/AdyenConstants.m +28 -0
  60. package/ios/SCPRNDeviceServices/Adyen/AdyenDelegate.h +23 -0
  61. package/ios/SCPRNDeviceServices/Adyen/AdyenDelegate.m +15 -0
  62. package/ios/SCPRNDeviceServices/Adyen/AdyenDeviceManagerDelegate.h +19 -0
  63. package/ios/SCPRNDeviceServices/Adyen/AdyenDeviceManagerDelegate.m +31 -0
  64. package/ios/SCPRNDeviceServices/Adyen/AdyenLoginDelegate.h +19 -0
  65. package/ios/SCPRNDeviceServices/Adyen/AdyenLoginDelegate.m +26 -0
  66. package/ios/SCPRNDeviceServices/Adyen/AdyenTransactionProcessorDelegate.h +26 -0
  67. package/ios/SCPRNDeviceServices/Adyen/AdyenTransactionProcessorDelegate.m +148 -0
  68. package/ios/SCPRNDeviceServices/AdyenPaymentTerminal.h +19 -0
  69. package/ios/SCPRNDeviceServices/AdyenPaymentTerminal.m +457 -22
  70. package/ios/SCPRNDeviceServices.xcodeproj/project.pbxproj +56 -0
  71. package/lib/AdyenDevice/AdyenDevice.d.ts +56 -0
  72. package/lib/AdyenDevice/AdyenDevice.js +350 -0
  73. package/lib/AdyenDevice/AdyenDevice.js.map +1 -0
  74. package/lib/AdyenDevice/constants.d.ts +13 -0
  75. package/lib/AdyenDevice/constants.js +228 -0
  76. package/lib/AdyenDevice/constants.js.map +1 -0
  77. package/lib/AdyenDevice/index.d.ts +1 -0
  78. package/lib/AdyenDevice/index.js +7 -0
  79. package/lib/AdyenDevice/index.js.map +1 -0
  80. package/lib/AdyenDevice/interfaces.d.ts +175 -0
  81. package/lib/AdyenDevice/interfaces.js +3 -0
  82. package/lib/AdyenDevice/interfaces.js.map +1 -0
  83. package/lib/AurusDevice/AurusDevice.js +1 -1
  84. package/lib/AurusDevice/AurusDevice.js.map +1 -1
  85. package/lib/PaymentDeviceFactory.d.ts +1 -1
  86. package/lib/PaymentDeviceFactory.js +1 -1
  87. package/lib/ScannerDeviceFactory.d.ts +1 -1
  88. package/lib/ScannerDeviceFactory.js +2 -2
  89. package/lib/ScannerDeviceFactory.js.map +1 -1
  90. package/lib/configs/inversify/inversify.config.js +4 -2
  91. package/lib/configs/inversify/inversify.config.js.map +1 -1
  92. package/lib/interfaces/payment/messages/responses.d.ts +1 -1
  93. package/package.json +1 -1
@@ -0,0 +1,92 @@
1
+ //
2
+ // ADYReceiptLine.h
3
+ // DeepThoughts
4
+ //
5
+ // Created by Willem Lobbezoo on 29-04-12.
6
+ // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import "ADYUIKit.h"
11
+
12
+ typedef NS_ENUM(NSUInteger, ADYReceiptLineType) {
13
+ ADYReceiptLineTypeEmpty,
14
+ ADYReceiptLineTypeNameValue,
15
+ ADYReceiptLineTypeName,
16
+ ADYReceiptLineTypeImage
17
+ };
18
+
19
+ /**
20
+ * Instances of this class represent one line in a receipt.
21
+ *
22
+ * A line can consist of either a name and a value, only
23
+ * a name, or nothing at all (an empty line).
24
+ */
25
+
26
+ @interface ADYReceiptLine : NSObject <NSCoding>
27
+
28
+ /**
29
+ * @deprecated Use `isEmphasized` instead.
30
+ */
31
+ @property (strong, nonatomic) NSString *format;
32
+
33
+ /**
34
+ * @deprecated Use `type` instead.
35
+ */
36
+ @property (strong, nonatomic) NSString *mustPrint;
37
+
38
+ /**
39
+ * @deprecated Use the position in the containing
40
+ * `ADYReceipt` instead.
41
+ */
42
+ @property (strong, nonatomic) NSString *position;
43
+
44
+ /**
45
+ * The name of the line.
46
+ */
47
+ @property (strong, nonatomic) NSString *key;
48
+
49
+ /**
50
+ * The name of the line.
51
+ */
52
+ @property (strong, nonatomic) NSString *name;
53
+
54
+ /**
55
+ * The value of the line.
56
+ */
57
+ @property (strong, nonatomic) NSString *value;
58
+
59
+ /**
60
+ * The image of the line. Usually a logo to go on top of the receipt or
61
+ * the signature.
62
+ * Check the `type` property to determine if this line is an image.
63
+ */
64
+ @property (nonatomic, strong, readonly) ADYImageClassName *image;
65
+
66
+ /**
67
+ * Boolean indicating if the line should be printed
68
+ * with emphasis (i.e. with a bold font).
69
+ */
70
+ @property (nonatomic, assign, getter=isEmphasized) BOOL emphasized;
71
+
72
+ /**
73
+ * The type of the line.
74
+ *
75
+ * This can be one of the following:
76
+ *
77
+ * - `ADYReceiptLineTypeEmpty`: neither the `name` nor the `value`
78
+ * are valid, an empty line must be printed.
79
+ * - `ADYReceiptLineTypeNameValue`: both the `name` and the `value`
80
+ * are valid, both must be printed.
81
+ * - `ADYReceiptLineTypeName`: only the `name` is valid and must be printed.
82
+ * - `ADYReceiptLineTypeImage`: the line represents an image. Usually a logo.
83
+ */
84
+ @property (nonatomic, readonly) ADYReceiptLineType type;
85
+
86
+ - (void)setEncodedImage:(NSString *)encodedImage;
87
+
88
+ - (void)encodeWithCoder:(NSCoder *)coder;
89
+ //- (void) debug;
90
+
91
+
92
+ @end
@@ -0,0 +1,16 @@
1
+ //
2
+ // ADYReferralRequest.h
3
+ // Pods
4
+ //
5
+ // Created by Taras Kalapun on 9/29/15.
6
+ //
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ @interface ADYReferralRequest : NSObject
12
+
13
+
14
+ - (void)submitReferralWithCode:(NSString *)code;
15
+
16
+ @end
@@ -0,0 +1,54 @@
1
+ //
2
+ // AdyenPOSLib
3
+ //
4
+ // Created by Jeroen Bouma on 10/30/13.
5
+ //
6
+
7
+ #import <Foundation/Foundation.h>
8
+ #import "ADYConstants.h"
9
+
10
+ /**
11
+ * Instances of this class represent a refund on a particular transaction.
12
+ *
13
+ * A single transaction can have multiple refund instances. This is because
14
+ * a transaction can be refunded as a whole or partially. For example: when
15
+ * a customer purchased more than one item with one payment, but decides later on
16
+ * that one of the items is not satisfactory, only a part of the original
17
+ * transaction should be refunded.
18
+ *
19
+ * This can occur a number of times until all of the original amount has been
20
+ * refunded.
21
+ *
22
+ * The amount has to be refunded in the same currency as the original transaction.
23
+ */
24
+ @interface ADYRefundData : NSObject
25
+
26
+ /**
27
+ * The unique pspReference to identify this refund.
28
+ */
29
+ @property (nonatomic, strong) NSString * pspReference;
30
+
31
+ /**
32
+ * The amount that was refunded
33
+ */
34
+ @property (nonatomic, strong) NSNumber * amount;
35
+
36
+ /**
37
+ * The date/time this refund was completed
38
+ */
39
+ @property (nonatomic, strong) NSDate * date;
40
+
41
+ /**
42
+ * An optional reference or description for this refund
43
+ */
44
+ @property (nonatomic, strong) NSString * reference;
45
+
46
+ /**
47
+ * The processing state of the refund, indicating if the refund
48
+ * was already submitted to the server or is waiting for a working
49
+ * internet connection. Can be `ADYProcessingStateProcessed` or
50
+ * `ADYProcessingStateReversalPending`.
51
+ */
52
+ @property (nonatomic, assign) ADYProcessingState processingState;
53
+
54
+ @end
@@ -0,0 +1,18 @@
1
+ //
2
+ // ADYServerSynchronization.h
3
+ // AdyenPOSLib
4
+ //
5
+ // Created by Jeroen Koops on 6/10/13.
6
+ //
7
+ //
8
+
9
+ #ifndef AdyenPOSLib_ADYServerSynchronization_h
10
+ #define AdyenPOSLib_ADYServerSynchronization_h
11
+
12
+ typedef NS_ENUM(NSUInteger, ADYServerSynchronizerState) {
13
+ ADYServerSynchronizerStateWaitingForNetwork = 0,
14
+ ADYServerSynchronizerStateSynchronizing = 1,
15
+ ADYServerSynchronizerStateIdle = 2,
16
+ } ;
17
+
18
+ #endif
@@ -0,0 +1,117 @@
1
+ //
2
+ // ADYSignatureRequest.h
3
+ // AdyenPOSLib
4
+ //
5
+ // Created by Jeroen Koops on 4/11/13.
6
+ //
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import "ADYUIKit.h"
11
+ #import "ADYConstants.h"
12
+
13
+ /**
14
+ * Request-object used to inform the ADYTransactionProcessorDelegate
15
+ * that the cardholder's signature must be checked. This is described
16
+ * fully under [ADYTransactionProcessorDelegate transactionRequiresSignature:].
17
+ */
18
+ @interface ADYSignatureRequest : NSObject
19
+
20
+ /**
21
+ * The transactionData is an NSDictionary containing key/value pairs.
22
+ *
23
+ * - `key=signature.merchant.name1, value=the merchant name as used printing the receipt (first line)`
24
+ * - `key=signature.merchant.name2, value=the merchant name as used printing the receipt (second line)`
25
+ * - `key=signature.amount.currency, value=currency of the transaction`
26
+ * - `key=signature.amount.value, value=ORIGINAL amount of the transaction`
27
+ * - `key=signature.updated.amount.value, value=UPDATED amount of the transaction`
28
+ *
29
+ * Please note that the updated amount can be higher (i.e. tip) or lower (i.e. discount)
30
+ * or can be equal to the original amount
31
+ *
32
+ * @deprecated: the other properties of ADYSignatureRequest expose all data more conveniently.
33
+ */
34
+ @property (readonly) NSDictionary* transactionData;
35
+
36
+ /**
37
+ * The transactionData contains 2 merchant name lines. The first line can
38
+ * be either a text name or an image. If the signature.merchant.name1 line
39
+ * is an image it can be accessed through this property.
40
+ *
41
+ * If it is not configured it will be nil.
42
+ */
43
+ @property (readonly) ADYImageClassName *merchantImage;
44
+
45
+ /**
46
+ * The transactionData contains 2 merchant name lines. The first line can
47
+ * be either a text name or an image. The second line is always text.
48
+ *
49
+ * This property is a convenient way to iterate through the textual lines
50
+ * of the merchant name. The merchantImage exposes the image contained
51
+ * by line 1 (if any).
52
+ */
53
+ @property (readonly) NSArray *merchantNameLines;
54
+
55
+ /**
56
+ * The currency type used for the transaction
57
+ */
58
+ @property (readonly) NSString *transactionCurrency;
59
+
60
+ /**
61
+ * The amount in minor units (int) of the transaction
62
+ */
63
+ @property (readonly) NSNumber *transactionAmount;
64
+
65
+ /**
66
+ * The merchant reference of the transaction
67
+ */
68
+ @property (readonly) NSString *transactionReference;
69
+
70
+
71
+ /**
72
+ * The cardHolder of the transaction
73
+ */
74
+ @property (readonly) NSString *cardHolder;
75
+
76
+ /**
77
+ * The summary of the card used for the transaction
78
+ */
79
+ @property (readonly) NSString *cardSummary;
80
+
81
+ /**
82
+ * The card scheme used for the transaction
83
+ */
84
+ @property (readonly) ADYCardScheme cardScheme;
85
+
86
+ /**
87
+ * The authentication code of the card used for this transaction
88
+ */
89
+ @property (readonly) NSString *authenticationCode;
90
+
91
+ /**
92
+ * The signature image, if the signature was given (drawn) on the
93
+ * payment device touch screen and needs to be verified by the merchant.
94
+ */
95
+ @property (readonly) ADYImageClassName *signatureImage;
96
+
97
+ /**
98
+ * Continue transaction-processing by confirming that the
99
+ * signature drawn by the customer matches the signature on the card.
100
+ *
101
+ * @param signatureImage An image containing the signature drawn
102
+ * by the customer, or `nil` if the customer drew their signature on
103
+ * a paper receipt (only possible if a printer is available).
104
+ */
105
+ - (void)submitConfirmedSignature:(ADYImageClassName *)signatureImage;
106
+
107
+ /**
108
+ * Continue transaction-processing by asserting that the
109
+ * signature drawn by the customer does not match the
110
+ * signature on the card.
111
+ *
112
+ * @param signatureImage An image containing the signature drawn
113
+ * by the customer, or `nil` if the customer drew their signature on
114
+ * a paper receipt (only possible if a printer is available).
115
+ */
116
+ - (void)submitUnconfirmedSignature:(ADYImageClassName *)signatureImage;
117
+ @end
@@ -0,0 +1,63 @@
1
+ //
2
+ // ADYSpecialTransactionRequest.h
3
+ // AdyenToolkit
4
+ //
5
+ // Created by Diego Marcon on 03/10/2017.
6
+ //
7
+
8
+ #import "ADYTransactionRequest.h"
9
+
10
+ /**
11
+ Request for a special payment transaction.
12
+
13
+ Obtain a request by calling `createSpecialTransactionRequestWithReference:` on the `ADYDevice` instance of choice. Then,
14
+ fill in all required properties. Finally, start the transaction by calling startWithDelegate:. The
15
+ delegate will be informed of the transaction's progress, and when the transaction is complete.
16
+
17
+ You can call `requestCancel` to request cancellation of the running transaction.
18
+ */
19
+ @interface ADYSpecialTransactionRequest: NSObject
20
+
21
+ /** A merchant-supplied reference for the transaction */
22
+ @property (nonatomic, strong) NSString *reference;
23
+
24
+ /** Payment method type */
25
+ @property (nonatomic, strong) NSString *paymentMethodType;
26
+
27
+ /** Transaction type */
28
+ @property (nonatomic, strong) NSString *transactionType;
29
+
30
+ /** Optional dictionary with transaction options. Only NSString typed values are allowed */
31
+ @property (nonatomic, strong) NSDictionary *options;
32
+
33
+ /** The currency to use on the transaction. */
34
+ @property (nonatomic, strong) NSString *currency;
35
+
36
+ /** The amount to process on the transaction in minor units (cents). */
37
+ @property (nonatomic, strong) NSNumber *amount;
38
+
39
+ /** The amount to process on the transaction in minor units (cents). */
40
+ @property (nonatomic) BOOL handleReceipt;
41
+
42
+ /** Optional dictionary to specify RAW additionalData keys and values to be passed to tender */
43
+ @property (nonatomic, strong) NSMutableDictionary *additionalData;
44
+
45
+ /**
46
+ * Starts the transaction.
47
+ *
48
+ * @param delegate this delegate will be informed of the transaction's progress and completion.
49
+ * @param error if the transaction cant be started, the error will be set.
50
+ */
51
+ - (BOOL)startWithDelegate:(id<ADYTransactionProcessorDelegate>)delegate error:(NSError **)error;
52
+
53
+ /**
54
+ * Requests for the transaction to be cancelled.
55
+ * This is only a _request_ for cancellation. It is up to the payment device to honour this request
56
+ * or not. This method returns immediately, the delegate given in the call to
57
+ * startWithDelegate: will continue to receive updates on the transaction's status, and completion. If
58
+ * cancellation is successful, the status of the completed transaction will be `FinalStateCANCELLED`,
59
+ * but if the transaction could not be cancelled, it will be one of the other final states.
60
+ */
61
+ - (void)requestCancel;
62
+
63
+ @end
@@ -0,0 +1,45 @@
1
+ //
2
+ // ADYToneGenerator
3
+ //
4
+ // Created by Taras Kalapun
5
+
6
+ /*
7
+
8
+ - When a card has been presented and read successfully, a success tone (single beep) should be sounded; The success tone shall be a single ‘beep’ with a frequency of approximately 1500 Hertz, sine wave shape and duration of approximately 500ms.
9
+ - When the reader indicates a requirement to switch interfaces, an alert tone (double beep) should be sounded; The alert tone shall be a double ‘beep’ with a frequency of approximately 750 Hertz, sine wave shape. Each ‘beep’ shall have a duration of approximately 200ms with a gap between the two ‘beeps’ of approximately 200ms.
10
+
11
+ */
12
+
13
+ #import <Foundation/Foundation.h>
14
+
15
+ #define SINE_WAVE_TONE_GENERATOR_FREQUENCY_DEFAULT 440.0f
16
+
17
+ #define SINE_WAVE_TONE_GENERATOR_SAMPLE_RATE_DEFAULT 44100.0f
18
+
19
+ #define SINE_WAVE_TONE_GENERATOR_AMPLITUDE_LOW 0.01f
20
+ #define SINE_WAVE_TONE_GENERATOR_AMPLITUDE_MEDIUM 0.02f
21
+ #define SINE_WAVE_TONE_GENERATOR_AMPLITUDE_HIGH 0.03f
22
+ #define SINE_WAVE_TONE_GENERATOR_AMPLITUDE_FULL 0.25f
23
+ #define SINE_WAVE_TONE_GENERATOR_AMPLITUDE_DEFAULT 1.0f
24
+
25
+ #define ALERT_SUCCESS_FREQUENCY 1500.0f // Hertz
26
+ #define ALERT_SUCCESS_DURATION 500 // ms
27
+
28
+ #define ALERT_SWITCH_FREQUENCY 750.0f // Hertz
29
+ #define ALERT_SWITCH_DURATION 200 // ms
30
+ #define ALERT_SWITCH_GAP 200 // ms
31
+
32
+ typedef struct {
33
+ double frequency;
34
+ double theta;
35
+ } ADYToneInfo;
36
+
37
+ @interface ADYToneGenerator : NSObject
38
+
39
+ - (void)alertSuccess;
40
+ - (void)alertSwitch;
41
+
42
+ + (void)alertSuccess;
43
+ + (void)alertSwitch;
44
+
45
+ @end