    001    package com.skype.ipc;
    002
    003    import java.io.IOException;
    004    //import java.util.ArrayList;
    005
    006    public interface Encoding {
    007            Encoding encodeInt(final int value) throws IOException;
    008            Encoding encodeUint(final int value) throws IOException;
    009            Encoding encodeUint64(final long value) throws IOException;
    010            Encoding encodeString(final String value) throws IOException;
    011            Encoding encodeBinary(final byte[] value) throws IOException;
    012
    013            Encoding addBoolParm(final int tag, final boolean value) throws IOException;
    014            Encoding addBoolParm(final int tag, final boolean value, final boolean defaultValue) throws IOException;
    015            Encoding addBoolListParm(final int tag, final boolean[] values) throws IOException;
    016
    017            Encoding addEnumParm(final int tag, final int value) throws IOException;
    018            Encoding addEnumParm(final int tag, final int value, final int defval) throws IOException;
    019            Encoding addEnumParm(final int tag, final EnumConverting value) throws IOException;
    020            Encoding addEnumParm(final int tag, final EnumConverting value, final int defaultValue) throws IOException;
    021            Encoding addEnumListParm(final int tag, final EnumConverting[] values) throws IOException;
    022
    023            Encoding addIntParm(final int tag, final int value) throws IOException;
    024            Encoding addIntParm(final int tag, final int value, final int defaultValue) throws IOException;
    025            Encoding addIntListParm(final int tag, final int[] values) throws IOException;
    026
    027            Encoding addUintParm(final int tag, final int value) throws IOException;
    028            Encoding addUintParm(final int tag, final int value, final int defaultValue) throws IOException;
    029            Encoding addUintListParm(final int tag, final int[] values) throws IOException;
    030
    031            Encoding addUint64Parm(final int tag, final long value) throws IOException;
    032            Encoding addUint64Parm(final int tag, final long value, final long default_value) throws IOException;
    033            Encoding addUint64ListParm(final int tag, final long[] values) throws IOException;
    034
    035            Encoding addObjectParm(final int tag, final SidObject value)                     throws IOException;
    036            Encoding addObjectListParm(final int tag, final SidObject[] values)        throws IOException;
    037
    038            Encoding addStringParm(final int tag, final String value)                        throws IOException;
    039            Encoding addStringParm(final int tag, final String value, final String defaultValue)   throws IOException;
    040            Encoding addStringListParm(final int tag, final String[] values)           throws IOException;
    041
    042            Encoding addFilenameParm(final int tag, final String value)                      throws IOException;
    043            Encoding addFilenameParm(final int tag, final String value, final String defaultValue) throws IOException;
    044            Encoding addFilenameListParm(final int tag, final String[] values)         throws IOException;
    045
    046            Encoding addXmlParm(final int tag, final String value) throws IOException;
    047            Encoding addXmlParm(final int tag, final String value, final String defaultValue)      throws IOException;
    048            Encoding addXmlListParm(final int tag, final String[] values)              throws IOException;
    049
    050            Encoding addBinaryParm(final int tag, final byte[] value) throws IOException;
    051            Encoding addBinaryParm(final int tag, final byte[] value, final byte[] defaultValue)   throws IOException;
    052            Encoding addBinaryListParm(final int tag, final byte[][] values)                 throws IOException;
    053
    054            Encoding beginRequest(final byte[] header, final ClientEncodingListener listener)                     throws IOException;
    055            Encoding beginRequest(final byte[] header, final int target, final ClientEncodingListener listener)         throws IOException;
    056            Decoding endRequest()                                                                     throws IOException;
    057            Decoding endOneWay()                                                                      throws IOException;
    058
    059            Decoding doGetRequest(final byte[] header, final SidObject[] objs, final ClientEncodingListener listener)     throws IOException;
    060            Decoding doGetRequest(final byte[] header, final int oid, final ClientEncodingListener listener)        throws IOException;
    061
    062            Encoding beginMultiGet(final PropertyEnumConverting[] properties, final int modid, final int oid, final ClientEncodingListener listener_) throws IOException;
    063            Encoding addMultiGet(final PropertyEnumConverting[] properties, final int modid, final int oid) throws IOException;
    064            Encoding addMultiGet(int oid) throws IOException;
    065            public Decoding endMultiGet() throws IOException;
    066    }
    067
    068