Merge remote-tracking branch 'origin/API8' into tizen_6.0
[platform/core/csapi/tizenfx.git] / src / Tizen.Network.Bluetooth / Tizen.Network.Bluetooth / BluetoothEventArgs.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using System;
18 using System.Collections.Generic;
19 using System.ComponentModel;
20
21 namespace Tizen.Network.Bluetooth
22 {
23     /// <summary>
24     /// An extended EventArgs class contains the changed Bluetooth state.
25     /// </summary>
26     /// <since_tizen> 3 </since_tizen>
27     public class StateChangedEventArgs : EventArgs
28     {
29         private BluetoothState _type;
30         private BluetoothError _result;
31
32         internal StateChangedEventArgs(BluetoothError result, BluetoothState type)
33         {
34             _type = type;
35             _result = result;
36         }
37
38         /// <summary>
39         /// The state of Bluetooth.
40         /// </summary>
41         /// <since_tizen> 3 </since_tizen>
42         public BluetoothState BTState
43         {
44             get
45             {
46                 return _type;
47             }
48         }
49
50         /// <summary>
51         /// The BluetoothError result.
52         /// </summary>
53         /// <since_tizen> 3 </since_tizen>
54         public BluetoothError Result
55         {
56             get
57             {
58                 return _result;
59             }
60         }
61     }
62
63     /// <summary>
64     /// An extended EventArgs class contains the changed Bluetooth name.
65     /// </summary>
66     /// <since_tizen> 3 </since_tizen>
67     public class NameChangedEventArgs : EventArgs
68     {
69         private string _name;
70
71         internal NameChangedEventArgs(string name)
72         {
73             _name = name;
74         }
75
76         /// <summary>
77         /// The name of the device.
78         /// </summary>
79         /// <since_tizen> 3 </since_tizen>
80         public string DeviceName
81         {
82             get
83             {
84                 return _name;
85             }
86         }
87     }
88
89     /// <summary>
90     /// An extended EventArgs class contains the changed Bluetooth visibility mode.
91     /// </summary>
92     /// <since_tizen> 3 </since_tizen>
93     public class VisibilityModeChangedEventArgs : EventArgs
94     {
95         private VisibilityMode _mode;
96         private BluetoothError _result;
97
98         internal VisibilityModeChangedEventArgs(BluetoothError result, VisibilityMode mode)
99         {
100             _result = result;
101             _mode = mode;
102         }
103
104         /// <summary>
105         /// The visibility mode.
106         /// </summary>
107         /// <since_tizen> 3 </since_tizen>
108         public VisibilityMode Visibility
109         {
110             get
111             {
112                 return _mode;
113             }
114         }
115
116         /// <summary>
117         /// The BluetoothError result.
118         /// </summary>
119         /// <since_tizen> 3 </since_tizen>
120         public BluetoothError Result
121         {
122             get
123             {
124                 return _result;
125             }
126         }
127     }
128
129     /// <summary>
130     /// An extended EventArgs class contains the duration until the visibility mode is changed from TimeLimitedDiscoverable to NonDiscoverable.
131     /// </summary>
132     /// <since_tizen> 3 </since_tizen>
133     public class VisibilityDurationChangedEventArgs : EventArgs
134     {
135         private int _duration;
136
137         internal VisibilityDurationChangedEventArgs(int duration)
138         {
139             _duration = duration;
140         }
141
142         /// <summary>
143         /// The duration.
144         /// </summary>
145         /// <since_tizen> 3 </since_tizen>
146         public int Duration
147         {
148             get
149             {
150                 return _duration;
151             }
152         }
153     }
154
155     /// <summary>
156     /// An extended EventArgs class contains the changed Bluetooth device discovery state and the discovered device information.
157     /// </summary>
158     /// <since_tizen> 3 </since_tizen>
159     public class DiscoveryStateChangedEventArgs : EventArgs
160     {
161         private BluetoothError _result;
162         private BluetoothDeviceDiscoveryState _state;
163         private BluetoothDevice _device;
164
165         internal DiscoveryStateChangedEventArgs(BluetoothError result, BluetoothDeviceDiscoveryState state)
166         {
167             _result = result;
168             _state = state;
169         }
170
171         internal DiscoveryStateChangedEventArgs(BluetoothError result, BluetoothDeviceDiscoveryState state, BluetoothDevice device)
172         {
173             _result = result;
174             _state = state;
175             _device = device;
176         }
177
178         /// <summary>
179         /// The BluetoothError result.
180         /// </summary>
181         /// <since_tizen> 3 </since_tizen>
182         public BluetoothError Result
183         {
184             get
185             {
186                 return _result;
187             }
188         }
189
190         /// <summary>
191         /// The state of the discovery.
192         /// </summary>
193         /// <since_tizen> 3 </since_tizen>
194         public BluetoothDeviceDiscoveryState DiscoveryState
195         {
196             get
197             {
198                 return _state;
199             }
200         }
201
202         /// <summary>
203         /// The remote device found.
204         /// </summary>
205         /// <since_tizen> 3 </since_tizen>
206         public BluetoothDevice DeviceFound
207         {
208             get
209             {
210                 return _device;
211             }
212         }
213     }
214
215     /// <summary>
216     /// An extended EventArgs class contains the bonded device information.
217     /// </summary>
218     /// <since_tizen> 3 </since_tizen>
219     public class BondCreatedEventArgs : EventArgs
220     {
221         private BluetoothError _result;
222         private BluetoothDevice _device;
223
224         internal BondCreatedEventArgs(BluetoothError result, BluetoothDevice device)
225         {
226             _result = result;
227             _device = device;
228         }
229
230         /// <summary>
231         /// The BluetoothError result.
232         /// </summary>
233         /// <since_tizen> 3 </since_tizen>
234         public BluetoothError Result
235         {
236             get
237             {
238                 return _result;
239             }
240         }
241
242         /// <summary>
243         /// The remote device.
244         /// </summary>
245         /// <since_tizen> 3 </since_tizen>
246         public BluetoothDevice Device
247         {
248             get
249             {
250                 return _device;
251             }
252         }
253     }
254
255     /// <summary>
256     /// An extended EventArgs class contains the address of the remote Bluetooth device to destroy bond with.
257     /// </summary>
258     /// <since_tizen> 3 </since_tizen>
259     public class BondDestroyedEventArgs : EventArgs
260     {
261         private BluetoothError _result;
262         private string _address;
263
264         internal BondDestroyedEventArgs(BluetoothError result, string address)
265         {
266             _result = result;
267             _address = address;
268         }
269
270         /// <summary>
271         /// The BluetoothError result.
272         /// </summary>
273         /// <since_tizen> 3 </since_tizen>
274         public BluetoothError Result
275         {
276             get
277             {
278                 return _result;
279             }
280         }
281
282         /// <summary>
283         /// The remote device address.
284         /// </summary>
285         /// <value>The device address.</value>
286         /// <since_tizen> 3 </since_tizen>
287         public string DeviceAddress
288         {
289             get
290             {
291                 return _address;
292             }
293         }
294     }
295
296     /// <summary>
297     /// An extended EventArgs class contains the authorization state and the address of the remote Bluetooth device.
298     /// </summary>
299     /// <since_tizen> 3 </since_tizen>
300     public class AuthorizationChangedEventArgs : EventArgs
301     {
302         private BluetoothAuthorizationType _authType;
303         private string _address;
304
305         internal AuthorizationChangedEventArgs(BluetoothAuthorizationType authType, string address)
306         {
307             _authType = authType;
308             _address = address;
309         }
310
311         /// <summary>
312         /// The authorization.
313         /// </summary>
314         /// <since_tizen> 3 </since_tizen>
315         public BluetoothAuthorizationType Authorization
316         {
317             get
318             {
319                 return _authType;
320             }
321         }
322
323         /// <summary>
324         /// The device address.
325         /// </summary>
326         /// <since_tizen> 3 </since_tizen>
327         public string DeviceAddress
328         {
329             get
330             {
331                 return _address;
332             }
333         }
334
335     }
336
337     /// <summary>
338     /// An extended EventArgs class contains the service lists found on the remote Bluetooth device.
339     /// </summary>
340     /// <since_tizen> 3 </since_tizen>
341     public class ServiceSearchedEventArgs : EventArgs
342     {
343         private BluetoothDeviceSdpData _sdpData;
344         private BluetoothError _result;
345
346         internal ServiceSearchedEventArgs(BluetoothError result, BluetoothDeviceSdpData sdpData)
347         {
348             _result = result;
349             _sdpData = sdpData;
350         }
351
352         /// <summary>
353         /// The BluetoothError result.
354         /// </summary>
355         /// <since_tizen> 3 </since_tizen>
356         public BluetoothError Result
357         {
358             get
359             {
360                 return _result;
361             }
362         }
363         /// <summary>
364         /// The sdp data.
365         /// </summary>
366         /// <since_tizen> 3 </since_tizen>
367         public BluetoothDeviceSdpData SdpData
368         {
369             get
370             {
371                 return _sdpData;
372             }
373         }
374     }
375
376     /// <summary>
377     /// An extended EventArgs class contains the connection state and the connection information of the remote device.
378     /// </summary>
379     /// <since_tizen> 3 </since_tizen>
380     public class DeviceConnectionStateChangedEventArgs : EventArgs
381     {
382         private bool _isConnected;
383         private BluetoothDeviceConnectionData _connectionData;
384
385         internal DeviceConnectionStateChangedEventArgs(bool isConnected, BluetoothDeviceConnectionData connectionData)
386         {
387             _isConnected = isConnected;
388             _connectionData = connectionData;
389         }
390
391         /// <summary>
392         /// A value indicating whether the device is connected.
393         /// </summary>
394         /// <since_tizen> 3 </since_tizen>
395         public bool IsConnected => _isConnected;
396
397         /// <summary>
398         /// The device connection data.
399         /// </summary>
400         /// <since_tizen> 3 </since_tizen>
401         public BluetoothDeviceConnectionData ConnectionData
402         {
403             get
404             {
405                 return _connectionData;
406             }
407         }
408     }
409
410     /// <summary>
411     /// An extended EventArgs class contains the data received information.
412     /// </summary>
413     /// <since_tizen> 3 </since_tizen>
414     public class SocketDataReceivedEventArgs : EventArgs
415     {
416         private SocketData _data;
417
418         internal SocketDataReceivedEventArgs(SocketData data)
419         {
420             _data = data;
421         }
422
423         /// <summary>
424         /// The socket data.
425         /// </summary>
426         /// <since_tizen> 3 </since_tizen>
427         public SocketData Data
428         {
429             get
430             {
431                 return _data;
432             }
433         }
434     }
435
436     /// <summary>
437     /// An extended EventArgs class contains the changed connection state.
438     /// </summary>
439     /// <since_tizen> 3 </since_tizen>
440     public class SocketConnectionStateChangedEventArgs : EventArgs
441     {
442         private BluetoothError _result;
443         private BluetoothSocketState _state;
444         private SocketConnection _connection;
445
446         internal SocketConnectionStateChangedEventArgs(BluetoothError result, BluetoothSocketState state, SocketConnection connection)
447         {
448             _result = result;
449             _state = state;
450             _connection = connection;
451         }
452
453         /// <summary>
454         /// The BluetoothError result.
455         /// </summary>
456         /// <since_tizen> 3 </since_tizen>
457         public BluetoothError Result
458         {
459             get
460             {
461                 return _result;
462             }
463         }
464
465         /// <summary>
466         /// The socket state.
467         /// </summary>
468         /// <since_tizen> 3 </since_tizen>
469         public BluetoothSocketState State
470         {
471             get
472             {
473                 return _state;
474             }
475         }
476
477         /// <summary>
478         /// The socket connection.
479         /// </summary>
480         /// <since_tizen> 3 </since_tizen>
481         public SocketConnection Connection
482         {
483             get
484             {
485                 return _connection;
486             }
487         }
488     }
489
490     /// <summary>
491     /// The AcceptStateChanged event is raised when the socket connection state is changed.
492     /// </summary>
493     /// <since_tizen> 3 </since_tizen>
494     public class AcceptStateChangedEventArgs : EventArgs
495     {
496         private BluetoothError _result;
497         private BluetoothSocketState _state;
498         private SocketConnection _connection;
499         private IBluetoothServerSocket _server;
500
501         internal AcceptStateChangedEventArgs(BluetoothError result, BluetoothSocketState state, SocketConnection connection, BluetoothSocket server)
502         {
503             _result = result;
504             _state = state;
505             _connection = connection;
506             _server = (IBluetoothServerSocket)server;
507         }
508
509         /// <summary>
510         /// The BluetoothError result.
511         /// </summary>
512         /// <since_tizen> 3 </since_tizen>
513         public BluetoothError Result
514         {
515             get
516             {
517                 return _result;
518             }
519         }
520
521         /// <summary>
522         /// The socket state.
523         /// </summary>
524         /// <since_tizen> 3 </since_tizen>
525         public BluetoothSocketState State
526         {
527             get
528             {
529                 return _state;
530             }
531         }
532
533         /// <summary>
534         /// The socket connection.
535         /// </summary>
536         /// <since_tizen> 3 </since_tizen>
537         public SocketConnection Connection
538         {
539             get
540             {
541                 return _connection;
542             }
543         }
544
545         /// <summary>
546         /// The server socket instance.
547         /// </summary>
548         /// <since_tizen> 3 </since_tizen>
549         [Obsolete("Deprecated since API level 6. Please use the 'Client' in the SocketConnection.")]
550         public IBluetoothServerSocket Server
551         {
552             get
553             {
554                 return _server;
555             }
556         }
557     }
558
559     /// <summary>
560     /// An extended EventArgs class contains the socket connection requested.
561     /// </summary>
562     /// <since_tizen> 6 </since_tizen>
563     [EditorBrowsable(EditorBrowsableState.Never)]
564     public class SocketConnectionRequestedEventArgs : EventArgs
565     {
566         internal SocketConnectionRequestedEventArgs(int socketFd, string remoteAddress)
567         {
568             SocketFd = socketFd;
569             RemoteAddress = remoteAddress;
570         }
571
572         /// <summary>
573         /// The socket fd.
574         /// </summary>
575         /// <since_tizen> 6 </since_tizen>
576         internal int SocketFd
577         {
578             get;
579             private set;
580         }
581
582         /// <summary>
583         /// The remote address.
584         /// </summary>
585         /// <since_tizen> 6 </since_tizen>
586         public string RemoteAddress
587         {
588             get;
589             private set;
590         }
591     }
592
593     /// <summary>
594     /// An extended EventArgs class contains the connection state, remote address, and the type of audio profile.
595     /// </summary>
596     /// <since_tizen> 3 </since_tizen>
597     public class AudioConnectionStateChangedEventArgs : EventArgs
598     {
599         private int _result;
600         private bool _isConnected;
601         private string _address;
602         private BluetoothAudioProfileType _type;
603
604         internal AudioConnectionStateChangedEventArgs(int result, bool isConnected, string address, BluetoothAudioProfileType type)
605         {
606             _result = result;
607             _type = type;
608             _isConnected = isConnected;
609             _address = address;
610         }
611
612         /// <summary>
613         /// The result.
614         /// </summary>
615         /// <since_tizen> 3 </since_tizen>
616         public int Result
617         {
618             get
619             {
620                 return _result;
621             }
622         }
623
624         /// <summary>
625         /// A value indicating whether this instance is connected.
626         /// </summary>
627         /// <since_tizen> 3 </since_tizen>
628         public bool IsConnected
629         {
630             get
631             {
632                 return _isConnected;
633             }
634         }
635
636         /// <summary>
637         /// The address.
638         /// </summary>
639         /// <since_tizen> 3 </since_tizen>
640         public string Address
641         {
642             get
643             {
644                 return _address;
645             }
646         }
647
648         /// <summary>
649         /// The type of the audio profile.
650         /// </summary>
651         /// <since_tizen> 3 </since_tizen>
652         public BluetoothAudioProfileType ProfileType
653         {
654             get
655             {
656                 return _type;
657             }
658         }
659     }
660
661     /// <summary>
662     /// An extended EventArgs class contains the connection state and the address of the remote Bluetooth device.
663     /// </summary>
664     /// <since_tizen> 6 </since_tizen>
665     [EditorBrowsable(EditorBrowsableState.Never)]
666     public class AgScoStateChangedEventArgs : EventArgs
667     {
668         internal AgScoStateChangedEventArgs(bool isOpened)
669         {
670             IsOpened = isOpened;
671         }
672
673         /// <summary>
674         /// A value indicating whether the state is connected.
675         /// </summary>
676         /// <since_tizen> 6 </since_tizen>
677         public bool IsOpened
678         {
679             get;
680             private set;
681         }
682     }
683
684     /// <summary>
685     /// An extended EventArgs class contains the connection state and the address of the remote Bluetooth device.
686     /// </summary>
687     /// <since_tizen> 3 </since_tizen>
688     public class HidConnectionStateChangedEventArgs : EventArgs
689     {
690         private int _result;
691         private bool _isConnected;
692         private string _address;
693
694         internal HidConnectionStateChangedEventArgs(int result, bool isConnected, string address)
695         {
696             _result = result;
697             _isConnected = isConnected;
698             _address = address;
699         }
700
701         /// <summary>
702         /// The result.
703         /// </summary>
704         /// <since_tizen> 3 </since_tizen>
705         public int Result
706         {
707             get
708             {
709                 return _result;
710             }
711         }
712
713         /// <summary>
714         /// A value indicating whether this instance is connected.
715         /// </summary>
716         /// <since_tizen> 3 </since_tizen>
717         public bool IsConnected
718         {
719             get
720             {
721                 return _isConnected;
722             }
723         }
724
725         /// <summary>
726         /// The address.
727         /// </summary>
728         /// <since_tizen> 3 </since_tizen>
729         public string Address
730         {
731             get
732             {
733                 return _address;
734             }
735         }
736     }
737
738     /// <summary>
739     /// An extended EventArgs class contains the connection state and the address of the remote Bluetooth device.
740     /// </summary>
741     /// <since_tizen> 6 </since_tizen>
742     [EditorBrowsable(EditorBrowsableState.Never)]
743     public class HidDeviceConnectionStateChangedEventArgs : EventArgs
744     {
745         internal HidDeviceConnectionStateChangedEventArgs(bool isConnected, string address)
746         {
747             IsConnected = isConnected;
748             Address = address;
749         }
750
751         internal HidDeviceConnectionStateChangedEventArgs(int result, bool isConnected, string address)
752         {
753             Result = result;
754             IsConnected = isConnected;
755             Address = address;
756         }
757
758         internal int Result
759         {
760             get;
761             private set;
762         }
763
764         /// <summary>
765         /// A value indicating whether this instance is connected.
766         /// </summary>
767         /// <since_tizen> 6 </since_tizen>
768         public bool IsConnected
769         {
770             get;
771             private set;
772         }
773
774         /// <summary>
775         /// The address.
776         /// </summary>
777         /// <since_tizen> 6 </since_tizen>
778         public string Address
779         {
780             get;
781             private set;
782         }
783     }
784
785     /// <summary>
786     /// An extended EventArgs class contains the connection state and the address of the remote Bluetooth device.
787     /// </summary>
788     /// <since_tizen> 6 </since_tizen>
789     [EditorBrowsable(EditorBrowsableState.Never)]
790     public class HidDeviceDataReceivedEventArgs : EventArgs
791     {
792         internal HidDeviceDataReceivedEventArgs(BluetoothHidDeviceReceivedData receivedData)
793         {
794             ReceivedData = receivedData;
795         }
796
797         /// <summary>
798         /// The result.
799         /// </summary>
800         /// <since_tizen> 6 </since_tizen>
801         public BluetoothHidDeviceReceivedData ReceivedData
802         {
803             get;
804             private set;
805         }
806     }
807
808     /// <summary>
809     /// An extended EventArgs class contains the changed equalizer state.
810     /// </summary>
811     /// <since_tizen> 3 </since_tizen>
812     public class EqualizerStateChangedEventArgs : EventArgs
813     {
814         private EqualizerState _state;
815
816         internal EqualizerStateChangedEventArgs(EqualizerState state)
817         {
818             _state = state;
819         }
820
821         /// <summary>
822         /// The state of the equalizer.
823         /// </summary>
824         /// <since_tizen> 3 </since_tizen>
825         public EqualizerState State
826         {
827             get
828             {
829                 return _state;
830             }
831         }
832     }
833
834     /// <summary>
835     /// An extended EventArgs class contains the changed repeat mode.
836     /// </summary>
837     /// <since_tizen> 3 </since_tizen>
838     public class RepeatModeChangedEventArgs : EventArgs
839     {
840         private RepeatMode _mode;
841
842         internal RepeatModeChangedEventArgs(RepeatMode mode)
843         {
844             _mode = mode;
845         }
846
847         /// <summary>
848         /// The repeat mode.
849         /// </summary>
850         /// <since_tizen> 3 </since_tizen>
851         public RepeatMode Mode
852         {
853             get
854             {
855                 return _mode;
856             }
857         }
858     }
859
860     /// <summary>
861     /// An extended EventArgs class contains the changed shuffle mode.
862     /// </summary>
863     /// <since_tizen> 3 </since_tizen>
864     public class ShuffleModeChangedeventArgs : EventArgs
865     {
866         private ShuffleMode _mode;
867
868         internal ShuffleModeChangedeventArgs(ShuffleMode mode)
869         {
870             _mode = mode;
871         }
872
873         /// <summary>
874         /// The shuffle mode.
875         /// </summary>
876         /// <since_tizen> 3 </since_tizen>
877         public ShuffleMode Mode
878         {
879             get
880             {
881                 return _mode;
882             }
883         }
884     }
885
886     /// <summary>
887     /// An extended EventArgs class contains the changed scan mode.
888     /// </summary>
889     /// <since_tizen> 3 </since_tizen>
890     public class ScanModeChangedEventArgs : EventArgs
891     {
892         private ScanMode _mode;
893
894         internal ScanModeChangedEventArgs(ScanMode mode)
895         {
896             _mode = mode;
897         }
898
899         /// <summary>
900         /// The scan mode.
901         /// </summary>
902         /// <since_tizen> 3 </since_tizen>
903         public ScanMode Mode
904         {
905             get
906             {
907                 return _mode;
908             }
909         }
910     }
911
912     /// <summary>
913     /// An extended EventArgs class contains the connection state and the remote device address.
914     /// </summary>
915     /// <since_tizen> 3 </since_tizen>
916     public class TargetConnectionStateChangedEventArgs : EventArgs
917     {
918         private bool _isConnected;
919         private string _address;
920
921         internal TargetConnectionStateChangedEventArgs(bool isConnected, string address)
922         {
923             _isConnected = isConnected;
924             _address = address;
925         }
926
927         /// <summary>
928         /// A value indicating whether this instance is connected.
929         /// </summary>
930         /// <since_tizen> 3 </since_tizen>
931         public bool IsConnected
932         {
933             get
934             {
935                 return _isConnected;
936             }
937         }
938
939         /// <summary>
940         /// The address.
941         /// </summary>
942         /// <since_tizen> 3 </since_tizen>
943         public string Address
944         {
945             get
946             {
947                 return _address;
948             }
949         }
950     }
951
952     /// <summary>
953     /// An extended EventArgs class contains the connection state and the remote device address.
954     /// </summary>
955     /// <since_tizen> 8 </since_tizen>
956     public class AvrcpControlConnectionChangedEventArgs : EventArgs
957     {
958         private bool _isConnected;
959         string _remoteAddress;
960         // Setting Values when Event is invoked
961         internal AvrcpControlConnectionChangedEventArgs(bool conn, string address)
962         {
963             _isConnected = conn;
964             _remoteAddress = address;
965         }
966
967         /// <summary>
968         /// A value indicating whether this instance is connected.
969         /// </summary>
970         /// <since_tizen> 8 </since_tizen>
971         public bool IsConnected
972         {
973             get
974             {
975                 return _isConnected;
976             }
977         }
978
979         /// <summary>
980         /// The remote address.
981         /// </summary>
982         /// <since_tizen> 8 </since_tizen>
983         public string RemoteAddress
984         {
985             get
986             {
987                 return _remoteAddress;
988             }
989         }
990     }
991
992     /// <summary>
993     /// An extended EventArgs class contains the position.
994     /// </summary>
995     /// <since_tizen> 8 </since_tizen>
996     public class PositionChangedEventArgs : EventArgs
997     {
998         private uint _pos;
999         internal PositionChangedEventArgs(uint pos)
1000         {
1001             _pos = pos;
1002         }
1003
1004         /// <summary>
1005         /// The current position in milliseconds.
1006         /// </summary>
1007         /// <since_tizen> 8 </since_tizen>
1008         public uint Position
1009         {
1010             get
1011             {
1012                 return _pos;
1013             }
1014         }
1015     }
1016
1017     /// <summary>
1018     /// An extended EventArgs class contains the play state.
1019     /// </summary>
1020     /// <since_tizen> 8 </since_tizen>
1021     public class PlayStateChangedEventArgs : EventArgs
1022     {
1023         private PlayerState _playState;
1024         internal PlayStateChangedEventArgs(PlayerState playState)
1025         {
1026             _playState = playState;
1027         }
1028
1029         /// <summary>
1030         /// The current play state.
1031         /// </summary>
1032         /// <since_tizen> 8 </since_tizen>
1033         public PlayerState PlayState
1034         {
1035             get
1036             {
1037                 return _playState;
1038             }
1039         }
1040     }
1041
1042     /// <summary>
1043     /// An extended EventArgs class contains the play state.
1044     /// </summary>
1045     /// <since_tizen> 8 </since_tizen>
1046     public class TrackInfoChangedEventArgs : EventArgs
1047     {
1048         private Track _track;
1049         internal TrackInfoChangedEventArgs(Track Data)
1050         {
1051             _track = Data;
1052         }
1053
1054         /// <summary>
1055         /// The current track data
1056         /// </summary>
1057         /// <since_tizen> 8 </since_tizen>
1058         public Track TrackData
1059         {
1060             get
1061             {
1062                 return _track;
1063             }
1064         }
1065     }
1066
1067     /// <summary>
1068     /// An extended EventArgs class contains the changed Bluetooth LE advertising state changed information.
1069     /// </summary>
1070     /// <since_tizen> 3 </since_tizen>
1071     public class AdvertisingStateChangedEventArgs : EventArgs
1072     {
1073         private BluetoothLeAdvertisingState _state;
1074         private int _result;
1075         private IntPtr _advertiserHandle;
1076
1077                 //TODO : Add conversion code from IntPtr to BluetoothLeAdvertiser class later
1078         internal AdvertisingStateChangedEventArgs(int result, IntPtr advertiserHandle,
1079             BluetoothLeAdvertisingState state)
1080         {
1081             _result = result;
1082             _advertiserHandle = advertiserHandle;
1083             _state = state;
1084         }
1085
1086         /// <summary>
1087         /// The result.
1088         /// </summary>
1089         /// <since_tizen> 3 </since_tizen>
1090         public int Result
1091         {
1092             get
1093             {
1094                 return _result;
1095             }
1096         }
1097
1098         /// <summary>
1099         /// The advertiser handle.
1100         /// </summary>
1101         /// <since_tizen> 3 </since_tizen>
1102         public IntPtr AdvertiserHandle
1103         {
1104             get
1105             {
1106                 return _advertiserHandle;
1107             }
1108         }
1109
1110         /// <summary>
1111         /// The LE advertising state.
1112         /// </summary>
1113         /// <since_tizen> 3 </since_tizen>
1114         public BluetoothLeAdvertisingState State
1115         {
1116             get
1117             {
1118                 return _state;
1119             }
1120         }
1121     }
1122
1123     /// <summary>
1124     /// An extended EventArgs class contains the changed Bluetooth LE scan result information.
1125     /// </summary>
1126     /// <since_tizen> 3 </since_tizen>
1127     public class AdapterLeScanResultChangedEventArgs : EventArgs
1128     {
1129         private BluetoothLeDevice _deviceData;
1130         private BluetoothError _result;
1131
1132         internal AdapterLeScanResultChangedEventArgs(BluetoothError result, BluetoothLeDevice deviceData)
1133         {
1134             _deviceData = deviceData;
1135             _result = result;
1136         }
1137
1138         /// <summary>
1139         /// The result.
1140         /// </summary>
1141         /// <since_tizen> 3 </since_tizen>
1142         public BluetoothError Result
1143         {
1144             get
1145             {
1146                 return _result;
1147             }
1148         }
1149
1150         /// <summary>
1151         /// The LE device data.
1152         /// </summary>
1153         /// <since_tizen> 3 </since_tizen>
1154         public BluetoothLeDevice DeviceData
1155         {
1156             get
1157             {
1158                 return _deviceData;
1159             }
1160         }
1161     }
1162
1163     /// <summary>
1164     /// An extended EventArgs class contains the changed Bluetooth LE GATT connection state.
1165     /// </summary>
1166     /// <since_tizen> 3 </since_tizen>
1167     public class GattConnectionStateChangedEventArgs : EventArgs
1168     {
1169         private bool _isConnected;
1170         private int _result;
1171         private string _remoteAddress;
1172
1173         internal GattConnectionStateChangedEventArgs(int result, bool connected, string remoteAddress)
1174         {
1175             _isConnected = connected;
1176             _result = result;
1177             _remoteAddress = remoteAddress;
1178         }
1179
1180         /// <summary>
1181         /// The result.
1182         /// </summary>
1183         /// <since_tizen> 3 </since_tizen>
1184         public int Result
1185         {
1186             get
1187             {
1188                 return _result;
1189             }
1190         }
1191
1192         /// <summary>
1193         /// A value indicating whether this instance is connected.
1194         /// </summary>
1195         /// <since_tizen> 3 </since_tizen>
1196         public bool IsConnected
1197         {
1198             get
1199             {
1200                 return _isConnected;
1201             }
1202         }
1203
1204         /// <summary>
1205         /// The remote address.
1206         /// </summary>
1207         /// <since_tizen> 3 </since_tizen>
1208         public string RemoteAddress
1209         {
1210             get
1211             {
1212                 return _remoteAddress;
1213             }
1214         }
1215     }
1216
1217     /// <summary>
1218     /// An extended EventArgs class contains the changed MTU value.
1219     /// </summary>
1220     /// <since_tizen> 8 </since_tizen>
1221     [EditorBrowsable(EditorBrowsableState.Never)]
1222     public class AttMtuChangedEventArgs : EventArgs
1223     {
1224         internal AttMtuChangedEventArgs(string remoteAddress, int mtu)
1225         {
1226             RemoteAddress = remoteAddress;
1227             Mtu = mtu;
1228         }
1229
1230         /// <summary>
1231         /// The remote address.
1232         /// </summary>
1233         /// <since_tizen> 8 </since_tizen>
1234         public string RemoteAddress { get; }
1235
1236         /// <summary>
1237         /// The MTU value
1238         /// </summary>
1239         /// <since_tizen> 8 </since_tizen>
1240         public int Mtu { get; }
1241     }
1242
1243     /// <summary>
1244     /// An extended EventArgs class contains the changed attribute value.
1245     /// </summary>
1246     /// <since_tizen> 3 </since_tizen>
1247     public class ValueChangedEventArgs : EventArgs
1248     {
1249         internal ValueChangedEventArgs(IntPtr value, int len)
1250         {
1251             Value = new byte[len];
1252             unsafe
1253             {
1254                 for (int i = 0; i < len; i++)
1255                 {
1256                     Value[i] = *((byte*)value.ToPointer() + i);
1257                 }
1258             }
1259         }
1260
1261         /// <summary>
1262         /// The attribute value.
1263         /// </summary>
1264         /// <since_tizen> 3 </since_tizen>
1265         public byte[] Value { get; }
1266     }
1267
1268     /// <summary>
1269     /// An extended EventArgs class contains the read value request data.
1270     /// </summary>
1271     /// <since_tizen> 3 </since_tizen>
1272     public class ReadRequestedEventArgs : EventArgs
1273     {
1274         internal ReadRequestedEventArgs(BluetoothGattServer server, string clientAddress, int requestId, int offset)
1275         {
1276             Server = server;
1277             ClientAddress = clientAddress;
1278             RequestId = requestId;
1279             Offset = offset;
1280         }
1281
1282         /// <summary>
1283         /// The GATT server instance.
1284         /// </summary>
1285         /// <since_tizen> 3 </since_tizen>
1286         public BluetoothGattServer Server { get; }
1287         /// <summary>
1288         /// The client address.
1289         /// </summary>
1290         /// <since_tizen> 3 </since_tizen>
1291         public string ClientAddress { get; }
1292         /// <summary>
1293         /// The request identifier.
1294         /// </summary>
1295         /// <since_tizen> 3 </since_tizen>
1296         public int RequestId { get; }
1297         /// <summary>
1298         /// The offset.
1299         /// </summary>
1300         /// <since_tizen> 3 </since_tizen>
1301         public int Offset { get; }
1302     }
1303
1304     /// <summary>
1305     /// An extended EventArgs class contains the read value request data.
1306     /// </summary>
1307     /// <since_tizen> 3 </since_tizen>
1308     public class WriteRequestedEventArgs : EventArgs
1309     {
1310         internal WriteRequestedEventArgs(BluetoothGattServer server, string clientAddress, int requestId, byte[] value, int offset, bool response_needed)
1311         {
1312             Server = server;
1313             ClientAddress = clientAddress;
1314             RequestId = requestId;
1315             Value = value;
1316             Offset = offset;
1317             Response_needed = response_needed;
1318         }
1319
1320         /// <summary>
1321         /// The GATT server instance.
1322         /// </summary>
1323         /// <since_tizen> 3 </since_tizen>
1324         public BluetoothGattServer Server { get; }
1325         /// <summary>
1326         /// The client address.
1327         /// </summary>
1328         /// <since_tizen> 3 </since_tizen>
1329         public string ClientAddress { get; }
1330         /// <summary>
1331         /// The request identifier.
1332         /// </summary>
1333         /// <since_tizen> 3 </since_tizen>
1334         public int RequestId { get; }
1335         /// <summary>
1336         /// The read value.
1337         /// </summary>
1338         /// <since_tizen> 3 </since_tizen>
1339         public byte[] Value { get; }
1340         /// <summary>
1341         /// The offset.
1342         /// </summary>
1343         /// <since_tizen> 3 </since_tizen>
1344         public int Offset { get; }
1345         /// <summary>
1346         /// Indicates whether a response is required by the remote device.
1347         /// </summary>
1348         /// <since_tizen> 3 </since_tizen>
1349         public bool Response_needed { get; }
1350     }
1351
1352     /// <summary>
1353     /// An extended EventArgs class contains the client preference to enable or disable the Notification/Indication.
1354     /// </summary>
1355     /// <since_tizen> 3 </since_tizen>
1356     public class NotificationStateChangedEventArg : EventArgs
1357     {
1358         internal NotificationStateChangedEventArg(BluetoothGattServer server, bool value)
1359         {
1360             Server = server;
1361             Value = value;
1362         }
1363
1364         /// <summary>
1365         /// The GATT server instance.
1366         /// </summary>
1367         /// <since_tizen> 3 </since_tizen>
1368         public BluetoothGattServer Server { get; }
1369         /// <summary>
1370         /// A value indicating whether the notification is enabled.
1371         /// </summary>
1372         /// <since_tizen> 3 </since_tizen>
1373         public bool Value { get; }
1374     }
1375
1376     /// <summary>
1377     /// An extended EventArgs class contains the read value request data.
1378     /// </summary>
1379     /// <since_tizen> 3 </since_tizen>
1380     public class NotificationSentEventArg : EventArgs
1381     {
1382         internal NotificationSentEventArg(BluetoothGattServer server, string clientAddress, int result, bool completed)
1383         {
1384             Result = result;
1385             ClientAddress = clientAddress;
1386             Server = server;
1387             Completed = completed;
1388         }
1389
1390         /// <summary>
1391         /// The GATT server instance.
1392         /// </summary>
1393         /// <since_tizen> 3 </since_tizen>
1394         public BluetoothGattServer Server { get; internal set; }
1395         /// <summary>
1396         /// The client address.
1397         /// </summary>
1398         /// <since_tizen> 3 </since_tizen>
1399         public string ClientAddress { get; }
1400         /// <summary>
1401         /// The result.
1402         /// </summary>
1403         /// <since_tizen> 3 </since_tizen>
1404         public int Result { get; }
1405         /// <summary>
1406         /// Gets a value indicating whether the notification sent is completed.
1407         /// </summary>
1408         /// <since_tizen> 3 </since_tizen>
1409         public bool Completed { get; }
1410     }
1411
1412     /// <summary>
1413     /// An extended EventArgs class which contains the connection state and address of the remote Bluetooth device.
1414     /// </summary>
1415     /// <since_tizen> 4 </since_tizen>
1416     public class ConnectionRequestedEventArgs : EventArgs
1417     {
1418         private string _address;
1419
1420         internal ConnectionRequestedEventArgs(string address)
1421         {
1422             _address = address;
1423         }
1424
1425         /// <summary>
1426         /// The address.
1427         /// </summary>
1428         /// <since_tizen> 4 </since_tizen>
1429         public string Address
1430         {
1431             get
1432             {
1433                 return _address;
1434             }
1435         }
1436     }
1437
1438     /// <summary>
1439     /// An extended EventArgs class which contains the file transfer progress state, file transfer progress by percent.
1440     /// </summary>
1441     /// <since_tizen> 4 </since_tizen>
1442     public class TransferProgressEventArgs : EventArgs
1443     {
1444         private string _file;
1445         private long _size;
1446         private int _percent;
1447
1448         internal TransferProgressEventArgs(string file, long size, int percent)
1449         {
1450             _file = file;
1451             _size = size;
1452             _percent = percent;
1453         }
1454
1455         /// <summary>
1456         /// The File name.
1457         /// </summary>
1458         /// <since_tizen> 4 </since_tizen>
1459         public string File
1460         {
1461             get
1462             {
1463                 return _file;
1464             }
1465         }
1466
1467         /// <summary>
1468         /// The File size.
1469         /// </summary>
1470         /// <since_tizen> 4 </since_tizen>
1471         public long Size
1472         {
1473             get
1474             {
1475                 return _size;
1476             }
1477         }
1478
1479         /// <summary>
1480         /// The File transfer percent.
1481         /// </summary>
1482         /// <since_tizen> 4 </since_tizen>
1483         public int Percent
1484         {
1485             get
1486             {
1487                 return _percent;
1488             }
1489         }
1490     }
1491
1492     /// <summary>
1493     /// An extended EventArgs class which contains the file transfer finished state and file state.
1494     /// </summary>
1495     /// <since_tizen> 4 </since_tizen>
1496     public class TransferFinishedEventArgs : EventArgs
1497     {
1498         private string _file;
1499         private long _size;
1500         private int _result;
1501
1502         internal TransferFinishedEventArgs(int result, string file, long size)
1503         {
1504             _file = file;
1505             _size = size;
1506             _result = result;
1507         }
1508
1509         /// <summary>
1510         /// The File name.
1511         /// </summary>
1512         /// <since_tizen> 4 </since_tizen>
1513         public string File
1514         {
1515             get
1516             {
1517                 return _file;
1518             }
1519         }
1520
1521         /// <summary>
1522         /// The File size.
1523         /// </summary>
1524         /// <since_tizen> 4 </since_tizen>
1525         public long Size
1526         {
1527             get
1528             {
1529                 return _size;
1530             }
1531         }
1532
1533         /// <summary>
1534         /// The return value.
1535         /// </summary>
1536         /// <since_tizen> 4 </since_tizen>
1537         public int Result
1538         {
1539             get
1540             {
1541                 return _result;
1542             }
1543         }
1544     }
1545
1546     /// <summary>
1547     /// An extended EventArgs class which contains the Push Request respond state
1548     /// </summary>
1549     /// <since_tizen> 4 </since_tizen>
1550     public class PushRespondedEventArgs : EventArgs
1551     {
1552         int _result;
1553         string _address;
1554
1555         internal PushRespondedEventArgs(int result, string address)
1556         {
1557             _address = address;
1558             _result = result;
1559         }
1560
1561         /// <summary>
1562         /// The return value.
1563         /// </summary>
1564         /// <since_tizen> 4 </since_tizen>
1565         public int Result
1566         {
1567             get
1568             {
1569                 return _result;
1570             }
1571         }
1572
1573         /// <summary>
1574         /// The address.
1575         /// </summary>
1576         /// <since_tizen> 4 </since_tizen>
1577         public string Address
1578         {
1579             get
1580             {
1581                 return _address;
1582             }
1583         }
1584     }
1585
1586     /// <summary>
1587     /// An extended EventArgs class which contains the file push progress state, push progress by percent.
1588     /// </summary>
1589     /// <since_tizen> 4 </since_tizen>
1590     public class PushProgressEventArgs : EventArgs
1591     {
1592         private string _file;
1593         private long _size;
1594         private int _percent;
1595
1596         internal PushProgressEventArgs(string file, long size, int percent)
1597         {
1598             _file = file;
1599             _size = size;
1600             _percent = percent;
1601         }
1602
1603         /// <summary>
1604         /// The File name.
1605         /// </summary>
1606         /// <since_tizen> 4 </since_tizen>
1607         public string File
1608         {
1609             get
1610             {
1611                 return _file;
1612             }
1613         }
1614
1615         /// <summary>
1616         /// The File size.
1617         /// </summary>
1618         /// <since_tizen> 4 </since_tizen>
1619         public long Size
1620         {
1621             get
1622             {
1623                 return _size;
1624             }
1625         }
1626
1627         /// <summary>
1628         /// The File transfer percent.
1629         /// </summary>
1630         /// <since_tizen> 4 </since_tizen>
1631         public int Percent
1632         {
1633             get
1634             {
1635                 return _percent;
1636             }
1637         }
1638     }
1639
1640     /// <summary>
1641     /// An extended EventArgs class which contains the Push Request respond state
1642     /// </summary>
1643     /// <since_tizen> 4 </since_tizen>
1644     public class PushFinishedEventArgs : EventArgs
1645     {
1646         int _result;
1647         string _address;
1648
1649         internal PushFinishedEventArgs(int result, string address)
1650         {
1651             _address = address;
1652             _result = result;
1653         }
1654
1655         /// <summary>
1656         /// The return value.
1657         /// </summary>
1658         /// <since_tizen> 4 </since_tizen>
1659         public int Result
1660         {
1661             get
1662             {
1663                 return _result;
1664             }
1665         }
1666
1667         /// <summary>
1668         /// The address.
1669         /// </summary>
1670         /// <since_tizen> 4 </since_tizen>
1671         public string Address
1672         {
1673             get
1674             {
1675                 return _address;
1676             }
1677         }
1678     }
1679 }