Home | History | Annotate | Download | only in anqp
      1 package com.android.server.wifi.anqp;
      2 
      3 import java.net.ProtocolException;
      4 import java.nio.ByteBuffer;
      5 import java.util.ArrayList;
      6 import java.util.Collections;
      7 import java.util.List;
      8 
      9 /**
     10  * The Operator Friendly Name vendor specific ANQP Element,
     11  * Wi-Fi Alliance Hotspot 2.0 (Release 2) Technical Specification - Version 5.00,
     12  * section 4.3
     13  */
     14 public class HSFriendlyNameElement extends ANQPElement {
     15     private final List<I18Name> mNames;
     16 
     17     public HSFriendlyNameElement(Constants.ANQPElementType infoID, ByteBuffer payload)
     18             throws ProtocolException {
     19         super(infoID);
     20 
     21         mNames = new ArrayList<I18Name>();
     22 
     23         while (payload.hasRemaining()) {
     24             mNames.add(new I18Name(payload));
     25         }
     26     }
     27 
     28     public List<I18Name> getNames() {
     29         return Collections.unmodifiableList(mNames);
     30     }
     31 
     32     @Override
     33     public String toString() {
     34         return "HSFriendlyName{" +
     35                 "mNames=" + mNames +
     36                 '}';
     37     }
     38 }
     39