2 // Copyright (c) 2013 Ford Motor Company
4 package com.smartdevicelink.protocol;
6 import com.smartdevicelink.protocol.enums.SessionType;
7 import com.smartdevicelink.transport.ISmartDeviceLinkTransport;
8 import com.smartdevicelink.transport.ITransportListener;
10 public interface IProtocol extends ITransportListener {
12 void handleBytesFromTransport(byte[] receivedBytes, int receivedBytesLength);
13 public void sendStartSession(SessionType sessionType);
14 public void sendEndSession(SessionType sessionType, byte sessionID);
16 public void sendData(SessionType sessionType, byte sessionID, byte[] data);
18 public ISmartDeviceLinkTransport getTransport();
19 public void setTransport(ISmartDeviceLinkTransport transport);
21 void addProtocolListener(IProtocolListener listener);
22 boolean removeProtocolListener(IProtocolListener listener);