@wireapp/avs 10.1.56 → 10.1.62

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.
@@ -174,6 +174,10 @@ export declare class Wcall {
174
174
  audioRecord(wuser: number, path: string): number;
175
175
  poll(): void;
176
176
  setupEx(flags: number): number;
177
+ eventCreate(userid: string, clientid: string, incomingh: WcallIncomingHandler, missedh: WcallMissedHandler, closeh: WcallCloseHandler, arg?: number): number;
178
+ eventStart(wuser: number): void;
179
+ eventProcess(wuser: number, buf: string, len: number, curr_time: number, msg_time: number, convid: string, userid: string, clientid: string, conv_type: number): number;
180
+ eventEnd(wuser: number): void;
177
181
  setMode(mode: number): void;
178
182
  getMode(): number;
179
183
  setUserMediaHandler(userMediaHandler: UserMediaHandler): void;
package/dist/avs_wcall.js CHANGED
@@ -603,6 +603,55 @@ var Wcall = /** @class */ (function () {
603
603
  Wcall.prototype.setupEx = function (flags) {
604
604
  return this.em_module.ccall("wcall_setup_ex", "number", ["number"], [flags]);
605
605
  };
606
+ Wcall.prototype.eventCreate = function (userid, clientid, incomingh, missedh, closeh, arg) {
607
+ var _this = this;
608
+ if (arg === void 0) { arg = 0; }
609
+ var fn_incomingh = this.em_module.addFunction(function (convid, msg_time, userid, clientid, video_call, should_ring, conv_type, arg) {
610
+ if (incomingh) {
611
+ incomingh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), msg_time, userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), video_call, should_ring, conv_type, arg);
612
+ }
613
+ }, "viiiiiiii");
614
+ var fn_missedh = this.em_module.addFunction(function (convid, msg_time, userid, clientid, video_call, arg) {
615
+ if (missedh) {
616
+ missedh(convid == 0 ? null : _this.em_module.UTF8ToString(convid), msg_time, userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), video_call, arg);
617
+ }
618
+ }, "viiiiii");
619
+ var fn_closeh = this.em_module.addFunction(function (reason, convid, msg_time, userid, clientid, arg) {
620
+ if (closeh) {
621
+ closeh(reason, convid == 0 ? null : _this.em_module.UTF8ToString(convid), msg_time, userid == 0 ? null : _this.em_module.UTF8ToString(userid), clientid == 0 ? null : _this.em_module.UTF8ToString(clientid), arg);
622
+ }
623
+ }, "viiiiii");
624
+ return this.em_module.ccall("wcall_event_create", "number", ["string", "string", "number", "number", "number", "number"], [userid, clientid, fn_incomingh, fn_missedh, fn_closeh, arg]);
625
+ };
626
+ Wcall.prototype.eventStart = function (wuser) {
627
+ this.em_module.ccall("wcall_event_start", "null", ["number"], [wuser]);
628
+ };
629
+ Wcall.prototype.eventProcess = function (wuser, buf, len, curr_time, msg_time, convid, userid, clientid, conv_type) {
630
+ return this.em_module.ccall("wcall_event_process", "number", [
631
+ "number",
632
+ "string",
633
+ "number",
634
+ "number",
635
+ "number",
636
+ "string",
637
+ "string",
638
+ "string",
639
+ "number",
640
+ ], [
641
+ wuser,
642
+ buf,
643
+ len,
644
+ curr_time,
645
+ msg_time,
646
+ convid,
647
+ userid,
648
+ clientid,
649
+ conv_type,
650
+ ]);
651
+ };
652
+ Wcall.prototype.eventEnd = function (wuser) {
653
+ this.em_module.ccall("wcall_event_end", "null", ["number"], [wuser]);
654
+ };
606
655
  Wcall.prototype.setMode = function (mode) {
607
656
  this.em_module.ccall("wcall_set_mode", "null", ["number"], [mode]);
608
657
  };
package/package.json CHANGED
@@ -27,5 +27,5 @@
27
27
  "prepack": "prettier -w src/avs_wcall.ts && tsc && cp src/*.js src/*.d.ts dist/",
28
28
  "test": "karma start"
29
29
  },
30
- "version": "10.1.56"
30
+ "version": "10.1.62"
31
31
  }