-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEnvirons.iOSX.h
1145 lines (912 loc) · 29.8 KB
/
Environs.iOSX.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* Environs.iOSX.h
* ------------------------------------------------------------------
* Copyright (c) Chi-Tai Dang
*
* @author Chi-Tai Dang
* @version 1.0
* @remarks
*
* This file is part of the Environs framework developed at the
* Lab for Human Centered Multimedia of the University of Augsburg.
* http://hcm-lab.de/environs
*
* Environ is free software; you can redistribute it and/or modify
* it under the terms of the Eclipse Public License v1.0.
* A copy of the license may be obtained at:
* http://www.eclipse.org/org/documents/epl-v10.html
* --------------------------------------------------------------------
*/
#include "Environs.Platforms.h"
#include "Environs.Build.Opts.h"
#import <Environs.iOSX.Imp.h>
#if ( defined(ENVIRONS_IOS) || defined(ENVIRONS_OSX) )
# if __has_feature(modules)
@import Foundation;
@import CoreLocation;
@import CoreBluetooth;
# if ( defined(ENVIRONS_OSX) )
@import IOBluetooth;
@import IOBluetoothUI;
# endif
# if ( defined(ENVIRONS_IOS) )
@import CoreMotion;
@import VideoToolbox;
@import AVFoundation;
@import SystemConfiguration;
# ifdef ENABLE_IOS_HEALTHKIT_SUPPORT
@import HealthKit;
# endif
# endif
# else
# import <Foundation/Foundation.h>
# import <CoreLocation/CoreLocation.h>
# endif
# import "Environs.Observer.iOSX.h"
#if (!defined(DISABLE_ENVIRONS_OBJC_API))
# import "Device.List.iOSX.h"
# import "Device.Instance.iOSX.h"
# import "Message.Instance.iOSX.h"
# import "File.Instance.iOSX.h"
# import "Portal.Instance.iOSX.h"
# include "Device.Display.Decl.h"
# ifdef __cplusplus
# define ENVIRONS_NAMES environs::
# else
# define ENVIRONS_NAMES
# endif
bool CreateAppID ( char * buffer, unsigned int bufSize );
@interface Environs :
# ifdef ENVIRONS_IOS
NSObject<UIAlertViewDelegate>
# else
NSObject
# endif
{
}
- (bool) opt:(NSString *) key;
#ifndef ENVIRONS_CORE_LIB
- (instancetype) init __attribute__((unavailable("Call [Environs CreateInstance]; or [Environs New]; to create Environs objects.")));
+ (instancetype) alloc __attribute__((unavailable("Call [Environs CreateInstance]; or [Environs New]; to create Environs objects.")));
#endif
#ifdef __cplusplus
/** Perform calls to the Environs object asynchronously. If set to Environs.CALL_WAIT, then all commands will block until the call finishes.
* If set to Environs.CALL_NOWAIT, then certain calls (which may take longer) will be performed asynchronously. */
@property (nonatomic) environs::Call_t async;
#endif
/**
* Instructs the framework to perform a quick shutdown (with minimal wait times)
*
* @param enable true / false
*/
- (void) SetAppShutdown : (bool) enable;
/**
* Create an Environs object.
*
* @return An instance handle that refers to the created Environs object
*/
+ (Environs *) CreateInstance;
/**
* Create an Environs object.
*
* @param appName The application name for the application environment.
* @param areaName The area name for the application environment.
*
* @return An instance handle that refers to the created Environs object
*/
+ (Environs *) CreateInstance: (const char *) appName Area:(const char *) areaName;
/**
* Create an Environs object.
*
* @return An instance handle that refers to the created Environs object
*/
+ (Environs *) New;
/**
* Create an Environs object.
*
* @param appName The application name for the application environment.
* @param areaName The area name for the application environment.
*
* @return An instance handle that refers to the created Environs object
*/
+ (Environs *) New: (const char *) appName Area:(const char *) areaName;
/**
* Load settings for the given application environment from settings storage,
* if any have been saved previously.
*
* @param appName The application name for the application environment.
* @param areaName The area name for the application environment.
*
* @return success
*/
- (bool) LoadSettings: (const char *) appName Area:(const char *) areaName;
/**
* Load settings. Prior to this call, an application environment MUST be given
* using SetApplicationName and SetAreaName.
*
* @return success
*/
- (bool) LoadSettings;
- (void) ShowMessage:(NSString *) sender Message:(const char *) message Length:(int)msgLength;
/**
* Initialize the environment. This must be called after the user interface has been loaded, rendered and shown.
* Tasks:
* - Request display always on state, hence disable standby and power management functions.
* - Load sensor managers and sensor services
* - Initialize google cloud messaging
*
@returns success
*/
- (bool) Init;
/**
* Dispose the storage, that is remove all data and messages received in the data store.
*
*/
- (void) ClearStorage;
/**
* Reset crypt layer and all created resources. Those will be recreated if necessary.
* This method is intended to be called directly after creation of an Environs instance.
*
*/
- (void) ResetCryptLayer;
/**
* Get the native version of Environs.
*
* @return version string
*/
- (const char *) GetVersionString;
/**
* Get the native major version of Environs.
*
* @return major version
*/
- (int) GetVersionMajor;
/**
* Get the native minor version of Environs.
*
* @return minor version
*/
- (int) GetVersionMinor;
/**
* Get the native revision of Environs.
*
* @return revision
*/
- (int) GetVersionRevision;
/**
* Query whether the native layer was build for release (or debug).
*
* @return true = Release build, false = Debug build.
*/
- (bool) GetIsReleaseBuild;
/**
* Instruct Environs to output verbose debug logging.
*
* @param level debug level 0 ... 16
*/
- (void) SetDebug : (int) value;
/**
* Get output debug level.
*
* @return level debug level 0 ... 16
*/
- (int) GetDebug;
/**
* Set timeout for LAN/WiFi connects. Default ( 2 seconds ).
* Increasing this value may help to handle worse networks which suffer from large latencies.
*
* @param timeout
*/
- (void) SetNetworkConnectTimeout : (int) timeout;
/**
* Get platform that the app is running on.
*
* @return enum of type Environs.Platforms
*/
- (int) GetPlatform;
/**
* Set the platform type that the local instance of Environs shall use for identification within the environment.
* Valid type are enumerated in Environs.Platforms.*
*
* @param platform Environs.Platforms.*
*/
- (void) SetPlatform: (int) platform;
/**
* Set/Remove the location-node flag to the platform type that the local instance of Environs shall use for identification within the environment.
* Flag: Environs.Platforms.LocationNode_Flag
*
* @param isLocationNode true or false
*/
- (void) SetIsLocationNode: (bool) isLocationNode;
/**
* Set the user name for authentication with a Mediator service. Usually the user's email address is used as the user name.
*
* @param username
* @return success
*/
- (bool) SetMediatorUserName: (NSString *) userName;
- (bool) SetUserName: (const char *) username;
/**
* Query UserName used to authenticate with a Mediator.
*
* @return UserName
*/
- (NSString *) GetMediatorUserName;
/**
* Enable or disable anonymous logon to the Mediator.
*
* @param enable A boolean that determines the target state.
*/
- (void) SetUseMediatorAnonymousLogon: (bool) enable;
/**
* Retrieve a boolean that determines whether Environs makes use of anonymous logon to Mediator services.
*
* @return true = yes, false = no
*/
- (bool) GetUseMediatorAnonymousLogon;
/**
* Set the user password for authentication with a Mediator service. The password is stored as a hashed token within Environs.
*
* @param password
* @return success
*/
- (bool) SetMediatorPassword: (NSString *) password;
- (bool) SetUserPassword: (const char *) password;
/**
* Enable or disable authentication with the Mediator using username/password.
*
* @param enable
*/
- (void) SetUseAuthentication: (bool) enable;
#ifdef __cplusplus
/**
* Query the filter level for device management within Environs.
*
* return level can be one of the values Environs.MEDIATOR_FILTER_NONE, Environs.MEDIATOR_FILTER_AREA, Environs.MEDIATOR_FILTER_AREA_AND_APP
*/
- (environs::MediatorFilter_t) GetMediatorFilterLevel;
/**
* Set the filter level for device management within Environs.
*
* @param level can be one of the values Environs.MEDIATOR_FILTER_NONE, Environs.MEDIATOR_FILTER_AREA, Environs.MEDIATOR_FILTER_AREA_AND_APP
*/
- (void) SetMediatorFilterLevel : (environs::MediatorFilter_t) level;
#endif
/**
* Retrieve a boolean that determines whether Environs shows up a login dialog if a Mediator is used and no credentials are available.
*
* @return true = yes, false = no
*/
- (bool) GetUseMediatorLoginDialog;
/**
* Instruct Environs to show up a login dialog if a Mediator is used and no credentials are available.
*
* @param enable true = enable, false = disable
*/
- (void) SetUseMediatorLoginDialog: (bool) enable;
/**
* Retrieve a boolean that determines whether Environs disable Mediator settings on dismiss of the login dialog.
*
* @return true = yes, false = no
*/
- (bool) GetMediatorLoginDialogDismissDisable;
/**
* Instruct Environs disable Mediator settings on dismiss of the login dialog.
*
* @param enable true = enable, false = disable
*/
- (void) SetMediatorLoginDialogDismissDisable: (bool) enable;
/**
* Register at known Mediator server instances.
*
* @return success state
*/
- (bool) RegisterAtMediators;
/**
* Enable or disable device list update notifications from Mediator layer.
* In particular, mobile devices should disable notifications if the devicelist is not
* visible to users or the app transitioned to background.
* This helps recuding cpu load and network traffic when not required.
*
* @param enable true = enable, false = disable
*/
- (void) SetMediatorNotificationSubscription : (bool) enable;
/**
* Get subscription status of device list update notifications from Mediator layer.
*
* @return enable true = enable, false = disable
*/
- (bool) GetMediatorNotificationSubscription;
/**
* Enable or disable short messages from Mediator layer.
* In particular, mobile devices should disable short messages if the app transitioned to background or mobile network only.
* This helps recuding cpu load and network traffic when not necessary.
*
* @param enable true = enable, false = disable
*/
- (void) SetMessagesSubscription : (bool) enable;
/**
* Get subscription status of short messages from Mediator layer.
*
* @return enable true = enable, false = disable
*/
- (bool) GetMessagesSubscription;
/** Default value for each DeviceInstance after object creation. */
- (bool) GetAllowConnectDefault;
/** Default value for each DeviceInstance after object creation. */
- (void) SetAllowConnectDefault:(bool) value;
/**
* Start Environs. This is a non-blocking call and returns immediately.
* Since starting Environs includes starting threads and activities that may take longer,
* this call executes the start tasks within a thread.
* In order to get the status, catch the onNotify handler of your EnvironsListener.
*
*/
- (void) Start;
#ifdef __cplusplus
/**
* Query the status of Environs.&nsbp;Valid values are environs::Status
*
* @return environs::Status
*/
- (environs::Status_t) GetStatus;
#endif
/**
* Stop Environs and dispose all acquired resources.
*/
- (void) Stop;
/**
* Stop Environs and dispose all acquired resources.
*/
- (void) Dispose;
/**
* Add an observer for communication with Environs and devices within the environment.
*
* @param observer Your implementation of EnvironsObserver.
*/
- (void) AddObserver:(id<EnvironsObserver>) observer;
/**
* Remove an observer for communication with Environs and devices within the environment.
*
* @param observer Your implementation of EnvironsObserver.
*/
- (void) RemoveObserver:(id<EnvironsObserver>) observer;
/**
* Add an observer for receiving messages.
*
* @param observer Your implementation of EnvironsMessageObserver.
*/
- (void) AddObserverForMessages:(id<EnvironsMessageObserver>) observer;
/**
* Remove an observer for receiving messages.
*
* @param observer Your implementation of EnvironsMessageObserver.
*/
- (void) RemoveObserverForMessages:(id<EnvironsMessageObserver>) observer;
/**
* Add an observer for receiving data buffers and files.
*
* @param observer Your implementation of EnvironsDataObserver.
*/
- (void) AddObserverForData:(id<EnvironsDataObserver>) observer;
/**
* Remove an observer for receiving data buffers and files.
*
* @param observer Your implementation of EnvironsDataObserver.
*/
- (void) RemoveObserverForData:(id<EnvironsDataObserver>) observer;
/**
* Add an observer for receiving data buffers and files.
*
* @param observer Your implementation of EnvironsSensorObserver.
*/
- (void) AddObserverForSensorData:(id<EnvironsSensorObserver>) observer;
/**
* Remove an observer for receiving data buffers and files.
*
* @param observer Your implementation of EnvironsSensorObserver.
*/
- (void) RemoveObserverForSensorData:(id<EnvironsSensorObserver>) observer;
/**
* Set the ports that the local instance of Environs shall use for listening on connections.
*
* @param tcpPort
* @param udpPort
* @return success
*/
- (void) SetPorts:(int)comPort DataPort:(int)dataPort;
/**
* Set the area name that the local instance of Environs shall use for identification within the environment.
* It must be set before creating the Environs instance.
*
* @param name
* @return success
*/
- (void) SetAreaName: (const char *) name;
/**
* Get the area name that the local instance of Environs use for identification within the environment.
* It must be set before creating the Environs instance.
*
* @return areaName
*/
- (const char *) GetAreaName;
/**
* Set the application name of that the local instance of Environs shall use for identification within the environment.
* It must be set before creating the Environs instance.
*
* @param name
* @return success
*/
- (void) SetApplication: (const char *) name;
- (void) SetApplicationName: (const char *) name;
/**
* Get the application name that the local instance of Environs use for identification within the environment.
* It must be set before creating the Environs instance.
*
* @return appName
*/
- (const char *) GetApplicationName;
/**
* Set the name of the current device. This name is used to communicate with other devices within the environment.
*
* @param deviceName
* @return success
*/
- (void) SetDeviceName: (const char *) name;
- (unsigned int) GetIPAddress;
- (unsigned int) GetSubnetMask;
- (NSString *) GetSSID;
- (NSString *) GetSSIDDesc;
- (unsigned long long) GetBSSID;
- (int) GetRSSI;
/**
* Set the device id that is assigned to the instance of Environs.
*
* @param deviceID
*/
- (void) SetDeviceID : (int) deviceID;
/**
* Get the device id that the application has assigned to the instance of Environs.
*
* @return deviceID
*/
- (int) GetDeviceID;
/**
* Request a device id from mediator server instances that have been provided before this call.
* Prior to this call, the area and application name must be provided as well,
* in order to get an available device id for the specified application environment.
* If the application has already set a deviceID (using setDeviceID), this call returns the previously set value.
*
* @return deviceID
*/
- (int) GetDeviceIDFromMediator;
/**
* Query whether the name of the current device has been set before.
*
* @return has DeviceUID
*/
- (bool) HasDeviceUID;
/**
* Set the name of the current device. This name is used to communicate with other devices within the environment.
*
* @param uid
* @return success
*/
- (bool) SetDeviceUID : (const char *) name;
/**
* Determines whether to use environs default Mediator predefined by framework developers or not.
*
* @param enable true = use the default Mediator
*/
- (void) SetUseDefaultMediator : (bool) usage;
/**
* Query whether to use given Mediator by setMediator()
*
* @return enabled
*/
- (bool) GetUseDefaultMediator;
/**
* Determines whether to use given Mediator by setMediator()
*
* @param enable true = enable, false = disable
*/
- (void) SetUseCustomMediator : (bool) usage;
/**
* Query whether to use given Mediator by setMediator()
*
* @return enabled
*/
- (bool) GetUseCustomMediator;
/**
* Query ip of custom Mediator.
*
* @return ip
*/
- (NSString *) GetMediatorIP;
/**
* Query port of custom Mediator.
*
* @return Port
*/
- (int) GetMediatorPort;
/**
* Set custom Mediator to use.
*
* @param ip
* @param port
*/
- (void) SetMediator:(NSString *)ip Port:(unsigned short) port;
/**
* Determines whether to use Crypto Layer Security for Mediator connections.
* If a Mediator enforces CLS, then disabling this option will result in failure to connect to that Mediator.
*
* @param enable
*/
- (void) SetUseCLSForMediator : (bool) usage;
/**
* Query whether to use Crypto Layer Security for Mediator connections.
*
* @return enabled
*/
- (bool) GetUseCLSForMediator;
/**
* Determines whether to use Crypto Layer Security for device-to-device connections.
*
* @param enable
*/
- (void) SetUseCLSForDevices : (bool) usage;
/**
* Query whether to use Crypto Layer Security for device-to-device connections.
*
* @return enabled
*/
- (bool) GetUseCLSForDevices;
/**
* Determines whether to enforce Crypto Layer Security for device-to-device connections.
*
* @param enable
*/
- (void) SetUseCLSForDevicesEnforce : (bool) usage;
/**
* Query whether to enforce Crypto Layer Security for device-to-device connections.
*
* @return enabled
*/
- (bool) GetUseCLSForDevicesEnforce;
/**
* Enable Crypto Layer Security for all traffic (incl. those of interactive type) in device-to-device connections.
*
* @param enable
*/
- (void) SetUseCLSForAllTraffic : (bool) usage;
/**
* Query whether all traffic (incl. those of interactive type) in device-to-device connections is encrypted.
*
* @return enabled
*/
- (bool) GetUseCLSForAllTraffic;
- (void) SetUseH264 : (bool) usage;
- (bool) GetUseH264;
/**
* Instruct Environs to show log messages in the status log.
*
* @param enable true = enable, false = disable
*/
- (void) SetUseNotifyDebugMessage : (bool) usage;
/**
* Query Environs settings that show log messages in the status log.
*
* @return enable true = enable, false = disable
*/
- (bool) GetUseNotifyDebugMessage;
/**
* Instruct Environs to create and write a log file in the working directory.
*
* @param enable true = enable, false = disable
*/
- (void) SetUseLogFile : (bool) usage;
/**
* Query Environs settings that create and write a log file in the working directory.
*
* @return enable true = enable, false = disable
*/
- (bool) GetUseLogFile;
/**
* Instruct Environs to log to stdout.
*
* @param enable true = enable, false = disable
*/
-( void ) SetUseLogToStdout : ( bool ) enable;
/**
* Query Environs settings whether to log to stdout.
*
* @return enable true = enabled, false = disabled
*/
-( bool ) GetUseLogToStdout;
/**
* Instruct Environs to create DeviceLists that are used as UIAdapter by client code.
* Any changes of those lists are made within the applications main / UI thread context.
* Only DeviceList objects that are created after this call are affected.
* DeviceList objects created before this call remain using the setting at the time they are created.
*
* @param enable true = enable, false = disable
*/
-( void ) SetUseDeviceListAsUIAdapter : ( bool ) enable;
/**
* Query Environs settings whether to create DeviceLists that are used as UIAdapter by client code.
* Any changes of those lists are made within the applications main / UI thread context.
*
* @return enable true = enabled, false = disabled
*/
-( bool ) GetUseDeviceListAsUIAdapter;
#ifdef ENVIRONS_OSX
/**
* Instruct Environs to use headless mode without worrying about UI thread.
*
* @param enable true = enable, false = disable
*/
-( void ) SetUseHeadless : ( bool ) enable;
/**
* Query Environs settings whether to use headless mode without worrying about UI thread.
*
* @return enable true = enabled, false = disabled
*/
-( bool ) GetUseHeadless;
/**
* Check for mediator logon credentials and query on command line if necessary.
*
* @param success true = successful, false = failed
*/
-( bool ) QueryMediatorLogonCommandLine;
#endif
/**
* Enable or disable a touch recognizer module by name (libEnv-Rec...).
*
* @param moduleName The module name
* @param enable Enable or disable
* @return success
*/
- (bool) SetUseTouchRecognizer : (const char *) moduleName Status:(bool)enable;
/**
* Use default encoder, decoder, capture, render modules.
*
* @return success
*/
- (bool) SetUsePortalDefaultModules;
/**
* Use encoder module with the name moduleName. (libEnv-Enc...).
*
* @param moduleName The module name
* @return success
*/
- (bool) SetUseEncoder: (const char *) moduleName;
/**
* Use decoder module with the name moduleName. (libEnv-Dec...).
*
* @param moduleName The module name
* @return success
*/
- (bool) SetUseDecoder: (const char *) moduleName;
/**
* Use capture module with the name moduleName. (libEnv-Cap...).
*
* @param moduleName the name of the module
* @return success
*/
- (bool) SetUseCapturer: (const char *) moduleName;
/**
* Use render module with the name moduleName. (libEnv-Rend...).
*
* @param moduleName the name of the module
* @return success
*/
- (bool) SetUseRenderer: (const char *) moduleName;
#ifdef ENVIRONS_IOS
/**
* Determines whether to use native C++ for portal stream encoding/decoding or not.
*
* @param enable
*/
- (void) SetUseNativeDecoder:(bool)usage;
/**
* Query whether to use native C++ for portal stream encoding/decoding or not.
*
* @return enabled
*/
- (bool) GetUseNativeDecoder;
/**
* Determines whether to use device sensor data (compass, acc, gyro, etc.) for interaction or not.
*
* @param enable
*/
- (void) SetUseSensors:(bool)usage;
/**
* Query whether to use device sensor data (compass, acc, gyro, etc.) for interaction or not.
*
* @return enabled
*/
- (bool) GetUseSensors;
/**
* Query whether to use native display resolution for the portal stream.
*
* @return enabled
*/
- (bool) GetPortalNativeResolution;
/**
* Determines whether to use native display resolution for the portal stream.
*
* @param enable true = enable, false = disable
*/
- (void) SetPortalNativeResolution:(bool)enable;
/**
* Query whether to automatically start a portal stream on successful device connection or not.
*
* @return enabled true = enable, false = disable
*/
- (bool) GetPortalAutoStart;
/**
* Determine whether to automatically start a portal stream on successful device connection or not.
*
* @param enable true = enable, false = disable
*/
- (void) SetPortalAutoStart:(bool)enable;
/**
* Determine whether to use TCP for portal streaming (if not selectively set for a particular deviceID)
*
* @param enable
*/
- (void) SetPortalTCP:(bool)usage;
/**
* Query whether to use TCP for portal streaming (UDP otherwise)
*
* @return enabled
*/
- (bool) GetPortalTCP;
- (void) SetUsePortalTCP:(bool)usage;
- (bool) GetUsePortalTCP;
#else
#ifdef __cplusplus
- (int) SetUseTracker:(environs::Call_t) async module:(const char *) moduleName;
- (int) GetUseTracker:(const char *) moduleName;
- (EBOOL) DisposeTracker:(environs::Call_t) async module:(const char *) moduleName;
- (EBOOL) PushTrackerCommand:(environs::Call_t) async module: (int) index cmd:(int) command;
#endif
#endif
-(ENVIRONS_NAMES DeviceDisplay *) GetDeviceDisplayProps:(int) nativeID;
#ifdef __cplusplus
/**
* Connect to device with the given ID and a particular application environment.
*
* @param deviceID Destination device ID
* @param areaName Project name of the application environment
* @param appName Application name of the application environment
* @param async Perform asynchronous. Non-async means that this call blocks until the call finished.
* @return status 0: Connection can't be conducted (maybe environs is stopped or the device ID is invalid)
* 1: A connection to the device already exists or a connection task is already in progress)
* 2: A new connection has been triggered and is in progress
*/
-(int) DeviceConnect:(int) deviceID areaName:(const char *) areaName appName:(const char *) appName async:(environs::Call_t) async;
/**
* Set render callback.
*
* @param async Perform asynchronous. Non-async means that this call blocks until the call finished.
* @param portalID This is an ID that Environs use to manage multiple portals from the same source device. It is provided within the notification listener as sourceIdent. Applications should store them in order to address the correct portal within Environs.
* @param callback The pointer to the callback.
* @param callbackType A value of type RENDER_CALLBACK_TYPE_* that tells the portal receiver what we actually can render..
* @return true = success, false = failed.
*/
-(bool) SetRenderCallback:(environs::Call_t) async portalID:(int) portalID callback:(void *)callback callbackType:(environs::RenderCallbackType_t) callbackType;
/**
* Release render callback delegate or pointer
*