KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > filesys > smb > server > NamedPipeTransaction


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.filesys.smb.server;
18
19 /**
20  * <p>
21  * Contains the named pipe transaction codes.
22  */

23 public class NamedPipeTransaction
24 {
25
26     // Transaction sub-commands
27

28     public static final int CallNamedPipe = 0x54;
29     public static final int WaitNamedPipe = 0x53;
30     public static final int PeekNmPipe = 0x23;
31     public static final int QNmPHandState = 0x21;
32     public static final int SetNmPHandState = 0x01;
33     public static final int QNmPipeInfo = 0x22;
34     public static final int TransactNmPipe = 0x26;
35     public static final int RawReadNmPipe = 0x11;
36     public static final int RawWriteNmPipe = 0x31;
37
38     /**
39      * Return the named pipe transaction sub-command as a string
40      *
41      * @param subCmd int
42      * @return String
43      */

44     public final static String JavaDoc getSubCommand(int subCmd)
45     {
46
47         // Determine the sub-command code
48

49         String JavaDoc ret = "";
50
51         switch (subCmd)
52         {
53         case CallNamedPipe:
54             ret = "CallNamedPipe";
55             break;
56         case WaitNamedPipe:
57             ret = "WaitNamedPipe";
58             break;
59         case PeekNmPipe:
60             ret = "PeekNmPipe";
61             break;
62         case QNmPHandState:
63             ret = "QNmPHandState";
64             break;
65         case SetNmPHandState:
66             ret = "SetNmPHandState";
67             break;
68         case QNmPipeInfo:
69             ret = "QNmPipeInfo";
70             break;
71         case TransactNmPipe:
72             ret = "TransactNmPipe";
73             break;
74         case RawReadNmPipe:
75             ret = "RawReadNmPipe";
76             break;
77         case RawWriteNmPipe:
78             ret = "RawWriteNmPipe";
79             break;
80         }
81         return ret;
82     }
83 }
84
Popular Tags