Release 4.0.0-preview1-00285
[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
20 namespace Tizen.Network.Bluetooth
21 {
22     /// <summary>
23     /// An extended EventArgs class contains the changed Bluetooth state.
24     /// </summary>
25     public class StateChangedEventArgs : EventArgs
26     {
27         private BluetoothState _type;
28         private BluetoothError _result;
29
30         internal StateChangedEventArgs(BluetoothError result, BluetoothState type)
31         {
32             _type = type;
33             _result = result;
34         }
35
36         /// <summary>
37         /// The state of Bluetooth.
38         /// </summary>
39         public BluetoothState BTState
40         {
41             get
42             {
43                 return _type;
44             }
45         }
46
47         /// <summary>
48         /// The BluetoothError result.
49         /// </summary>
50         public BluetoothError Result
51         {
52             get
53             {
54                 return _result;
55             }
56         }
57     }
58
59     /// <summary>
60     /// An extended EventArgs class contains the changed Bluetooth name.
61     /// </summary>
62     public class NameChangedEventArgs : EventArgs
63     {
64         private string _name;
65
66         internal NameChangedEventArgs(string name)
67         {
68             _name = name;
69         }
70
71         /// <summary>
72         /// The name of the device.
73         /// </summary>
74         public string DeviceName
75         {
76             get
77             {
78                 return _name;
79             }
80         }
81     }
82
83     /// <summary>
84     /// An extended EventArgs class contains the changed Bluetooth visibility mode.
85     /// </summary>
86     public class VisibilityModeChangedEventArgs : EventArgs
87     {
88         private VisibilityMode _mode;
89         private BluetoothError _result;
90
91         internal VisibilityModeChangedEventArgs(BluetoothError result, VisibilityMode mode)
92         {
93             _result = result;
94             _mode = mode;
95         }
96
97         /// <summary>
98         /// The visibility mode.
99         /// </summary>
100         public VisibilityMode Visibility
101         {
102             get
103             {
104                 return _mode;
105             }
106         }
107
108         /// <summary>
109         /// The BluetoothError result.
110         /// </summary>
111         public BluetoothError Result
112         {
113             get
114             {
115                 return _result;
116             }
117         }
118     }
119
120     /// <summary>
121     /// An extended EventArgs class contains the duration until the visibility mode is changed from TimeLimitedDiscoverable to NonDiscoverable.
122     /// </summary>
123     public class VisibilityDurationChangedEventArgs : EventArgs
124     {
125         private int _duration;
126
127         internal VisibilityDurationChangedEventArgs(int duration)
128         {
129             _duration = duration;
130         }
131
132         /// <summary>
133         /// The duration.
134         /// </summary>
135         public int Duration
136         {
137             get
138             {
139                 return _duration;
140             }
141         }
142     }
143
144     /// <summary>
145     /// An extended EventArgs class contains the changed Bluetooth device discovery state and the discovered device information.
146     /// </summary>
147     public class DiscoveryStateChangedEventArgs : EventArgs
148     {
149         private BluetoothError _result;
150         private BluetoothDeviceDiscoveryState _state;
151         private BluetoothDevice _device;
152
153         internal DiscoveryStateChangedEventArgs(BluetoothError result, BluetoothDeviceDiscoveryState state)
154         {
155             _result = result;
156             _state = state;
157         }
158
159         internal DiscoveryStateChangedEventArgs(BluetoothError result, BluetoothDeviceDiscoveryState state, BluetoothDevice device)
160         {
161             _result = result;
162             _state = state;
163             _device = device;
164         }
165
166         /// <summary>
167         /// The BluetoothError result.
168         /// </summary>
169         public BluetoothError Result
170         {
171             get
172             {
173                 return _result;
174             }
175         }
176
177         /// <summary>
178         /// The state of the discovery.
179         /// </summary>
180         public BluetoothDeviceDiscoveryState DiscoveryState
181         {
182             get
183             {
184                 return _state;
185             }
186         }
187
188         /// <summary>
189         /// The remote device found.
190         /// </summary>
191         public BluetoothDevice DeviceFound
192         {
193             get
194             {
195                 return _device;
196             }
197         }
198     }
199
200     /// <summary>
201     /// An extended EventArgs class contains the bonded device information.
202     /// </summary>
203     public class BondCreatedEventArgs : EventArgs
204     {
205         private BluetoothError _result;
206         private BluetoothDevice _device;
207
208         internal BondCreatedEventArgs(BluetoothError result, BluetoothDevice device)
209         {
210             _result = result;
211             _device = device;
212         }
213
214         /// <summary>
215         /// The BluetoothError result.
216         /// </summary>
217         public BluetoothError Result
218         {
219             get
220             {
221                 return _result;
222             }
223         }
224
225         /// <summary>
226         /// The remote device.
227         /// </summary>
228         public BluetoothDevice Device
229         {
230             get
231             {
232                 return _device;
233             }
234         }
235     }
236
237     /// <summary>
238     /// An extended EventArgs class contains the address of the remote Bluetooth device to destroy bond with.
239     /// </summary>
240     public class BondDestroyedEventArgs : EventArgs
241     {
242         private BluetoothError _result;
243         private string _address;
244
245         internal BondDestroyedEventArgs(BluetoothError result, string address)
246         {
247             _result = result;
248             _address = address;
249         }
250
251         /// <summary>
252         /// The BluetoothError result.
253         /// </summary>
254         public BluetoothError Result
255         {
256             get
257             {
258                 return _result;
259             }
260         }
261
262         /// <summary>
263         /// The remote device address.
264         /// </summary>
265         /// <value>The device address.</value>
266         public string DeviceAddress
267         {
268             get
269             {
270                 return _address;
271             }
272         }
273     }
274
275     /// <summary>
276     /// An extended EventArgs class contains the authorization state and the address of the remote Bluetooth device.
277     /// </summary>
278     public class AuthorizationChangedEventArgs : EventArgs
279     {
280         private BluetoothAuthorizationType _authType;
281         private string _address;
282
283         internal AuthorizationChangedEventArgs(BluetoothAuthorizationType authType, string address)
284         {
285             _authType = authType;
286             _address = address;
287         }
288
289         /// <summary>
290         /// The authorization.
291         /// </summary>
292         public BluetoothAuthorizationType Authorization
293         {
294             get
295             {
296                 return _authType;
297             }
298         }
299
300         /// <summary>
301         /// The device address.
302         /// </summary>
303         public string DeviceAddress
304         {
305             get
306             {
307                 return _address;
308             }
309         }
310
311     }
312
313     /// <summary>
314     /// An extended EventArgs class contains the service lists found on the remote Bluetooth device.
315     /// </summary>
316     public class ServiceSearchedEventArgs : EventArgs
317     {
318         private BluetoothDeviceSdpData _sdpData;
319         private BluetoothError _result;
320
321         internal ServiceSearchedEventArgs(BluetoothError result, BluetoothDeviceSdpData sdpData)
322         {
323             _result = result;
324             _sdpData = sdpData;
325         }
326
327         /// <summary>
328         /// The BluetoothError result.
329         /// </summary>
330         public BluetoothError Result
331         {
332             get
333             {
334                 return _result;
335             }
336         }
337         /// <summary>
338         /// The sdp data.
339         /// </summary>
340         public BluetoothDeviceSdpData SdpData
341         {
342             get
343             {
344                 return _sdpData;
345             }
346         }
347     }
348
349     /// <summary>
350     /// An extended EventArgs class contains the connection state and the connection information of the remote device.
351     /// </summary>
352     public class DeviceConnectionStateChangedEventArgs : EventArgs
353     {
354         private bool _isConnected;
355         private BluetoothDeviceConnectionData _connectionData;
356
357         internal DeviceConnectionStateChangedEventArgs(bool isConnected, BluetoothDeviceConnectionData connectionData)
358         {
359             _isConnected = isConnected;
360             _connectionData = connectionData;
361         }
362
363         /// <summary>
364         /// A value indicating whether the device is connected.
365         /// </summary>
366         public bool IsConnected
367         {
368             get
369             {
370                 return _isConnected;
371             }
372         }
373
374         /// <summary>
375         /// The device connection data.
376         /// </summary>
377         public BluetoothDeviceConnectionData ConnectionData
378         {
379             get
380             {
381                 return _connectionData;
382             }
383         }
384     }
385
386     /// <summary>
387     /// An extended EventArgs class contains the data received information.
388     /// </summary>
389     public class SocketDataReceivedEventArgs : EventArgs
390     {
391         private SocketData _data;
392
393         internal SocketDataReceivedEventArgs(SocketData data)
394         {
395             _data = data;
396         }
397
398         /// <summary>
399         /// The socket data.
400         /// </summary>
401         public SocketData Data
402         {
403             get
404             {
405                 return _data;
406             }
407         }
408     }
409
410     /// <summary>
411     /// An extended EventArgs class contains the changed connection state.
412     /// </summary>
413     public class SocketConnectionStateChangedEventArgs : EventArgs
414     {
415         private BluetoothError _result;
416         private BluetoothSocketState _state;
417         private SocketConnection _connection;
418
419         internal SocketConnectionStateChangedEventArgs(BluetoothError result, BluetoothSocketState state, SocketConnection connection)
420         {
421             _result = result;
422             _state = state;
423             _connection = connection;
424         }
425
426         /// <summary>
427         /// The BluetoothError result.
428         /// </summary>
429         public BluetoothError Result
430         {
431             get
432             {
433                 return _result;
434             }
435         }
436
437         /// <summary>
438         /// The socket state.
439         /// </summary>
440         public BluetoothSocketState State
441         {
442             get
443             {
444                 return _state;
445             }
446         }
447
448         /// <summary>
449         /// The socket connection.
450         /// </summary>
451         public SocketConnection Connection
452         {
453             get
454             {
455                 return _connection;
456             }
457         }
458     }
459
460     /// <summary>
461     /// The AcceptStateChanged event is raised when the socket connection state is changed.
462     /// </summary>
463     public class AcceptStateChangedEventArgs : EventArgs
464     {
465         private BluetoothError _result;
466         private BluetoothSocketState _state;
467         private SocketConnection _connection;
468         private IBluetoothServerSocket _server;
469
470         internal AcceptStateChangedEventArgs(BluetoothError result, BluetoothSocketState state, SocketConnection connection, BluetoothSocket server)
471         {
472             _result = result;
473             _state = state;
474             _connection = connection;
475             _server = (IBluetoothServerSocket)server;
476         }
477
478         /// <summary>
479         /// The BluetoothError result.
480         /// </summary>
481         public BluetoothError Result
482         {
483             get
484             {
485                 return _result;
486             }
487         }
488
489         /// <summary>
490         /// The socket state.
491         /// </summary>
492         public BluetoothSocketState State
493         {
494             get
495             {
496                 return _state;
497             }
498         }
499
500         /// <summary>
501         /// The socket connection.
502         /// </summary>
503         public SocketConnection Connection
504         {
505             get
506             {
507                 return _connection;
508             }
509         }
510
511         /// <summary>
512         /// The server socket instance.
513         /// </summary>
514         public IBluetoothServerSocket Server
515         {
516             get
517             {
518                 return _server;
519             }
520         }
521     }
522
523     /// <summary>
524     /// An extended EventArgs class contains the connection state, remote address, and the type of audio profile.
525     /// </summary>
526     public class AudioConnectionStateChangedEventArgs : EventArgs
527     {
528         private int _result;
529         private bool _isConnected;
530         private string _address;
531         private BluetoothAudioProfileType _type;
532
533         internal AudioConnectionStateChangedEventArgs(int result, bool isConnected, string address, BluetoothAudioProfileType type)
534         {
535             _result = result;
536             _type = type;
537             _isConnected = isConnected;
538             _address = address;
539         }
540
541         /// <summary>
542         /// The result.
543         /// </summary>
544         public int Result
545         {
546             get
547             {
548                 return _result;
549             }
550         }
551
552         /// <summary>
553         /// A value indicating whether this instance is connected.
554         /// </summary>
555         public bool IsConnected
556         {
557             get
558             {
559                 return _isConnected;
560             }
561         }
562
563         /// <summary>
564         /// The address.
565         /// </summary>
566         public string Address
567         {
568             get
569             {
570                 return _address;
571             }
572         }
573
574         /// <summary>
575         /// The type of the audio profile.
576         /// </summary>
577         public BluetoothAudioProfileType ProfileType
578         {
579             get
580             {
581                 return _type;
582             }
583         }
584     }
585
586     /// <summary>
587     /// An extended EventArgs class contains the connection state and the address of the remote Bluetooth device.
588     /// </summary>
589     public class HidConnectionStateChangedEventArgs : EventArgs
590     {
591         private int _result;
592         private bool _isConnected;
593         private string _address;
594
595         internal HidConnectionStateChangedEventArgs(int result, bool isConnected, string address)
596         {
597             _result = result;
598             _isConnected = isConnected;
599             _address = address;
600         }
601
602         /// <summary>
603         /// The result.
604         /// </summary>
605         public int Result
606         {
607             get
608             {
609                 return _result;
610             }
611         }
612
613         /// <summary>
614         /// A value indicating whether this instance is connected.
615         /// </summary>
616         public bool IsConnected
617         {
618             get
619             {
620                 return _isConnected;
621             }
622         }
623
624         /// <summary>
625         /// The address.
626         /// </summary>
627         public string Address
628         {
629             get
630             {
631                 return _address;
632             }
633         }
634     }
635
636     /// <summary>
637     /// An extended EventArgs class contains the changed equalizer state.
638     /// </summary>
639     public class EqualizerStateChangedEventArgs : EventArgs
640     {
641         private EqualizerState _state;
642
643         internal EqualizerStateChangedEventArgs(EqualizerState state)
644         {
645             _state = state;
646         }
647
648         /// <summary>
649         /// The state of the equalizer.
650         /// </summary>
651         public EqualizerState State
652         {
653             get
654             {
655                 return _state;
656             }
657         }
658     }
659
660     /// <summary>
661     /// An extended EventArgs class contains the changed repeat mode.
662     /// </summary>
663     public class RepeatModeChangedEventArgs : EventArgs
664     {
665         private RepeatMode _mode;
666
667         internal RepeatModeChangedEventArgs(RepeatMode mode)
668         {
669             _mode = mode;
670         }
671
672         /// <summary>
673         /// The repeat mode.
674         /// </summary>
675         public RepeatMode Mode
676         {
677             get
678             {
679                 return _mode;
680             }
681         }
682     }
683
684     /// <summary>
685     /// An extended EventArgs class contains the changed shuffle mode.
686     /// </summary>
687     public class ShuffleModeChangedeventArgs : EventArgs
688     {
689         private ShuffleMode _mode;
690
691         internal ShuffleModeChangedeventArgs(ShuffleMode mode)
692         {
693             _mode = mode;
694         }
695
696         /// <summary>
697         /// The shuffle mode.
698         /// </summary>
699         public ShuffleMode Mode
700         {
701             get
702             {
703                 return _mode;
704             }
705         }
706     }
707
708     /// <summary>
709     /// An extended EventArgs class contains the changed scan mode.
710     /// </summary>
711     public class ScanModeChangedEventArgs : EventArgs
712     {
713         private ScanMode _mode;
714
715         internal ScanModeChangedEventArgs(ScanMode mode)
716         {
717             _mode = mode;
718         }
719
720         /// <summary>
721         /// The scan mode.
722         /// </summary>
723         public ScanMode Mode
724         {
725             get
726             {
727                 return _mode;
728             }
729         }
730     }
731
732     /// <summary>
733     /// An extended EventArgs class contains the connection state and the remote device address.
734     /// </summary>
735     public class TargetConnectionStateChangedEventArgs : EventArgs
736     {
737         private bool _isConnected;
738         private string _address;
739
740         internal TargetConnectionStateChangedEventArgs(bool isConnected, string address)
741         {
742             _isConnected = isConnected;
743             _address = address;
744         }
745
746         /// <summary>
747         /// A value indicating whether this instance is connected.
748         /// </summary>
749         public bool IsConnected
750         {
751             get
752             {
753                 return _isConnected;
754             }
755         }
756
757         /// <summary>
758         /// The address.
759         /// </summary>
760         public string Address
761         {
762             get
763             {
764                 return _address;
765             }
766         }
767     }
768
769     /// <summary>
770     /// An extended EventArgs class contains the changed Bluetooth LE advertising state changed information.
771     /// </summary>
772     public class AdvertisingStateChangedEventArgs : EventArgs
773     {
774         private BluetoothLeAdvertisingState _state;
775         private int _result;
776         private IntPtr _advertiserHandle;
777
778                 //TODO : Add conversion code from IntPtr to BluetoothLeAdvertiser class later
779         internal AdvertisingStateChangedEventArgs(int result, IntPtr advertiserHandle,
780             BluetoothLeAdvertisingState state)
781         {
782             _result = result;
783             _advertiserHandle = advertiserHandle;
784             _state = state;
785         }
786
787         /// <summary>
788         /// The result.
789         /// </summary>
790         public int Result
791         {
792             get
793             {
794                 return _result;
795             }
796         }
797
798         /// <summary>
799         /// The advertiser handle.
800         /// </summary>
801         public IntPtr AdvertiserHandle
802         {
803             get
804             {
805                 return _advertiserHandle;
806             }
807         }
808
809         /// <summary>
810         /// The LE advertising state.
811         /// </summary>
812         public BluetoothLeAdvertisingState State
813         {
814             get
815             {
816                 return _state;
817             }
818         }
819     }
820
821     /// <summary>
822     /// An extended EventArgs class contains the changed Bluetooth LE scan result information.
823     /// </summary>
824     public class AdapterLeScanResultChangedEventArgs : EventArgs
825     {
826         private BluetoothLeDevice _deviceData;
827         private BluetoothError _result;
828
829         internal AdapterLeScanResultChangedEventArgs(BluetoothError result, BluetoothLeDevice deviceData)
830         {
831             _deviceData = deviceData;
832             _result = result;
833         }
834
835         /// <summary>
836         /// The result.
837         /// </summary>
838         public BluetoothError Result
839         {
840             get
841             {
842                 return _result;
843             }
844         }
845
846         /// <summary>
847         /// The LE device data.
848         /// </summary>
849         public BluetoothLeDevice DeviceData
850         {
851             get
852             {
853                 return _deviceData;
854             }
855         }
856     }
857
858     /// <summary>
859     /// An extended EventArgs class contains the changed Bluetooth LE GATT connection state.
860     /// </summary>
861     public class GattConnectionStateChangedEventArgs : EventArgs
862     {
863         private bool _isConnected;
864         private int _result;
865         private string _remoteAddress;
866
867         internal GattConnectionStateChangedEventArgs(int result, bool connected, string remoteAddress)
868         {
869             _isConnected = connected;
870             _result = result;
871             _remoteAddress = remoteAddress;
872         }
873
874         /// <summary>
875         /// The result.
876         /// </summary>
877         public int Result
878         {
879             get
880             {
881                 return _result;
882             }
883         }
884
885         /// <summary>
886         /// A value indicating whether this instance is connected.
887         /// </summary>
888         public bool IsConnected
889         {
890             get
891             {
892                 return _isConnected;
893             }
894         }
895
896         /// <summary>
897         /// The remote address.
898         /// </summary>
899         public string RemoteAddress
900         {
901             get
902             {
903                 return _remoteAddress;
904             }
905         }
906     }
907
908     /// <summary>
909     /// An extended EventArgs class contains the changed attribute value.
910     /// </summary>
911     public class ValueChangedEventArgs : EventArgs
912     {
913         internal ValueChangedEventArgs(byte[] value)
914         {
915             Value = value;
916         }
917
918         /// <summary>
919         /// The attribute value.
920         /// </summary>
921         public byte[] Value { get; }
922     }
923
924     /// <summary>
925     /// An extended EventArgs class contains the read value request data.
926     /// </summary>
927     public class ReadRequestedEventArgs : EventArgs
928     {
929         internal ReadRequestedEventArgs(BluetoothGattServer server, string clientAddress, int requestId, int offset)
930         {
931             Server = server;
932             ClientAddress = clientAddress;
933             RequestId = requestId;
934             Offset = offset;
935         }
936
937         /// <summary>
938         /// The GATT server instance.
939         /// </summary>
940         public BluetoothGattServer Server { get; }
941         /// <summary>
942         /// The client address.
943         /// </summary>
944         public string ClientAddress { get; }
945         /// <summary>
946         /// The request identifier.
947         /// </summary>
948         public int RequestId { get; }
949         /// <summary>
950         /// The offset.
951         /// </summary>
952         public int Offset { get; }
953     }
954
955     /// <summary>
956     /// An extended EventArgs class contains the read value request data.
957     /// </summary>
958     public class WriteRequestedEventArgs : EventArgs
959     {
960         internal WriteRequestedEventArgs(BluetoothGattServer server, string clientAddress, int requestId, byte[] value, int offset, bool response_needed)
961         {
962             Server = server;
963             ClientAddress = clientAddress;
964             RequestId = requestId;
965             Value = value;
966             Offset = offset;
967             Response_needed = response_needed;
968         }
969
970         /// <summary>
971         /// The GATT server instance.
972         /// </summary>
973         public BluetoothGattServer Server { get; }
974         /// <summary>
975         /// The client address.
976         /// </summary>
977         public string ClientAddress { get; }
978         /// <summary>
979         /// The request identifier.
980         /// </summary>
981         public int RequestId { get; }
982         /// <summary>
983         /// The read value.
984         /// </summary>
985         public byte[] Value { get; }
986         /// <summary>
987         /// The offset.
988         /// </summary>
989         public int Offset { get; }
990         /// <summary>
991         /// Indicates whether a response is required by the remote device.
992         /// </summary>
993         public bool Response_needed { get; }
994     }
995
996     /// <summary>
997     /// An extended EventArgs class contains the client preference to enable or disable the Notification/Indication.
998     /// </summary>
999     public class NotificationStateChangedEventArg : EventArgs
1000     {
1001         internal NotificationStateChangedEventArg(BluetoothGattServer server, bool value)
1002         {
1003             Server = server;
1004             Value = value;
1005         }
1006
1007         /// <summary>
1008         /// The GATT server instance.
1009         /// </summary>
1010         public BluetoothGattServer Server { get; }
1011         /// <summary>
1012         /// A value indicating whether the notification is enabled.
1013         /// </summary>
1014         public bool Value { get; }
1015     }
1016
1017     /// <summary>
1018     /// An extended EventArgs class contains the read value request data.
1019     /// </summary>
1020     public class NotificationSentEventArg : EventArgs
1021     {
1022         internal NotificationSentEventArg(BluetoothGattServer server, string clientAddress, int result, bool completed)
1023         {
1024             Result = result;
1025             ClientAddress = clientAddress;
1026             Server = server;
1027             Completed = completed;
1028         }
1029
1030         /// <summary>
1031         /// The GATT server instance.
1032         /// </summary>
1033         public BluetoothGattServer Server { get; }
1034         /// <summary>
1035         /// The client address.
1036         /// </summary>
1037         public string ClientAddress { get; }
1038         /// <summary>
1039         /// The result.
1040         /// </summary>
1041         public int Result { get; }
1042         /// <summary>
1043         /// Gets a value indicating whether the notification sent is completed.
1044         /// </summary>
1045         public bool Completed { get; }
1046     }
1047
1048     /// <summary>
1049     /// An extended EventArgs class which contains the connection state and address of the remote Bluetooth device.
1050     /// </summary>
1051     public class ConnectionRequestedEventArgs : EventArgs
1052     {
1053         private string _address;
1054
1055         internal ConnectionRequestedEventArgs(string address)
1056         {
1057             _address = address;
1058         }
1059
1060         /// <summary>
1061         /// The address.
1062         /// </summary>
1063         public string Address
1064         {
1065             get
1066             {
1067                 return _address;
1068             }
1069         }
1070     }
1071
1072     /// <summary>
1073     /// An extended EventArgs class which contains the file transfer progress state, file transfer progress by percent.
1074     /// </summary>
1075     public class TransferProgressEventArgs : EventArgs
1076     {
1077         private string _file;
1078         private long _size;
1079         private int _percent;
1080
1081         internal TransferProgressEventArgs(string file, long size, int percent)
1082         {
1083             _file = file;
1084             _size = size;
1085             _percent = percent;
1086         }
1087
1088         /// <summary>
1089         /// The File name.
1090         /// </summary>
1091         public string File
1092         {
1093             get
1094             {
1095                 return _file;
1096             }
1097         }
1098
1099         /// <summary>
1100         /// The File size.
1101         /// </summary>
1102         public long Size
1103         {
1104             get
1105             {
1106                 return _size;
1107             }
1108         }
1109
1110         /// <summary>
1111         /// The File transfer percent.
1112         /// </summary>
1113         public int Percent
1114         {
1115             get
1116             {
1117                 return _percent;
1118             }
1119         }
1120     }
1121
1122     /// <summary>
1123     /// An extended EventArgs class which contains the file transfer finished state and file state.
1124     /// </summary>
1125     public class TransferFinishedEventArgs : EventArgs
1126     {
1127         private string _file;
1128         private long _size;
1129         private int _result;
1130
1131         internal TransferFinishedEventArgs(int result, string file, long size)
1132         {
1133             _file = file;
1134             _size = size;
1135             _result = result;
1136         }
1137
1138         /// <summary>
1139         /// The File name.
1140         /// </summary>
1141         public string File
1142         {
1143             get
1144             {
1145                 return _file;
1146             }
1147         }
1148
1149         /// <summary>
1150         /// The File size.
1151         /// </summary>
1152         public long Size
1153         {
1154             get
1155             {
1156                 return _size;
1157             }
1158         }
1159
1160         /// <summary>
1161         /// The return value.
1162         /// </summary>
1163         public int Result
1164         {
1165             get
1166             {
1167                 return _result;
1168             }
1169         }
1170     }
1171
1172     /// <Summary>
1173     /// An extended EventArgs class which contains the Push Request respond state
1174     /// </Summary>
1175
1176     public class PushRespondedEventArgs : EventArgs
1177     {
1178         int _result;
1179         string _address;
1180
1181         internal PushRespondedEventArgs(int result, string address)
1182         {
1183             _address = address;
1184             _result = result;
1185         }
1186
1187         /// <summary>
1188         /// The return value.
1189         /// </summary>
1190         public int Result
1191         {
1192             get
1193             {
1194                 return _result;
1195             }
1196         }
1197
1198         /// <summary>
1199         /// The address.
1200         /// </summary>
1201         public string Address
1202         {
1203             get
1204             {
1205                 return _address;
1206             }
1207         }
1208     }
1209
1210     /// <summary>
1211     /// An extended EventArgs class which contains the file push progress state, push progress by percent.
1212     /// </summary>
1213     public class PushProgressEventArgs : EventArgs
1214     {
1215         private string _file;
1216         private long _size;
1217         private int _percent;
1218
1219         internal PushProgressEventArgs(string file, long size, int percent)
1220         {
1221             _file = file;
1222             _size = size;
1223             _percent = percent;
1224         }
1225
1226         /// <summary>
1227         /// The File name.
1228         /// </summary>
1229         public string File
1230         {
1231             get
1232             {
1233                 return _file;
1234             }
1235         }
1236
1237         /// <summary>
1238         /// The File size.
1239         /// </summary>
1240         public long Size
1241         {
1242             get
1243             {
1244                 return _size;
1245             }
1246         }
1247
1248         /// <summary>
1249         /// The File transfer percent.
1250         /// </summary>
1251         public int Percent
1252         {
1253             get
1254             {
1255                 return _percent;
1256             }
1257         }
1258     }
1259
1260     /// <Summary>
1261     /// An extended EventArgs class which contains the Push Request respond state
1262     /// </Summary>
1263
1264     public class PushFinishedEventArgs : EventArgs
1265     {
1266         int _result;
1267         string _address;
1268
1269         internal PushFinishedEventArgs(int result, string address)
1270         {
1271             _address = address;
1272             _result = result;
1273         }
1274
1275         /// <summary>
1276         /// The return value.
1277         /// </summary>
1278         public int Result
1279         {
1280             get
1281             {
1282                 return _result;
1283             }
1284         }
1285
1286         /// <summary>
1287         /// The address.
1288         /// </summary>
1289         public string Address
1290         {
1291             get
1292             {
1293                 return _address;
1294             }
1295         }
1296     }
1297 }