22
33import android .content .Intent ;
44
5- import net .sharksystem .SharkNotSupportedException ;
65import net .sharksystem .asap .ASAPException ;
76import net .sharksystem .asap .ASAPHop ;
87import net .sharksystem .asap .utils .ASAPSerialization ;
98import net .sharksystem .utils .Log ;
109
1110import java .io .IOException ;
11+ import java .util .List ;
1212
1313public class ASAPChunkReceivedBroadcastIntent extends Intent {
1414
15- private final ASAPHop asapHop ;
15+ private final List < ASAPHop > asapHops ;
1616 private CharSequence folder ;
1717 private CharSequence uri ;
1818 private int era ;
1919 private CharSequence senderE2E ;
2020 private CharSequence format ;
2121
2222 public ASAPChunkReceivedBroadcastIntent (CharSequence format , CharSequence senderE2E ,
23- CharSequence folderName ,
24- CharSequence uri , int era ,
25- ASAPHop asapHop ) throws ASAPException {
23+ CharSequence folderName ,
24+ CharSequence uri , int era ,
25+ List < ASAPHop > asapHops ) throws ASAPException {
2626
2727 super ();
2828
@@ -37,20 +37,20 @@ public ASAPChunkReceivedBroadcastIntent(CharSequence format, CharSequence sender
3737 this .putExtra (ASAPServiceMethods .URI_TAG , uri );
3838 this .putExtra (ASAPAndroid .SENDER_E2E , senderE2E );
3939 try {
40- byte [] asapHopBytes = ASAPSerialization .asapHop2ByteArray ( asapHop );
41- this .putExtra (ASAPAndroid .ASAP_HOP , asapHopBytes );
40+ byte [] asapHopBytes = ASAPSerialization .asapHopList2ByteArray ( asapHops );
41+ this .putExtra (ASAPAndroid .ASAP_HOPS , asapHopBytes );
4242 }
4343 catch (IOException e ) {
4444 // ignore
45- Log .writeLogErr (this , "cannot serialize ASAPHop: " + asapHop );
45+ Log .writeLogErr (this , "cannot serialize ASAPHop: " + asapHops );
4646 }
4747
4848 this .format = format ;
4949 this .folder = folderName ;
5050 this .uri = uri ;
5151 this .era = era ;
5252 this .senderE2E = senderE2E ;
53- this .asapHop = asapHop ;
53+ this .asapHops = asapHops ;
5454 }
5555
5656 public ASAPChunkReceivedBroadcastIntent (Intent intent ) throws ASAPException , IOException {
@@ -62,8 +62,8 @@ public ASAPChunkReceivedBroadcastIntent(Intent intent) throws ASAPException, IOE
6262 this .uri = intent .getStringExtra (ASAPServiceMethods .URI_TAG );
6363 this .era = intent .getIntExtra (ASAPServiceMethods .ERA_TAG , 0 );
6464 this .senderE2E = intent .getStringExtra (ASAPAndroid .SENDER_E2E );
65- byte [] asapHopBytes = intent .getByteArrayExtra (ASAPAndroid .ASAP_HOP );
66- this .asapHop = ASAPSerialization .byteArray2ASAPHop ( asapHopBytes );
65+ byte [] asapHopsBytes = intent .getByteArrayExtra (ASAPAndroid .ASAP_HOPS );
66+ this .asapHops = ASAPSerialization .byteArray2ASAPHopList ( asapHopsBytes );
6767 }
6868
6969 public CharSequence getFoldername () {
@@ -85,7 +85,7 @@ public int getEra() {
8585
8686 public CharSequence getFormat () { return this .format ; }
8787
88- public ASAPHop getASAPHop () {
89- return this .asapHop ;
88+ public List < ASAPHop > getASAPHop () {
89+ return this .asapHops ;
9090 }
9191}
0 commit comments