1 /*
2  * Created on Feb 20, 2005
3  * Created by Alon Rohter
4  * Copyright (C) Azureus Software, Inc, All Rights Reserved.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17  *
18  */
19 
20 package com.aelitis.azureus.core.peermanager.messaging.azureus;
21 
22 import com.aelitis.azureus.core.peermanager.messaging.Message;
23 
24 /**
25  * A core AZ type peer message.
26  */
27 public interface AZMessage extends Message {
28 	public static final String AZ_FEATURE_ID = "AZ1";
29 
30   public static final String ID_AZ_HANDSHAKE        	= "AZ_HANDSHAKE";
31   public static final byte[] ID_AZ_HANDSHAKE_BYTES      = ID_AZ_HANDSHAKE.getBytes();
32   public static final int SUBID_AZ_HANDSHAKE			= 0;
33 
34   public static final String ID_AZ_PEER_EXCHANGE    	= "AZ_PEER_EXCHANGE";
35   public static final byte[] ID_AZ_PEER_EXCHANGE_BYTES  = ID_AZ_PEER_EXCHANGE.getBytes();
36   public static final int SUBID_AZ_PEER_EXCHANGE		= 1;
37 
38   public static final String ID_AZ_GENERIC_MAP    		= "AZ_GENERIC_MAP";
39   public static final byte[] ID_AZ_GENERIC_MAP_BYTES    = ID_AZ_GENERIC_MAP.getBytes();
40   public static final int SUBID_AZ_GENERIC_MAP			= 2;
41 
42   public static final String ID_AZ_REQUEST_HINT    		= "AZ_REQUEST_HINT";
43   public static final byte[] ID_AZ_REQUEST_HINT_BYTES  = ID_AZ_REQUEST_HINT.getBytes();
44   public static final int SUBID_ID_AZ_REQUEST_HINT		= 3;
45 
46   public static final String ID_AZ_HAVE	    			= "AZ_HAVE";
47   public static final byte[] ID_AZ_HAVE_BYTES 			= ID_AZ_HAVE.getBytes();
48   public static final int SUBID_ID_AZ_HAVE				= 4;
49 
50   public static final String ID_AZ_BAD_PIECE	    	= "AZ_BAD_PIECE";
51   public static final byte[] ID_AZ_BAD_PIECE_BYTES 		= ID_AZ_BAD_PIECE.getBytes();
52   public static final int SUBID_ID_AZ_BAD_PIECE			= 5;
53 
54   public static final String ID_AZ_STAT_REQUEST	    	= "AZ_STAT_REQ";
55   public static final byte[] ID_AZ_STAT_REQUEST_BYTES 	= ID_AZ_STAT_REQUEST.getBytes();
56   public static final int SUBID_ID_AZ_STAT_REQUEST		= 6;
57 
58   public static final String ID_AZ_STAT_REPLY	    	= "AZ_STAT_REP";
59   public static final byte[] ID_AZ_STAT_REPLY_BYTES 	= ID_AZ_STAT_REPLY.getBytes();
60   public static final int SUBID_ID_AZ_STAT_REPLY		= 7;
61 
62   public static final String ID_AZ_METADATA	    		= "AZ_METADATA";
63   public static final byte[] ID_AZ_METADATA_BYTES 		= ID_AZ_METADATA.getBytes();
64   public static final int SUBID_ID_AZ_METADATA			= 8;
65 
66 
67   //TODO
68 
69   public static final String ID_AZ_SESSION_SYN      	= "AZ_SESSION_SYN";
70   public static final byte[] ID_AZ_SESSION_SYN_BYTES    = ID_AZ_SESSION_SYN.getBytes();
71 
72   public static final String ID_AZ_SESSION_ACK      	= "AZ_SESSION_ACK";
73   public static final byte[] ID_AZ_SESSION_ACK_BYTES    = ID_AZ_SESSION_ACK.getBytes();
74 
75   public static final String ID_AZ_SESSION_END      	= "AZ_SESSION_END";
76   public static final byte[] ID_AZ_SESSION_END_BYTES    = ID_AZ_SESSION_END.getBytes();
77 
78   public static final String ID_AZ_SESSION_BITFIELD 		= "AZ_SESSION_BITFIELD";
79   public static final byte[] ID_AZ_SESSION_BITFIELD_BYTES 	= ID_AZ_SESSION_BITFIELD.getBytes();
80 
81   public static final String ID_AZ_SESSION_CANCEL   	= "AZ_SESSION_CANCEL";
82   public static final byte[] ID_AZ_SESSION_CANCEL_BYTES = ID_AZ_SESSION_CANCEL.getBytes();
83 
84   public static final String ID_AZ_SESSION_HAVE     	= "AZ_SESSION_HAVE";
85   public static final byte[] ID_AZ_SESSION_HAVE_BYTES   = ID_AZ_SESSION_HAVE.getBytes();
86 
87   public static final String ID_AZ_SESSION_PIECE    	= "AZ_SESSION_PIECE";
88   public static final byte[] ID_AZ_SESSION_PIECE_BYTES  = ID_AZ_SESSION_PIECE.getBytes();
89 
90   public static final String ID_AZ_SESSION_REQUEST  		= "AZ_SESSION_REQUEST";
91   public static final byte[] ID_AZ_SESSION_REQUEST_BYTES  	= ID_AZ_SESSION_REQUEST.getBytes();
92 }
93