react-native-gizwits-sdk-v5 1.5.6-light → 1.5.6-thirdbluetooth
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.
- package/android/build.gradle +7 -5
- package/android/libs/sdk-bluetooth-release.aar +0 -0
- package/android/libs/sdk-lan-release.aar +0 -0
- package/android/libs/sdk-mqtt-release.aar +0 -0
- package/android/libs/sdk-release.aar +0 -0
- package/android/src/main/java/com/gizwits/reactnativegizwitssdkv5/GizRNCallbackManager.kt +6 -5
- package/android/src/main/java/com/gizwits/reactnativegizwitssdkv5/RNGizDeviceManagerModule.kt +123 -85
- package/android/src/main/java/com/gizwits/reactnativegizwitssdkv5/RNGizParamsChecker.kt +1 -0
- package/ios/GizwitsiOSSDK.framework/GizwitsiOSSDK +0 -0
- package/ios/GizwitsiOSSDK.framework/Headers/CocoaAsyncSocket.h +18 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDASLLogger.h +41 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDAbstractDatabaseLogger.h +102 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDContextFilterLogFormatter.h +63 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDDispatchQueueLogFormatter.h +128 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDFileLogger.h +340 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDLog+LOGV.h +99 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDLog.h +632 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDMultiFormatter.h +30 -0
- package/ios/GizwitsiOSSDK.framework/Headers/DDTTYLogger.h +171 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPAES.h +19 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPDataCode.h +44 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPDatumCode.h +38 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPGuideCode.h +15 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPTools.h +22 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPTouch.h +36 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchDelegate.h +24 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchGenerator.h +46 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchResult.h +36 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchTask.h +124 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchTaskParameter.h +173 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPUDPSocketClient.h +50 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESPUDPSocketServer.h +49 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESP_ByteUtil.h +128 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESP_CRC8.h +61 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESP_NetUtil.h +82 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ESP_WifiUtil.h +33 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ForegroundReconnection.h +23 -0
- package/ios/GizwitsiOSSDK.framework/Headers/GCDTimer.h +19 -0
- package/ios/GizwitsiOSSDK.framework/Headers/GizwitsiOSSDK-Swift.h +338 -0
- package/ios/GizwitsiOSSDK.framework/Headers/GizwitsiOSSDK.h +24 -0
- package/ios/GizwitsiOSSDK.framework/Headers/MQTTClient.h +39 -0
- package/ios/GizwitsiOSSDK.framework/Headers/MQTTInMemoryPersistence.h +16 -0
- package/ios/GizwitsiOSSDK.framework/Headers/MQTTSSLSecurityPolicyDecoder.h +19 -0
- package/ios/GizwitsiOSSDK.framework/Headers/MQTTSSLSecurityPolicyEncoder.h +18 -0
- package/ios/GizwitsiOSSDK.framework/Headers/MQTTSessionLegacy.h +112 -0
- package/ios/GizwitsiOSSDK.framework/Headers/MQTTSessionSynchron.h +194 -0
- package/ios/GizwitsiOSSDK.framework/Headers/MQTTStrict.h +33 -0
- package/ios/GizwitsiOSSDK.framework/Headers/MQTTUntil.h +14 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ReconnectTimer.h +21 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_GCDAsyncSocket.h +1226 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_GCDAsyncUdpSocket.h +1036 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_GizwitsParser.h +61 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTCFSocketDecoder.h +39 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTCFSocketEncoder.h +38 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTCFSocketTransport.h +79 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTCoreDataPersistence.h +21 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTDecoder.h +66 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTLog.h +123 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTMessage.h +233 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTPersistence.h +124 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTProperties.h +76 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTSSLSecurityPolicy.h +158 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTSSLSecurityPolicyTransport.h +30 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTSession.h +886 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTSessionManager.h +237 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_MQTTTransport.h +114 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_SSZipArchive.h +178 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_SSZipCommon.h +71 -0
- package/ios/GizwitsiOSSDK.framework/Headers/_ZipArchive.h +26 -0
- package/ios/GizwitsiOSSDK.framework/Headers/a_weighting.h +88 -0
- package/ios/GizwitsiOSSDK.framework/Headers/aubio.h +231 -0
- package/ios/GizwitsiOSSDK.framework/Headers/audio_unit.h +61 -0
- package/ios/GizwitsiOSSDK.framework/Headers/awhitening.h +125 -0
- package/ios/GizwitsiOSSDK.framework/Headers/beattracking.h +121 -0
- package/ios/GizwitsiOSSDK.framework/Headers/biquad.h +75 -0
- package/ios/GizwitsiOSSDK.framework/Headers/c_weighting.h +88 -0
- package/ios/GizwitsiOSSDK.framework/Headers/common.h +104 -0
- package/ios/GizwitsiOSSDK.framework/Headers/cvec.h +247 -0
- package/ios/GizwitsiOSSDK.framework/Headers/dct.h +85 -0
- package/ios/GizwitsiOSSDK.framework/Headers/fft.h +144 -0
- package/ios/GizwitsiOSSDK.framework/Headers/filter.h +176 -0
- package/ios/GizwitsiOSSDK.framework/Headers/filterbank.h +90 -0
- package/ios/GizwitsiOSSDK.framework/Headers/filterbank_mel.h +72 -0
- package/ios/GizwitsiOSSDK.framework/Headers/fmat.h +172 -0
- package/ios/GizwitsiOSSDK.framework/Headers/fvec.h +178 -0
- package/ios/GizwitsiOSSDK.framework/Headers/hist.h +63 -0
- package/ios/GizwitsiOSSDK.framework/Headers/ioutils.h +60 -0
- package/ios/GizwitsiOSSDK.framework/Headers/log.h +99 -0
- package/ios/GizwitsiOSSDK.framework/Headers/lvec.h +118 -0
- package/ios/GizwitsiOSSDK.framework/Headers/mathutils.h +330 -0
- package/ios/GizwitsiOSSDK.framework/Headers/mfcc.h +79 -0
- package/ios/GizwitsiOSSDK.framework/Headers/musicutils.h +171 -0
- package/ios/GizwitsiOSSDK.framework/Headers/notes.h +113 -0
- package/ios/GizwitsiOSSDK.framework/Headers/onset.h +347 -0
- package/ios/GizwitsiOSSDK.framework/Headers/parameter.h +159 -0
- package/ios/GizwitsiOSSDK.framework/Headers/peakpicker.h +57 -0
- package/ios/GizwitsiOSSDK.framework/Headers/phasevoc.h +112 -0
- package/ios/GizwitsiOSSDK.framework/Headers/pitch.h +197 -0
- package/ios/GizwitsiOSSDK.framework/Headers/pitchfcomb.h +76 -0
- package/ios/GizwitsiOSSDK.framework/Headers/pitchmcomb.h +77 -0
- package/ios/GizwitsiOSSDK.framework/Headers/pitchschmitt.h +75 -0
- package/ios/GizwitsiOSSDK.framework/Headers/pitchspecacf.h +103 -0
- package/ios/GizwitsiOSSDK.framework/Headers/pitchyin.h +100 -0
- package/ios/GizwitsiOSSDK.framework/Headers/pitchyinfast.h +102 -0
- package/ios/GizwitsiOSSDK.framework/Headers/pitchyinfft.h +99 -0
- package/ios/GizwitsiOSSDK.framework/Headers/resampler.h +65 -0
- package/ios/GizwitsiOSSDK.framework/Headers/sampler.h +140 -0
- package/ios/GizwitsiOSSDK.framework/Headers/scale.h +80 -0
- package/ios/GizwitsiOSSDK.framework/Headers/sink.h +181 -0
- package/ios/GizwitsiOSSDK.framework/Headers/sink_apple_audio.h +163 -0
- package/ios/GizwitsiOSSDK.framework/Headers/sink_sndfile.h +162 -0
- package/ios/GizwitsiOSSDK.framework/Headers/sink_wavwrite.h +162 -0
- package/ios/GizwitsiOSSDK.framework/Headers/source.h +184 -0
- package/ios/GizwitsiOSSDK.framework/Headers/source_apple_audio.h +156 -0
- package/ios/GizwitsiOSSDK.framework/Headers/source_avcodec.h +155 -0
- package/ios/GizwitsiOSSDK.framework/Headers/source_sndfile.h +155 -0
- package/ios/GizwitsiOSSDK.framework/Headers/source_wavread.h +160 -0
- package/ios/GizwitsiOSSDK.framework/Headers/specdesc.h +204 -0
- package/ios/GizwitsiOSSDK.framework/Headers/tempo.h +255 -0
- package/ios/GizwitsiOSSDK.framework/Headers/tss.h +103 -0
- package/ios/GizwitsiOSSDK.framework/Headers/types.h +70 -0
- package/ios/GizwitsiOSSDK.framework/Headers/vecutils.h +116 -0
- package/ios/GizwitsiOSSDK.framework/Headers/wavetable.h +178 -0
- package/ios/GizwitsiOSSDK.framework/Info.plist +0 -0
- package/ios/GizwitsiOSSDK.framework/LICENSE +17 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.abi.json +57489 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +1752 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftinterface +1752 -0
- package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
- package/ios/GizwitsiOSSDK.framework/Modules/module.modulemap +11 -0
- package/ios/GizwitsiOSSDK.framework/PrivacyInfo.xcprivacy +23 -0
- package/ios/GizwitsiOSSDK.framework/README.md +31 -0
- package/ios/RNGizDeviceManagerModule.m +2 -5
- package/ios/RNGizDeviceManagerModule.swift +43 -155
- package/ios/RNGizSDKManagerModule.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/RNGizSDKManagerModule.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/lib/device.d.ts +3 -5
- package/lib/device.js +6 -28
- package/lib/device.js.map +1 -1
- package/lib/index.js +0 -42
- package/lib/index.js.map +1 -1
- package/lib/types.d.ts +0 -22
- package/package.json +1 -1
- package/react-native-gizwits-sdk-v5.podspec +2 -2
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
#if TARGET_OS_IPHONE
|
|
3
|
+
#import <UIKit/UIColor.h>
|
|
4
|
+
#else
|
|
5
|
+
#import <AppKit/NSColor.h>
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
#import "DDLog.h"
|
|
9
|
+
|
|
10
|
+
#define LOG_CONTEXT_ALL INT_MAX
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Welcome to Cocoa Lumberjack!
|
|
14
|
+
*
|
|
15
|
+
* The project page has a wealth of documentation if you have any questions.
|
|
16
|
+
* https://github.com/CocoaLumberjack/CocoaLumberjack
|
|
17
|
+
*
|
|
18
|
+
* If you're new to the project you may wish to read the "Getting Started" wiki.
|
|
19
|
+
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/GettingStarted
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* This class provides a logger for Terminal output or Xcode console output,
|
|
23
|
+
* depending on where you are running your code.
|
|
24
|
+
*
|
|
25
|
+
* As described in the "Getting Started" page,
|
|
26
|
+
* the traditional NSLog() function directs it's output to two places:
|
|
27
|
+
*
|
|
28
|
+
* - Apple System Log (so it shows up in Console.app)
|
|
29
|
+
* - StdErr (if stderr is a TTY, so log statements show up in Xcode console)
|
|
30
|
+
*
|
|
31
|
+
* To duplicate NSLog() functionality you can simply add this logger and an asl logger.
|
|
32
|
+
* However, if you instead choose to use file logging (for faster performance),
|
|
33
|
+
* you may choose to use only a file logger and a tty logger.
|
|
34
|
+
**/
|
|
35
|
+
|
|
36
|
+
@interface DDTTYLogger : DDAbstractLogger <DDLogger>
|
|
37
|
+
{
|
|
38
|
+
NSCalendar *calendar;
|
|
39
|
+
NSUInteger calendarUnitFlags;
|
|
40
|
+
|
|
41
|
+
NSString *appName;
|
|
42
|
+
char *app;
|
|
43
|
+
size_t appLen;
|
|
44
|
+
|
|
45
|
+
NSString *processID;
|
|
46
|
+
char *pid;
|
|
47
|
+
size_t pidLen;
|
|
48
|
+
|
|
49
|
+
BOOL colorsEnabled;
|
|
50
|
+
NSMutableArray *colorProfilesArray;
|
|
51
|
+
NSMutableDictionary *colorProfilesDict;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
+ (instancetype)sharedInstance;
|
|
55
|
+
|
|
56
|
+
/* Inherited from the DDLogger protocol:
|
|
57
|
+
*
|
|
58
|
+
* Formatters may optionally be added to any logger.
|
|
59
|
+
*
|
|
60
|
+
* If no formatter is set, the logger simply logs the message as it is given in logMessage,
|
|
61
|
+
* or it may use its own built in formatting style.
|
|
62
|
+
*
|
|
63
|
+
* More information about formatters can be found here:
|
|
64
|
+
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomFormatters
|
|
65
|
+
*
|
|
66
|
+
* The actual implementation of these methods is inherited from DDAbstractLogger.
|
|
67
|
+
|
|
68
|
+
- (id <DDLogFormatter>)logFormatter;
|
|
69
|
+
- (void)setLogFormatter:(id <DDLogFormatter>)formatter;
|
|
70
|
+
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Want to use different colors for different log levels?
|
|
75
|
+
* Enable this property.
|
|
76
|
+
*
|
|
77
|
+
* If you run the application via the Terminal (not Xcode),
|
|
78
|
+
* the logger will map colors to xterm-256color or xterm-color (if available).
|
|
79
|
+
*
|
|
80
|
+
* Xcode does NOT natively support colors in the Xcode debugging console.
|
|
81
|
+
* You'll need to install the XcodeColors plugin to see colors in the Xcode console.
|
|
82
|
+
* https://github.com/robbiehanson/XcodeColors
|
|
83
|
+
*
|
|
84
|
+
* The default value if NO.
|
|
85
|
+
**/
|
|
86
|
+
@property (readwrite, assign) BOOL colorsEnabled;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The default color set (foregroundColor, backgroundColor) is:
|
|
90
|
+
*
|
|
91
|
+
* - LOG_FLAG_ERROR = (red, nil)
|
|
92
|
+
* - LOG_FLAG_WARN = (orange, nil)
|
|
93
|
+
*
|
|
94
|
+
* You can customize the colors however you see fit.
|
|
95
|
+
* Please note that you are passing a flag, NOT a level.
|
|
96
|
+
*
|
|
97
|
+
* GOOD : [ttyLogger setForegroundColor:pink backgroundColor:nil forFlag:LOG_FLAG_INFO]; // <- Good :)
|
|
98
|
+
* BAD : [ttyLogger setForegroundColor:pink backgroundColor:nil forFlag:LOG_LEVEL_INFO]; // <- BAD! :(
|
|
99
|
+
*
|
|
100
|
+
* LOG_FLAG_INFO = 0...00100
|
|
101
|
+
* LOG_LEVEL_INFO = 0...00111 <- Would match LOG_FLAG_INFO and LOG_FLAG_WARN and LOG_FLAG_ERROR
|
|
102
|
+
*
|
|
103
|
+
* If you run the application within Xcode, then the XcodeColors plugin is required.
|
|
104
|
+
*
|
|
105
|
+
* If you run the application from a shell, then DDTTYLogger will automatically map the given color to
|
|
106
|
+
* the closest available color. (xterm-256color or xterm-color which have 256 and 16 supported colors respectively.)
|
|
107
|
+
*
|
|
108
|
+
* This method invokes setForegroundColor:backgroundColor:forFlag:context: and applies it to `LOG_CONTEXT_ALL`.
|
|
109
|
+
**/
|
|
110
|
+
#if TARGET_OS_IPHONE
|
|
111
|
+
- (void)setForegroundColor:(UIColor *)txtColor backgroundColor:(UIColor *)bgColor forFlag:(int)mask;
|
|
112
|
+
#else
|
|
113
|
+
- (void)setForegroundColor:(NSColor *)txtColor backgroundColor:(NSColor *)bgColor forFlag:(int)mask;
|
|
114
|
+
#endif
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Just like setForegroundColor:backgroundColor:flag, but allows you to specify a particular logging context.
|
|
118
|
+
*
|
|
119
|
+
* A logging context is often used to identify log messages coming from a 3rd party framework,
|
|
120
|
+
* although logging context's can be used for many different functions.
|
|
121
|
+
*
|
|
122
|
+
* Use LOG_CONTEXT_ALL to set the deafult color for all contexts that have no specific color set defined.
|
|
123
|
+
*
|
|
124
|
+
* Logging context's are explained in further detail here:
|
|
125
|
+
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomContext
|
|
126
|
+
**/
|
|
127
|
+
#if TARGET_OS_IPHONE
|
|
128
|
+
- (void)setForegroundColor:(UIColor *)txtColor backgroundColor:(UIColor *)bgColor forFlag:(int)mask context:(int)ctxt;
|
|
129
|
+
#else
|
|
130
|
+
- (void)setForegroundColor:(NSColor *)txtColor backgroundColor:(NSColor *)bgColor forFlag:(int)mask context:(int)ctxt;
|
|
131
|
+
#endif
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Similar to the methods above, but allows you to map DDLogMessage->tag to a particular color profile.
|
|
135
|
+
* For example, you could do something like this:
|
|
136
|
+
*
|
|
137
|
+
* static NSString *const PurpleTag = @"PurpleTag";
|
|
138
|
+
*
|
|
139
|
+
* #define DDLogPurple(frmt, ...) LOG_OBJC_TAG_MACRO(NO, 0, 0, 0, PurpleTag, frmt, ##__VA_ARGS__)
|
|
140
|
+
*
|
|
141
|
+
* And then in your applicationDidFinishLaunching, or wherever you configure Lumberjack:
|
|
142
|
+
*
|
|
143
|
+
* #if TARGET_OS_IPHONE
|
|
144
|
+
* UIColor *purple = [UIColor colorWithRed:(64/255.0) green:(0/255.0) blue:(128/255.0) alpha:1.0];
|
|
145
|
+
* #else
|
|
146
|
+
* NSColor *purple = [NSColor colorWithCalibratedRed:(64/255.0) green:(0/255.0) blue:(128/255.0) alpha:1.0];
|
|
147
|
+
*
|
|
148
|
+
* [[DDTTYLogger sharedInstance] setForegroundColor:purple backgroundColor:nil forTag:PurpleTag];
|
|
149
|
+
* [DDLog addLogger:[DDTTYLogger sharedInstance]];
|
|
150
|
+
*
|
|
151
|
+
* This would essentially give you a straight NSLog replacement that prints in purple:
|
|
152
|
+
*
|
|
153
|
+
* DDLogPurple(@"I'm a purple log message!");
|
|
154
|
+
**/
|
|
155
|
+
#if TARGET_OS_IPHONE
|
|
156
|
+
- (void)setForegroundColor:(UIColor *)txtColor backgroundColor:(UIColor *)bgColor forTag:(id <NSCopying>)tag;
|
|
157
|
+
#else
|
|
158
|
+
- (void)setForegroundColor:(NSColor *)txtColor backgroundColor:(NSColor *)bgColor forTag:(id <NSCopying>)tag;
|
|
159
|
+
#endif
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Clearing color profiles.
|
|
163
|
+
**/
|
|
164
|
+
- (void)clearColorsForFlag:(int)mask;
|
|
165
|
+
- (void)clearColorsForFlag:(int)mask context:(int)context;
|
|
166
|
+
- (void)clearColorsForTag:(id <NSCopying>)tag;
|
|
167
|
+
- (void)clearColorsForAllFlags;
|
|
168
|
+
- (void)clearColorsForAllTags;
|
|
169
|
+
- (void)clearAllColors;
|
|
170
|
+
|
|
171
|
+
@end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ESPAES.h
|
|
3
|
+
// EspTouchDemo
|
|
4
|
+
//
|
|
5
|
+
// Created by AE on 2018/4/5.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
@interface ESPAES : NSObject {
|
|
11
|
+
@private NSString *key;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
- (instancetype)initWithKey:(NSString *)secretKey;
|
|
15
|
+
|
|
16
|
+
- (NSData *)AES128EncryptData:(NSData *)data;
|
|
17
|
+
- (NSData *)AES128DecryptData:(NSData *)data;
|
|
18
|
+
|
|
19
|
+
@end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ESPDataCode.h
|
|
3
|
+
// EspTouchDemo
|
|
4
|
+
//
|
|
5
|
+
// Created by fby on 4/9/15.
|
|
6
|
+
// Copyright (c) 2015 fby. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
#define DATA_CODE_LEN 6
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* one data format:(data code should have 2 to 65 data)
|
|
15
|
+
*
|
|
16
|
+
* control byte high 4 bits low 4 bits
|
|
17
|
+
* 1st 9bits: 0x0 crc(high) data(high)
|
|
18
|
+
* 2nd 9bits: 0x1 sequence header
|
|
19
|
+
* 3rd 9bits: 0x0 crc(low) data(low)
|
|
20
|
+
*
|
|
21
|
+
* sequence header: 0,1,2,...
|
|
22
|
+
*
|
|
23
|
+
* @author afunx
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
@interface ESPDataCode : NSObject
|
|
27
|
+
{
|
|
28
|
+
@private
|
|
29
|
+
Byte _seqHeader;
|
|
30
|
+
@private
|
|
31
|
+
Byte _dataHigh;
|
|
32
|
+
@private
|
|
33
|
+
Byte _dataLow;
|
|
34
|
+
@private
|
|
35
|
+
Byte _crcHigh;
|
|
36
|
+
@private
|
|
37
|
+
Byte _crcLow;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
- (NSData*) getBytes;
|
|
41
|
+
|
|
42
|
+
- (id) initWithU8: (UInt8) u8 andIndex: (int) index;
|
|
43
|
+
|
|
44
|
+
@end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ESPDatumCode.h
|
|
3
|
+
// EspTouchDemo
|
|
4
|
+
//
|
|
5
|
+
// Created by fby on 4/9/15.
|
|
6
|
+
// Copyright (c) 2015 fby. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
@interface ESPDatumCode : NSObject
|
|
12
|
+
{
|
|
13
|
+
@private
|
|
14
|
+
NSMutableArray *_dataCodes;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Constructor of DatumCode
|
|
19
|
+
*
|
|
20
|
+
* @param apSsid
|
|
21
|
+
* the Ap's ssid
|
|
22
|
+
* @param apBssid
|
|
23
|
+
* the Ap's bssid
|
|
24
|
+
* @param apPwd
|
|
25
|
+
* the Ap's password ssid
|
|
26
|
+
* @param ipAddrData
|
|
27
|
+
* the ip address of the phone or pad
|
|
28
|
+
* @param isSsidHidden
|
|
29
|
+
* whether the Ap's ssid is hidden
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
- (id) initWithSsid: (NSData *) apSsid andApBssid: (NSData *) apBssid andApPwd: (NSData*) apPwd andInetAddrData: (NSData *) ipAddrData andIsSsidHidden: (BOOL) isSsidHidden;
|
|
33
|
+
|
|
34
|
+
- (NSData *) getBytes;
|
|
35
|
+
|
|
36
|
+
- (NSData *) getU16s;
|
|
37
|
+
|
|
38
|
+
@end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// EspNetUtils.h
|
|
3
|
+
// Esp32Mesh
|
|
4
|
+
//
|
|
5
|
+
// Created by AE on 2018/4/19.
|
|
6
|
+
// Copyright © 2018年 AE. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
12
|
+
@interface ESPTools : NSObject
|
|
13
|
+
|
|
14
|
+
+ (nullable NSString *)getCurrentWiFiSsid;
|
|
15
|
+
+ (nullable NSString *)getCurrentBSSID;
|
|
16
|
+
|
|
17
|
+
+ (NSString *)getIPAddress:(BOOL)preferIPv4;
|
|
18
|
+
|
|
19
|
+
+ (NSDictionary *)getIPAddresses;
|
|
20
|
+
NS_ASSUME_NONNULL_END
|
|
21
|
+
@end
|
|
22
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ESPTouch.h
|
|
3
|
+
// GizwitsiOSSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by CodeMak1r on 2025/6/16.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
#import <UIKit/UIKit.h>
|
|
10
|
+
|
|
11
|
+
#import "ESPTouchTask.h"
|
|
12
|
+
#import "ESPTouchResult.h"
|
|
13
|
+
#import "ESPTouchDelegate.h"
|
|
14
|
+
|
|
15
|
+
#import "ESP_ByteUtil.h"
|
|
16
|
+
#import "ESP_CRC8.h"
|
|
17
|
+
#import "ESP_NetUtil.h"
|
|
18
|
+
#import "ESP_WifiUtil.h"
|
|
19
|
+
#import "ESPAES.h"
|
|
20
|
+
#import "ESPTools.h"
|
|
21
|
+
|
|
22
|
+
#import "ESPDataCode.h"
|
|
23
|
+
#import "ESPDatumCode.h"
|
|
24
|
+
#import "ESPGuideCode.h"
|
|
25
|
+
#import "ESPTouchGenerator.h"
|
|
26
|
+
|
|
27
|
+
#import "ESPUDPSocketClient.h"
|
|
28
|
+
#import "ESPUDPSocketServer.h"
|
|
29
|
+
|
|
30
|
+
#import "ESPTouchTaskParameter.h"
|
|
31
|
+
|
|
32
|
+
//! Project version number for MQTTClient.
|
|
33
|
+
FOUNDATION_EXPORT double ESPTouchVersionNumber;
|
|
34
|
+
|
|
35
|
+
//! Project version string for MQTTClient<.
|
|
36
|
+
FOUNDATION_EXPORT const unsigned char ESPTouchVersionString[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ESPTouchDelegate.h
|
|
3
|
+
// EspTouchDemo
|
|
4
|
+
//
|
|
5
|
+
// Created by fby on 8/14/15.
|
|
6
|
+
// Copyright (c) 2015 fby. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import "ESPTouchResult.h"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@protocol ESPTouchDelegate <NSObject>
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* when new esptouch result is added, the listener will call
|
|
17
|
+
* onEsptouchResultAdded callback
|
|
18
|
+
*
|
|
19
|
+
* @param result
|
|
20
|
+
* the Esptouch result
|
|
21
|
+
*/
|
|
22
|
+
-(void) onEsptouchResultAddedWithResult: (ESPTouchResult *) result;
|
|
23
|
+
|
|
24
|
+
@end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ESPTouchGenerator.h
|
|
3
|
+
// EspTouchDemo
|
|
4
|
+
//
|
|
5
|
+
// Created by fby on 4/9/15.
|
|
6
|
+
// Copyright (c) 2015 fby. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
@interface ESPTouchGenerator : NSObject
|
|
12
|
+
{
|
|
13
|
+
@private
|
|
14
|
+
NSMutableArray *_gcBytes2;
|
|
15
|
+
@private
|
|
16
|
+
NSMutableArray *_dcBytes2;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Constructor of EsptouchGenerator, it will cost some time(maybe a bit much)
|
|
20
|
+
*
|
|
21
|
+
* @param apSsid
|
|
22
|
+
* the Ap's ssid
|
|
23
|
+
* @param apBssid
|
|
24
|
+
* the Ap's bssid
|
|
25
|
+
* @param apPwd
|
|
26
|
+
* the Ap's password
|
|
27
|
+
* @param ipAddrData
|
|
28
|
+
* the ip address of the phone or pad
|
|
29
|
+
* @param isSsidHidden
|
|
30
|
+
* whether the Ap's ssid is hidden
|
|
31
|
+
*/
|
|
32
|
+
- (id) initWithSsid: (NSData *)apSsid andApBssid: (NSData *)apBssid andApPassword: (NSData *)apPwd andInetAddrData: (NSData *)ipAddrData andIsSsidHidden: (BOOL)isSsidHidden;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Get guide code by the format of byte[][]
|
|
36
|
+
* @return guide code by the format of byte[][]
|
|
37
|
+
*/
|
|
38
|
+
- (NSArray *) getGCBytes2;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Get data code by the format of byte[][]
|
|
42
|
+
* @return data code by the format of byte[][]
|
|
43
|
+
*/
|
|
44
|
+
- (NSArray *) getDCBytes2;
|
|
45
|
+
|
|
46
|
+
@end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ESPTouchResult.h
|
|
3
|
+
// EspTouchDemo
|
|
4
|
+
//
|
|
5
|
+
// Created by fby on 4/14/15.
|
|
6
|
+
// Copyright (c) 2015 fby. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
@interface ESPTouchResult : NSObject
|
|
12
|
+
|
|
13
|
+
// it is used to check whether the esptouch task is executed suc
|
|
14
|
+
@property (nonatomic,assign) BOOL isSuc;
|
|
15
|
+
|
|
16
|
+
// it is used to store the device's bssid
|
|
17
|
+
@property (nonatomic,strong) NSString * bssid;
|
|
18
|
+
|
|
19
|
+
// it is used to check whether the esptouch task is cancelled by user
|
|
20
|
+
@property (atomic,assign) BOOL isCancelled;
|
|
21
|
+
|
|
22
|
+
// it is used to store the device's ip address
|
|
23
|
+
@property (atomic) NSData * ipAddrData;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Constructor of EsptouchResult
|
|
27
|
+
*
|
|
28
|
+
* @param isSuc whether the esptouch task is executed suc
|
|
29
|
+
* @param bssid the device's bssid
|
|
30
|
+
* @param ipAddrData the device's ip address
|
|
31
|
+
*/
|
|
32
|
+
- (id) initWithIsSuc: (BOOL) isSuc andBssid: (NSString *) bssid andInetAddrData: (NSData *) ipAddrData;
|
|
33
|
+
|
|
34
|
+
- (NSString *) getAddressString;
|
|
35
|
+
|
|
36
|
+
@end
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ESPTouchTask.h
|
|
3
|
+
// EspTouchDemo
|
|
4
|
+
//
|
|
5
|
+
// Created by fby on 4/14/15.
|
|
6
|
+
// Copyright (c) 2015 fby. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import <UIKit/UIKit.h>
|
|
11
|
+
#import "ESPTouchResult.h"
|
|
12
|
+
#import "ESPTouchDelegate.h"
|
|
13
|
+
#import "ESPAES.h"
|
|
14
|
+
|
|
15
|
+
#define ESPTOUCH_VERSION @"SDK-v1.1.0"
|
|
16
|
+
|
|
17
|
+
#define DEBUG_ON YES
|
|
18
|
+
|
|
19
|
+
@interface ESPTouchTask : NSObject
|
|
20
|
+
|
|
21
|
+
@property (atomic,assign) BOOL isCancelled;
|
|
22
|
+
|
|
23
|
+
- (id)initWithApSsid:(NSString *)apSsid andApBssid:(NSString *)apBssid andApPwd:(NSString *)apPwd andAES:(ESPAES *)aes;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Constructor of EsptouchTask
|
|
27
|
+
*
|
|
28
|
+
* @param apSsid
|
|
29
|
+
* the Ap's ssid
|
|
30
|
+
* @param apBssid
|
|
31
|
+
* the Ap's bssid
|
|
32
|
+
* @param apPassword
|
|
33
|
+
* the Ap's password
|
|
34
|
+
* @param isSsidHidden
|
|
35
|
+
* whether the Ap's ssid is hidden
|
|
36
|
+
*/
|
|
37
|
+
- (id) initWithApSsid: (NSString *)apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString *)apPwd;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Deprecated
|
|
41
|
+
*/
|
|
42
|
+
- (id) initWithApSsid: (NSString *)apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString *)apPwd andIsSsidHiden: (BOOL) isSsidHidden __deprecated_msg("Use initWithApSsid:(NSString *) andApBssid:(NSString *) andApPwd:(NSString *) instead.");
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Constructor of EsptouchTask
|
|
46
|
+
*
|
|
47
|
+
* @param apSsid
|
|
48
|
+
* the Ap's ssid
|
|
49
|
+
* @param apBssid
|
|
50
|
+
* the Ap's bssid
|
|
51
|
+
* @param apPassword
|
|
52
|
+
* the Ap's password
|
|
53
|
+
* @param isSsidHidden
|
|
54
|
+
* whether the Ap's ssid is hidden
|
|
55
|
+
* @param timeoutMillisecond(it should be >= 15000+6000)
|
|
56
|
+
* millisecond of total timeout
|
|
57
|
+
* @param context
|
|
58
|
+
* the Context of the Application
|
|
59
|
+
*/
|
|
60
|
+
- (id) initWithApSsid: (NSString *)apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString *)apPwd andTimeoutMillisecond: (int) timeoutMillisecond;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Constructor of EsptouchTask
|
|
64
|
+
*
|
|
65
|
+
* @param apSsid
|
|
66
|
+
* the Ap's ssid
|
|
67
|
+
* @param apBssid
|
|
68
|
+
* the Ap's bssid
|
|
69
|
+
* @param apPassword
|
|
70
|
+
* the Ap's password
|
|
71
|
+
* @param isSsidHidden
|
|
72
|
+
* whether the Ap's ssid is hidden
|
|
73
|
+
* @param timeoutMillisecond(it should be >= 15000+6000)
|
|
74
|
+
* millisecond of total timeout
|
|
75
|
+
* @param context
|
|
76
|
+
* the Context of the Application
|
|
77
|
+
*/
|
|
78
|
+
- (id) initWithApSsid: (NSString *)apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString *)apPwd andIsSsidHiden: (BOOL) isSsidHidden andTimeoutMillisecond: (int) timeoutMillisecond __deprecated_msg("Use initWithApSsid:(NSString *) andApBssid:(NSString *) andApPwd:(NSString *) andTimeoutMillisecond:(int) instead.");
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Interrupt the Esptouch Task when User tap back or close the Application.
|
|
82
|
+
*/
|
|
83
|
+
- (void) interrupt;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Note: !!!Don't call the task at UI Main Thread
|
|
87
|
+
*
|
|
88
|
+
* Smart Config v2.4 support the API
|
|
89
|
+
*
|
|
90
|
+
* @return the ESPTouchResult
|
|
91
|
+
*/
|
|
92
|
+
- (ESPTouchResult*) executeForResult;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Note: !!!Don't call the task at UI Main Thread
|
|
96
|
+
*
|
|
97
|
+
* Smart Config v2.4 support the API
|
|
98
|
+
*
|
|
99
|
+
* It will be blocked until the client receive result count >= expectTaskResultCount.
|
|
100
|
+
* If it fail, it will return one fail result will be returned in the list.
|
|
101
|
+
* If it is cancelled while executing,
|
|
102
|
+
* if it has received some results, all of them will be returned in the list.
|
|
103
|
+
* if it hasn't received any results, one cancel result will be returned in the list.
|
|
104
|
+
*
|
|
105
|
+
* @param expectTaskResultCount
|
|
106
|
+
* the expect result count(if expectTaskResultCount <= 0,
|
|
107
|
+
* expectTaskResultCount = INT32_MAX)
|
|
108
|
+
* @return the NSArray of EsptouchResult
|
|
109
|
+
* @throws RuntimeException
|
|
110
|
+
*/
|
|
111
|
+
- (NSArray*) executeForResults:(int) expectTaskResultCount;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* set the esptouch delegate, when one device is connected to the Ap, it will be called back
|
|
115
|
+
* @param esptouchDelegate when one device is connected to the Ap, it will be called back
|
|
116
|
+
*/
|
|
117
|
+
- (void) setEsptouchDelegate: (NSObject<ESPTouchDelegate> *) esptouchDelegate;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Set boradcast or multicast when post config info
|
|
121
|
+
* @param broadcast YES is boradcast, NO is multicast
|
|
122
|
+
*/
|
|
123
|
+
- (void) setPackageBroadcast: (BOOL) broadcast;
|
|
124
|
+
@end
|