~ubuntu-branches/ubuntu/gutsy/lasso/gutsy

« back to all changes in this revision

Viewing changes to java/Server.java

  • Committer: Bazaar Package Importer
  • Author(s): Frederic Peters
  • Date: 2004-09-13 09:26:34 UTC
  • Revision ID: james.westby@ubuntu.com-20040913092634-01vdfl8j9cp94exa
Tags: upstream-0.4.1
ImportĀ upstreamĀ versionĀ 0.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ----------------------------------------------------------------------------
 
2
 * This file was automatically generated by SWIG (http://www.swig.org).
 
3
 * Version: 1.3.21
 
4
 *
 
5
 * Do not make changes to this file unless you know what you are doing--modify
 
6
 * the SWIG interface file instead.
 
7
 * ----------------------------------------------------------------------------- */
 
8
 
 
9
package com.entrouvert.lasso;
 
10
 
 
11
 
 
12
public class Server {
 
13
  private long swigCPtr;
 
14
  protected boolean swigCMemOwn;
 
15
 
 
16
  protected Server(long cPtr, boolean cMemoryOwn) {
 
17
    swigCMemOwn = cMemoryOwn;
 
18
    swigCPtr = cPtr;
 
19
  }
 
20
 
 
21
  protected Server() {
 
22
    this(0, false);
 
23
  }
 
24
 
 
25
  protected void finalize() {
 
26
    delete();
 
27
  }
 
28
 
 
29
  public void delete() {
 
30
    if(swigCPtr != 0 && swigCMemOwn) {
 
31
      swigCMemOwn = false;
 
32
      lassoJNI.delete_Server(swigCPtr);
 
33
    }
 
34
    swigCPtr = 0;
 
35
  }
 
36
 
 
37
  protected static long getCPtr(Server obj) {
 
38
    return (obj == null) ? 0 : obj.swigCPtr;
 
39
  }
 
40
 
 
41
  public String getProviderId() {
 
42
    return lassoJNI.get_Server_providerId(swigCPtr);
 
43
  }
 
44
 
 
45
  public Server(String metadata, String publicKey, String privateKey, String certificate, int signatureMethod) {
 
46
    this(lassoJNI.new_Server(metadata, publicKey, privateKey, certificate, signatureMethod), true);
 
47
  }
 
48
 
 
49
  public static Server newFromDump(String dump) {
 
50
    long cPtr = lassoJNI.Server_newFromDump(dump);
 
51
    return (cPtr == 0) ? null : new Server(cPtr, true);
 
52
  }
 
53
 
 
54
  public void addProvider(String metadata, String publicKey, String caCertificate) {
 
55
    lassoJNI.Server_addProvider(swigCPtr, metadata, publicKey, caCertificate);
 
56
  }
 
57
 
 
58
  public String dump() {
 
59
    return lassoJNI.Server_dump(swigCPtr);
 
60
  }
 
61
 
 
62
}