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

« back to all changes in this revision

Viewing changes to csharp/Session.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 Session : IDisposable {
 
13
  private IntPtr swigCPtr;
 
14
  protected bool swigCMemOwn;
 
15
 
 
16
  internal Session(IntPtr cPtr, bool cMemoryOwn) {
 
17
    swigCMemOwn = cMemoryOwn;
 
18
    swigCPtr = cPtr;
 
19
  }
 
20
 
 
21
  ~Session() {
 
22
    Dispose();
 
23
  }
 
24
 
 
25
  public virtual void Dispose() {
 
26
    if(swigCPtr != IntPtr.Zero && swigCMemOwn) {
 
27
      swigCMemOwn = false;
 
28
      lassoPINVOKE.delete_Session(swigCPtr);
 
29
    }
 
30
    swigCPtr = IntPtr.Zero;
 
31
    GC.SuppressFinalize(this);
 
32
  }
 
33
 
 
34
  internal static IntPtr getCPtr(Session obj) {
 
35
    return (obj == null) ? IntPtr.Zero : obj.swigCPtr;
 
36
  }
 
37
 
 
38
  public bool isDirty {
 
39
    get {
 
40
      return lassoPINVOKE.get_Session_isDirty(swigCPtr);
 
41
    } 
 
42
  }
 
43
 
 
44
  public Session() : this(lassoPINVOKE.new_Session(), true) {
 
45
  }
 
46
 
 
47
  public static Session newFromDump(string dump) {
 
48
    IntPtr cPtr = lassoPINVOKE.Session_newFromDump(dump);
 
49
    return (cPtr == IntPtr.Zero) ? null : new Session(cPtr, true);
 
50
  }
 
51
 
 
52
  public string dump() {
 
53
    return lassoPINVOKE.Session_dump(swigCPtr);
 
54
  }
 
55
 
 
56
  public string getAuthenticationMethod(string remoteProviderId) {
 
57
    return lassoPINVOKE.Session_getAuthenticationMethod(swigCPtr, remoteProviderId);
 
58
  }
 
59
 
 
60
}