make the signature an nsIFileSpec for right now

git-svn-id: svn://10.0.0.236/trunk@47936 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
alecf%netscape.com
1999-09-17 06:43:27 +00:00
parent e6670b60d3
commit 52d40f2fe6
2 changed files with 36 additions and 2 deletions

View File

@@ -18,6 +18,7 @@
#include "nsISupports.idl"
#include "nsIMsgSignature.idl"
#include "nsIFileSpec.idl"
#include "nsIMsgVCard.idl"
/*
@@ -63,7 +64,9 @@ interface nsIMsgIdentity : nsISupports {
attribute boolean attachVCard;
/* the current signature */
attribute nsIMsgSignature signature;
attribute nsIFileSpec signature;
/* after PR1, let's make this a real object */
/* attribute nsIMsgSignature signature; */
/* the current vcard */
attribute nsIMsgVCard vCard;

View File

@@ -319,7 +319,38 @@ nsMsgIdentity::ToString(PRUnichar **aResult)
/* Identity attribute accessors */
// XXX - these are a COM objects, use NS_ADDREF
NS_IMPL_GETSET(nsMsgIdentity, Signature, nsIMsgSignature*, m_signature);
//NS_IMPL_GETSET(nsMsgIdentity, Signature, nsIMsgSignature*, m_signature);
NS_IMETHODIMP
nsMsgIdentity::GetSignature(nsIFileSpec **sig) {
nsresult rv = getPrefService();
if (NS_FAILED(rv)) return rv;
char *prefName = getPrefName(m_identityKey, "sig_file");
return m_prefs->GetFilePref(prefName, sig);
}
NS_IMETHODIMP
nsMsgIdentity::SetSignature(nsIFileSpec *sig)
{
nsresult rv = getPrefService();
if (NS_FAILED(rv)) return rv;
rv = NS_OK;
char *prefName = getPrefName(m_identityKey, "sig_file");
if (sig)
rv = m_prefs->SetFilePref(NS_CONST_CAST(const char*,prefName), sig,
PR_FALSE);
/*
else
m_prefs->ClearFilePref(prefName);
*/
PR_Free(prefName);
return rv;
return NS_OK;
}
NS_IMPL_GETSET(nsMsgIdentity, VCard, nsIMsgVCard*, m_vCard);
NS_IMPL_GETTER_STR(nsMsgIdentity::GetKey, m_identityKey);