Clean up C# wrappers for NSL use.

This commit is contained in:
Jim Norman
2007-01-09 07:39:22 +00:00
parent 3d1b7f16e7
commit 52ccbd37a7
10 changed files with 172 additions and 172 deletions

View File

@@ -98,9 +98,9 @@ namespace Novell.CASA.GUI
// check for conflicts
if (m_ss == null)
m_ss = SecretStore.getInstance();
m_ss = SecretStore.GetInstance();
m_scConflicts = m_ss.enumerateSecretIDs(SecretStore.SSCS_CONFLICT_KEYCHAIN);
m_scConflicts = m_ss.EnumerateSecretIDs(SecretStore.SSCS_CONFLICT_KEYCHAIN);
if (m_scConflicts.Count > 0)
{
HandleConficts(m_ss, m_scConflicts);
@@ -188,9 +188,9 @@ namespace Novell.CASA.GUI
// check for conflicts
if (m_ss == null)
m_ss = SecretStore.getInstance();
m_ss = SecretStore.GetInstance();
m_scConflicts = m_ss.enumerateSecretIDs(SecretStore.SSCS_CONFLICT_KEYCHAIN);
m_scConflicts = m_ss.EnumerateSecretIDs(SecretStore.SSCS_CONFLICT_KEYCHAIN);
if (m_scConflicts.Count > 0)
{
HandleConficts(m_ss, m_scConflicts);
@@ -226,7 +226,7 @@ namespace Novell.CASA.GUI
while (sEnum.MoveNext())
{
string sSecretID = sEnum.Current;
Secret currentSecret = store.getSecret(sSecretID);
Secret currentSecret = store.GetSecret(sSecretID);
string sConflictSecretID;
if (sSecretID.StartsWith("SS_CredSet"))
@@ -237,11 +237,11 @@ namespace Novell.CASA.GUI
{
sConflictSecretID = sSecretID;
}
Secret conflictSecret = store.getSecret(SecretStore.SSCS_CONFLICT_KEYCHAIN, 0, sConflictSecretID, Secret.SS_CREDSET, "");
Secret conflictSecret = store.GetSecret(SecretStore.SSCS_CONFLICT_KEYCHAIN, 0, sConflictSecretID, Secret.SS_CREDSET, "");
// add this conflict to the treestore
NameValueCollection nvcConflict = conflictSecret.getKeyValueCollection();
NameValueCollection nvcCurrent = currentSecret.getKeyValueCollection();
NameValueCollection nvcConflict = conflictSecret.GetKeyValueCollection();
NameValueCollection nvcCurrent = currentSecret.GetKeyValueCollection();
for (int i = 0; i < nvcConflict.Count; i++)
{
String sConflictKey = nvcConflict.GetKey(i);
@@ -419,7 +419,7 @@ namespace Novell.CASA.GUI
{
sSecretID = sSecretID.Substring(11);
}
m_ss.removeSecret(0, SecretStore.SSCS_CONFLICT_KEYCHAIN, null, sSecretID, Secret.SS_CREDSET);
m_ss.RemoveSecret(0, SecretStore.SSCS_CONFLICT_KEYCHAIN, null, sSecretID, Secret.SS_CREDSET);
}
}
}

View File

@@ -330,7 +330,7 @@ public class MiCasa : Store
for( int i=0; i< keys.Length; i++ )
{
Secret secret = ss.getSecret(selected);
Secret secret = ss.GetSecret(selected);
Hashtable ht = secret.GetLinkedKeys(keys[i]);
@@ -1171,7 +1171,7 @@ public class MiCasa : Store
// show secretIDs
SecretStore ss = GetMiCasaStore();
StringCollection sc = ss.enumerateSecretIDs();
StringCollection sc = ss.EnumerateSecretIDs();
StringEnumerator se = sc.GetEnumerator();
se.Reset();
while (se.MoveNext())
@@ -1195,7 +1195,7 @@ public class MiCasa : Store
tvLinkedKeys.AppendColumn("Key", new CellRendererText(), "text", 1);
tvLinkedKeys.Model=tsLinkedKeys;
Secret secret = ss.getSecret(entrySecretID.Text);
Secret secret = ss.GetSecret(entrySecretID.Text);
ShowLinkedKeys(secret, selected);
// display info on this secret
@@ -1242,8 +1242,8 @@ public class MiCasa : Store
if(selected != null && selected.Length > 0)
{
SecretStore ss = GetMiCasaStore();
Secret secret = ss.getSecret(selected);
NameValueCollection nvc = secret.getKeyValueCollection();
Secret secret = ss.GetSecret(selected);
NameValueCollection nvc = secret.GetKeyValueCollection();
for (int i=0; i<nvc.Count; i++)
{
// don't allow linking this key to ourself.
@@ -1281,7 +1281,7 @@ public class MiCasa : Store
LinkedKeyInfo lki = new LinkedKeyInfo(selectedSecret, selectedKey);
MiCasaRequestReply.Send(MiCasaRequestReply.VERB_SET_LINKED_KEY, null, labelLinkSecretID.Text, labelLinkKeyID.Text, lki);
Secret secret = GetMiCasaStore().getSecret(entrySecretID.Text);
Secret secret = GetMiCasaStore().GetSecret(entrySecretID.Text);
ShowLinkedKeys(secret, labelLinkKeyID.Text);
AggregateStore();
}
@@ -1304,7 +1304,7 @@ public class MiCasa : Store
LinkedKeyInfo lki = new LinkedKeyInfo(selectedSecret, selectedKey);
MiCasaRequestReply.Send(MiCasaRequestReply.VERB_REMOVE_LINKED_KEY, null, labelLinkSecretID.Text, labelLinkKeyID.Text, lki);
Secret secret = GetMiCasaStore().getSecret(entrySecretID.Text);
Secret secret = GetMiCasaStore().GetSecret(entrySecretID.Text);
ShowLinkedKeys(secret, labelLinkKeyID.Text);
AggregateStore();
}
@@ -1313,7 +1313,7 @@ public class MiCasa : Store
private SecretStore GetMiCasaStore()
{
if (m_store == null)
m_store = SecretStore.getInstance();
m_store = SecretStore.GetInstance();
return m_store;
}
@@ -1333,9 +1333,9 @@ public class MiCasa : Store
if (sNewKeyValue != null)
{
SecretStore ss = GetMiCasaStore();
Secret secret = ss.getSecret(labelLinkSecretID.Text);
secret.setKeyValuePair(labelLinkKeyID.Text, sNewKeyValue);
ss.setSecret(0, secret, Secret.SS_CREDSET);
Secret secret = ss.GetSecret(labelLinkSecretID.Text);
secret.SetKeyValuePair(labelLinkKeyID.Text, sNewKeyValue);
ss.SetSecret(0, secret, Secret.SS_CREDSET);
sNewKeyValue = null;
}
}
@@ -1429,8 +1429,8 @@ public class MiCasa : Store
{
// read value from store
SecretStore ss = GetMiCasaStore();
Secret secret = ss.getSecret(entrySecretID.Text);
value = secret.getKeyValue(selected);
Secret secret = ss.GetSecret(entrySecretID.Text);
value = secret.GetKeyValue(selected);
// strip of header data
byte[] baValue = System.Text.Encoding.ASCII.GetBytes(value);

View File

@@ -56,8 +56,8 @@ namespace Novell.CASA.GUI
applybuttonPersistent.Sensitive = false;
// load store
SecretStore ss = SecretStore.getInstance();
StringCollection sc = ss.enumerateSecretIDs();
SecretStore ss = SecretStore.GetInstance();
StringCollection sc = ss.EnumerateSecretIDs();
StringEnumerator senum = sc.GetEnumerator();
// load policy