CPKIFSignerInfo.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 CPKIFSignerInfo extends IPKIFHasAttributes {
00012   private long swigCPtr;
00013 
00014   public CPKIFSignerInfo(long cPtr, boolean cMemoryOwn) {
00015     super(pkif_moduleJNI.CPKIFSignerInfo_SWIGUpcast(cPtr), cMemoryOwn);
00016     swigCPtr = cPtr;
00017   }
00018 
00019   public static long getCPtr(CPKIFSignerInfo obj) {
00020     return (obj == null) ? 0 : obj.swigCPtr;
00021   }
00022 
00023   protected void finalize() {
00024     delete();
00025   }
00026 
00027   public synchronized void delete() {
00028     if (swigCPtr != 0) {
00029       if (swigCMemOwn) {
00030         swigCMemOwn = false;
00031         pkif_moduleJNI.delete_CPKIFSignerInfo(swigCPtr);
00032       }
00033       swigCPtr = 0;
00034     }
00035     super.delete();
00036   }
00037 
00038   public CPKIFSignerInfo() {
00039     this(pkif_moduleJNI.new_CPKIFSignerInfo__SWIG_0(), true);
00040   }
00041 
00042   public CPKIFSignerInfo(CPKIFBufferPtr siBuf) {
00043     this(pkif_moduleJNI.new_CPKIFSignerInfo__SWIG_1(CPKIFBufferPtr.getCPtr(siBuf), siBuf), true);
00044   }
00045 
00046   public void SetCredential(CPKIFCredentialPtr cred, boolean enforceKeyUsage) {
00047     pkif_moduleJNI.CPKIFSignerInfo_SetCredential__SWIG_0(swigCPtr, this, CPKIFCredentialPtr.getCPtr(cred), cred, enforceKeyUsage);
00048   }
00049 
00050   public void SetCredential(CPKIFCredentialPtr cred) {
00051     pkif_moduleJNI.CPKIFSignerInfo_SetCredential__SWIG_1(swigCPtr, this, CPKIFCredentialPtr.getCPtr(cred), cred);
00052   }
00053 
00054   public CPKIFCredentialPtr GetCredential() {
00055     return new CPKIFCredentialPtr(pkif_moduleJNI.CPKIFSignerInfo_GetCredential(swigCPtr, this), true);
00056   }
00057 
00058   public boolean Decoded() {
00059     return pkif_moduleJNI.CPKIFSignerInfo_Decoded(swigCPtr, this);
00060   }
00061 
00062   public long Version() {
00063     return pkif_moduleJNI.CPKIFSignerInfo_Version(swigCPtr, this);
00064   }
00065 
00066   public CPKIFSignerInfo.SignerIdentifierChoice GetSignerIdentifierChoice() {
00067     return CPKIFSignerInfo.SignerIdentifierChoice.swigToEnum(pkif_moduleJNI.CPKIFSignerInfo_GetSignerIdentifierChoice(swigCPtr, this));
00068   }
00069 
00070   public void SetIssuerAndSerialNumber(CPKIFIssuerAndSerialNumberPtr iasn) {
00071     pkif_moduleJNI.CPKIFSignerInfo_SetIssuerAndSerialNumber(swigCPtr, this, CPKIFIssuerAndSerialNumberPtr.getCPtr(iasn), iasn);
00072   }
00073 
00074   public CPKIFIssuerAndSerialNumberPtr GetIssuerAndSerialNumber() {
00075     return new CPKIFIssuerAndSerialNumberPtr(pkif_moduleJNI.CPKIFSignerInfo_GetIssuerAndSerialNumber(swigCPtr, this), true);
00076   }
00077 
00078   public void SetSKID(CPKIFBufferPtr skid) {
00079     pkif_moduleJNI.CPKIFSignerInfo_SetSKID(swigCPtr, this, CPKIFBufferPtr.getCPtr(skid), skid);
00080   }
00081 
00082   public CPKIFBufferPtr GetSKID() {
00083     return new CPKIFBufferPtr(pkif_moduleJNI.CPKIFSignerInfo_GetSKID(swigCPtr, this), true);
00084   }
00085 
00086   public CPKIFAlgorithmIdentifierPtr GetDigestAlg() {
00087     return new CPKIFAlgorithmIdentifierPtr(pkif_moduleJNI.CPKIFSignerInfo_GetDigestAlg(swigCPtr, this), true);
00088   }
00089 
00090   public void SetDigestAlg(CPKIFAlgorithmIdentifierPtr digAlg) {
00091     pkif_moduleJNI.CPKIFSignerInfo_SetDigestAlg(swigCPtr, this, CPKIFAlgorithmIdentifierPtr.getCPtr(digAlg), digAlg);
00092   }
00093 
00094   public void GetSignedAttributes(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_PKIFAllocT_boost__shared_ptrT_CPKIFAttribute_t_t_t sal) {
00095     pkif_moduleJNI.CPKIFSignerInfo_GetSignedAttributes(swigCPtr, this, SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_PKIFAllocT_boost__shared_ptrT_CPKIFAttribute_t_t_t.getCPtr(sal));
00096   }
00097 
00098   public void AddSignedAttribute(CPKIFAttributePtr sa) {
00099     pkif_moduleJNI.CPKIFSignerInfo_AddSignedAttribute(swigCPtr, this, CPKIFAttributePtr.getCPtr(sa), sa);
00100   }
00101 
00102   public CPKIFAlgorithmIdentifierPtr GetSignatureAlgorithm() {
00103     return new CPKIFAlgorithmIdentifierPtr(pkif_moduleJNI.CPKIFSignerInfo_GetSignatureAlgorithm(swigCPtr, this), true);
00104   }
00105 
00106   public CPKIFBufferPtr GetSignature() {
00107     return new CPKIFBufferPtr(pkif_moduleJNI.CPKIFSignerInfo_GetSignature(swigCPtr, this), true);
00108   }
00109 
00110   public void GetUnsignedAttributes(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_PKIFAllocT_boost__shared_ptrT_CPKIFAttribute_t_t_t ual) {
00111     pkif_moduleJNI.CPKIFSignerInfo_GetUnsignedAttributes(swigCPtr, this, SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_PKIFAllocT_boost__shared_ptrT_CPKIFAttribute_t_t_t.getCPtr(ual));
00112   }
00113 
00114   public void AddUnsignedAttribute(CPKIFAttributePtr ua) {
00115     pkif_moduleJNI.CPKIFSignerInfo_AddUnsignedAttribute(swigCPtr, this, CPKIFAttributePtr.getCPtr(ua), ua);
00116   }
00117 
00118   public void GetEncodedSignedAttributes(CPKIFBufferPtr buf) {
00119     pkif_moduleJNI.CPKIFSignerInfo_GetEncodedSignedAttributes(swigCPtr, this, CPKIFBufferPtr.getCPtr(buf), buf);
00120   }
00121 
00122   public void GetEncodedUnsignedAttributes(CPKIFBufferPtr buf) {
00123     pkif_moduleJNI.CPKIFSignerInfo_GetEncodedUnsignedAttributes(swigCPtr, this, CPKIFBufferPtr.getCPtr(buf), buf);
00124   }
00125 
00126   public void _GetSignedAttributes(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_t attrVector) {
00127     pkif_moduleJNI.CPKIFSignerInfo__GetSignedAttributes(swigCPtr, this, SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_t.getCPtr(attrVector));
00128   }
00129 
00130   public void _GetUnsignedAttributes(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_t attrVector) {
00131     pkif_moduleJNI.CPKIFSignerInfo__GetUnsignedAttributes(swigCPtr, this, SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_t.getCPtr(attrVector));
00132   }
00133 
00134   public void GetAddedSignedAttributes(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_t attr) {
00135     pkif_moduleJNI.CPKIFSignerInfo_GetAddedSignedAttributes(swigCPtr, this, SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_t.getCPtr(attr));
00136   }
00137 
00138   public void GetAddedUnsignedAttributes(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_t attr) {
00139     pkif_moduleJNI.CPKIFSignerInfo_GetAddedUnsignedAttributes(swigCPtr, this, SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_t.getCPtr(attr));
00140   }
00141 
00142   public final static class SignerIdentifierChoice {
00143     public final static SignerIdentifierChoice ISSUERANDSERIAL = new SignerIdentifierChoice("ISSUERANDSERIAL");
00144     public final static SignerIdentifierChoice SKID = new SignerIdentifierChoice("SKID");
00145     public final static SignerIdentifierChoice UNSET = new SignerIdentifierChoice("UNSET");
00146 
00147     public final int swigValue() {
00148       return swigValue;
00149     }
00150 
00151     public String toString() {
00152       return swigName;
00153     }
00154 
00155     public static SignerIdentifierChoice swigToEnum(int swigValue) {
00156       if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
00157         return swigValues[swigValue];
00158       for (int i = 0; i < swigValues.length; i++)
00159         if (swigValues[i].swigValue == swigValue)
00160           return swigValues[i];
00161       throw new IllegalArgumentException("No enum " + SignerIdentifierChoice.class + " with value " + swigValue);
00162     }
00163 
00164     private SignerIdentifierChoice(String swigName) {
00165       this.swigName = swigName;
00166       this.swigValue = swigNext++;
00167     }
00168 
00169     private SignerIdentifierChoice(String swigName, int swigValue) {
00170       this.swigName = swigName;
00171       this.swigValue = swigValue;
00172       swigNext = swigValue+1;
00173     }
00174 
00175     private SignerIdentifierChoice(String swigName, SignerIdentifierChoice swigEnum) {
00176       this.swigName = swigName;
00177       this.swigValue = swigEnum.swigValue;
00178       swigNext = this.swigValue+1;
00179     }
00180 
00181     private static SignerIdentifierChoice[] swigValues = { ISSUERANDSERIAL, SKID, UNSET };
00182     private static int swigNext = 0;
00183     private final int swigValue;
00184     private final String swigName;
00185   }
00186 
00187 }

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