~ubuntu-branches/ubuntu/utopic/lasso/utopic-proposed

« back to all changes in this revision

Viewing changes to csharp/Server.cs

  • 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 lasso;
 
10
 
 
11
using System;
 
12
public class Server : IDisposable {
 
13
  private IntPtr swigCPtr;
 
14
  protected bool swigCMemOwn;
 
15
 
 
16
  internal Server(IntPtr cPtr, bool cMemoryOwn) {
 
17
    swigCMemOwn = cMemoryOwn;
 
18
    swigCPtr = cPtr;
 
19
  }
 
20
 
 
21
  protected Server() : this(IntPtr.Zero, false) {
 
22
  }
 
23
 
 
24
  ~Server() {
 
25
    Dispose();
 
26
  }
 
27
 
 
28
  public virtual void Dispose() {
 
29
    if(swigCPtr != IntPtr.Zero && swigCMemOwn) {
 
30
      swigCMemOwn = false;
 
31
      lassoPINVOKE.delete_Server(swigCPtr);
 
32
    }
 
33
    swigCPtr = IntPtr.Zero;
 
34
    GC.SuppressFinalize(this);
 
35
  }
 
36
 
 
37
  internal static IntPtr getCPtr(Server obj) {
 
38
    return (obj == null) ? IntPtr.Zero : obj.swigCPtr;
 
39
  }
 
40
 
 
41
  public string providerId {
 
42
    get {
 
43
      return lassoPINVOKE.get_Server_providerId(swigCPtr);
 
44
    } 
 
45
  }
 
46
 
 
47
  public Server(string metadata, string publicKey, string privateKey, string certificate, int signatureMethod) : this(lassoPINVOKE.new_Server(metadata, publicKey, privateKey, certificate, signatureMethod), true) {
 
48
  }
 
49
 
 
50
  public static Server newFromDump(string dump) {
 
51
    IntPtr cPtr = lassoPINVOKE.Server_newFromDump(dump);
 
52
    return (cPtr == IntPtr.Zero) ? null : new Server(cPtr, true);
 
53
  }
 
54
 
 
55
  public void addProvider(string metadata, string publicKey, string caCertificate) {
 
56
    lassoPINVOKE.Server_addProvider(swigCPtr, metadata, publicKey, caCertificate);
 
57
  }
 
58
 
 
59
  public string dump() {
 
60
    return lassoPINVOKE.Server_dump(swigCPtr);
 
61
  }
 
62
 
 
63
}