CPKIFEncryptedData.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 CPKIFEncryptedData extends IPKIFHasAttributes {
00012   private long swigCPtr;
00013 
00014   public CPKIFEncryptedData(long cPtr, boolean cMemoryOwn) {
00015     super(pkif_moduleJNI.CPKIFEncryptedData_SWIGUpcast(cPtr), cMemoryOwn);
00016     swigCPtr = cPtr;
00017   }
00018 
00019   public static long getCPtr(CPKIFEncryptedData 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_CPKIFEncryptedData(swigCPtr);
00032       }
00033       swigCPtr = 0;
00034     }
00035     super.delete();
00036   }
00037 
00038   public CPKIFEncryptedData() {
00039     this(pkif_moduleJNI.new_CPKIFEncryptedData(), true);
00040   }
00041 
00042   public CPKIFEncryptedData.CMSVersion GetVersion() {
00043     return CPKIFEncryptedData.CMSVersion.swigToEnum(pkif_moduleJNI.CPKIFEncryptedData_GetVersion(swigCPtr, this));
00044   }
00045 
00046   public void SetDataToEncrypt(CPKIFEncryptedContentInfoPtr buf) {
00047     pkif_moduleJNI.CPKIFEncryptedData_SetDataToEncrypt(swigCPtr, this, CPKIFEncryptedContentInfoPtr.getCPtr(buf), buf);
00048   }
00049 
00050   public CPKIFEncryptedContentInfoPtr GetEncryptedData() {
00051     return new CPKIFEncryptedContentInfoPtr(pkif_moduleJNI.CPKIFEncryptedData_GetEncryptedData(swigCPtr, this), true);
00052   }
00053 
00054   public void AddUnprotectedAttribute(CPKIFAttributePtr attr) {
00055     pkif_moduleJNI.CPKIFEncryptedData_AddUnprotectedAttribute(swigCPtr, this, CPKIFAttributePtr.getCPtr(attr), attr);
00056   }
00057 
00058   public void GetUnprotectedAttributes(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_PKIFAllocT_boost__shared_ptrT_CPKIFAttribute_t_t_t ual) {
00059     pkif_moduleJNI.CPKIFEncryptedData_GetUnprotectedAttributes(swigCPtr, this, SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_PKIFAllocT_boost__shared_ptrT_CPKIFAttribute_t_t_t.getCPtr(ual));
00060   }
00061 
00062   public void GetEncodedUnprotectedAttributes(CPKIFBufferPtr buf) {
00063     pkif_moduleJNI.CPKIFEncryptedData_GetEncodedUnprotectedAttributes(swigCPtr, this, CPKIFBufferPtr.getCPtr(buf), buf);
00064   }
00065 
00066   public void _GetUnprotectedAttributes(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_t attrVector) {
00067     pkif_moduleJNI.CPKIFEncryptedData__GetUnprotectedAttributes(swigCPtr, this, SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_t.getCPtr(attrVector));
00068   }
00069 
00070   public void ClearContent(boolean removeMediatorAssociations) {
00071     pkif_moduleJNI.CPKIFEncryptedData_ClearContent__SWIG_0(swigCPtr, this, removeMediatorAssociations);
00072   }
00073 
00074   public void ClearContent() {
00075     pkif_moduleJNI.CPKIFEncryptedData_ClearContent__SWIG_1(swigCPtr, this);
00076   }
00077 
00078   public void SetKeyMaterial(CPKIFKeyMaterialPtr key) {
00079     pkif_moduleJNI.CPKIFEncryptedData_SetKeyMaterial(swigCPtr, this, CPKIFKeyMaterialPtr.getCPtr(key), key);
00080   }
00081 
00082   public CPKIFBufferPtr Encode() {
00083     return new CPKIFBufferPtr(pkif_moduleJNI.CPKIFEncryptedData_Encode(swigCPtr, this), true);
00084   }
00085 
00086   public void Decode(CPKIFBufferPtr buf) {
00087     pkif_moduleJNI.CPKIFEncryptedData_Decode(swigCPtr, this, CPKIFBufferPtr.getCPtr(buf), buf);
00088   }
00089 
00090   public CPKIFBufferPtr Decrypt() {
00091     return new CPKIFBufferPtr(pkif_moduleJNI.CPKIFEncryptedData_Decrypt(swigCPtr, this), true);
00092   }
00093 
00094   public void GetAddedUnprotectedAttributes(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_t attr) {
00095     pkif_moduleJNI.CPKIFEncryptedData_GetAddedUnprotectedAttributes(swigCPtr, this, SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CPKIFAttribute_t_t.getCPtr(attr));
00096   }
00097 
00098   public void AddMediator(IPKIFColleaguePtr m) {
00099     pkif_moduleJNI.CPKIFEncryptedData_AddMediator(swigCPtr, this, IPKIFColleaguePtr.getCPtr(m), m);
00100   }
00101 
00102   public IPKIFColleaguePtr GetMediator() {
00103     return new IPKIFColleaguePtr(pkif_moduleJNI.CPKIFEncryptedData_GetMediator(swigCPtr, this), true);
00104   }
00105 
00106   public final static class CMSVersion {
00107     public final static CMSVersion CMSv0 = new CMSVersion("CMSv0", pkif_moduleJNI.CPKIFEncryptedData_CMSv0_get());
00108     public final static CMSVersion CMSv2 = new CMSVersion("CMSv2", pkif_moduleJNI.CPKIFEncryptedData_CMSv2_get());
00109 
00110     public final int swigValue() {
00111       return swigValue;
00112     }
00113 
00114     public String toString() {
00115       return swigName;
00116     }
00117 
00118     public static CMSVersion swigToEnum(int swigValue) {
00119       if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
00120         return swigValues[swigValue];
00121       for (int i = 0; i < swigValues.length; i++)
00122         if (swigValues[i].swigValue == swigValue)
00123           return swigValues[i];
00124       throw new IllegalArgumentException("No enum " + CMSVersion.class + " with value " + swigValue);
00125     }
00126 
00127     private CMSVersion(String swigName) {
00128       this.swigName = swigName;
00129       this.swigValue = swigNext++;
00130     }
00131 
00132     private CMSVersion(String swigName, int swigValue) {
00133       this.swigName = swigName;
00134       this.swigValue = swigValue;
00135       swigNext = swigValue+1;
00136     }
00137 
00138     private CMSVersion(String swigName, CMSVersion swigEnum) {
00139       this.swigName = swigName;
00140       this.swigValue = swigEnum.swigValue;
00141       swigNext = this.swigValue+1;
00142     }
00143 
00144     private static CMSVersion[] swigValues = { CMSv0, CMSv2 };
00145     private static int swigNext = 0;
00146     private final int swigValue;
00147     private final String swigName;
00148   }
00149 
00150 }

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