directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r208992 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
Date Sun, 03 Jul 2005 22:29:59 GMT
Author: elecharny
Date: Sun Jul  3 15:29:57 2005
New Revision: 208992

URL: http://svn.apache.org/viewcvs?rev=208992&view=rev
Log:
Added the ExtendedResponse states

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java?rev=208992&r1=208991&r2=208992&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
Sun Jul  3 15:29:57 2005
@@ -906,6 +906,33 @@
     public static int LAST_EXTENDED_REQUEST_STATE = 6;
     
     //=========================================================================
+    // Extended Response grammar states 
+    //=========================================================================
+    // Extended Response ------------------------------------------------------
+    /** Extended Response Tag */
+    public static int EXTENDED_RESPONSE_TAG = 0;
+    
+    /** Extended Response Value */
+    public static int EXTENDED_RESPONSE_VALUE = 1;
+    
+    /** Extended Response Ldap Result (we will switch the grammar here) */
+    public static int EXTENDED_RESPONSE_LDAP_RESULT = 2;
+
+    // Name -------------------------------------------------------------------
+    /** Name Value */
+    public static int EXTENDED_RESPONSE_NAME_VALUE = 4;
+    
+    // Response ------------------------------------------------------------------
+    /** Response Tag */
+    public static int EXTENDED_RESPONSE_RESPONSE_TAG = 5;
+    
+    /** Response Value */
+    public static int EXTENDED_RESPONSE_RESPONSE_VALUE = 6;
+    
+    /** The last state */
+    public static int LAST_EXTENDED_RESPONSE_STATE = 7;
+    
+    //=========================================================================
     // Grammars declaration.
     //=========================================================================
     /** Ldap Message Grammar */
@@ -1046,6 +1073,12 @@
     /** ExtendedRequest number */
     public static final int EXTENDED_REQUEST_GRAMMAR = 22;
     
+    /** ExtendedResponse Grammar */
+    public static final int EXTENDED_RESPONSE_GRAMMAR_SWITCH = 0x1800;
+
+    /** ExtendedResponse number */
+    public static final int EXTENDED_RESPONSE_GRAMMAR = 23;
+    
     /** The total number of grammars used */
     public static final int NB_GRAMMARS = 25;
 
@@ -1078,7 +1111,8 @@
             "MODIFY_DN_REQUEST_GRAMMAR_SWITCH",
             "DEL_REQUEST_GRAMMAR_SWITCH",
             "COMPARE_REQUEST_GRAMMAR_SWITCH",
-            "EXTENDED_REQUEST_GRAMMAR_SWITCH"
+            "EXTENDED_REQUEST_GRAMMAR_SWITCH",
+            "EXTENDED_RESPONSE_GRAMMAR_SWITCH"
         };
 
     //=========================================================================
@@ -1437,6 +1471,19 @@
 		    "EXTENDED_REQUEST_VALUE_VALUE"
         };
 
+    /** A string representation of all the extended response states */
+    private static String[] ExtendedResponseString =
+        new String[]
+        {
+		    "EXTENDED_RESPONSE_TAG",
+		    "EXTENDED_RESPONSE_VALUE",
+		    "EXTENDED_RESPONSE_LDAP_RESULT",
+		    "EXTENDED_RESPONSE_NAME_TAG",
+		    "EXTENDED_RESPONSE_NAME_VALUE",
+		    "EXTENDED_RESPONSE_VALUE_TAG",
+		    "EXTENDED_RESPONSE_VALUE_VALUE"
+        };
+    
     /** The instance */
     private static LdapStatesEnum instance = new LdapStatesEnum();
 
@@ -1493,6 +1540,7 @@
             case DEL_REQUEST_GRAMMAR             : return "DEL_REQUEST_GRAMMAR";
             case COMPARE_REQUEST_GRAMMAR         : return "COMPARE_REQUEST_GRAMMAR";
             case EXTENDED_REQUEST_GRAMMAR        : return "EXTENDED_REQUEST_GRAMMAR";
+            case EXTENDED_RESPONSE_GRAMMAR       : return "EXTENDED_RESPONSE_GRAMMAR";
 
         	default                              : return "UNKNOWN";
         }
@@ -1597,6 +1645,10 @@
         {
             return "EXTENDED_REQUEST_GRAMMAR";
         }
+        else if (grammar instanceof ExtendedResponseGrammar)
+        {
+            return "EXTENDED_RESPONSE_GRAMMAR";
+        }
         else 
         {
             return "UNKNOWN GRAMMAR";
@@ -1692,6 +1744,9 @@
                                         
                 case EXTENDED_REQUEST_GRAMMAR :
                     return ( ( state == GRAMMAR_END ) ? "EXTENDED_REQUEST_END_STATE" : ExtendedRequestString[state]
);
+                                        
+                case EXTENDED_RESPONSE_GRAMMAR :
+                    return ( ( state == GRAMMAR_END ) ? "EXTENDED_RESPONSE_END_STATE" : ExtendedResponseString[state]
);
                                         
                 default :
                     return "UNKNOWN";



Mime
View raw message