CPKIFOCSPCertStatus.java

Go to the documentation of this file.
00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 2.0.1
00004  *
00005  * Do not make changes to this file unless you know what you are doing--modify
00006  * the SWIG interface file instead.
00007  * ----------------------------------------------------------------------------- */
00008 
00009 package com.orionsec.jpkif;
00010 
00011 public class CPKIFOCSPCertStatus {
00012   private long swigCPtr;
00013   protected boolean swigCMemOwn;
00014 
00015   public CPKIFOCSPCertStatus(long cPtr, boolean cMemoryOwn) {
00016     swigCMemOwn = cMemoryOwn;
00017     swigCPtr = cPtr;
00018   }
00019 
00020   public static long getCPtr(CPKIFOCSPCertStatus obj) {
00021     return (obj == null) ? 0 : obj.swigCPtr;
00022   }
00023 
00024   protected void finalize() {
00025     delete();
00026   }
00027 
00028   public synchronized void delete() {
00029     if (swigCPtr != 0) {
00030       if (swigCMemOwn) {
00031         swigCMemOwn = false;
00032         pkif_moduleJNI.delete_CPKIFOCSPCertStatus(swigCPtr);
00033       }
00034       swigCPtr = 0;
00035     }
00036   }
00037 
00038   public CPKIFOCSPCertStatus() {
00039     this(pkif_moduleJNI.new_CPKIFOCSPCertStatus__SWIG_0(), true);
00040   }
00041 
00042   public CPKIFOCSPCertStatus(CPKIFBufferPtr cs) {
00043     this(pkif_moduleJNI.new_CPKIFOCSPCertStatus__SWIG_1(CPKIFBufferPtr.getCPtr(cs), cs), true);
00044   }
00045 
00046   public CPKIFOCSPCertStatus.CertStatusChoice GetChoice() {
00047     return CPKIFOCSPCertStatus.CertStatusChoice.swigToEnum(pkif_moduleJNI.CPKIFOCSPCertStatus_GetChoice(swigCPtr, this));
00048   }
00049 
00050   public void SetRevokedInfo(CPKIFRevokedInfoPtr ri) {
00051     pkif_moduleJNI.CPKIFOCSPCertStatus_SetRevokedInfo(swigCPtr, this, CPKIFRevokedInfoPtr.getCPtr(ri), ri);
00052   }
00053 
00054   public CPKIFRevokedInfoPtr GetRevokedInfo() {
00055     return new CPKIFRevokedInfoPtr(pkif_moduleJNI.CPKIFOCSPCertStatus_GetRevokedInfo(swigCPtr, this), true);
00056   }
00057 
00058   public final static class CertStatusChoice {
00059     public final static CertStatusChoice GOOD = new CertStatusChoice("GOOD");
00060     public final static CertStatusChoice REVOKED = new CertStatusChoice("REVOKED");
00061     public final static CertStatusChoice UNKNOWN = new CertStatusChoice("UNKNOWN");
00062     public final static CertStatusChoice UNSET = new CertStatusChoice("UNSET");
00063 
00064     public final int swigValue() {
00065       return swigValue;
00066     }
00067 
00068     public String toString() {
00069       return swigName;
00070     }
00071 
00072     public static CertStatusChoice swigToEnum(int swigValue) {
00073       if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
00074         return swigValues[swigValue];
00075       for (int i = 0; i < swigValues.length; i++)
00076         if (swigValues[i].swigValue == swigValue)
00077           return swigValues[i];
00078       throw new IllegalArgumentException("No enum " + CertStatusChoice.class + " with value " + swigValue);
00079     }
00080 
00081     private CertStatusChoice(String swigName) {
00082       this.swigName = swigName;
00083       this.swigValue = swigNext++;
00084     }
00085 
00086     private CertStatusChoice(String swigName, int swigValue) {
00087       this.swigName = swigName;
00088       this.swigValue = swigValue;
00089       swigNext = swigValue+1;
00090     }
00091 
00092     private CertStatusChoice(String swigName, CertStatusChoice swigEnum) {
00093       this.swigName = swigName;
00094       this.swigValue = swigEnum.swigValue;
00095       swigNext = this.swigValue+1;
00096     }
00097 
00098     private static CertStatusChoice[] swigValues = { GOOD, REVOKED, UNKNOWN, UNSET };
00099     private static int swigNext = 0;
00100     private final int swigValue;
00101     private final String swigName;
00102   }
00103 
00104 }

Generated on Mon Nov 15 11:15:49 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6