scandit-datacapture-frameworks-core 7.2.2 → 7.3.0-beta.1

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.
@@ -1,34 +1,15 @@
1
1
  import { EventEmitter } from "./EventEmitter";
2
+ import { NativeCaller, ProxyEvent } from "./proxies";
2
3
  export declare class BaseController<PROXY> {
3
4
  protected eventEmitter: EventEmitter;
4
5
  private proxyName;
5
6
  protected get _proxy(): PROXY;
6
7
  constructor(proxyName: string);
7
8
  }
8
- export declare class BaseNewController<PROXY> {
9
- protected eventEmitter: EventEmitter;
10
- private _cachedProxy;
11
- protected get _proxy(): PROXY;
12
- constructor(proxyName: string);
13
- emit(event: any, payload: any): void;
14
- }
15
9
  export declare class BaseNativeProxy {
16
10
  protected eventEmitter: EventEmitter;
17
11
  constructor();
18
12
  }
19
- /**
20
- * Framework specific native calls provider
21
- */
22
- export interface NativeCaller {
23
- callFn(fnName: string, args: object | undefined | null): Promise<any>;
24
- registerEvent(evName: string, handler: (args: any) => Promise<void>): Promise<any>;
25
- unregisterEvent(evName: string, subscription: any): Promise<void>;
26
- eventHook(args: any): any;
27
- }
28
- export interface ProxyEvent {
29
- name: string;
30
- nativeEventName: string;
31
- }
32
13
  /**
33
14
  * AdvancedNativeProxy will provide an easy way to communicate between native proxies
34
15
  * and other parts of the architecture such as the controller layer
@@ -0,0 +1,5 @@
1
+ export declare class BaseNewController<PROXY> {
2
+ private _cachedProxy;
3
+ protected get _proxy(): PROXY;
4
+ constructor(proxyName: string);
5
+ }
@@ -0,0 +1 @@
1
+ export * from "./BaseNewController";
@@ -14,4 +14,6 @@ export * from "./locationselection";
14
14
  export * from "./view";
15
15
  export * from "./LicenseInfo";
16
16
  export * from "./Expiration";
17
+ export * from "./proxies";
18
+ export * from "./controllers";
17
19
  export { FactoryMaker } from "./FactoryMaker";
@@ -0,0 +1,30 @@
1
+ import { BaseInstanceAwareNativeProxy } from "./BaseInstanceAwareNativeProxy";
2
+ import { NativeCaller } from "./NativeCaller";
3
+ import { ProxyEvent } from "./ProxyEvent";
4
+ /**
5
+ * AdvancedNativeProxy will provide an easy way to communicate between native proxies
6
+ * and other parts of the architecture such as the controller layer
7
+ */
8
+ export declare class AdvancedInstanceAwareNativeProxy extends BaseInstanceAwareNativeProxy {
9
+ protected nativeCaller: NativeCaller;
10
+ protected events: ProxyEvent[];
11
+ protected eventSubscriptions: Map<string, any>;
12
+ private eventHandlers;
13
+ [k: string]: any;
14
+ constructor(nativeCaller: NativeCaller, events?: ProxyEvent[]);
15
+ dispose(): Promise<void>;
16
+ _call(fnName: string, args: object | undefined | null): Promise<any>;
17
+ private _registerEvent;
18
+ private _unregisterEvent;
19
+ }
20
+ /**
21
+ * Function to create a custom AdvancedNativeProxy. This will return an object which will provide dynamically the
22
+ * methods specified in the PROXY interface.
23
+ *
24
+ * The Proxy interface implemented in order to call native methods will require a special mark
25
+ * `$methodName` for method calls
26
+ * `on$methodName` for the listeners added to the events defined in eventsEnum
27
+ * @param nativeCaller
28
+ * @param eventsEnum
29
+ */
30
+ export declare function createAdvancedInstanceAwareNativeProxy<PROXY>(nativeCaller: NativeCaller, eventsEnum?: any): PROXY;
@@ -0,0 +1,5 @@
1
+ import { EventEmitter } from "../EventEmitter";
2
+ export declare class BaseInstanceAwareNativeProxy {
3
+ protected eventEmitter: EventEmitter;
4
+ constructor();
5
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Framework specific native calls provider
3
+ */
4
+ export interface NativeCaller {
5
+ callFn(fnName: string, args: object | undefined | null): Promise<any>;
6
+ registerEvent(evName: string, handler: (args: any) => Promise<void>): Promise<any>;
7
+ unregisterEvent(evName: string, subscription: any): Promise<void>;
8
+ eventHook(args: any): any;
9
+ }
@@ -0,0 +1,4 @@
1
+ export interface ProxyEvent {
2
+ name: string;
3
+ nativeEventName: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ export { ProxyEvent } from "./ProxyEvent";
2
+ export { BaseInstanceAwareNativeProxy } from "./BaseInstanceAwareNativeProxy";
3
+ export { AdvancedInstanceAwareNativeProxy, createAdvancedInstanceAwareNativeProxy } from "./AdvancedInstanceAwareNativeProxy";
4
+ export { NativeCaller } from "./NativeCaller";