1/* 2 * Copyright (C) 2016 The Android Open Source Project 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 17package android.net.wifi.nan; 18 19/** 20 * A representation of a NAN publish session. Created when 21 * {@link WifiNanManager#publish(PublishData, PublishSettings, WifiNanSessionListener, int)} 22 * is executed. The object can be used to stop and re-start (re-configure) the 23 * publish session. 24 * 25 * @hide PROPOSED_NAN_API 26 */ 27public class WifiNanPublishSession extends WifiNanSession { 28 /** 29 * {@hide} 30 */ 31 public WifiNanPublishSession(WifiNanManager manager, int sessionId) { 32 super(manager, sessionId); 33 } 34 35 /** 36 * Restart/re-configure the publish session. Note that the 37 * {@link WifiNanSessionListener} is not replaced - the same listener used at 38 * creation is still used. 39 * 40 * @param publishData The data ({@link PublishData}) to publish. 41 * @param publishSettings The settings ({@link PublishSettings}) of the 42 * publish session. 43 */ 44 public void publish(PublishData publishData, PublishSettings publishSettings) { 45 mManager.publish(mSessionId, publishData, publishSettings); 46 } 47} 48