Compare commits
15 Commits
linkclickf
...
alecf_modu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
639f4e8d86 | ||
|
|
1796b42d7d | ||
|
|
7bfaa8ffa0 | ||
|
|
d364dabc06 | ||
|
|
b71cf9b55d | ||
|
|
35b53ff925 | ||
|
|
b6e49afc62 | ||
|
|
eb1eb295e6 | ||
|
|
11a676f105 | ||
|
|
4a927a0ef3 | ||
|
|
f23957990f | ||
|
|
c5dbbcd088 | ||
|
|
2ac3dfbb5a | ||
|
|
45aff89642 | ||
|
|
20d06560f4 |
@@ -1,42 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = necko
|
||||
LIBRARY_NAME = necko_datetime
|
||||
SHORT_LIBNAME = neckodtm
|
||||
IS_COMPONENT = 1
|
||||
|
||||
CPPSRCS = \
|
||||
nsDateTimeHandler.cpp \
|
||||
nsDateTimeChannel.cpp \
|
||||
nsDateTimeModule.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
@@ -1,431 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
// datetime implementation
|
||||
|
||||
#include "nsDateTimeChannel.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsILoadGroup.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsISocketTransportService.h"
|
||||
|
||||
static NS_DEFINE_CID(kSocketTransportServiceCID, NS_SOCKETTRANSPORTSERVICE_CID);
|
||||
|
||||
// nsDateTimeChannel methods
|
||||
nsDateTimeChannel::nsDateTimeChannel() {
|
||||
NS_INIT_REFCNT();
|
||||
mContentLength = -1;
|
||||
mPort = -1;
|
||||
}
|
||||
|
||||
nsDateTimeChannel::~nsDateTimeChannel() {
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS4(nsDateTimeChannel, nsIChannel, nsIRequest, nsIStreamListener, nsIStreamObserver)
|
||||
|
||||
nsresult
|
||||
nsDateTimeChannel::Init(nsIURI* uri)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
NS_ASSERTION(uri, "no uri");
|
||||
|
||||
mUrl = uri;
|
||||
|
||||
rv = mUrl->GetPort(&mPort);
|
||||
if (NS_FAILED(rv) || mPort < 1)
|
||||
mPort = DATETIME_PORT;
|
||||
|
||||
rv = mUrl->GetPath(getter_Copies(mHost));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (!*(const char *)mHost) return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD
|
||||
nsDateTimeChannel::Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult)
|
||||
{
|
||||
nsDateTimeChannel* dc = new nsDateTimeChannel();
|
||||
if (dc == nsnull)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(dc);
|
||||
nsresult rv = dc->QueryInterface(aIID, aResult);
|
||||
NS_RELEASE(dc);
|
||||
return rv;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsIRequest methods:
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::IsPending(PRBool *result)
|
||||
{
|
||||
NS_NOTREACHED("nsDateTimeChannel::IsPending");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::GetStatus(nsresult *status)
|
||||
{
|
||||
*status = NS_OK;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::Cancel(nsresult status)
|
||||
{
|
||||
NS_NOTREACHED("nsDateTimeChannel::Cancel");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::Suspend(void)
|
||||
{
|
||||
NS_NOTREACHED("nsDateTimeChannel::Suspend");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::Resume(void)
|
||||
{
|
||||
NS_NOTREACHED("nsDateTimeChannel::Resume");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsIChannel methods:
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::GetOriginalURI(nsIURI* *aURI)
|
||||
{
|
||||
*aURI = mOriginalURI ? mOriginalURI : mUrl;
|
||||
NS_ADDREF(*aURI);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::SetOriginalURI(nsIURI* aURI)
|
||||
{
|
||||
mOriginalURI = aURI;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::GetURI(nsIURI* *aURI)
|
||||
{
|
||||
*aURI = mUrl;
|
||||
NS_IF_ADDREF(*aURI);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::SetURI(nsIURI* aURI)
|
||||
{
|
||||
mUrl = aURI;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::OpenInputStream(nsIInputStream **_retval)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
NS_WITH_SERVICE(nsISocketTransportService, socketService, kSocketTransportServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
rv = socketService->CreateTransport(mHost, mPort, mHost, 32, 32, getter_AddRefs(channel));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = channel->SetNotificationCallbacks(mCallbacks);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
return channel->OpenInputStream(_retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::OpenOutputStream(nsIOutputStream **_retval)
|
||||
{
|
||||
NS_NOTREACHED("nsDateTimeChannel::OpenOutputStream");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::AsyncOpen(nsIStreamObserver *observer, nsISupports* ctxt)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
NS_WITH_SERVICE(nsISocketTransportService, socketService, kSocketTransportServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
rv = socketService->CreateTransport(mHost, mPort, mHost, 32, 32, getter_AddRefs(channel));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = channel->SetNotificationCallbacks(mCallbacks);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
return channel->AsyncOpen(observer, ctxt);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::AsyncRead(nsIStreamListener *aListener,
|
||||
nsISupports *ctxt)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
NS_WITH_SERVICE(nsISocketTransportService, socketService, kSocketTransportServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
rv = socketService->CreateTransport(mHost, mPort, mHost, 32, 32, getter_AddRefs(channel));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = channel->SetNotificationCallbacks(mCallbacks);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
mListener = aListener;
|
||||
|
||||
return channel->AsyncRead(this, ctxt);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::AsyncWrite(nsIInputStream *fromStream,
|
||||
nsIStreamObserver *observer,
|
||||
nsISupports *ctxt)
|
||||
{
|
||||
NS_NOTREACHED("nsDateTimeChannel::AsyncWrite");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::GetLoadAttributes(PRUint32 *aLoadAttributes)
|
||||
{
|
||||
*aLoadAttributes = mLoadAttributes;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::SetLoadAttributes(PRUint32 aLoadAttributes)
|
||||
{
|
||||
mLoadAttributes = aLoadAttributes;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#define DATETIME_TYPE "text/plain"
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::GetContentType(char* *aContentType) {
|
||||
if (!aContentType) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
*aContentType = nsCRT::strdup(DATETIME_TYPE);
|
||||
if (!*aContentType) return NS_ERROR_OUT_OF_MEMORY;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::SetContentType(const char *aContentType)
|
||||
{
|
||||
//It doesn't make sense to set the content-type on this type
|
||||
// of channel...
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::GetContentLength(PRInt32 *aContentLength)
|
||||
{
|
||||
*aContentLength = mContentLength;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::SetContentLength(PRInt32 aContentLength)
|
||||
{
|
||||
NS_NOTREACHED("nsDateTimeChannel::SetContentLength");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::GetTransferOffset(PRUint32 *aTransferOffset)
|
||||
{
|
||||
NS_NOTREACHED("nsDateTimeChannel::GetTransferOffset");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::SetTransferOffset(PRUint32 aTransferOffset)
|
||||
{
|
||||
NS_NOTREACHED("nsDateTimeChannel::SetTransferOffset");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::GetTransferCount(PRInt32 *aTransferCount)
|
||||
{
|
||||
NS_NOTREACHED("nsDateTimeChannel::GetTransferCount");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::SetTransferCount(PRInt32 aTransferCount)
|
||||
{
|
||||
NS_NOTREACHED("nsDateTimeChannel::SetTransferCount");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::GetBufferSegmentSize(PRUint32 *aBufferSegmentSize)
|
||||
{
|
||||
NS_NOTREACHED("nsDateTimeChannel::GetBufferSegmentSize");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::SetBufferSegmentSize(PRUint32 aBufferSegmentSize)
|
||||
{
|
||||
NS_NOTREACHED("nsDateTimeChannel::SetBufferSegmentSize");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::GetBufferMaxSize(PRUint32 *aBufferMaxSize)
|
||||
{
|
||||
NS_NOTREACHED("nsDateTimeChannel::GetBufferMaxSize");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::SetBufferMaxSize(PRUint32 aBufferMaxSize)
|
||||
{
|
||||
NS_NOTREACHED("nsDateTimeChannel::SetBufferMaxSize");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::GetShouldCache(PRBool *aShouldCache)
|
||||
{
|
||||
*aShouldCache = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::GetPipeliningAllowed(PRBool *aPipeliningAllowed)
|
||||
{
|
||||
*aPipeliningAllowed = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::SetPipeliningAllowed(PRBool aPipeliningAllowed)
|
||||
{
|
||||
NS_NOTREACHED("SetPipeliningAllowed");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::GetLoadGroup(nsILoadGroup* *aLoadGroup)
|
||||
{
|
||||
*aLoadGroup = mLoadGroup;
|
||||
NS_IF_ADDREF(*aLoadGroup);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::SetLoadGroup(nsILoadGroup* aLoadGroup)
|
||||
{
|
||||
if (mLoadGroup) // if we already had a load group remove ourselves...
|
||||
(void)mLoadGroup->RemoveChannel(this, nsnull, nsnull, nsnull);
|
||||
|
||||
mLoadGroup = aLoadGroup;
|
||||
if (mLoadGroup) {
|
||||
return mLoadGroup->AddChannel(this, nsnull);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::GetOwner(nsISupports* *aOwner)
|
||||
{
|
||||
*aOwner = mOwner.get();
|
||||
NS_IF_ADDREF(*aOwner);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::SetOwner(nsISupports* aOwner)
|
||||
{
|
||||
mOwner = aOwner;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
|
||||
{
|
||||
*aNotificationCallbacks = mCallbacks.get();
|
||||
NS_IF_ADDREF(*aNotificationCallbacks);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
|
||||
{
|
||||
mCallbacks = aNotificationCallbacks;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::GetSecurityInfo(nsISupports * *aSecurityInfo)
|
||||
{
|
||||
*aSecurityInfo = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// nsIStreamObserver methods
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::OnStartRequest(nsIChannel *aChannel, nsISupports *aContext) {
|
||||
return mListener->OnStartRequest(this, aContext);
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::OnStopRequest(nsIChannel* aChannel, nsISupports* aContext,
|
||||
nsresult aStatus, const PRUnichar* aMsg) {
|
||||
if (mLoadGroup) {
|
||||
nsresult rv = mLoadGroup->RemoveChannel(this, nsnull, aStatus, aMsg);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
return mListener->OnStopRequest(this, aContext, aStatus, aMsg);
|
||||
}
|
||||
|
||||
|
||||
// nsIStreamListener method
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeChannel::OnDataAvailable(nsIChannel* aChannel, nsISupports* aContext,
|
||||
nsIInputStream *aInputStream, PRUint32 aSourceOffset,
|
||||
PRUint32 aLength) {
|
||||
mContentLength = aLength;
|
||||
return mListener->OnDataAvailable(this, aContext, aInputStream, aSourceOffset, aLength);
|
||||
}
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
// A datetime channel retrieves date time information from
|
||||
// RFC 867 compliant datetime servers. The date/time returned
|
||||
// to the caller is of MIME type "text/plain".
|
||||
|
||||
#ifndef nsDateTimeChannel_h___
|
||||
#define nsDateTimeChannel_h___
|
||||
|
||||
#include "nsString.h"
|
||||
#include "nsILoadGroup.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsDateTimeHandler.h"
|
||||
#include "nsIStreamListener.h"
|
||||
|
||||
|
||||
class nsDateTimeChannel : public nsIChannel, public nsIStreamListener {
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIREQUEST
|
||||
NS_DECL_NSICHANNEL
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsDateTimeChannel methods:
|
||||
nsDateTimeChannel();
|
||||
virtual ~nsDateTimeChannel();
|
||||
|
||||
// Define a Create method to be used with a factory:
|
||||
static NS_METHOD
|
||||
Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult);
|
||||
|
||||
nsresult Init(nsIURI* uri);
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
||||
nsCOMPtr<nsIURI> mOriginalURI;
|
||||
nsCOMPtr<nsIURI> mUrl;
|
||||
nsCOMPtr<nsIStreamListener> mListener;
|
||||
PRUint32 mLoadAttributes;
|
||||
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
||||
nsCString mContentType;
|
||||
PRInt32 mContentLength;
|
||||
nsCOMPtr<nsISupports> mOwner;
|
||||
PRUint32 mBufferSegmentSize;
|
||||
PRUint32 mBufferMaxSize;
|
||||
|
||||
PRInt32 mPort;
|
||||
nsXPIDLCString mHost;
|
||||
};
|
||||
|
||||
#endif /* nsDateTimeChannel_h___ */
|
||||
@@ -1,116 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "nspr.h"
|
||||
#include "nsDateTimeChannel.h"
|
||||
#include "nsDateTimeHandler.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIProgressEventSink.h"
|
||||
|
||||
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsDateTimeHandler::nsDateTimeHandler() {
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
nsDateTimeHandler::~nsDateTimeHandler() {
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsDateTimeHandler, NS_GET_IID(nsIProtocolHandler));
|
||||
|
||||
NS_METHOD
|
||||
nsDateTimeHandler::Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult) {
|
||||
|
||||
nsDateTimeHandler* ph = new nsDateTimeHandler();
|
||||
if (ph == nsnull)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(ph);
|
||||
nsresult rv = ph->QueryInterface(aIID, aResult);
|
||||
NS_RELEASE(ph);
|
||||
return rv;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsIProtocolHandler methods:
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeHandler::GetScheme(char* *result) {
|
||||
*result = nsCRT::strdup("datetime");
|
||||
if (!*result) return NS_ERROR_OUT_OF_MEMORY;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeHandler::GetDefaultPort(PRInt32 *result) {
|
||||
*result = DATETIME_PORT;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
|
||||
nsIURI **result) {
|
||||
nsresult rv;
|
||||
|
||||
// no concept of a relative datetime url
|
||||
NS_ASSERTION(!aBaseURI, "base url passed into datetime protocol handler");
|
||||
|
||||
nsIURI* url;
|
||||
rv = nsComponentManager::CreateInstance(kSimpleURICID, nsnull,
|
||||
NS_GET_IID(nsIURI),
|
||||
(void**)&url);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
rv = url->SetSpec((char*)aSpec);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_RELEASE(url);
|
||||
return rv;
|
||||
}
|
||||
|
||||
*result = url;
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDateTimeHandler::NewChannel(nsIURI* url, nsIChannel* *result)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
nsDateTimeChannel* channel;
|
||||
rv = nsDateTimeChannel::Create(nsnull, NS_GET_IID(nsIChannel), (void**)&channel);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = channel->Init(url);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_RELEASE(channel);
|
||||
return rv;
|
||||
}
|
||||
|
||||
*result = channel;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1,51 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
// The datetime protocol handler creates "datetime" URIs of the form
|
||||
// "datetime:RFC867Server".
|
||||
|
||||
#ifndef nsDateTimeHandler_h___
|
||||
#define nsDateTimeHandler_h___
|
||||
|
||||
#include "nsIProtocolHandler.h"
|
||||
|
||||
#define DATETIME_PORT 13
|
||||
|
||||
// {AA27D2A0-B71B-11d3-A1A0-0050041CAF44}
|
||||
#define NS_DATETIMEHANDLER_CID \
|
||||
{ 0xaa27d2a0, 0xb71b, 0x11d3, { 0xa1, 0xa0, 0x0, 0x50, 0x4, 0x1c, 0xaf, 0x44 } }
|
||||
|
||||
class nsDateTimeHandler : public nsIProtocolHandler
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPROTOCOLHANDLER
|
||||
|
||||
// nsDateTimeHandler methods:
|
||||
nsDateTimeHandler();
|
||||
virtual ~nsDateTimeHandler();
|
||||
|
||||
// Define a Create method to be used with a factory:
|
||||
static NS_METHOD Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult);
|
||||
};
|
||||
|
||||
#endif /* nsDateTimeHandler_h___ */
|
||||
@@ -1,34 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsDateTimeHandler.h"
|
||||
|
||||
static nsModuleComponentInfo gResComponents[] = {
|
||||
{ "The DateTime Protocol Handler",
|
||||
NS_DATETIMEHANDLER_CID,
|
||||
NS_NETWORK_PROTOCOL_PROGID_PREFIX "datetime",
|
||||
nsDateTimeHandler::Create
|
||||
}
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE("datetime", gResComponents)
|
||||
@@ -1,41 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = necko
|
||||
LIBRARY_NAME = necko_finger
|
||||
IS_COMPONENT = 1
|
||||
|
||||
CPPSRCS = \
|
||||
nsFingerHandler.cpp \
|
||||
nsFingerChannel.cpp \
|
||||
nsFingerModule.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
@@ -1,517 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
// finger implementation
|
||||
|
||||
#include "nsFingerChannel.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsILoadGroup.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsISocketTransportService.h"
|
||||
#include "nsIStringStream.h"
|
||||
#include "nsMimeTypes.h"
|
||||
|
||||
static NS_DEFINE_CID(kSocketTransportServiceCID, NS_SOCKETTRANSPORTSERVICE_CID);
|
||||
|
||||
#define BUFFER_SEG_SIZE (4*1024)
|
||||
#define BUFFER_MAX_SIZE (64*1024)
|
||||
|
||||
// nsFingerChannel methods
|
||||
nsFingerChannel::nsFingerChannel()
|
||||
: mContentLength(-1),
|
||||
mActAsObserver(PR_TRUE),
|
||||
mPort(-1),
|
||||
mStatus(NS_OK)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
nsFingerChannel::~nsFingerChannel() {
|
||||
}
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS4(nsFingerChannel, nsIChannel, nsIRequest,
|
||||
nsIStreamListener, nsIStreamObserver)
|
||||
|
||||
nsresult
|
||||
nsFingerChannel::Init(nsIURI* uri)
|
||||
{
|
||||
nsresult rv;
|
||||
nsXPIDLCString autoBuffer;
|
||||
|
||||
NS_ASSERTION(uri, "no uri");
|
||||
|
||||
mUrl = uri;
|
||||
|
||||
// For security reasons, we do not allow the user to specify a
|
||||
// non-default port for finger: URL's.
|
||||
|
||||
mPort = FINGER_PORT;
|
||||
|
||||
rv = mUrl->GetPath(getter_Copies(autoBuffer)); // autoBuffer = user@host
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCString cString(autoBuffer);
|
||||
nsCString tempBuf;
|
||||
|
||||
PRUint32 i;
|
||||
|
||||
// Now parse out the user and host
|
||||
for (i=0; cString[i] != '\0'; i++) {
|
||||
if (cString[i] == '@') {
|
||||
cString.Left(tempBuf, i);
|
||||
mUser = tempBuf;
|
||||
cString.Right(tempBuf, cString.Length() - i - 1);
|
||||
mHost = tempBuf;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Catch the case of just the host being given
|
||||
|
||||
if (cString[i] == '\0') {
|
||||
mHost = cString;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_bryner
|
||||
printf("Status:mUser = %s, mHost = %s\n", (const char*)mUser,
|
||||
(const char*)mHost);
|
||||
#endif
|
||||
if (!*(const char *)mHost) return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD
|
||||
nsFingerChannel::Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult)
|
||||
{
|
||||
nsFingerChannel* fc = new nsFingerChannel();
|
||||
if (fc == nsnull)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(fc);
|
||||
nsresult rv = fc->QueryInterface(aIID, aResult);
|
||||
NS_RELEASE(fc);
|
||||
return rv;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsIRequest methods:
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::IsPending(PRBool *result)
|
||||
{
|
||||
NS_NOTREACHED("nsFingerChannel::IsPending");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::GetStatus(nsresult *status)
|
||||
{
|
||||
*status = mStatus;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::Cancel(nsresult status)
|
||||
{
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
mStatus = status;
|
||||
if (mTransport) {
|
||||
rv = mTransport->Cancel(status);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::Suspend(void)
|
||||
{
|
||||
NS_NOTREACHED("nsFingerChannel::Suspend");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::Resume(void)
|
||||
{
|
||||
NS_NOTREACHED("nsFingerChannel::Resume");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsIChannel methods:
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::GetOriginalURI(nsIURI* *aURI)
|
||||
{
|
||||
*aURI = mOriginalURI ? mOriginalURI : mUrl;
|
||||
NS_ADDREF(*aURI);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::SetOriginalURI(nsIURI* aURI)
|
||||
{
|
||||
mOriginalURI = aURI;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::GetURI(nsIURI* *aURI)
|
||||
{
|
||||
*aURI = mUrl;
|
||||
NS_IF_ADDREF(*aURI);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::SetURI(nsIURI* aURI)
|
||||
{
|
||||
mUrl = aURI;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::OpenInputStream(nsIInputStream **_retval)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
NS_WITH_SERVICE(nsISocketTransportService, socketService, kSocketTransportServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
rv = socketService->CreateTransport(mHost, mPort, mHost, BUFFER_SEG_SIZE,
|
||||
BUFFER_MAX_SIZE, getter_AddRefs(channel));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = channel->SetNotificationCallbacks(mCallbacks);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
return channel->OpenInputStream(_retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::OpenOutputStream(nsIOutputStream **_retval)
|
||||
{
|
||||
NS_NOTREACHED("nsFingerChannel::OpenOutputStream");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::AsyncOpen(nsIStreamObserver *observer, nsISupports* ctxt)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::AsyncRead(nsIStreamListener *aListener, nsISupports *ctxt)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
NS_WITH_SERVICE(nsISocketTransportService, socketService, kSocketTransportServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
rv = socketService->CreateTransport(mHost, mPort, mHost, BUFFER_SEG_SIZE,
|
||||
BUFFER_MAX_SIZE, getter_AddRefs(channel));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = channel->SetNotificationCallbacks(mCallbacks);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
mListener = aListener;
|
||||
mResponseContext = ctxt;
|
||||
mTransport = channel;
|
||||
|
||||
return SendRequest(channel);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::AsyncWrite(nsIInputStream *fromStream,
|
||||
nsIStreamObserver *observer,
|
||||
nsISupports *ctxt)
|
||||
{
|
||||
NS_NOTREACHED("nsFingerChannel::AsyncWrite");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::GetLoadAttributes(PRUint32 *aLoadAttributes)
|
||||
{
|
||||
*aLoadAttributes = mLoadAttributes;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::SetLoadAttributes(PRUint32 aLoadAttributes)
|
||||
{
|
||||
mLoadAttributes = aLoadAttributes;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#define FINGER_TYPE TEXT_PLAIN
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::GetContentType(char* *aContentType) {
|
||||
if (!aContentType) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
*aContentType = nsCRT::strdup(FINGER_TYPE);
|
||||
if (!*aContentType) return NS_ERROR_OUT_OF_MEMORY;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::SetContentType(const char *aContentType)
|
||||
{
|
||||
//It doesn't make sense to set the content-type on this type
|
||||
// of channel...
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::GetContentLength(PRInt32 *aContentLength)
|
||||
{
|
||||
*aContentLength = mContentLength;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::SetContentLength(PRInt32 aContentLength)
|
||||
{
|
||||
NS_NOTREACHED("nsFingerChannel::SetContentLength");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::GetTransferOffset(PRUint32 *aTransferOffset)
|
||||
{
|
||||
NS_NOTREACHED("nsFingerChannel::GetTransferOffset");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::SetTransferOffset(PRUint32 aTransferOffset)
|
||||
{
|
||||
NS_NOTREACHED("nsFingerChannel::SetTransferOffset");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::GetTransferCount(PRInt32 *aTransferCount)
|
||||
{
|
||||
NS_NOTREACHED("nsFingerChannel::GetTransferCount");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::SetTransferCount(PRInt32 aTransferCount)
|
||||
{
|
||||
NS_NOTREACHED("nsFingerChannel::SetTransferCount");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::GetBufferSegmentSize(PRUint32 *aBufferSegmentSize)
|
||||
{
|
||||
NS_NOTREACHED("nsFingerChannel::GetBufferSegmentSize");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::SetBufferSegmentSize(PRUint32 aBufferSegmentSize)
|
||||
{
|
||||
NS_NOTREACHED("nsFingerChannel::SetBufferSegmentSize");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::GetBufferMaxSize(PRUint32 *aBufferMaxSize)
|
||||
{
|
||||
NS_NOTREACHED("nsFingerChannel::GetBufferMaxSize");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::SetBufferMaxSize(PRUint32 aBufferMaxSize)
|
||||
{
|
||||
NS_NOTREACHED("nsFingerChannel::SetBufferMaxSize");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::GetShouldCache(PRBool *aShouldCache)
|
||||
{
|
||||
*aShouldCache = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::GetPipeliningAllowed(PRBool *aPipeliningAllowed)
|
||||
{
|
||||
*aPipeliningAllowed = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::SetPipeliningAllowed(PRBool aPipeliningAllowed)
|
||||
{
|
||||
NS_NOTREACHED("SetPipeliningAllowed");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::GetLoadGroup(nsILoadGroup* *aLoadGroup)
|
||||
{
|
||||
*aLoadGroup = mLoadGroup;
|
||||
NS_IF_ADDREF(*aLoadGroup);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::SetLoadGroup(nsILoadGroup* aLoadGroup)
|
||||
{
|
||||
mLoadGroup = aLoadGroup;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::GetOwner(nsISupports* *aOwner)
|
||||
{
|
||||
*aOwner = mOwner.get();
|
||||
NS_IF_ADDREF(*aOwner);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::SetOwner(nsISupports* aOwner)
|
||||
{
|
||||
mOwner = aOwner;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::GetNotificationCallbacks(nsIInterfaceRequestor* *aNotificationCallbacks)
|
||||
{
|
||||
*aNotificationCallbacks = mCallbacks.get();
|
||||
NS_IF_ADDREF(*aNotificationCallbacks);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::SetNotificationCallbacks(nsIInterfaceRequestor* aNotificationCallbacks)
|
||||
{
|
||||
mCallbacks = aNotificationCallbacks;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::GetSecurityInfo(nsISupports * *aSecurityInfo)
|
||||
{
|
||||
*aSecurityInfo = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// nsIStreamObserver methods
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::OnStartRequest(nsIChannel *aChannel, nsISupports *aContext) {
|
||||
if (!mActAsObserver) {
|
||||
// acting as a listener
|
||||
return mListener->OnStartRequest(this, aContext);
|
||||
} else {
|
||||
// we don't want to pass our AsyncWrite's OnStart through
|
||||
// we just ignore this
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::OnStopRequest(nsIChannel* aChannel, nsISupports* aContext,
|
||||
nsresult aStatus, const PRUnichar* aMsg) {
|
||||
#ifdef DEBUG_bryner
|
||||
printf("nsFingerChannel::OnStopRequest, mActAsObserver=%d\n",
|
||||
mActAsObserver);
|
||||
printf(" aChannel = %p\n", aChannel);
|
||||
#endif
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
if (NS_FAILED(aStatus) || !mActAsObserver) {
|
||||
if (mLoadGroup) {
|
||||
rv = mLoadGroup->RemoveChannel(this, nsnull, aStatus, aMsg);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
rv = mListener->OnStopRequest(this, aContext, aStatus, aMsg);
|
||||
mTransport = 0;
|
||||
return rv;
|
||||
} else {
|
||||
// at this point we know the request has been sent.
|
||||
// we're no longer acting as an observer.
|
||||
|
||||
mActAsObserver = PR_FALSE;
|
||||
return aChannel->AsyncRead(this, mResponseContext);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// nsIStreamListener method
|
||||
NS_IMETHODIMP
|
||||
nsFingerChannel::OnDataAvailable(nsIChannel* aChannel, nsISupports* aContext,
|
||||
nsIInputStream *aInputStream, PRUint32 aSourceOffset,
|
||||
PRUint32 aLength) {
|
||||
mContentLength = aLength;
|
||||
return mListener->OnDataAvailable(this, aContext, aInputStream, aSourceOffset, aLength);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsFingerChannel::SendRequest(nsIChannel* aChannel) {
|
||||
// The text to send should already be in mUser
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsISupports> result;
|
||||
nsCOMPtr<nsIInputStream> charstream;
|
||||
nsCString requestBuffer(mUser);
|
||||
|
||||
if (mLoadGroup) {
|
||||
mLoadGroup->AddChannel(this, nsnull);
|
||||
}
|
||||
|
||||
requestBuffer.Append(CRLF);
|
||||
|
||||
mRequest = requestBuffer.ToNewCString();
|
||||
|
||||
rv = NS_NewCharInputStream(getter_AddRefs(result), mRequest);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
charstream = do_QueryInterface(result, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
#ifdef DEBUG_bryner
|
||||
printf("Sending: %s\n", requestBuffer.GetBuffer());
|
||||
#endif
|
||||
|
||||
rv = aChannel->SetTransferCount(requestBuffer.Length());
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
rv = aChannel->AsyncWrite(charstream, this, 0);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#ifndef nsFingerChannel_h___
|
||||
#define nsFingerChannel_h___
|
||||
|
||||
#include "nsString.h"
|
||||
#include "nsILoadGroup.h"
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsFingerHandler.h"
|
||||
#include "nsIStreamListener.h"
|
||||
|
||||
|
||||
class nsFingerChannel : public nsIChannel, public nsIStreamListener {
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIREQUEST
|
||||
NS_DECL_NSICHANNEL
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
NS_DECL_NSISTREAMOBSERVER
|
||||
|
||||
// nsFingerChannel methods:
|
||||
nsFingerChannel();
|
||||
virtual ~nsFingerChannel();
|
||||
|
||||
// Define a Create method to be used with a factory:
|
||||
static NS_METHOD
|
||||
Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult);
|
||||
|
||||
nsresult Init(nsIURI* uri);
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
||||
nsCOMPtr<nsIURI> mOriginalURI;
|
||||
nsCOMPtr<nsIURI> mUrl;
|
||||
nsCOMPtr<nsIStreamListener> mListener;
|
||||
PRUint32 mLoadAttributes;
|
||||
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
||||
nsCString mContentType;
|
||||
PRInt32 mContentLength;
|
||||
nsCOMPtr<nsISupports> mOwner;
|
||||
PRUint32 mBufferSegmentSize;
|
||||
PRUint32 mBufferMaxSize;
|
||||
PRBool mActAsObserver;
|
||||
|
||||
PRInt32 mPort;
|
||||
nsXPIDLCString mHost;
|
||||
nsXPIDLCString mUser;
|
||||
|
||||
nsXPIDLCString mRequest;
|
||||
|
||||
nsCOMPtr<nsISupports> mResponseContext;
|
||||
nsCOMPtr<nsIChannel> mTransport;
|
||||
nsresult mStatus;
|
||||
|
||||
protected:
|
||||
nsresult SendRequest(nsIChannel* aChannel);
|
||||
};
|
||||
|
||||
#endif /* nsFingerChannel_h___ */
|
||||
@@ -1,116 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "nspr.h"
|
||||
#include "nsFingerChannel.h"
|
||||
#include "nsFingerHandler.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIProgressEventSink.h"
|
||||
|
||||
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsFingerHandler::nsFingerHandler() {
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
nsFingerHandler::~nsFingerHandler() {
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsFingerHandler, NS_GET_IID(nsIProtocolHandler));
|
||||
|
||||
NS_METHOD
|
||||
nsFingerHandler::Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult) {
|
||||
|
||||
nsFingerHandler* ph = new nsFingerHandler();
|
||||
if (ph == nsnull)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(ph);
|
||||
nsresult rv = ph->QueryInterface(aIID, aResult);
|
||||
NS_RELEASE(ph);
|
||||
return rv;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsIProtocolHandler methods:
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerHandler::GetScheme(char* *result) {
|
||||
*result = nsCRT::strdup("finger");
|
||||
if (!*result) return NS_ERROR_OUT_OF_MEMORY;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerHandler::GetDefaultPort(PRInt32 *result) {
|
||||
*result = FINGER_PORT;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerHandler::NewURI(const char *aSpec, nsIURI *aBaseURI,
|
||||
nsIURI **result) {
|
||||
nsresult rv;
|
||||
|
||||
// no concept of a relative finger url
|
||||
NS_ASSERTION(!aBaseURI, "base url passed into finger protocol handler");
|
||||
|
||||
nsIURI* url;
|
||||
rv = nsComponentManager::CreateInstance(kSimpleURICID, nsnull,
|
||||
NS_GET_IID(nsIURI),
|
||||
(void**)&url);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
rv = url->SetSpec((char*)aSpec);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_RELEASE(url);
|
||||
return rv;
|
||||
}
|
||||
|
||||
*result = url;
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFingerHandler::NewChannel(nsIURI* url, nsIChannel* *result)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
nsFingerChannel* channel;
|
||||
rv = nsFingerChannel::Create(nsnull, NS_GET_IID(nsIChannel), (void**)&channel);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = channel->Init(url);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_RELEASE(channel);
|
||||
return rv;
|
||||
}
|
||||
|
||||
*result = channel;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1,52 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
// The finger protocol handler creates "finger" URIs of the form
|
||||
// "finger:user@host" or "finger:host".
|
||||
|
||||
#ifndef nsFingerHandler_h___
|
||||
#define nsFingerHandler_h___
|
||||
|
||||
#include "nsIProtocolHandler.h"
|
||||
|
||||
#define FINGER_PORT 79
|
||||
|
||||
// {0x76d6d5d8-1dd2-11b2-b361-850ddf15ef07}
|
||||
#define NS_FINGERHANDLER_CID \
|
||||
{ 0x76d6d5d8, 0x1dd2, 0x11b2, \
|
||||
{0xb3, 0x61, 0x85, 0x0d, 0xdf, 0x15, 0xef, 0x07} }
|
||||
|
||||
class nsFingerHandler : public nsIProtocolHandler
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPROTOCOLHANDLER
|
||||
|
||||
// nsFingerHandler methods:
|
||||
nsFingerHandler();
|
||||
virtual ~nsFingerHandler();
|
||||
|
||||
// Define a Create method to be used with a factory:
|
||||
static NS_METHOD Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult);
|
||||
};
|
||||
|
||||
#endif /* nsFingerHandler_h___ */
|
||||
@@ -1,34 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsFingerHandler.h"
|
||||
|
||||
static nsModuleComponentInfo gResComponents[] = {
|
||||
{ "The Finger Protocol Handler",
|
||||
NS_FINGERHANDLER_CID,
|
||||
NS_NETWORK_PROTOCOL_PROGID_PREFIX "finger",
|
||||
nsFingerHandler::Create
|
||||
}
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE("finger", gResComponents)
|
||||
28
mozilla/mailnews/addrbook/Makefile.in
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = public src prefs build resources
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
17
mozilla/mailnews/addrbook/build/MANIFEST
Normal file
@@ -0,0 +1,17 @@
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
nsAbBaseCID.h
|
||||
@@ -1,4 +1,3 @@
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
@@ -18,31 +17,33 @@
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = nkcache
|
||||
MODULE = addrbook
|
||||
LIBRARY_NAME = addrbook
|
||||
IS_COMPONENT = 1
|
||||
|
||||
LIBRARY_NAME = nkmemcache_s
|
||||
CPPSRCS = nsAbFactory.cpp
|
||||
EXPORTS = nsAbBaseCID.h
|
||||
|
||||
REQUIRES = nspr dbm
|
||||
|
||||
EXPORTS=nsMemCacheCID.h \
|
||||
nsMemCache.h \
|
||||
SHARED_LIBRARY_LIBS = \
|
||||
$(DIST)/lib/libaddrbook_s.a \
|
||||
$(DIST)/lib/librdfutil_s.a \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
nsMemCache.cpp \
|
||||
nsMemCacheRecord.cpp \
|
||||
nsMemCacheChannel.cpp \
|
||||
$(NULL)
|
||||
|
||||
# we don't want the shared lib, but we want to force the creation of a
|
||||
# static lib.
|
||||
override NO_SHARED_LIB=1
|
||||
override NO_STATIC_LIB=
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(MKSHLIB_FORCE_ALL) \
|
||||
$(SHARED_LIBRARY_LIBS) \
|
||||
$(MKSHLIB_UNFORCE_ALL) \
|
||||
-L$(DIST)/bin \
|
||||
$(NSPR_LIBS) \
|
||||
-lxpcom \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
$(LIBRARY) $(SHARED_LIBRARY): $(SHARED_LIBRARY_LIBS) Makefile
|
||||
|
||||
49
mozilla/mailnews/addrbook/build/makefile.win
Normal file
@@ -0,0 +1,49 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=..\..\..
|
||||
MODULE=addrbook
|
||||
|
||||
################################################################################
|
||||
## exports
|
||||
|
||||
EXPORTS= \
|
||||
nsAbBaseCID.h \
|
||||
$(NULL)
|
||||
|
||||
################################################################################
|
||||
## library
|
||||
|
||||
LIBNAME = .\$(OBJDIR)\addrbook
|
||||
DLL = $(LIBNAME).dll
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\nsAbFactory.obj \
|
||||
$(NULL)
|
||||
|
||||
LLIBS= \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\addrbook_s.lib \
|
||||
$(LIBNSPR) \
|
||||
$(DIST)\lib\rdfutil_s.lib \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) $(LIBNAME).$(DLL_SUFFIX) $(DIST)\bin\components
|
||||
$(MAKE_INSTALL) $(LIBNAME).$(LIB_SUFFIX) $(DIST)\lib
|
||||
154
mozilla/mailnews/addrbook/build/nsAbBaseCID.h
Normal file
@@ -0,0 +1,154 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsAbBaseCID_h__
|
||||
#define nsAbBaseCID_h__
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsIFactory.h"
|
||||
#include "nsIComponentManager.h"
|
||||
|
||||
//
|
||||
// nsAddressBook
|
||||
//
|
||||
#define NS_ADDRESSBOOK_PROGID \
|
||||
"component://netscape/addressbook"
|
||||
|
||||
#define NS_ADDRESSBOOK_CID \
|
||||
{ /* {D60B84F2-2A8C-11d3-9E07-00A0C92B5F0D} */ \
|
||||
0xd60b84f2, 0x2a8c, 0x11d3, \
|
||||
{ 0x9e, 0x7, 0x0, 0xa0, 0xc9, 0x2b, 0x5f, 0xd } \
|
||||
}
|
||||
|
||||
//
|
||||
// nsAbDirectoryDataSource
|
||||
//
|
||||
#define NS_ABDIRECTORYDATASOURCE_PROGID \
|
||||
NS_RDF_DATASOURCE_PROGID_PREFIX "addressdirectory"
|
||||
|
||||
#define NS_ABDIRECTORYDATASOURCE_CID \
|
||||
{ /* 0A79186D-F754-11d2-A2DA-001083003D0C */ \
|
||||
0xa79186d, 0xf754, 0x11d2, \
|
||||
{0xa2, 0xda, 0x0, 0x10, 0x83, 0x0, 0x3d, 0xc} \
|
||||
}
|
||||
|
||||
//
|
||||
// nsAbDirectory
|
||||
//
|
||||
#define NS_ABDIRECTORY_PROGID \
|
||||
NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "abdirectory"
|
||||
|
||||
#define NS_ABDIRECTORY_CID \
|
||||
{ /* {6C21831D-FCC2-11d2-A2E2-001083003D0C}*/ \
|
||||
0x6c21831d, 0xfcc2, 0x11d2, \
|
||||
{0xa2, 0xe2, 0x0, 0x10, 0x83, 0x0, 0x3d, 0xc} \
|
||||
}
|
||||
|
||||
//
|
||||
// nsAbCardDataSource
|
||||
//
|
||||
#define NS_ABCARDDATASOURCE_PROGID \
|
||||
NS_RDF_DATASOURCE_PROGID_PREFIX "addresscard"
|
||||
|
||||
#define NS_ABCARDDATASOURCE_CID \
|
||||
{ /* 1920E486-0709-11d3-A2EC-001083003D0C */ \
|
||||
0x1920e486, 0x709, 0x11d3, \
|
||||
{0xa2, 0xec, 0x0, 0x10, 0x83, 0x0, 0x3d, 0xc} \
|
||||
}
|
||||
|
||||
//
|
||||
// nsAbCard
|
||||
//
|
||||
#define NS_ABCARD_PROGID \
|
||||
NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "abcard"
|
||||
|
||||
#define NS_ABCARD_CID \
|
||||
{ /* {1920E487-0709-11d3-A2EC-001083003D0C}*/ \
|
||||
0x1920e487, 0x709, 0x11d3, \
|
||||
{0xa2, 0xec, 0x0, 0x10, 0x83, 0x0, 0x3d, 0xc} \
|
||||
}
|
||||
|
||||
//
|
||||
// nsAddressBookDB
|
||||
//
|
||||
#define NS_ADDRDATABASE_PROGID \
|
||||
"component://netscape/addressbook/carddatabase"
|
||||
|
||||
#define NS_ADDRDATABASE_CID \
|
||||
{ /* 63187917-1D19-11d3-A302-001083003D0C */ \
|
||||
0x63187917, 0x1d19, 0x11d3, \
|
||||
{0xa3, 0x2, 0x0, 0x10, 0x83, 0x0, 0x3d, 0xc} \
|
||||
}
|
||||
|
||||
//
|
||||
// nsAbCardProperty
|
||||
//
|
||||
#define NS_ABCARDPROPERTY_PROGID \
|
||||
"component://netscape/addressbook/cardproperty"
|
||||
#define NS_ABCARDPROPERTY_CID \
|
||||
{ /* 2B722171-2CEA-11d3-9E0B-00A0C92B5F0D */ \
|
||||
0x2b722171, 0x2cea, 0x11d3, \
|
||||
{0x9e, 0xb, 0x0, 0xa0, 0xc9, 0x2b, 0x5f, 0xd} \
|
||||
}
|
||||
|
||||
//
|
||||
// nsAddrBookSession
|
||||
//
|
||||
#define NS_ADDRBOOKSESSION_PROGID \
|
||||
"component://netscape/addressbook/services/session"
|
||||
|
||||
#define NS_ADDRBOOKSESSION_CID \
|
||||
{ /* C5339442-303F-11d3-9E13-00A0C92B5F0D */ \
|
||||
0xc5339442, 0x303f, 0x11d3, \
|
||||
{0x9e, 0x13, 0x0, 0xa0, 0xc9, 0x2b, 0x5f, 0xd} \
|
||||
}
|
||||
|
||||
//
|
||||
// nsAbDirProperty
|
||||
//
|
||||
#define NS_ABDIRPROPERTY_PROGID \
|
||||
"component://netscape/addressbook/directoryproperty"
|
||||
#define NS_ABDIRPROPERTY_CID \
|
||||
{ /* 6FD8EC67-3965-11d3-A316-001083003D0C */ \
|
||||
0x6fd8ec67, 0x3965, 0x11d3, \
|
||||
{0xa3, 0x16, 0x0, 0x10, 0x83, 0x0, 0x3d, 0xc} \
|
||||
}
|
||||
|
||||
//
|
||||
// nsAbAutoCompleteSession
|
||||
//
|
||||
#define NS_ABAUTOCOMPLETESESSION_PROGID \
|
||||
"component://netscape/messenger/autocomplete&type=addrbook"
|
||||
#define NS_ABAUTOCOMPLETESESSION_CID \
|
||||
{ /* 138DE9BD-362B-11d3-988E-001083010E9B */ \
|
||||
0x138de9bd, 0x362b, 0x11d3, \
|
||||
{0x98, 0x8e, 0x0, 0x10, 0x83, 0x1, 0xe, 0x9b} \
|
||||
}
|
||||
|
||||
//
|
||||
// nsAbAddressCollecter
|
||||
//
|
||||
#define NS_ABADDRESSCOLLECTER_PROGID \
|
||||
"component://netscape/addressbook/services/addressCollecter"
|
||||
#define NS_ABADDRESSCOLLECTER_CID \
|
||||
{ /* fe04c8e6-501e-11d3-a527-0060b0fc04b7 */ \
|
||||
0xfe04c8e6, 0x501e, 0x11d3, \
|
||||
{0xa5, 0x27, 0x0, 0x60, 0xb0, 0xfc, 0x4, 0xb7} \
|
||||
}
|
||||
|
||||
#endif // nsAbBaseCID_h__
|
||||
83
mozilla/mailnews/addrbook/build/nsAbFactory.cpp
Normal file
@@ -0,0 +1,83 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998,1999 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsIFactory.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsIModule.h"
|
||||
|
||||
#include "nsAbBaseCID.h"
|
||||
#include "pratom.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "rdf.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
|
||||
/* Include all of the interfaces our factory can generate components for */
|
||||
|
||||
#include "nsDirectoryDataSource.h"
|
||||
#include "nsCardDataSource.h"
|
||||
#include "nsAbDirectory.h"
|
||||
#include "nsAbCard.h"
|
||||
#include "nsAddrDatabase.h"
|
||||
#include "nsAddressBook.h"
|
||||
#include "nsAddrBookSession.h"
|
||||
#include "nsAbDirProperty.h"
|
||||
#include "nsAbAutoCompleteSession.h"
|
||||
#include "nsAbAddressCollecter.h"
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAddressBook)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAbDirectoryDataSource,Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAbDirectory)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAbCardDataSource,Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAbCard)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAbCardProperty)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAddrDatabase)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAbDirProperty)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAddrBookSession)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAbAutoCompleteSession)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAbAddressCollecter)
|
||||
|
||||
struct components_t {
|
||||
nsCID cid;
|
||||
nsIGenericFactory::ConstructorProcPtr constructor;
|
||||
const char *progid;
|
||||
const char *description;
|
||||
};
|
||||
|
||||
static components_t components[] =
|
||||
{
|
||||
{ NS_ADDRESSBOOK_CID, &nsAddressBookConstructor, NS_ADDRESSBOOK_PROGID, },
|
||||
{ NS_ABDIRECTORYDATASOURCE_CID, &nsAbDirectoryDataSourceConstructor, NS_ABDIRECTORYDATASOURCE_PROGID, },
|
||||
{ NS_ABDIRECTORY_CID, &nsAbDirectoryConstructor, NS_ABDIRECTORY_PROGID, },
|
||||
{ NS_ABCARDDATASOURCE_CID, &nsAbCardDataSourceConstructor, NS_ABCARDDATASOURCE_PROGID, },
|
||||
{ NS_ABCARD_CID, &nsAbCardConstructor, NS_ABCARD_PROGID, },
|
||||
{ NS_ADDRDATABASE_CID, &nsAddrDatabaseConstructor, NS_ADDRDATABASE_PROGID, },
|
||||
{ NS_ABCARDPROPERTY_CID, &nsAbCardPropertyConstructor, NS_ABCARDPROPERTY_PROGID, },
|
||||
{ NS_ABDIRPROPERTY_CID, &nsAbDirPropertyConstructor, NS_ABDIRPROPERTY_PROGID, },
|
||||
{ NS_ADDRBOOKSESSION_CID, &nsAddrBookSessionConstructor, NS_ADDRBOOKSESSION_PROGID, },
|
||||
{ NS_ABAUTOCOMPLETESESSION_CID, &nsAbAutoCompleteSessionConstructor, NS_ABAUTOCOMPLETESESSION_PROGID, },
|
||||
{ NS_ABADDRESSCOLLECTER_CID, &nsAbAddressCollecterConstructor, NS_ABADDRESSCOLLECTER_PROGID, },
|
||||
|
||||
};
|
||||
|
||||
|
||||
NS_IMPL_MODULE(components)
|
||||
NS_IMPL_NSGETMODULE(nsModule)
|
||||
BIN
mozilla/mailnews/addrbook/macbuild/msgAddrbook.mcp
Normal file
BIN
mozilla/mailnews/addrbook/macbuild/msgAddrbookIDL.mcp
Normal file
21
mozilla/mailnews/addrbook/macbuild/msgAddrbookPrefix.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "MacPrefix.h"
|
||||
21
mozilla/mailnews/addrbook/macbuild/msgAddrbookPrefixDebug.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "MacPrefix_debug.h"
|
||||
22
mozilla/mailnews/addrbook/makefile.win
Normal file
@@ -0,0 +1,22 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=..\..
|
||||
|
||||
DIRS=public src prefs build resources
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
28
mozilla/mailnews/addrbook/prefs/Makefile.in
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = resources
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
22
mozilla/mailnews/addrbook/prefs/makefile.win
Normal file
@@ -0,0 +1,22 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=..\..\..
|
||||
|
||||
DIRS= resources
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
28
mozilla/mailnews/addrbook/prefs/resources/Makefile.in
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = content locale
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
19
mozilla/mailnews/addrbook/prefs/resources/content/MANIFEST
Normal file
@@ -0,0 +1,19 @@
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
# This is a list of local files which get copied to the res\mailnews\messenger directory
|
||||
#
|
||||
|
||||
pref-addressing.xul
|
||||
@@ -0,0 +1,37 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
SAMPLES_DIR = $(DIST)/bin/chrome/addressbook/content/default
|
||||
|
||||
EXPORT_RESOURCE_SAMPLES = \
|
||||
pref-addressing.xul \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
GARBAGE += $(addprefix $(SAMPLES_DIR)/, $(EXPORT_RESOURCE_SAMPLES))
|
||||
|
||||
install::
|
||||
$(INSTALL) $(addprefix $(srcdir)/, $(EXPORT_RESOURCE_SAMPLES)) $(SAMPLES_DIR)
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=..\..\..\..\..
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install::
|
||||
$(MAKE_INSTALL) pref-addressing.xul $(DIST)\bin\chrome\addressbook\content\default
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\chrome\addressbook\content\default\pref-addressing.xul
|
||||
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://pref/skin/pref.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/pref-addressing.dtd">
|
||||
|
||||
<window xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="StartUp('Mailnews-Main')" >
|
||||
|
||||
<html:script language="javascript" src="chrome://pref/content/PrefsWindow.js"/>
|
||||
|
||||
<html:div flex="100%">
|
||||
<html:div id="top">
|
||||
<html:span id="lefttext">&pane.title;</html:span>
|
||||
</html:div>
|
||||
|
||||
&pinpoint.label;
|
||||
<html:form>
|
||||
<html:table>
|
||||
<html:tr><html:td>&lookFor.label;</html:td></html:tr>
|
||||
<html:tr><html:td>
|
||||
<html:input type="checkbox"/>
|
||||
<html:label>&padCheck.label;</html:label>
|
||||
</html:td></html:tr>
|
||||
<html:tr><html:td>
|
||||
<html:input type="checkbox"/>
|
||||
<html:label>&dirCheck.label;</html:label>
|
||||
</html:td></html:tr>
|
||||
<html:tr><html:td>
|
||||
<html:select>
|
||||
<html:option>&nsbook.label;</html:option>
|
||||
</html:select>
|
||||
</html:td></html:tr>
|
||||
<html:tr><html:td>&mulFound.label;</html:td></html:tr>
|
||||
<html:tr><html:td>
|
||||
<html:input name="multilist" type="radio"/>
|
||||
<html:label>&showList.label;</html:label>
|
||||
</html:td></html:tr>
|
||||
<html:tr><html:td>
|
||||
<html:input name="multilist" type="radio"/>
|
||||
<html:label>&acceptList.label;</html:label>
|
||||
</html:td></html:tr>
|
||||
<html:tr><html:td>&oneMatch.label;</html:td></html:tr>
|
||||
<html:tr><html:td>
|
||||
<html:input type="checkbox"/>
|
||||
<html:label>&useAddress.label;</html:label>
|
||||
</html:td></html:tr>
|
||||
</html:table>
|
||||
</html:form>
|
||||
|
||||
&displayFullname.label;
|
||||
<html:form>
|
||||
<html:table>
|
||||
<html:tr><html:td>
|
||||
<html:input name="displayname" type="radio" id="pref:0:int:mail.addr_book.lastnamefirst" checked="true"/>
|
||||
<html:label>&useDisplayName.label;</html:label>
|
||||
</html:td></html:tr>
|
||||
<html:tr><html:td>
|
||||
<html:input name="displayname" type="radio" id="pref:1:int:mail.addr_book.lastnamefirst"/>
|
||||
<html:label>&useLastFirst.label;</html:label>
|
||||
</html:td></html:tr>
|
||||
</html:table>
|
||||
</html:form>
|
||||
|
||||
</html:div>
|
||||
</window>
|
||||
28
mozilla/mailnews/addrbook/prefs/resources/locale/Makefile.in
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = en-US
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
pref-addressing.dtd
|
||||
@@ -0,0 +1,29 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
install::
|
||||
$(INSTALL) $(srcdir)/pref-addressing.dtd $(DIST)/bin/chrome/addressbook/locale/en-US
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=..\..\..\..\..\..
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
DISTBROWSER=$(DIST)\bin\chrome\addressbook\locale\en-US
|
||||
|
||||
|
||||
install::
|
||||
$(MAKE_INSTALL) pref-addressing.dtd $(DISTBROWSER)
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\pref-addressing.dtd
|
||||
@@ -0,0 +1,35 @@
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!ENTITY window.title "Addressing">
|
||||
<!ENTITY pane.title "Addressing">
|
||||
<!ENTITY pinpoint.label "Pinpoint Addressing">
|
||||
<!ENTITY lookFor.label "Look for addresses in the following">
|
||||
<!ENTITY padCheck.label "Address Books">
|
||||
<!ENTITY dirCheck.label "Directory Server">
|
||||
<!ENTITY nsbook.label "Netscape Phonebook">
|
||||
<!ENTITY mulFound.label "When there are multiple addresses found:">
|
||||
<!ENTITY showList.label "Show me a list of choices">
|
||||
<!ENTITY acceptList.label "Accept what I have typed">
|
||||
<!ENTITY oneMatch.label "If there is one match in your personal address books:">
|
||||
<!ENTITY useAddress.label "Use the address and do not search in the directory">
|
||||
<!ENTITY displayFullname.label "When displaying full names:">
|
||||
<!ENTITY useDisplayName.label "Show names using display name (from address book card)">
|
||||
<!ENTITY useLastFirst.label "Show names using last name, first name">
|
||||
@@ -0,0 +1,22 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=..\..\..\..\..
|
||||
|
||||
DIRS= en-US
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
22
mozilla/mailnews/addrbook/prefs/resources/makefile.win
Normal file
@@ -0,0 +1,22 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=..\..\..\..
|
||||
|
||||
DIRS= content locale
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
18
mozilla/mailnews/addrbook/public/MANIFEST
Normal file
@@ -0,0 +1,18 @@
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist:mailnews directory
|
||||
#
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
# This is a list of local files which get copied to the mozilla:dist:idl directory
|
||||
#
|
||||
|
||||
nsISocketProvider.idl
|
||||
nsISocketProviderService.idl
|
||||
nsIAbAddressCollecter.idl
|
||||
|
||||
43
mozilla/mailnews/addrbook/public/Makefile.in
Normal file
@@ -0,0 +1,43 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = addrbook
|
||||
|
||||
XPIDLSRCS = \
|
||||
nsIAbListener.idl \
|
||||
nsIAbDirectory.idl \
|
||||
nsIAbCard.idl \
|
||||
nsIAddrDBAnnouncer.idl \
|
||||
nsIAddrDBListener.idl \
|
||||
nsIAddrDatabase.idl \
|
||||
nsIAddressBook.idl \
|
||||
nsIAbBase.idl \
|
||||
nsIAddrBookSession.idl \
|
||||
nsIAutoCompleteListener.idl \
|
||||
nsIAutoCompleteSession.idl \
|
||||
nsIAbAddressCollecter.idl \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
39
mozilla/mailnews/addrbook/public/makefile.win
Normal file
@@ -0,0 +1,39 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=..\..\..
|
||||
MODULE=addrbook
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\nsIAbListener.idl \
|
||||
.\nsIAbBase.idl \
|
||||
.\nsIAbDirectory.idl \
|
||||
.\nsIAbCard.idl \
|
||||
.\nsIAddrDBAnnouncer.idl \
|
||||
.\nsIAddrDBListener.idl \
|
||||
.\nsIAddrDatabase.idl \
|
||||
.\nsIAddressBook.idl \
|
||||
.\nsIAddrBookSession.idl \
|
||||
.\nsIAutoCompleteSession.idl \
|
||||
.\nsIAutoCompleteListener.idl \
|
||||
.\nsIAbAddressCollecter.idl \
|
||||
$(NULL)
|
||||
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
include <$(DEPTH)\config\config.mak>
|
||||
|
||||
@@ -12,31 +12,17 @@
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsIURI.idl"
|
||||
#include "nsISupports.idl"
|
||||
|
||||
/**
|
||||
* JAR URLs have the following syntax
|
||||
*
|
||||
* jar:<jar-file-uri>!/<jar-entry>
|
||||
*
|
||||
* EXAMPLE: jar:http://www.big.com/blue.jar!/ocean.html
|
||||
*/
|
||||
[scriptable, uuid(c7e410d3-85f2-11d3-9f63-006008a6efe9)]
|
||||
interface nsIJARURI : nsIURI {
|
||||
|
||||
/**
|
||||
* Returns the root URI (the one for the actual JAR file) for this JAR.
|
||||
* eg http://www.big.com/blue.jar
|
||||
*/
|
||||
attribute nsIURI JARFile;
|
||||
[scriptable, uuid(fe04c8e6-501e-11d3-a527-0060b0fc04b7)]
|
||||
|
||||
/**
|
||||
* Returns the entry specified for this JAR URI.
|
||||
* eg ocean.html
|
||||
*/
|
||||
attribute string JAREntry;
|
||||
interface nsIAbAddressCollecter : nsISupports {
|
||||
|
||||
void CollectAddress(in string address);
|
||||
};
|
||||
|
||||
35
mozilla/mailnews/addrbook/public/nsIAbBase.idl
Normal file
@@ -0,0 +1,35 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsICollection.idl"
|
||||
|
||||
[scriptable, uuid(013DD009-F73B-11d2-A2DA-001083003D0C)]
|
||||
interface nsIAbBase : nsICollection {
|
||||
|
||||
readonly attribute string URI;
|
||||
attribute string name;
|
||||
|
||||
nsISupports GetChildNamed(in string name);
|
||||
attribute nsIAbBase parent;
|
||||
|
||||
nsIEnumerator GetChildNodes();
|
||||
|
||||
void AddUnique(in nsISupports element);
|
||||
void ReplaceElement(in nsISupports element, in nsISupports newElement);
|
||||
|
||||
};
|
||||
97
mozilla/mailnews/addrbook/public/nsIAbCard.idl
Normal file
@@ -0,0 +1,97 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIAddrDatabase;
|
||||
|
||||
[ptr] native nsVoidArray(nsVoidArray);
|
||||
|
||||
%{C++
|
||||
#include "nsVoidArray.h"
|
||||
%}
|
||||
|
||||
[scriptable, uuid(FA5C977F-04C8-11d3-A2EB-001083003D0C)]
|
||||
interface nsIAbCard : nsISupports {
|
||||
|
||||
attribute wstring FirstName;
|
||||
attribute wstring LastName;
|
||||
attribute wstring DisplayName;
|
||||
attribute wstring NickName;
|
||||
attribute wstring PrimaryEmail;
|
||||
attribute wstring SecondEmail;
|
||||
attribute wstring WorkPhone;
|
||||
attribute wstring HomePhone;
|
||||
attribute wstring FaxNumber;
|
||||
attribute wstring PagerNumber;
|
||||
attribute wstring CellularNumber;
|
||||
attribute wstring HomeAddress;
|
||||
attribute wstring HomeAddress2;
|
||||
attribute wstring HomeCity;
|
||||
attribute wstring HomeState;
|
||||
attribute wstring HomeZipCode;
|
||||
attribute wstring HomeCountry;
|
||||
attribute wstring WorkAddress;
|
||||
attribute wstring WorkAddress2;
|
||||
attribute wstring WorkCity;
|
||||
attribute wstring WorkState;
|
||||
attribute wstring WorkZipCode;
|
||||
attribute wstring WorkCountry;
|
||||
attribute wstring JobTitle;
|
||||
attribute wstring Department;
|
||||
attribute wstring Company;
|
||||
attribute wstring WebPage1;
|
||||
attribute wstring WebPage2;
|
||||
attribute wstring BirthYear;
|
||||
attribute wstring BirthMonth;
|
||||
attribute wstring BirthDay;
|
||||
attribute wstring Custom1;
|
||||
attribute wstring Custom2;
|
||||
attribute wstring Custom3;
|
||||
attribute wstring Custom4;
|
||||
attribute wstring Notes;
|
||||
attribute unsigned long LastModifiedDate;
|
||||
|
||||
attribute boolean SendPlainText;
|
||||
|
||||
attribute unsigned long DbTableID;
|
||||
attribute unsigned long DbRowID;
|
||||
|
||||
void GetCardValue(in string attrname, out wstring value);
|
||||
void SetCardValue(in string attrname, in wstring value);
|
||||
void SetAbDatabase(in nsIAddrDatabase database);
|
||||
|
||||
[noscript] void GetAnonymousStrAttrubutesList(out nsVoidArray attrlist);
|
||||
[noscript] void GetAnonymousStrValuesList(out nsVoidArray valuelist);
|
||||
[noscript] void GetAnonymousIntAttrubutesList(out nsVoidArray attrlist);
|
||||
[noscript] void GetAnonymousIntValuesList(out nsVoidArray valuelist);
|
||||
[noscript] void GetAnonymousBoolAttrubutesList(out nsVoidArray attrlist);
|
||||
[noscript] void GetAnonymousBoolValuesList(out nsVoidArray valuelist);
|
||||
|
||||
void SetAnonymousStringAttribute(in string attrname, in string value);
|
||||
void SetAnonymousIntAttribute(in string attrname, in unsigned long value);
|
||||
void SetAnonymousBoolAttribute(in string attrname, in boolean value);
|
||||
void AddAnonymousAttributesToDB();
|
||||
void EditAnonymousAttributesInDB();
|
||||
|
||||
void GetCardURI(out string uri);
|
||||
void AddCardToDatabase(in string uri);
|
||||
void EditCardToDatabase(in string uri);
|
||||
void CopyCard(in nsIAbCard srcCard);
|
||||
void GetCollationKey(in wstring str, out wstring key);
|
||||
};
|
||||
51
mozilla/mailnews/addrbook/public/nsIAbDirectory.idl
Normal file
@@ -0,0 +1,51 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAbCard.idl"
|
||||
#include "nsISupportsArray.idl"
|
||||
|
||||
[ptr] native nsFileSpec(nsFileSpec);
|
||||
[ptr] native DIR_Server(DIR_Server);
|
||||
|
||||
%{C++
|
||||
#include "nsFileSpec.h"
|
||||
#include "nsDirPrefs.h"
|
||||
%}
|
||||
|
||||
[scriptable, uuid(1920E485-0709-11d3-A2EC-001083003D0C)]
|
||||
interface nsIAbDirectory : nsISupports {
|
||||
|
||||
attribute wstring DirName;
|
||||
attribute unsigned long LastModifiedDate;
|
||||
attribute DIR_Server server;
|
||||
|
||||
void GetDirFilePath(out string dbPath);
|
||||
void GetChildNodes(out nsIEnumerator childList);
|
||||
void GetChildCards(out nsIEnumerator childCards);
|
||||
void AddChildCards(in string uriName, out nsIAbCard childCard);
|
||||
void AddDirectory(in string uriName, out nsIAbDirectory childDir);
|
||||
void DeleteDirectories(in nsISupportsArray dierctories);
|
||||
void DeleteCards(in nsISupportsArray cards);
|
||||
void HasCard(in nsIAbCard cards, out boolean hasCard);
|
||||
void HasDirectory(in nsIAbDirectory dir, out boolean hasDir);
|
||||
void GetMailingList(out nsIEnumerator mailingList);
|
||||
void CreateNewDirectory(in wstring dirName, in string fileName);
|
||||
void GetDirUri(out string uri);
|
||||
|
||||
};
|
||||
29
mozilla/mailnews/addrbook/public/nsIAbListener.idl
Normal file
@@ -0,0 +1,29 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIEnumerator.idl"
|
||||
|
||||
[scriptable, uuid(1920E484-0709-11d3-A2EC-001083003D0C)]
|
||||
interface nsIAbListener : nsISupports {
|
||||
|
||||
void OnItemAdded(in nsISupports parentDir, in nsISupports item);
|
||||
void OnItemRemoved(in nsISupports parentDir, in nsISupports item);
|
||||
void OnItemPropertyChanged(in nsISupports item, in string property, in wstring oldValue, in wstring newValue);
|
||||
|
||||
};
|
||||
49
mozilla/mailnews/addrbook/public/nsIAddrBookSession.idl
Normal file
@@ -0,0 +1,49 @@
|
||||
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
/*
|
||||
* The mail session is a replacement for the old 4.x MSG_Master object. It
|
||||
* contains mail session generic information such as the account manager, etc
|
||||
* I'm starting this off as an empty interface and as people feel they need to
|
||||
* add more information to it, they can. I think this is a better approach
|
||||
* than trying to port over the old MSG_Master in its entirety as that had a
|
||||
* lot of cruft in it....
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAbListener.idl"
|
||||
#include "nsIAbDirectory.idl"
|
||||
#include "nsIAbCard.idl"
|
||||
|
||||
[scriptable, uuid(C5339441-303F-11d3-9E13-00A0C92B5F0D)]
|
||||
interface nsIAddrBookSession : nsISupports {
|
||||
|
||||
void AddAddressBookListener(in nsIAbListener listener);
|
||||
void RemoveAddressBookListener(in nsIAbListener listener);
|
||||
void NotifyItemPropertyChanged(in nsISupports item,
|
||||
in string property,
|
||||
in wstring oldValue,
|
||||
in wstring newValue);
|
||||
void NotifyDirectoryItemAdded(in nsIAbDirectory directory, in nsISupports item);
|
||||
void NotifyDirectoryItemDeleted(in nsIAbDirectory directory, in nsISupports item);
|
||||
|
||||
[noscript] void GetUserProfileDirectory(out nsFileSpec userDir);
|
||||
};
|
||||
|
||||
37
mozilla/mailnews/addrbook/public/nsIAddrDBAnnouncer.idl
Normal file
@@ -0,0 +1,37 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAbCard.idl"
|
||||
|
||||
interface nsIAddrDBListener;
|
||||
|
||||
[scriptable, uuid(A4186D8A-1DD0-11d3-A303-001083003D0C)]
|
||||
interface nsIAddrDBAnnouncer : nsISupports {
|
||||
|
||||
void AddListener(in nsIAddrDBListener listener);
|
||||
void RemoveListener(in nsIAddrDBListener listener);
|
||||
|
||||
void NotifyCardAttribChange(in unsigned long abCode,
|
||||
in nsIAddrDBListener instigator);
|
||||
void NotifyCardEntryChange (in unsigned long abCode,
|
||||
in nsIAbCard card,
|
||||
in nsIAddrDBListener instigator);
|
||||
|
||||
void NotifyAnnouncerGoingAway();
|
||||
};
|
||||
32
mozilla/mailnews/addrbook/public/nsIAddrDBListener.idl
Normal file
@@ -0,0 +1,32 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAbCard.idl"
|
||||
|
||||
interface nsIAddrDBAnnouncer;
|
||||
|
||||
[scriptable, uuid(A4186D89-1DD0-11d3-A303-001083003D0C)]
|
||||
interface nsIAddrDBListener : nsISupports {
|
||||
|
||||
void OnCardAttribChange(in unsigned long abCode,
|
||||
in nsIAddrDBListener instigator);
|
||||
void OnCardEntryChange (in unsigned long abCode,
|
||||
in nsIAbCard card,
|
||||
in nsIAddrDBListener instigator);
|
||||
void OnAnnouncerGoingAway(in nsIAddrDBAnnouncer instigator);
|
||||
};
|
||||
109
mozilla/mailnews/addrbook/public/nsIAddrDatabase.idl
Normal file
@@ -0,0 +1,109 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
/* nsFileSpec is declared in nsIAbDirectory.idl */
|
||||
#include "nsIAddrDBAnnouncer.idl"
|
||||
#include "nsIAbCard.idl"
|
||||
#include "nsIAbDirectory.idl"
|
||||
|
||||
[ptr] native nsIMdbTableRowCursor(nsIMdbTableRowCursor);
|
||||
[ptr] native nsIMdbEnv(nsIMdbEnv);
|
||||
[ptr] native nsIMdbRow(nsIMdbRow);
|
||||
|
||||
%{C++
|
||||
#include "mdb.h"
|
||||
%}
|
||||
|
||||
|
||||
[scriptable, uuid(A4186D8B-1DD0-11d3-A303-001083003D0C)]
|
||||
interface nsIAddrDatabase : nsIAddrDBAnnouncer {
|
||||
|
||||
attribute nsFileSpec dbPath;
|
||||
|
||||
[noscript] void Open(in nsFileSpec folderName, in boolean create,
|
||||
out nsIAddrDatabase pCardDB, in boolean upgrading);
|
||||
void Close(in boolean forceCommit);
|
||||
[noscript] void OpenMDB(in nsFileSpec dbName, in boolean create);
|
||||
void CloseMDB(in boolean commit);
|
||||
void OpenAnonymousDB(out nsIAddrDatabase pCardDB);
|
||||
void CloseAnonymousDB(in boolean forceCommit);
|
||||
|
||||
void Commit(in unsigned long commitType);
|
||||
void ForceClosed();
|
||||
|
||||
void CreateNewCardAndAddToDB(in nsIAbCard newCard, in boolean beNotify);
|
||||
void EnumerateCards(in nsIAbDirectory directory, out nsIEnumerator result);
|
||||
void EnumerateMailingLists(in nsIAbDirectory directory, out nsIEnumerator result);
|
||||
void DeleteCard(in nsIAbCard card, in boolean beNotify);
|
||||
void EditCard(in nsIAbCard card, in boolean beNotify);
|
||||
void ContainsCard(in nsIAbCard card, out boolean hasCard);
|
||||
|
||||
void GetCardForEmailAddress(in nsIAbDirectory directory, in string emailAddress, out nsIAbCard card);
|
||||
|
||||
void SetAnonymousStringAttribute(in string attrname, in string value);
|
||||
void GetAnonymousStringAttribute(in string attrname, out string value);
|
||||
void SetAnonymousIntAttribute(in string attrname, in unsigned long value);
|
||||
void GetAnonymousIntAttribute(in string attrname, out unsigned long value);
|
||||
void SetAnonymousBoolAttribute(in string attrname, in boolean value);
|
||||
void GetAnonymousBoolAttribute(in string attrname, out boolean value);
|
||||
void AddAnonymousAttributesToDB();
|
||||
void RemoveAnonymousAttributesFromDB();
|
||||
void EditAnonymousAttributesInDB();
|
||||
void AddAnonymousAttributesFromCard(in nsIAbCard card);
|
||||
void RemoveAnonymousAttributesFromCard(in nsIAbCard card);
|
||||
void EditAnonymousAttributesFromCard(in nsIAbCard card);
|
||||
|
||||
[noscript] void GetNewRow(out nsIMdbRow newRow);
|
||||
[noscript] void AddCardRowToDB(in nsIMdbRow newRow);
|
||||
[noscript] void AddFirstName(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddLastName(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddDisplayName(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddNickName(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddPrimaryEmail(in nsIMdbRow row, in string value);
|
||||
[noscript] void Add2ndEmail(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddWorkPhone(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddHomePhone(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddFaxNumber(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddPagerNumber(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddCellularNumber(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddHomeAddress(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddHomeAddress2(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddHomeCity(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddHomeState(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddHomeZipCode(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddHomeCountry(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddWorkAddress(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddWorkAddress2(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddWorkCity(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddWorkState(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddWorkZipCode(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddWorkCountry(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddJobTitle(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddDepartment(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddCompany(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddWebPage1(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddWebPage2(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddBirthYear(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddBirthMonth(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddBirthDay(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddCustom1(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddCustom2(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddCustom3(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddCustom4(in nsIMdbRow row, in string value);
|
||||
[noscript] void AddNotes(in nsIMdbRow row, in string value);
|
||||
};
|
||||
43
mozilla/mailnews/addrbook/public/nsIAddressBook.idl
Normal file
@@ -0,0 +1,43 @@
|
||||
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "xulstubs.idl"
|
||||
#include "nsIRDFCompositeDataSource.idl"
|
||||
#include "nsIAbCard.idl"
|
||||
|
||||
|
||||
%{C++
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
%}
|
||||
|
||||
interface nsIDOMWindow;
|
||||
|
||||
[scriptable, uuid(D60B84F1-2A8C-11d3-9E07-00A0C92B5F0D)]
|
||||
interface nsIAddressBook : nsISupports {
|
||||
|
||||
void DeleteCards(in nsIDOMXULElement tree, in nsIDOMXULElement srcDir, in nsIDOMNodeList node);
|
||||
void NewAddressBook(in nsIRDFCompositeDataSource db, in nsIDOMXULElement srcDir, in wstring name);
|
||||
void DeleteAddressBooks(in nsIRDFCompositeDataSource db, in nsIDOMXULElement srcDir, in nsIDOMNodeList node);
|
||||
void PrintCard();
|
||||
void PrintAddressbook();
|
||||
void SetWebShellWindow(in nsIDOMWindow win);
|
||||
void ImportAddressBook();
|
||||
};
|
||||
|
||||
26
mozilla/mailnews/addrbook/public/nsIAutoCompleteListener.idl
Normal file
@@ -0,0 +1,26 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsrootidl.idl"
|
||||
|
||||
[scriptable, uuid(CA2A6B08-3625-11d3-988E-001083010E9B)]
|
||||
interface nsIAutoCompleteListener : nsISupports {
|
||||
void OnAutoCompleteResult(in nsISupports aParam, in wstring aOriginalString, in wstring aMatch);
|
||||
};
|
||||
|
||||
28
mozilla/mailnews/addrbook/public/nsIAutoCompleteSession.idl
Normal file
@@ -0,0 +1,28 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsrootidl.idl"
|
||||
|
||||
interface nsIAutoCompleteListener;
|
||||
|
||||
[scriptable, uuid(CA2A6B07-3625-11d3-988E-001083010E9B)]
|
||||
interface nsIAutoCompleteSession : nsISupports {
|
||||
void AutoComplete(in nsISupports aParam, in wstring aSearchString, in nsIAutoCompleteListener aResultListener);
|
||||
};
|
||||
|
||||
28
mozilla/mailnews/addrbook/resources/Makefile.in
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = content locale skin
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
33
mozilla/mailnews/addrbook/resources/content/MANIFEST
Normal file
@@ -0,0 +1,33 @@
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
# This is a list of local files which get copied to the res\mailnews\messenger directory
|
||||
#
|
||||
|
||||
abAddressBookNameDialog.js
|
||||
abAddressBookNameDialog.xul
|
||||
abCardOverlay.js
|
||||
abCardOverlay.xul
|
||||
abCardViewOverlay.js
|
||||
abCardViewOverlay.xul
|
||||
abCommon.js
|
||||
abDirTreeOverlay.xul
|
||||
abEditCardDialog.xul
|
||||
abNewCardDialog.xul
|
||||
abResultsTreeOverlay.xul
|
||||
abSelectAddressesDialog.js
|
||||
abSelectAddressesDialog.xul
|
||||
addressbook.js
|
||||
addressbook.xul
|
||||
51
mozilla/mailnews/addrbook/resources/content/Makefile.in
Normal file
@@ -0,0 +1,51 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
SAMPLES_DIR = $(DIST)/bin/chrome/addressbook/content/default
|
||||
|
||||
EXPORT_RESOURCE_SAMPLES = \
|
||||
abAddressBookNameDialog.js \
|
||||
abAddressBookNameDialog.xul \
|
||||
abCardOverlay.js \
|
||||
abCardOverlay.xul \
|
||||
abCardViewOverlay.js \
|
||||
abCardViewOverlay.xul \
|
||||
abCommon.js \
|
||||
abDirTreeOverlay.xul \
|
||||
abEditCardDialog.xul \
|
||||
abNewCardDialog.xul \
|
||||
abResultsTreeOverlay.xul \
|
||||
abSelectAddressesDialog.js \
|
||||
abSelectAddressesDialog.xul \
|
||||
addressbook.js \
|
||||
addressbook.xul \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
GARBAGE += $(addprefix $(SAMPLES_DIR)/, $(EXPORT_RESOURCE_SAMPLES))
|
||||
|
||||
install::
|
||||
$(INSTALL) $(addprefix $(srcdir)/, $(EXPORT_RESOURCE_SAMPLES)) $(SAMPLES_DIR)
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
var okCallback = 0;
|
||||
|
||||
function abNameOnLoad()
|
||||
{
|
||||
doSetOKCancel(abNameOKButton, 0);
|
||||
|
||||
// look in arguments[0] for parameters
|
||||
if (window.arguments && window.arguments[0])
|
||||
{
|
||||
if ( window.arguments[0].title )
|
||||
{
|
||||
dump("title = " + window.arguments[0].title + "\n");
|
||||
var title = window.arguments[0].title;
|
||||
top.window.title = title;
|
||||
}
|
||||
|
||||
if ( window.arguments[0].okCallback )
|
||||
top.okCallback = window.arguments[0].okCallback;
|
||||
}
|
||||
|
||||
// focus on input
|
||||
var name = document.getElementById('name');
|
||||
if ( name )
|
||||
name.focus();
|
||||
}
|
||||
|
||||
function abNameOKButton()
|
||||
{
|
||||
if ( top.okCallback )
|
||||
{
|
||||
var name = document.getElementById('name').value;
|
||||
|
||||
top.okCallback(name);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/abAddressBookNameDialog.dtd">
|
||||
|
||||
|
||||
<window xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
align="vertical"
|
||||
class="dialog"
|
||||
onload="abNameOnLoad()"
|
||||
style="padding:10px">
|
||||
|
||||
<html:script language="JavaScript" src="chrome://addressbook/content/abAddressBookNameDialog.js"/>
|
||||
|
||||
<keyset id="keyset"/>
|
||||
|
||||
<box align="vertical" style="width:36em; min-height:12em">
|
||||
|
||||
<spring flex="100%"/>
|
||||
|
||||
<html:div style="margin-bottom:.3em">&name.label;</html:div>
|
||||
|
||||
<html:input tabindex="0" type="text" id="name" style="width:100%"/>
|
||||
|
||||
<spring flex="100%"/>
|
||||
|
||||
<box id="okCancelButtons"/>
|
||||
|
||||
</box>
|
||||
|
||||
</window>
|
||||
303
mozilla/mailnews/addrbook/resources/content/abCardOverlay.js
Normal file
@@ -0,0 +1,303 @@
|
||||
var editCard;
|
||||
|
||||
var newCardTitlePrefix = "New Card for ";
|
||||
var editCardTitlePrefix = "Card for ";
|
||||
var editCardFirstLastSeparator = " ";
|
||||
var editCardLastFirstSeparator = ", ";
|
||||
|
||||
function OnLoadNewCard()
|
||||
{
|
||||
InitEditCard();
|
||||
|
||||
doSetOKCancel(NewCardOKButton, 0);
|
||||
|
||||
editCard.card = 0;
|
||||
editCard.okCallback = 0;
|
||||
editCard.titlePrefix = newCardTitlePrefix;
|
||||
|
||||
if (window.arguments && window.arguments[0])
|
||||
{
|
||||
if ( window.arguments[0].selectedAB )
|
||||
editCard.selectedAB = window.arguments[0].selectedAB;
|
||||
}
|
||||
|
||||
// set popup with address book names
|
||||
var abPopup = document.getElementById('abPopup');
|
||||
if ( editCard.selectedAB )
|
||||
abPopup.value = editCard.selectedAB;
|
||||
|
||||
//// FIX ME - looks like we need to focus on both the text field and the tab widget
|
||||
//// probably need to do the same in the addressing widget
|
||||
|
||||
// focus on first name
|
||||
var firstName = document.getElementById('FirstName');
|
||||
if ( firstName )
|
||||
firstName.focus();
|
||||
}
|
||||
|
||||
|
||||
function OnLoadEditCard()
|
||||
{
|
||||
InitEditCard();
|
||||
|
||||
doSetOKCancel(EditCardOKButton, 0);
|
||||
|
||||
editCard.titlePrefix = editCardTitlePrefix;
|
||||
|
||||
if (window.arguments && window.arguments[0])
|
||||
{
|
||||
if ( window.arguments[0].card )
|
||||
editCard.card = window.arguments[0].card;
|
||||
if ( window.arguments[0].okCallback )
|
||||
editCard.okCallback = window.arguments[0].okCallback;
|
||||
if ( window.arguments[0].abURI )
|
||||
editCard.abURI = window.arguments[0].abURI;
|
||||
}
|
||||
|
||||
// set global state variables
|
||||
// if first or last name entered, disable generateDisplayName
|
||||
if ( editCard.generateDisplayName && (editCard.card.FirstName.length +
|
||||
editCard.card.LastName.length +
|
||||
editCard.card.DisplayName.length > 0) )
|
||||
{
|
||||
editCard.generateDisplayName = false;
|
||||
}
|
||||
|
||||
GetCardValues(editCard.card, document);
|
||||
|
||||
top.window.title = editCard.titlePrefix + editCard.card.DisplayName;
|
||||
}
|
||||
|
||||
function InitEditCard()
|
||||
{
|
||||
// create editCard object that contains global variables for editCard.js
|
||||
editCard = new Object;
|
||||
|
||||
// get pointer to nsIPref object
|
||||
var prefs = Components.classes["component://netscape/preferences"];
|
||||
if ( prefs )
|
||||
{
|
||||
prefs = prefs.getService();
|
||||
if ( prefs )
|
||||
{
|
||||
prefs = prefs.QueryInterface(Components.interfaces.nsIPref);
|
||||
editCard.prefs = prefs;
|
||||
}
|
||||
}
|
||||
|
||||
// get specific prefs that editCard will need
|
||||
if ( prefs )
|
||||
{
|
||||
try {
|
||||
editCard.displayLastNameFirst = prefs.GetBoolPref("mail.addr_book.lastnamefirst");
|
||||
}
|
||||
catch (ex) {
|
||||
dump("failed to get the mail.addr_book.lastnamefirst pref\n");
|
||||
}
|
||||
|
||||
try {
|
||||
editCard.generateDisplayName = prefs.GetBoolPref("mail.addr_book.displayName.autoGeneration");
|
||||
}
|
||||
catch (ex) {
|
||||
dump("failed to get the mail.addr_book.displayName.autoGeneration pref\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function NewCardOKButton()
|
||||
{
|
||||
var popup = document.getElementById('abPopup');
|
||||
if ( popup )
|
||||
{
|
||||
var uri = popup.value;
|
||||
|
||||
// FIX ME - hack to avoid crashing if no ab selected because of blank option bug from template
|
||||
// should be able to just remove this if we are not seeing blank lines in the ab popup
|
||||
if ( !uri )
|
||||
return false; // don't close window
|
||||
// -----
|
||||
|
||||
var cardproperty = Components.classes["component://netscape/addressbook/cardproperty"].createInstance();
|
||||
cardproperty = cardproperty.QueryInterface(Components.interfaces.nsIAbCard);
|
||||
|
||||
if ( cardproperty )
|
||||
{
|
||||
SetCardValues(cardproperty, document);
|
||||
|
||||
cardproperty.AddCardToDatabase(uri);
|
||||
}
|
||||
}
|
||||
|
||||
return true; // close the window
|
||||
}
|
||||
|
||||
function EditCardOKButton()
|
||||
{
|
||||
SetCardValues(editCard.card, document);
|
||||
|
||||
editCard.card.EditCardToDatabase(editCard.abURI);
|
||||
|
||||
// callback to allow caller to update
|
||||
if ( editCard.okCallback )
|
||||
editCard.okCallback();
|
||||
|
||||
return true; // close the window
|
||||
}
|
||||
|
||||
|
||||
// Move the data from the cardproperty to the dialog
|
||||
function GetCardValues(cardproperty, doc)
|
||||
{
|
||||
if ( cardproperty )
|
||||
{
|
||||
doc.getElementById('FirstName').value = cardproperty.FirstName;
|
||||
doc.getElementById('LastName').value = cardproperty.LastName;
|
||||
doc.getElementById('DisplayName').value = cardproperty.DisplayName;
|
||||
doc.getElementById('NickName').value = cardproperty.NickName;
|
||||
|
||||
doc.getElementById('PrimaryEmail').value = cardproperty.PrimaryEmail;
|
||||
doc.getElementById('SecondEmail').value = cardproperty.SecondEmail;
|
||||
//doc.getElementById('SendPlainText').value = cardproperty.SendPlainText;
|
||||
|
||||
doc.getElementById('WorkPhone').value = cardproperty.WorkPhone;
|
||||
doc.getElementById('HomePhone').value = cardproperty.HomePhone;
|
||||
doc.getElementById('FaxNumber').value = cardproperty.FaxNumber;
|
||||
doc.getElementById('PagerNumber').value = cardproperty.PagerNumber;
|
||||
doc.getElementById('CellularNumber').value = cardproperty.CellularNumber;
|
||||
|
||||
doc.getElementById('HomeAddress').value = cardproperty.HomeAddress;
|
||||
doc.getElementById('HomeAddress2').value = cardproperty.HomeAddress2;
|
||||
doc.getElementById('HomeCity').value = cardproperty.HomeCity;
|
||||
doc.getElementById('HomeState').value = cardproperty.HomeState;
|
||||
doc.getElementById('HomeZipCode').value = cardproperty.HomeZipCode;
|
||||
doc.getElementById('HomeCountry').value = cardproperty.HomeCountry;
|
||||
|
||||
doc.getElementById('JobTitle').value = cardproperty.JobTitle;
|
||||
doc.getElementById('Department').value = cardproperty.Department;
|
||||
doc.getElementById('Company').value = cardproperty.Company;
|
||||
doc.getElementById('WorkAddress').value = cardproperty.WorkAddress;
|
||||
doc.getElementById('WorkAddress2').value = cardproperty.WorkAddress2;
|
||||
doc.getElementById('WorkCity').value = cardproperty.WorkCity;
|
||||
doc.getElementById('WorkState').value = cardproperty.WorkState;
|
||||
doc.getElementById('WorkZipCode').value = cardproperty.WorkZipCode;
|
||||
doc.getElementById('WorkCountry').value = cardproperty.WorkCountry;
|
||||
|
||||
doc.getElementById('WebPage1').value = cardproperty.WebPage1;
|
||||
|
||||
doc.getElementById('Custom1').value = cardproperty.Custom1;
|
||||
doc.getElementById('Custom2').value = cardproperty.Custom2;
|
||||
doc.getElementById('Custom3').value = cardproperty.Custom3;
|
||||
doc.getElementById('Custom4').value = cardproperty.Custom4;
|
||||
doc.getElementById('Notes').value = cardproperty.Notes;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Move the data from the dialog to the cardproperty to be stored in the database
|
||||
function SetCardValues(cardproperty, doc)
|
||||
{
|
||||
if (cardproperty)
|
||||
{
|
||||
cardproperty.FirstName = doc.getElementById('FirstName').value;
|
||||
cardproperty.LastName = doc.getElementById('LastName').value;
|
||||
cardproperty.DisplayName = doc.getElementById('DisplayName').value;
|
||||
cardproperty.NickName = doc.getElementById('NickName').value;
|
||||
|
||||
cardproperty.PrimaryEmail = doc.getElementById('PrimaryEmail').value;
|
||||
cardproperty.SecondEmail = doc.getElementById('SecondEmail').value;
|
||||
//cardproperty.SendPlainText = doc.getElementById('SendPlainText').value;
|
||||
|
||||
cardproperty.WorkPhone = doc.getElementById('WorkPhone').value;
|
||||
cardproperty.HomePhone = doc.getElementById('HomePhone').value;
|
||||
cardproperty.FaxNumber = doc.getElementById('FaxNumber').value;
|
||||
cardproperty.PagerNumber = doc.getElementById('PagerNumber').value;
|
||||
cardproperty.CellularNumber = doc.getElementById('CellularNumber').value;
|
||||
|
||||
cardproperty.HomeAddress = doc.getElementById('HomeAddress').value;
|
||||
cardproperty.HomeAddress2 = doc.getElementById('HomeAddress2').value;
|
||||
cardproperty.HomeCity = doc.getElementById('HomeCity').value;
|
||||
cardproperty.HomeState = doc.getElementById('HomeState').value;
|
||||
cardproperty.HomeZipCode = doc.getElementById('HomeZipCode').value;
|
||||
cardproperty.HomeCountry = doc.getElementById('HomeCountry').value;
|
||||
|
||||
cardproperty.JobTitle = doc.getElementById('JobTitle').value;
|
||||
cardproperty.Department = doc.getElementById('Department').value;
|
||||
cardproperty.Company = doc.getElementById('Company').value;
|
||||
cardproperty.WorkAddress = doc.getElementById('WorkAddress').value;
|
||||
cardproperty.WorkAddress2 = doc.getElementById('WorkAddress2').value;
|
||||
cardproperty.WorkCity = doc.getElementById('WorkCity').value;
|
||||
cardproperty.WorkState = doc.getElementById('WorkState').value;
|
||||
cardproperty.WorkZipCode = doc.getElementById('WorkZipCode').value;
|
||||
cardproperty.WorkCountry = doc.getElementById('WorkCountry').value;
|
||||
|
||||
cardproperty.WebPage1 = doc.getElementById('WebPage1').value;
|
||||
|
||||
cardproperty.Custom1 = doc.getElementById('Custom1').value;
|
||||
cardproperty.Custom2 = doc.getElementById('Custom2').value;
|
||||
cardproperty.Custom3 = doc.getElementById('Custom3').value;
|
||||
cardproperty.Custom4 = doc.getElementById('Custom4').value;
|
||||
cardproperty.Notes = doc.getElementById('Notes').value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function NewCardCancelButton()
|
||||
{
|
||||
top.window.close();
|
||||
}
|
||||
|
||||
function EditCardCancelButton()
|
||||
{
|
||||
top.window.close();
|
||||
}
|
||||
|
||||
function GenerateDisplayName()
|
||||
{
|
||||
if ( editCard.generateDisplayName )
|
||||
{
|
||||
var displayName;
|
||||
|
||||
var firstNameField = document.getElementById('FirstName');
|
||||
var lastNameField = document.getElementById('LastName');
|
||||
var displayNameField = document.getElementById('DisplayName');
|
||||
|
||||
/* todo: i18N work todo here */
|
||||
/* this used to be XP_GetString(MK_ADDR_FIRST_LAST_SEP) */
|
||||
|
||||
/* todo: mscott says there was a pref in 4.5 that would */
|
||||
/* cause GenerateDisplayName() to do nothing. */
|
||||
/* the i18N people need it. */
|
||||
/* find the pref and heed it. */
|
||||
|
||||
/* trying to be smart about no using the first last sep */
|
||||
/* if first or last is missing */
|
||||
/* todo: is this i18N safe? */
|
||||
|
||||
var separator = "";
|
||||
if ( lastNameField.value && firstNameField.value )
|
||||
{
|
||||
if ( editCard.displayLastNameFirst )
|
||||
separator = editCardLastFirstSeparator;
|
||||
else
|
||||
separator = editCardFirstLastSeparator;
|
||||
}
|
||||
|
||||
if ( editCard.displayLastNameFirst )
|
||||
displayName = lastNameField.value + separator + firstNameField.value;
|
||||
else
|
||||
displayName = firstNameField.value + separator + lastNameField.value;
|
||||
|
||||
displayNameField.value = displayName;
|
||||
top.window.title = editCard.titlePrefix + displayName;
|
||||
}
|
||||
}
|
||||
|
||||
function DisplayNameChanged()
|
||||
{
|
||||
// turn off generateDisplayName if the user changes the display name
|
||||
editCard.generateDisplayName = false;
|
||||
|
||||
var title = editCard.titlePrefix + document.getElementById('DisplayName').value;
|
||||
if ( top.window.title != title )
|
||||
top.window.title = title;
|
||||
}
|
||||
293
mozilla/mailnews/addrbook/resources/content/abCardOverlay.xul
Normal file
@@ -0,0 +1,293 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/abCardOverlay.dtd">
|
||||
|
||||
|
||||
<overlay id="editcardOverlay"
|
||||
xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<html:script language="JavaScript" src="chrome://addressbook/content/abCardOverlay.js"/>
|
||||
|
||||
|
||||
<box id="editcard" align="vertical">
|
||||
|
||||
<tabcontrol align="vertical" style="margin:5px">
|
||||
<tabbox align="horizontal">
|
||||
<tab>&Name.tab;</tab>
|
||||
<tab>&Address.tab;</tab>
|
||||
<tab>&Other.tab;</tab>
|
||||
</tabbox>
|
||||
|
||||
<tabpanel align="vertical" flex="100%" style="border:2px groove white">
|
||||
|
||||
<!-- ** Name Tab ** -->
|
||||
<box index="name" align="vertical" flex="100%">
|
||||
|
||||
<html:fieldset flex="100%">
|
||||
<html:legend align="left">
|
||||
<html:div style="font-weight: bold">&Name.box;</html:div>
|
||||
</html:legend>
|
||||
|
||||
<box align="vertical" style="width:100%">
|
||||
<box align="horizontal" flex="100%">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="FirstName">&FirstName.label;</html:label>
|
||||
<html:input type="text" id="FirstName" class="CardEdit" onkeyup="top.GenerateDisplayName()" />
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="LastName">&LastName.label;</html:label>
|
||||
<html:input id="LastName" type="text" class="CardEdit" onkeyup="top.GenerateDisplayName()"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="DisplayName">&DisplayName.label;</html:label>
|
||||
<html:input id="DisplayName" type="text" class="CardEdit" onkeyup="top.DisplayNameChanged()"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="NickName">&NickName.label;</html:label>
|
||||
<html:input id="NickName" type="text" class="CardEdit"/>
|
||||
</box>
|
||||
</box>
|
||||
</html:fieldset>
|
||||
|
||||
<html:fieldset flex="100%">
|
||||
<html:legend align="left">
|
||||
<html:div style="font-weight: bold">&Internet.box;</html:div>
|
||||
</html:legend>
|
||||
|
||||
<box align="vertical" style="width:100%">
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="PrimaryEmail">&PrimaryEmail.label;</html:label>
|
||||
<html:input id="PrimaryEmail" type="text" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="SecondEmail">&SecondEmail.label;</html:label>
|
||||
<html:input id="SecondEmail" type="text" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<box class="CardEditWidth">
|
||||
<html:input id="SendPlainText" type="checkbox"/>
|
||||
<html:label for="SendPlainText">&SendPlainText.label;</html:label>
|
||||
</box>
|
||||
</box>
|
||||
</box>
|
||||
</html:fieldset>
|
||||
|
||||
<html:fieldset flex="100%">
|
||||
<html:legend align="left">
|
||||
<html:div style="font-weight: bold">&Phones.box;</html:div>
|
||||
</html:legend>
|
||||
|
||||
<box align="vertical" style="width:100%">
|
||||
<box align="horizontal" style="vertical-align:baseline">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="WorkPhone" style="vertical-align:baseline">&WorkPhone.label;</html:label>
|
||||
<html:input id="WorkPhone" type="text" class="CardEdit" style="vertical-align:baseline"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="HomePhone">&HomePhone.label;</html:label>
|
||||
<html:input id="HomePhone" type="text" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="FaxNumber">&FaxNumber.label;</html:label>
|
||||
<html:input id="FaxNumber" type="text" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="PagerNumber">&PagerNumber.label;</html:label>
|
||||
<html:input id="PagerNumber" type="text" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="CellularNumber">&CellularNumber.label;</html:label>
|
||||
<html:input id="CellularNumber" type="text" class="CardEdit"/>
|
||||
</box>
|
||||
</box>
|
||||
</html:fieldset>
|
||||
</box>
|
||||
|
||||
<!-- ** Address Tab ** -->
|
||||
<box index="address" align="vertical" flex="100%">
|
||||
|
||||
<html:fieldset flex="100%">
|
||||
<html:legend align="left">
|
||||
<html:div style="font-weight: bold">&Home.box;</html:div>
|
||||
</html:legend>
|
||||
|
||||
<box align="vertical" style="width:100%">
|
||||
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="HomeAddress">&HomeAddress.label;</html:label>
|
||||
<html:input type="text" id="HomeAddress" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="HomeAddress2">&HomeAddress2.label;</html:label>
|
||||
<html:input type="text" id="HomeAddress2" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="HomeCity">&HomeCity.label;</html:label>
|
||||
<html:input id="HomeCity" type="text" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="HomeState">&HomeState.label;</html:label>
|
||||
<box class="CardEditWidth">
|
||||
<html:input id="HomeState" type="text" class="CardEdit" style="min-width:1em; width:8em"/>
|
||||
<spring flex="100%"/>
|
||||
<html:label for="HomeZipCode">&HomeZipCode.label;</html:label>
|
||||
<html:input id="HomeZipCode" type="text" class="CardEdit" style="min-width:1em; width:8em"/>
|
||||
</box>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="HomeCountry">&HomeCountry.label;</html:label>
|
||||
<html:input id="HomeCountry" type="text" class="CardEdit"/>
|
||||
</box>
|
||||
</box>
|
||||
</html:fieldset>
|
||||
|
||||
<html:fieldset style="width:100%">
|
||||
<html:legend align="left">
|
||||
<html:div style="font-weight: bold">&Work.box;</html:div>
|
||||
</html:legend>
|
||||
|
||||
<box align="vertical" style="width:100%">
|
||||
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="JobTitle">&JobTitle.label;</html:label>
|
||||
<html:input type="text" id="JobTitle" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="Department">&Department.label;</html:label>
|
||||
<html:input type="text" id="Department" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="Company">&Company.label;</html:label>
|
||||
<html:input type="text" id="Company" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="WorkAddress">&WorkAddress.label;</html:label>
|
||||
<html:input type="text" id="WorkAddress" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="WorkAddress2">&WorkAddress2.label;</html:label>
|
||||
<html:input type="text" id="WorkAddress2" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="WorkCity">&WorkCity.label;</html:label>
|
||||
<html:input id="WorkCity" type="text" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="WorkState">&WorkState.label;</html:label>
|
||||
<box class="CardEditWidth">
|
||||
<html:input id="WorkState" type="text" class="CardEdit" style="min-width:1em; width:8em"/>
|
||||
<spring flex="100%"/>
|
||||
<html:label for="WorkZipCode">&WorkZipCode.label;</html:label>
|
||||
<html:input id="WorkZipCode" type="text" class="CardEdit" style="min-width:1em; width:8em"/>
|
||||
</box>
|
||||
</box>
|
||||
<box align="horizontal">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="WorkCountry">&WorkCountry.label;</html:label>
|
||||
<html:input id="WorkCountry" type="text" class="CardEdit"/>
|
||||
</box>
|
||||
</box>
|
||||
</html:fieldset>
|
||||
|
||||
<!--html:fieldset style="width:100%">
|
||||
<html:legend align="left">
|
||||
<html:div style="font-weight: bold">&Web.box;</html:div>
|
||||
</html:legend-->
|
||||
|
||||
<box align="vertical" style="width:100%">
|
||||
|
||||
<box align="horizontal">
|
||||
<!--spring flex="100%"/-->
|
||||
<html:label for="WebPage1">&WebPage1.label;</html:label>
|
||||
<html:input type="text" id="WebPage1" class="CardEdit" flex="100%"/>
|
||||
</box>
|
||||
</box>
|
||||
<!--/html:fieldset-->
|
||||
</box>
|
||||
|
||||
<!-- ** Other Tab ** -->
|
||||
<box index="other" align="vertical" flex="100%">
|
||||
|
||||
<box align="vertical" style="width:100%">
|
||||
<box align="horizontal" flex="100%">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="Custom1">&Custom1.label;</html:label>
|
||||
<html:input type="text" id="Custom1" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal" flex="100%">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="Custom2">&Custom2.label;</html:label>
|
||||
<html:input type="text" id="Custom2" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal" flex="100%">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="Custom3">&Custom3.label;</html:label>
|
||||
<html:input type="text" id="Custom3" class="CardEdit"/>
|
||||
</box>
|
||||
<box align="horizontal" flex="100%">
|
||||
<spring flex="100%"/>
|
||||
<html:label for="Custom4">&Custom4.label;</html:label>
|
||||
<html:input type="text" id="Custom4" class="CardEdit"/>
|
||||
</box>
|
||||
</box>
|
||||
|
||||
<html:fieldset style="width:100%">
|
||||
<html:legend align="left">
|
||||
<html:div style="font-weight: bold">&Notes.box;</html:div>
|
||||
</html:legend>
|
||||
|
||||
<box align="vertical" style="width:100%">
|
||||
<html:textarea id="Notes" rows="15"/>
|
||||
</box>
|
||||
</html:fieldset>
|
||||
|
||||
</box>
|
||||
|
||||
</tabpanel>
|
||||
</tabcontrol>
|
||||
</box>
|
||||
|
||||
</overlay>
|
||||
|
||||
231
mozilla/mailnews/addrbook/resources/content/abCardViewOverlay.js
Normal file
@@ -0,0 +1,231 @@
|
||||
var zWork = "Work: ";
|
||||
var zHome = "Home: ";
|
||||
var zFax = "Fax: ";
|
||||
var zCellular = "Cellular: ";
|
||||
var zPager = "Pager: ";
|
||||
var zCustom1 = "Custom 1: ";
|
||||
var zCustom2 = "Custom 2: ";
|
||||
var zCustom3 = "Custom 3: ";
|
||||
var zCustom4 = "Custom 4: ";
|
||||
|
||||
var rdf;
|
||||
var cvData;
|
||||
|
||||
function OnLoadCardView()
|
||||
{
|
||||
// This should be in an onload for the card view window, but that is not currently working
|
||||
rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();
|
||||
rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
|
||||
|
||||
var doc = document;
|
||||
|
||||
/* data for address book, prefixes: "cvb" = card view box
|
||||
"cvh" = crad view header
|
||||
"cv" = card view (normal fields) */
|
||||
cvData = new Object;
|
||||
|
||||
// Card View Box
|
||||
cvData.CardViewBox = doc.getElementById("CardViewBox");
|
||||
// Title
|
||||
cvData.CardTitle = doc.getElementById("CardTitle");
|
||||
// Name section
|
||||
cvData.cvbName = doc.getElementById("cvbName");
|
||||
cvData.cvhName = doc.getElementById("cvhName");
|
||||
cvData.cvNickname = doc.getElementById("cvNickname");
|
||||
cvData.cvEmail1 = doc.getElementById("cvEmail1");
|
||||
cvData.cvEmail2 = doc.getElementById("cvEmail2");
|
||||
// Home section
|
||||
cvData.cvbHome = doc.getElementById("cvbHome");
|
||||
cvData.cvhHome = doc.getElementById("cvhHome");
|
||||
cvData.cvHomeAddress = doc.getElementById("cvHomeAddress");
|
||||
cvData.cvHomeAddress2 = doc.getElementById("cvHomeAddress2");
|
||||
cvData.cvHomeCityStZip = doc.getElementById("cvHomeCityStZip");
|
||||
cvData.cvHomeCountry = doc.getElementById("cvHomeCountry");
|
||||
// Other section
|
||||
cvData.cvbOther = doc.getElementById("cvbOther");
|
||||
cvData.cvhOther = doc.getElementById("cvhOther");
|
||||
cvData.cvCustom1 = doc.getElementById("cvCustom1");
|
||||
cvData.cvCustom2 = doc.getElementById("cvCustom2");
|
||||
cvData.cvCustom3 = doc.getElementById("cvCustom3");
|
||||
cvData.cvCustom4 = doc.getElementById("cvCustom4");
|
||||
cvData.cvNotes = doc.getElementById("cvNotes");
|
||||
// Phone section
|
||||
cvData.cvbPhone = doc.getElementById("cvbPhone");
|
||||
cvData.cvhPhone = doc.getElementById("cvhPhone");
|
||||
cvData.cvPhWork = doc.getElementById("cvPhWork");
|
||||
cvData.cvPhHome = doc.getElementById("cvPhHome");
|
||||
cvData.cvPhFax = doc.getElementById("cvPhFax");
|
||||
cvData.cvPhCellular = doc.getElementById("cvPhCellular");
|
||||
cvData.cvPhPager = doc.getElementById("cvPhPager");
|
||||
// Work section
|
||||
cvData.cvbWork = doc.getElementById("cvbWork");
|
||||
cvData.cvhWork = doc.getElementById("cvhWork");
|
||||
cvData.cvJobTitle = doc.getElementById("cvJobTitle");
|
||||
cvData.cvDepartment = doc.getElementById("cvDepartment");
|
||||
cvData.cvCompany = doc.getElementById("cvCompany");
|
||||
cvData.cvWorkAddress = doc.getElementById("cvWorkAddress");
|
||||
cvData.cvWorkAddress2 = doc.getElementById("cvWorkAddress2");
|
||||
cvData.cvWorkCityStZip = doc.getElementById("cvWorkCityStZip");
|
||||
cvData.cvWorkCountry = doc.getElementById("cvWorkCountry");
|
||||
}
|
||||
|
||||
function DisplayCardViewPane(abNode)
|
||||
{
|
||||
var uri = abNode.getAttribute('id');
|
||||
var cardResource = top.rdf.GetResource(uri);
|
||||
var card = cardResource.QueryInterface(Components.interfaces.nsIAbCard);
|
||||
|
||||
// FIX ME - this should use a i18n name routine in JS
|
||||
var name = card.DisplayName;
|
||||
if ( card.FirstName.length + card.LastName.length > 0 )
|
||||
name = card.FirstName + " " + card.LastName;
|
||||
|
||||
var nickname;
|
||||
if ( card.NickName )
|
||||
nickname = "\"" + card.NickName + "\"";
|
||||
|
||||
var data = top.cvData;
|
||||
var visible;
|
||||
|
||||
// set fields in card view pane
|
||||
|
||||
cvSetNode(data.CardTitle, "Card for " + card.DisplayName);
|
||||
|
||||
// Name section
|
||||
cvSetNode(data.cvhName, name);
|
||||
cvSetNode(data.cvNickname, nickname);
|
||||
cvSetNode(data.cvEmail1, card.PrimaryEmail);
|
||||
cvSetNode(data.cvEmail2, card.SecondEmail);
|
||||
// Home section
|
||||
visible = cvSetNode(data.cvHomeAddress, card.HomeAddress);
|
||||
visible = cvSetNode(data.cvHomeAddress2, card.HomeAddress2) || visible;
|
||||
visible = cvSetCityStateZip(data.cvHomeCityStZip, card.HomeCity, card.HomeState, card.HomeZipCode) || visible;
|
||||
visible = cvSetNode(data.cvHomeCountry, card.HomeCountry) || visible;
|
||||
cvSetVisible(data.cvhHome, visible);
|
||||
// Other section
|
||||
visible = cvSetNodeWithLabel(data.cvCustom1, zCustom1, card.Custom1);
|
||||
visible = cvSetNodeWithLabel(data.cvCustom2, zCustom2, card.Custom2) || visible;
|
||||
visible = cvSetNodeWithLabel(data.cvCustom3, zCustom3, card.Custom3) || visible;
|
||||
visible = cvSetNodeWithLabel(data.cvCustom4, zCustom4, card.Custom4) || visible;
|
||||
visible = cvSetNode(data.cvNotes, card.Notes) || visible;
|
||||
cvSetVisible(data.cvhOther, visible);
|
||||
// Phone section
|
||||
visible = cvSetNodeWithLabel(data.cvPhWork, zWork, card.WorkPhone);
|
||||
visible = cvSetNodeWithLabel(data.cvPhHome, zHome, card.HomePhone) || visible;
|
||||
visible = cvSetNodeWithLabel(data.cvPhFax, zFax, card.FaxNumber) || visible;
|
||||
visible = cvSetNodeWithLabel(data.cvPhCellular, zCellular, card.CellularNumber) || visible;
|
||||
visible = cvSetNodeWithLabel(data.cvPhPager, zPager, card.PagerNumber) || visible;
|
||||
cvSetVisible(data.cvhPhone, visible);
|
||||
// Work section
|
||||
visible = cvSetNode(data.cvJobTitle, card.JobTitle);
|
||||
visible = cvSetNode(data.cvDepartment, card.Department) || visible;
|
||||
visible = cvSetNode(data.cvCompany, card.Company) || visible;
|
||||
visible = cvSetNode(data.cvWorkAddress, card.WorkAddress) || visible;
|
||||
visible = cvSetNode(data.cvWorkAddress2, card.WorkAddress2) || visible;
|
||||
visible = cvSetCityStateZip(data.cvWorkCityStZip, card.WorkCity, card.WorkState, card.WorkZipCode) || visible;
|
||||
visible = cvSetNode(data.cvWorkCountry, card.WorkCountry) || visible;
|
||||
cvSetVisible(data.cvhWork, visible);
|
||||
|
||||
// make the card view box visible
|
||||
cvSetVisible(top.cvData.CardViewBox, true);
|
||||
}
|
||||
|
||||
function ClearCardViewPane()
|
||||
{
|
||||
cvSetVisible(top.cvData.CardViewBox, false);
|
||||
|
||||
/* can remove this code now that boxes handle display:none
|
||||
// HACK - we need to be able to set the entire box or div to display:none when bug fixed
|
||||
var data = top.cvData;
|
||||
|
||||
// title
|
||||
cvSetVisible(data.CardTitle, false);
|
||||
// Name section
|
||||
cvSetVisible(data.cvhName, false);
|
||||
cvSetVisible(data.cvNickname, false);
|
||||
cvSetVisible(data.cvEmail1, false);
|
||||
cvSetVisible(data.cvEmail2, false);
|
||||
// Home section
|
||||
cvSetVisible(data.cvhHome, false);
|
||||
cvSetVisible(data.cvHomeAddress, false);
|
||||
cvSetVisible(data.cvHomeAddress2, false);
|
||||
cvSetVisible(data.cvHomeCityStZip, false);
|
||||
cvSetVisible(data.cvHomeCountry, false);
|
||||
// Other section
|
||||
cvSetVisible(data.cvhOther, false);
|
||||
cvSetVisible(data.cvCustom1, false);
|
||||
cvSetVisible(data.cvCustom2, false);
|
||||
cvSetVisible(data.cvCustom3, false);
|
||||
cvSetVisible(data.cvCustom4, false);
|
||||
cvSetVisible(data.cvNotes, false);
|
||||
// Phone section
|
||||
cvSetVisible(data.cvhPhone, false);
|
||||
cvSetVisible(data.cvPhWork, false);
|
||||
cvSetVisible(data.cvPhHome, false);
|
||||
cvSetVisible(data.cvPhFax, false);
|
||||
cvSetVisible(data.cvPhCellular, false);
|
||||
cvSetVisible(data.cvPhPager, false);
|
||||
// Work section
|
||||
cvSetVisible(data.cvhWork, false);
|
||||
cvSetVisible(data.cvJobTitle, false);
|
||||
cvSetVisible(data.cvDepartment, false);
|
||||
cvSetVisible(data.cvCompany, false);
|
||||
cvSetVisible(data.cvWorkAddress, false);
|
||||
cvSetVisible(data.cvWorkAddress2, false);
|
||||
cvSetVisible(data.cvWorkCityStZip, false);
|
||||
cvSetVisible(data.cvWorkCountry, false);
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
function cvSetNodeWithLabel(node, label, text)
|
||||
{
|
||||
if ( text )
|
||||
return cvSetNode(node, label + text);
|
||||
else
|
||||
{
|
||||
cvSetVisible(node, false);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function cvSetCityStateZip(node, city, state, zip)
|
||||
{
|
||||
var text;
|
||||
|
||||
if ( city )
|
||||
{
|
||||
text = city;
|
||||
if ( state || zip )
|
||||
text += ", ";
|
||||
}
|
||||
if ( state )
|
||||
text += state + " ";
|
||||
if ( zip )
|
||||
text += zip;
|
||||
|
||||
return cvSetNode(node, text);
|
||||
}
|
||||
|
||||
function cvSetNode(node, text)
|
||||
{
|
||||
node.childNodes[0].nodeValue = text;
|
||||
var visible;
|
||||
|
||||
if ( text )
|
||||
visible = true;
|
||||
else
|
||||
visible = false;
|
||||
|
||||
cvSetVisible(node, visible);
|
||||
return visible;
|
||||
}
|
||||
|
||||
function cvSetVisible(node, visible)
|
||||
{
|
||||
if ( visible )
|
||||
node.removeAttribute("hide");
|
||||
else
|
||||
node.setAttribute("hide", "true");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/abCardViewOverlay.dtd">
|
||||
|
||||
|
||||
<overlay xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<html:script language="JavaScript" src="chrome://addressbook/content/abCardViewOverlay.js"/>
|
||||
|
||||
<box id="CardViewBox"
|
||||
align="vertical"
|
||||
flex="100%"
|
||||
style="overflow:auto; background-color:#dddddd; padding-left:5px; padding-right:5px">
|
||||
|
||||
<html:div hide="true" style="font-size:150%; font-weight:bold; border-bottom:2px solid black" id="CardTitle">*</html:div>
|
||||
|
||||
<box align="horizontal" flex="100%">
|
||||
|
||||
<box align="vertical" flex="100%" style="width:100px">
|
||||
<box id="cvbName" align="vertical">
|
||||
<html:div class="CardViewHeading" hide="true" id="cvhName">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvNickname">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvEmail1">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvEmail2">*</html:div>
|
||||
</box>
|
||||
|
||||
<box id="cvbHome" align="vertical">
|
||||
<html:div class="CardViewHeading" hide="true" id="cvhHome">&home.heading;</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvHomeAddress">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvHomeAddress2">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvHomeCityStZip">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvHomeCountry">*</html:div>
|
||||
</box>
|
||||
|
||||
<box id="cvbOther" align="vertical">
|
||||
<html:div class="CardViewHeading" hide="true" id="cvhOther">&other.heading;</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvCustom1">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvCustom2">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvCustom3">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvCustom4">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvNotes">*</html:div>
|
||||
</box>
|
||||
</box>
|
||||
|
||||
<spring style="width:20px"/>
|
||||
|
||||
<box align="vertical" flex="100%" style="width:100px">
|
||||
<box id="cvbPhone" align="vertical">
|
||||
<html:div class="CardViewHeading" hide="true" id="cvhPhone">&phone.heading;</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvPhWork">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvPhHome">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvPhFax">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvPhCellular">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvPhPager">*</html:div>
|
||||
</box>
|
||||
|
||||
<box id="cvbWork" align="vertical">
|
||||
<html:div class="CardViewHeading" hide="true" id="cvhWork">&work.heading;</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvJobTitle">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvDepartment">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvCompany">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvWorkAddress">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvWorkAddress2">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvWorkCityStZip">*</html:div>
|
||||
<html:div class="CardViewText" hide="true" id="cvWorkCountry">*</html:div>
|
||||
</box>
|
||||
</box>
|
||||
|
||||
</box>
|
||||
|
||||
</box>
|
||||
|
||||
</overlay>
|
||||
257
mozilla/mailnews/addrbook/resources/content/abCommon.js
Normal file
@@ -0,0 +1,257 @@
|
||||
// functions needed from abMainWindow and abSelectAddresses
|
||||
|
||||
// Controller object for Results Pane
|
||||
var ResultsPaneController =
|
||||
{
|
||||
IsCommandEnabled: function(command)
|
||||
{
|
||||
dump('ResultsPaneController::IsCommandEnabled(' + command + ')\n');
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_selectAll":
|
||||
return true;
|
||||
|
||||
case "cmd_delete":
|
||||
var resultsTree = document.getElementById('resultsTree');
|
||||
if ( resultsTree && resultsTree.selectedItems )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
DoCommand: function(command)
|
||||
{
|
||||
var resultsTree = document.getElementById('resultsTree');
|
||||
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_selectAll":
|
||||
if ( resultsTree )
|
||||
{
|
||||
dump("select all now!!!!!!" + "\n");
|
||||
resultsTree.selectAll();
|
||||
}
|
||||
break;
|
||||
|
||||
case "cmd_delete":
|
||||
if ( resultsTree )
|
||||
{
|
||||
var cardList = resultsTree.selectedItems;
|
||||
top.addressbook.DeleteCards(resultsTree, resultsTree, cardList);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Controller object for Dir Pane
|
||||
var DirPaneController =
|
||||
{
|
||||
IsCommandEnabled: function(command)
|
||||
{
|
||||
dump('DirPaneController::IsCommandEnabled(' + command + ')\n');
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_selectAll":
|
||||
return true;
|
||||
case "cmd_delete":
|
||||
var dirTree = document.getElementById('dirTree');
|
||||
if ( dirTree && dirTree.selectedItems )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
DoCommand: function(command)
|
||||
{
|
||||
var dirTree = document.getElementById('dirTree');
|
||||
|
||||
switch ( command )
|
||||
{
|
||||
case "cmd_selectAll":
|
||||
if ( dirTree )
|
||||
{
|
||||
dump("select all now!!!!!!" + "\n");
|
||||
dirTree.selectAll();
|
||||
}
|
||||
break;
|
||||
|
||||
case "cmd_delete":
|
||||
if ( dirTree )
|
||||
top.addressbook.DeleteAddressBooks(dirTree.database, dirTree, dirTree.selectedItems);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function SetupCommandUpdateHandlers()
|
||||
{
|
||||
var widget;
|
||||
|
||||
// dir pane
|
||||
widget = document.getElementById('dirTree');
|
||||
if ( widget )
|
||||
widget.controller = DirPaneController;
|
||||
|
||||
// results pane
|
||||
widget = document.getElementById('resultsTree');
|
||||
if ( widget )
|
||||
widget.controller = ResultsPaneController;
|
||||
}
|
||||
|
||||
|
||||
function AbNewCard()
|
||||
{
|
||||
var selectedAB = 0;
|
||||
var tree = document.getElementById('dirTree');
|
||||
if ( tree && tree.selectedItems && (tree.selectedItems.length == 1) )
|
||||
selectedAB = tree.selectedItems[0].getAttribute('id');
|
||||
|
||||
goNewCardDialog(selectedAB);
|
||||
}
|
||||
|
||||
function AbEditCard()
|
||||
{
|
||||
var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();
|
||||
rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
|
||||
|
||||
var resultsTree = document.getElementById('resultsTree');
|
||||
|
||||
if ( resultsTree.selectedItems && resultsTree.selectedItems.length == 1 )
|
||||
{
|
||||
var uri = resultsTree.selectedItems[0].getAttribute('id');
|
||||
var card = rdf.GetResource(uri);
|
||||
card = card.QueryInterface(Components.interfaces.nsIAbCard);
|
||||
goEditCardDialog(document.getElementById('resultsTree').getAttribute('ref'),
|
||||
card, top.editCardCallback);
|
||||
}
|
||||
}
|
||||
|
||||
function AbNewMessage()
|
||||
{
|
||||
var msgComposeService = Components.classes["component://netscape/messengercompose"].getService();
|
||||
msgComposeService = msgComposeService.QueryInterface(Components.interfaces.nsIMsgComposeService);
|
||||
|
||||
msgComposeService.OpenComposeWindowWithValues(null, 0, GetSelectedAddresses(), null, null,
|
||||
null, null, null);
|
||||
}
|
||||
|
||||
function GetSelectedAddresses()
|
||||
{
|
||||
var item, uri, rdf, cardResource, card;
|
||||
var selectedAddresses = "";
|
||||
|
||||
var resultsTree = document.getElementById('resultsTree');
|
||||
|
||||
rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();
|
||||
rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
|
||||
|
||||
if ( resultsTree.selectedItems && resultsTree.selectedItems.length )
|
||||
{
|
||||
for ( item = 0; item < resultsTree.selectedItems.length; item++ )
|
||||
{
|
||||
uri = resultsTree.selectedItems[item].getAttribute('id');
|
||||
cardResource = rdf.GetResource(uri);
|
||||
card = cardResource.QueryInterface(Components.interfaces.nsIAbCard);
|
||||
if ( selectedAddresses )
|
||||
selectedAddresses += ",";
|
||||
selectedAddresses += "\"" + card.DisplayName + "\" <" + card.PrimaryEmail + ">";
|
||||
}
|
||||
}
|
||||
dump("selectedAddresses = " + selectedAddresses + "\n");
|
||||
return selectedAddresses;
|
||||
}
|
||||
|
||||
|
||||
function SelectFirstAddressBook()
|
||||
{
|
||||
var tree = document.getElementById('dirTree');
|
||||
var body = document.getElementById('dirTreeBody');
|
||||
if ( tree && body )
|
||||
{
|
||||
var treeitems = body.getElementsByTagName('treeitem');
|
||||
if ( treeitems && treeitems.length > 0 )
|
||||
{
|
||||
tree.selectItem(treeitems[0]);
|
||||
ChangeDirectoryByDOMNode(treeitems[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function DirPaneSelectionChange()
|
||||
{
|
||||
// FIX ME - deselect the items in the results pane to work around tree bug
|
||||
var resultsTree = document.getElementById('resultsTree');
|
||||
if ( resultsTree )
|
||||
resultsTree.clearItemSelection();
|
||||
// ----
|
||||
|
||||
var tree = document.getElementById('dirTree');
|
||||
if ( tree && tree.selectedItems && (tree.selectedItems.length == 1) )
|
||||
ChangeDirectoryByDOMNode(tree.selectedItems[0]);
|
||||
else
|
||||
{
|
||||
var tree = document.getElementById('resultsTree');
|
||||
if ( tree )
|
||||
tree.setAttribute('ref', null);
|
||||
}
|
||||
}
|
||||
|
||||
function ChangeDirectoryByDOMNode(dirNode)
|
||||
{
|
||||
var uri = dirNode.getAttribute('id');
|
||||
dump("uri = " + uri + "\n");
|
||||
|
||||
var tree = document.getElementById('resultsTree');
|
||||
if ( tree )
|
||||
tree.setAttribute('ref', uri);
|
||||
}
|
||||
|
||||
function ResultsPaneSelectionChange()
|
||||
{
|
||||
// FIX ME! - Should use some js var to determine abmain vs selectaddress dialog
|
||||
// not in ab window if no parent.parent.rdf
|
||||
if ( parent.parent.rdf )
|
||||
{
|
||||
var tree = document.getElementById('resultsTree');
|
||||
|
||||
if ( tree && tree.selectedItems && (tree.selectedItems.length == 1) )
|
||||
DisplayCardViewPane(tree.selectedItems[0]);
|
||||
else
|
||||
ClearCardViewPane();
|
||||
}
|
||||
}
|
||||
|
||||
function SortResultPane(column, sortKey)
|
||||
{
|
||||
var node = document.getElementById(column);
|
||||
if(!node) return(false);
|
||||
|
||||
var isupports = Components.classes["component://netscape/rdf/xul-sort-service"].getService();
|
||||
if (!isupports) return(false);
|
||||
|
||||
var xulSortService = isupports.QueryInterface(Components.interfaces.nsIXULSortService);
|
||||
if (!xulSortService) return(false);
|
||||
|
||||
// sort!!!
|
||||
sortDirection = "ascending";
|
||||
var currentDirection = node.getAttribute('sortDirection');
|
||||
if (currentDirection == "ascending")
|
||||
sortDirection = "descending";
|
||||
else if (currentDirection == "descending")
|
||||
sortDirection = "ascending";
|
||||
else sortDirection = "ascending";
|
||||
|
||||
xulSortService.Sort(node, sortKey, sortDirection);
|
||||
|
||||
return(true);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/abDirTreeOverlay.dtd">
|
||||
|
||||
|
||||
<overlay xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<!-- FIX ME - remove document.commandDispatcher.updateCommands() when tree selection calls this automatically -->
|
||||
<tree id="dirTree"
|
||||
class="abDirectory"
|
||||
style="width:100%; height:100%"
|
||||
ref="abdirectory://"
|
||||
open="true"
|
||||
datasources="rdf:addressdirectory"
|
||||
onselect="DirPaneSelectionChange(); document.commandDispatcher.updateCommands('select');">
|
||||
|
||||
<template>
|
||||
<rule>
|
||||
<treechildren>
|
||||
<treeitem uri="...">
|
||||
<treerow >
|
||||
<treecell indent="true" value="rdf:http://home.netscape.com/NC-rdf#DirName"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
|
||||
<treecol rdf:resource="http://home.netscape.com/NC-rdf#DirName"/>
|
||||
|
||||
<treehead>
|
||||
<treerow>
|
||||
<treecell>&directoryColumn.label;</treecell>
|
||||
</treerow>
|
||||
</treehead>
|
||||
|
||||
<treechildren id="dirTreeBody"
|
||||
rdf:containment="http://home.netscape.com/NC-rdf#child"
|
||||
rdf:ignore="http://home.netscape.com/NC-rdf#CardChild">
|
||||
</treechildren>
|
||||
</tree>
|
||||
|
||||
</overlay>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
<?xml-stylesheet href="chrome://addressbook/skin/" type="text/css"?>
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://addressbook/content/abCardOverlay.xul"?>
|
||||
|
||||
|
||||
<window xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="OnLoadEditCard()"
|
||||
class="dialog"
|
||||
align="vertical">
|
||||
|
||||
<keyset id="keyset"/>
|
||||
|
||||
<box id="editcard"/>
|
||||
|
||||
<box id="okCancelButtons"/>
|
||||
|
||||
</window>
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
<?xml-stylesheet href="chrome://addressbook/skin/" type="text/css"?>
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://addressbook/content/abCardOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/abNewCardDialog.dtd">
|
||||
|
||||
|
||||
<window xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
title="&editcardWindow.title;"
|
||||
onload="OnLoadNewCard()"
|
||||
class="dialog"
|
||||
align="vertical">
|
||||
|
||||
<!--html:script language="JavaScript" src="resource:/res/samples/DumpDOM.js"/-->
|
||||
|
||||
<keyset id="keyset"/>
|
||||
|
||||
<box align="horizontal">
|
||||
<html:label for="abPopup">&chooseAddressBook.label;</html:label>
|
||||
<html:select id="abPopup" ref="abdirectory://" datasources="rdf:addressdirectory">
|
||||
<template>
|
||||
<html:option uri="..." value="rdf:http://home.netscape.com/NC-rdf#DirUri">
|
||||
<text value="rdf:http://home.netscape.com/NC-rdf#DirName"/>
|
||||
</html:option>
|
||||
</template>
|
||||
</html:select>
|
||||
</box>
|
||||
|
||||
<!--box align="horizontal">
|
||||
<html:label for="chooseAddressBook">&chooseAddressBook.label;</html:label>
|
||||
<html:select id="chooseAddressBook">
|
||||
</html:select>
|
||||
</box-->
|
||||
|
||||
<spring style="height:1em"/>
|
||||
|
||||
<box id="editcard"/>
|
||||
|
||||
<box id="okCancelButtons"/>
|
||||
|
||||
</window>
|
||||
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/abResultsTreeOverlay.dtd">
|
||||
|
||||
|
||||
<overlay xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<!-- FIX ME - remove document.commandDispatcher.updateCommands() when tree selection calls this automatically -->
|
||||
<tree id="resultsTree"
|
||||
class="abResults"
|
||||
style="width:100%; height:100%"
|
||||
datasources="rdf:addressdirectory rdf:addresscard"
|
||||
onselect="top.ResultsPaneSelectionChange(); document.commandDispatcher.updateCommands('select');"
|
||||
ondblclick="top.AbEditCard()"
|
||||
containment="http://home.netscape.com/NC-rdf#CardChild">
|
||||
|
||||
<template>
|
||||
<rule>
|
||||
<treechildren>
|
||||
<treeitem uri="...">
|
||||
<treerow >
|
||||
<treecell indent="true" value="rdf:http://home.netscape.com/NC-rdf#DisplayName"/>
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#PrimaryEmail"/>
|
||||
<treecell value="rdf:http://home.netscape.com/NC-rdf#WorkPhone"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
|
||||
<treecol style="width:20%" id="NameColumn" rdf:resource="http://home.netscape.com/NC-rdf#DisplayName"/>
|
||||
<treecol style="width:21%" id="EmailColumn" rdf:resource="http://home.netscape.com/NC-rdf#PrimaryEmail"/>
|
||||
<treecol style="width:20%" id="WorkPhoneColumn" rdf:resource="http://home.netscape.com/NC-rdf#WorkPhone"/>
|
||||
|
||||
<treehead>
|
||||
<treerow>
|
||||
<treecell onclick="return top.SortResultPane('NameColumn', 'http://home.netscape.com/NC-rdf#DisplayName');">&nameColumn.label;</treecell>
|
||||
<treecell onclick="return top.SortResultPane('EmailColumn', 'http://home.netscape.com/NC-rdf#PrimaryEmail');">&emailColumn.label;</treecell>
|
||||
<treecell onclick="return top.SortResultPane('WorkPhoneColumn', 'http://home.netscape.com/NC-rdf#WorkPhone');">&phoneColumn.label;</treecell>
|
||||
</treerow>
|
||||
</treehead>
|
||||
|
||||
</tree>
|
||||
|
||||
</overlay>
|
||||
@@ -0,0 +1,183 @@
|
||||
var addressbook = 0;
|
||||
var composeWindow = 0;
|
||||
var msgCompFields = 0;
|
||||
var editCardCallback = 0;
|
||||
|
||||
// localization strings
|
||||
var prefixTo = "To: ";
|
||||
var prefixCc = "Cc: ";
|
||||
var prefixBcc = "Bcc: ";
|
||||
|
||||
function OnLoadSelectAddress()
|
||||
{
|
||||
var toAddress="", ccAddress="", bccAddress="";
|
||||
|
||||
doSetOKCancel(SelectAddressOKButton, 0);
|
||||
|
||||
top.addressbook = Components.classes["component://netscape/addressbook"].createInstance();
|
||||
top.addressbook = top.addressbook.QueryInterface(Components.interfaces.nsIAddressBook);
|
||||
|
||||
// look in arguments[0] for parameters
|
||||
if (window.arguments && window.arguments[0])
|
||||
{
|
||||
// keep parameters in global for later
|
||||
if ( window.arguments[0].composeWindow )
|
||||
top.composeWindow = window.arguments[0].composeWindow;
|
||||
if ( window.arguments[0].msgCompFields )
|
||||
top.msgCompFields = window.arguments[0].msgCompFields;
|
||||
if ( window.arguments[0].toAddress )
|
||||
toAddress = window.arguments[0].toAddress;
|
||||
if ( window.arguments[0].ccAddress )
|
||||
ccAddress = window.arguments[0].ccAddress;
|
||||
if ( window.arguments[0].bccAddress )
|
||||
bccAddress = window.arguments[0].bccAddress;
|
||||
|
||||
dump("onload top.composeWindow: " + top.composeWindow + "\n");
|
||||
dump("onload toAddress: " + toAddress + "\n");
|
||||
|
||||
// put the addresses into the bucket
|
||||
AddAddressFromComposeWindow(toAddress, prefixTo);
|
||||
AddAddressFromComposeWindow(ccAddress, prefixCc);
|
||||
AddAddressFromComposeWindow(bccAddress, prefixBcc);
|
||||
}
|
||||
|
||||
SelectFirstAddressBook();
|
||||
}
|
||||
|
||||
function AddAddressFromComposeWindow(addresses, prefix)
|
||||
{
|
||||
if ( addresses )
|
||||
{
|
||||
var addressArray = addresses.split(",");
|
||||
|
||||
for ( var index = 0; index < addressArray.length; index++ )
|
||||
{
|
||||
// remove leading spaces
|
||||
while ( addressArray[index][0] == " " )
|
||||
addressArray[index] = addressArray[index].substring(1, addressArray[index].length);
|
||||
|
||||
AddAddressIntoBucket(prefix + addressArray[index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function SelectAddressOKButton()
|
||||
{
|
||||
var body = document.getElementById('bucketBody');
|
||||
var item, row, cell, text, colon;
|
||||
var toAddress="", ccAddress="", bccAddress="";
|
||||
|
||||
for ( var index = 0; index < body.childNodes.length; index++ )
|
||||
{
|
||||
item = body.childNodes[index];
|
||||
if ( item.childNodes && item.childNodes.length )
|
||||
{
|
||||
row = item.childNodes[0];
|
||||
if ( row.childNodes && row.childNodes.length )
|
||||
{
|
||||
cell = row.childNodes[0];
|
||||
if ( cell.childNodes && cell.childNodes.length )
|
||||
{
|
||||
text = cell.childNodes[0];
|
||||
if ( text && text.data && text.data.length )
|
||||
{
|
||||
switch ( text.data[0] )
|
||||
{
|
||||
case prefixTo[0]:
|
||||
if ( toAddress )
|
||||
toAddress += ", ";
|
||||
toAddress += text.data.substring(prefixTo.length, text.data.length);
|
||||
break;
|
||||
case prefixCc[0]:
|
||||
if ( ccAddress )
|
||||
ccAddress += ", ";
|
||||
ccAddress += text.data.substring(prefixCc.length, text.data.length);
|
||||
break;
|
||||
case prefixBcc[0]:
|
||||
if ( bccAddress )
|
||||
bccAddress += ", ";
|
||||
bccAddress += text.data.substring(prefixBcc.length, text.data.length);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// reset the UI in compose window
|
||||
msgCompFields.SetTo(toAddress);
|
||||
msgCompFields.SetCc(ccAddress);
|
||||
msgCompFields.SetBcc(bccAddress);
|
||||
top.composeWindow.CompFields2Recipients(top.msgCompFields);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function SelectAddressToButton()
|
||||
{
|
||||
AddSelectedAddressesIntoBucket(prefixTo);
|
||||
}
|
||||
|
||||
function SelectAddressCcButton()
|
||||
{
|
||||
AddSelectedAddressesIntoBucket(prefixCc);
|
||||
}
|
||||
|
||||
function SelectAddressBccButton()
|
||||
{
|
||||
AddSelectedAddressesIntoBucket(prefixBcc);
|
||||
}
|
||||
|
||||
function AddSelectedAddressesIntoBucket(prefix)
|
||||
{
|
||||
var item, uri, rdf, cardResource, card, address;
|
||||
|
||||
rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();
|
||||
rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
|
||||
|
||||
var resultsTree = document.getElementById('resultsTree');
|
||||
|
||||
if ( resultsTree && resultsTree.selectedItems && resultsTree.selectedItems.length )
|
||||
{
|
||||
for ( item = 0; item < resultsTree.selectedItems.length; item++ )
|
||||
{
|
||||
uri = resultsTree.selectedItems[item].getAttribute('id');
|
||||
cardResource = rdf.GetResource(uri);
|
||||
card = cardResource.QueryInterface(Components.interfaces.nsIAbCard);
|
||||
address = prefix + "\"" + card.DisplayName + "\" <" + card.PrimaryEmail + ">";
|
||||
AddAddressIntoBucket(address);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function AddAddressIntoBucket(address)
|
||||
{
|
||||
var body = document.getElementById("bucketBody");
|
||||
|
||||
var item = document.createElement('treeitem');
|
||||
var row = document.createElement('treerow');
|
||||
var cell = document.createElement('treecell');
|
||||
var text = document.createTextNode(address);
|
||||
|
||||
cell.appendChild(text);
|
||||
row.appendChild(cell);
|
||||
item.appendChild(row);
|
||||
body.appendChild(item);
|
||||
}
|
||||
|
||||
function RemoveSelectedFromBucket()
|
||||
{
|
||||
var bucketTree = document.getElementById("addressBucket");
|
||||
if ( bucketTree )
|
||||
{
|
||||
var body = document.getElementById("bucketBody");
|
||||
|
||||
if ( body && bucketTree.selectedItems && bucketTree.selectedItems.length )
|
||||
{
|
||||
for ( var item = bucketTree.selectedItems.length - 1; item >= 0; item-- )
|
||||
body.removeChild(bucketTree.selectedItems[item]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
<?xml-stylesheet href="chrome://addressbook/skin/" type="text/css"?>
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://addressbook/content/abDirTreeOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://addressbook/content/abResultsTreeOverlay.xul"?>
|
||||
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/abSelectAddressesDialog.dtd">
|
||||
|
||||
|
||||
<window xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&selectAddressWindow.title;"
|
||||
class="dialog"
|
||||
width="640" height="480"
|
||||
style="width:100%; height:100%; padding:0px"
|
||||
onload="OnLoadSelectAddress()"
|
||||
align="vertical">
|
||||
|
||||
<html:script language="JavaScript" src="chrome://addressbook/content/abCommon.js"/>
|
||||
<html:script language="JavaScript" src="chrome://addressbook/content/abSelectAddressesDialog.js"/>
|
||||
<html:script language="JavaScript" src="chrome://messengercompose/content/MsgComposeCommands.js"/>
|
||||
<html:script language="JavaScript" src="chrome://global/content/globalOverlay.js"/>
|
||||
<!--html:script language="JavaScript" src="resource:/res/samples/DumpDOM.js"/-->
|
||||
|
||||
|
||||
<keyset id="keyset"/>
|
||||
|
||||
<!-- Thin box across top, show names containing & stop, search buttons -->
|
||||
<box align="horizontal" style="width:100%; padding:0px; padding-top:2px; padding-bottom:2px">
|
||||
<html:div flex="100%" style="vertical-align: middle;">
|
||||
<html:label for="searchtext" tabindex="0">&search.label;</html:label>
|
||||
<html:input type="text" id="searchtext" flex="100%"/>
|
||||
</html:div>
|
||||
|
||||
<spring style="width: 1em;"/>
|
||||
|
||||
<titledbutton id="stop" value="&stopButton.label;" class="push" onclick="SelectAddressStopButton()"/>
|
||||
<spring style="width:5px"/>
|
||||
<titledbutton id="search" value="&searchButton.label;" class="push" onclick="SelectAddressSearchButton()"/>
|
||||
</box>
|
||||
|
||||
<!-- Main box, 3 pane and majority of buttons -->
|
||||
<box align="horizontal" flex="100%">
|
||||
<!-- 3 Pane box -->
|
||||
<box align="horizontal" flex="100%" style="border-top:solid black 1px; border-bottom:solid black 1px">
|
||||
|
||||
<!-- dir tree -->
|
||||
<box align="horizontal"
|
||||
style="width:200px; height:100%; background-color:white; border-right:solid black 1px">
|
||||
<!-- FIX ME - div is hack to make tree scroll properly -->
|
||||
<html:div style="width:100px;height:100px" flex="1">
|
||||
<tree id="dirTree"/>
|
||||
</html:div>
|
||||
</box>
|
||||
|
||||
<splitter collapse="before"/>
|
||||
|
||||
<!-- Box that holds results pane, (to,cc,bcc buttons), and address bucket -->
|
||||
<box align="vertical" flex="100%" style="border-left:solid black 1px; border-right:solid black 1px">
|
||||
<!-- Box that holds results pane and (to,cc,bcc buttons) -->
|
||||
<box align="vertical" flex="100%">
|
||||
<!-- results tree -->
|
||||
<box flex="100%" align="vertical"
|
||||
style="background-color:white; border-bottom:solid black 1px">
|
||||
<!-- FIX ME - div is hack to make tree scroll properly -->
|
||||
<html:div style="width:100px;height:100px" flex="1">
|
||||
<tree id="resultsTree"/>
|
||||
</html:div>
|
||||
</box>
|
||||
|
||||
<!-- Box that holds (to,cc,bcc buttons) -->
|
||||
<box align="horizontal" style="padding:0.3em; border-bottom:solid black 1px">
|
||||
<spring flex="50%"/>
|
||||
<titledbutton id="toButton" value="&toButton.label;" class="push" onclick="SelectAddressToButton()"/>
|
||||
<spring style="width:10px"/>
|
||||
<titledbutton id="ccButton" value="&ccButton.label;" class="push" onclick="SelectAddressCcButton()"/>
|
||||
<spring style="width:10px"/>
|
||||
<titledbutton id="bccButton" value="&bccButton.label;" class="push" onclick="SelectAddressBccButton()"/>
|
||||
<spring flex="50%"/>
|
||||
</box>
|
||||
</box>
|
||||
|
||||
<splitter collapse="after"/>
|
||||
|
||||
<!-- Address bucket -->
|
||||
<box align="vertical" style="height:170px; background-color:white; border-top:solid black 1px">
|
||||
<html:div style="width:100px;height:100px" flex="1">
|
||||
<tree id="addressBucket" style="width:100%; height:100%">
|
||||
<treecol style="width:100%"/>
|
||||
<treechildren id="bucketBody"/>
|
||||
</tree>
|
||||
</html:div>
|
||||
</box>
|
||||
|
||||
</box>
|
||||
</box>
|
||||
|
||||
<!-- Box with buttons on right edge of window -->
|
||||
<box align="vertical" style="padding: .5em; padding-right: 0px">
|
||||
<box align="vertical" flex="50%">
|
||||
<spring style="height:10px"/>
|
||||
<titledbutton id="new" value="&newButton.label;" class="push" onclick="AbNewCard()"/>
|
||||
<spring style="height:10px"/>
|
||||
<titledbutton id="edit" value="&editButton.label;" class="push" onclick="AbEditCard()"/>
|
||||
<spring style="height:10px"/>
|
||||
<titledbutton id="view" value="&viewButton.label;" class="push" onclick="SelectAddressViewButton()"/>
|
||||
<spring flex="100%"/>
|
||||
</box>
|
||||
<box align="vertical" flex="50%">
|
||||
<spring flex="50%"/>
|
||||
<titledbutton id="remove" value="&removeButton.label;" class="push" onclick="RemoveSelectedFromBucket()"/>
|
||||
<spring flex="50%"/>
|
||||
</box>
|
||||
</box>
|
||||
</box>
|
||||
|
||||
<!-- OK & Cancel buttons -->
|
||||
<box id="okCancelButtons"/>
|
||||
|
||||
</window>
|
||||
183
mozilla/mailnews/addrbook/resources/content/addressbook.js
Normal file
@@ -0,0 +1,183 @@
|
||||
var addressbook = 0;
|
||||
var editCardCallback = 0;
|
||||
|
||||
// functions used only by addressbook
|
||||
|
||||
function OnLoadAddressBook()
|
||||
{
|
||||
// FIX ME - later we will be able to use onload from the overlay
|
||||
OnLoadCardView();
|
||||
|
||||
top.addressbook = Components.classes["component://netscape/addressbook"].createInstance();
|
||||
top.addressbook = top.addressbook.QueryInterface(Components.interfaces.nsIAddressBook);
|
||||
top.editCardCallback = UpdateCardView;
|
||||
|
||||
try {
|
||||
top.addressbook.SetWebShellWindow(window)
|
||||
}
|
||||
catch (ex) {
|
||||
dump("failed to set webshell window\n");
|
||||
}
|
||||
|
||||
SetupCommandUpdateHandlers();
|
||||
SelectFirstAddressBook();
|
||||
}
|
||||
|
||||
|
||||
function CommandUpdate_AddressBook()
|
||||
{
|
||||
dump("CommandUpdate_AddressBook\n");
|
||||
|
||||
// get selection info from dir pane
|
||||
var tree = document.getElementById('dirTree');
|
||||
var oneAddressBookSelected = false;
|
||||
if ( tree && tree.selectedItems && (tree.selectedItems.length == 1) )
|
||||
oneAddressBookSelected = true;
|
||||
dump("oneAddressBookSelected = " + oneAddressBookSelected + "\n");
|
||||
|
||||
// get selection info from results pane
|
||||
var selectedCards = GetSelectedAddresses();
|
||||
var oneOrMoreCardsSelected = false;
|
||||
if ( selectedCards )
|
||||
oneOrMoreCardsSelected = true;
|
||||
|
||||
// set commands to enabled / disabled
|
||||
goSetCommandEnabled('cmd_PrintCard', oneOrMoreCardsSelected);
|
||||
goSetCommandEnabled('cmd_SortByName', oneAddressBookSelected);
|
||||
goSetCommandEnabled('cmd_SortByEmail', oneAddressBookSelected);
|
||||
goSetCommandEnabled('cmd_SortByPhone', oneAddressBookSelected);
|
||||
|
||||
AbUpdateCommandDelete();
|
||||
}
|
||||
|
||||
|
||||
// This function updates the text of the delete menu item and sets the state of the delete button
|
||||
function AbUpdateCommandDelete()
|
||||
{
|
||||
var command = "cmd_delete";
|
||||
var focusedElement = document.commandDispatcher.focusedElement;
|
||||
|
||||
var id = 0;
|
||||
if ( focusedElement )
|
||||
id = focusedElement.getAttribute('id');
|
||||
|
||||
dump("focusedOn = " + id + "\n");
|
||||
|
||||
switch ( id )
|
||||
{
|
||||
case "dirTree":
|
||||
// menu text
|
||||
goSetMenuValue(command, 'valueAddressBook');
|
||||
// delete button
|
||||
var dirTree = document.getElementById('dirTree');
|
||||
var numSelected = 0;
|
||||
if ( dirTree && dirTree.selectedItems )
|
||||
numSelected = dirTree.selectedItems.length;
|
||||
goSetCommandEnabled('button_delete', (numSelected>0));
|
||||
break;
|
||||
case "resultsTree":
|
||||
// menu text
|
||||
var resultsTree = document.getElementById('resultsTree');
|
||||
var numSelected = 0;
|
||||
if ( resultsTree && resultsTree.selectedItems )
|
||||
numSelected = resultsTree.selectedItems.length;
|
||||
if ( numSelected < 2 )
|
||||
goSetMenuValue(command, 'valueCard');
|
||||
else
|
||||
goSetMenuValue(command, 'valueCards');
|
||||
// delete button
|
||||
goSetCommandEnabled('button_delete', (numSelected>0));
|
||||
break;
|
||||
default:
|
||||
goSetMenuValue(command, 'valueDefault');
|
||||
goSetCommandEnabled('button_delete', false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function UpdateCardView()
|
||||
{
|
||||
var tree = document.getElementById('resultsTree');
|
||||
|
||||
if ( tree && tree.selectedItems && (tree.selectedItems.length == 1) )
|
||||
DisplayCardViewPane(tree.selectedItems[0]);
|
||||
}
|
||||
|
||||
|
||||
function AbClose()
|
||||
{
|
||||
top.window.close();
|
||||
}
|
||||
|
||||
function AbNewAddressBook()
|
||||
{
|
||||
var dialog = window.openDialog("chrome://addressbook/content/abAddressBookNameDialog.xul",
|
||||
"",
|
||||
"chrome",
|
||||
{title:"New Address Book",
|
||||
okCallback:AbCreateNewAddressBook});
|
||||
}
|
||||
|
||||
function AbCreateNewAddressBook(name)
|
||||
{
|
||||
top.addressbook.NewAddressBook(document.getElementById('dirTree').database, document.getElementById('resultsTree'), name);
|
||||
}
|
||||
|
||||
function AbPrintCard()
|
||||
{
|
||||
dump("print card\n");
|
||||
try {
|
||||
addressbook.PrintCard();
|
||||
}
|
||||
catch (ex) {
|
||||
dump("failed to print card\n");
|
||||
}
|
||||
}
|
||||
|
||||
function AbPrintAddressBook()
|
||||
{
|
||||
dump("print address book \n");
|
||||
try {
|
||||
addressbook.PrintAddressbook();
|
||||
}
|
||||
catch (ex) {
|
||||
dump("failed to print address book\n");
|
||||
}
|
||||
}
|
||||
|
||||
function AbImport()
|
||||
{
|
||||
addressbook.ImportAddressBook();
|
||||
}
|
||||
|
||||
/*
|
||||
function AbDelete()
|
||||
{
|
||||
// dump("\AbDelete from XUL\n");
|
||||
var tree = document.getElementById('resultsTree');
|
||||
if ( tree )
|
||||
{
|
||||
//get the selected elements
|
||||
var cardList = tree.selectedItems;
|
||||
//get the current folder
|
||||
var srcDirectory = document.getElementById('resultsTree');
|
||||
dump("srcDirectory = " + srcDirectory + "\n");
|
||||
top.addressbook.DeleteCards(tree, srcDirectory, cardList);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
function AbDeleteDirectory()
|
||||
{
|
||||
// dump("\AbDeleteDirectory from XUL\n");
|
||||
var tree = document.getElementById('dirTree');
|
||||
|
||||
// if ( tree && tree.selectedItems && tree.selectedItems.length )
|
||||
if ( tree )
|
||||
top.addressbook.DeleteAddressBooks(tree.database, tree, tree.selectedItems);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
247
mozilla/mailnews/addrbook/resources/content/addressbook.xul
Normal file
@@ -0,0 +1,247 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
<?xml-stylesheet href="chrome://addressbook/skin/" type="text/css"?>
|
||||
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://global/content/tasksOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://addressbook/content/abDirTreeOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://addressbook/content/abResultsTreeOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://addressbook/content/abCardViewOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/abMainWindow.dtd">
|
||||
|
||||
|
||||
<window xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
height="420"
|
||||
width="600"
|
||||
align="vertical"
|
||||
title="&addressbookWindow.title;"
|
||||
windowtype="mail:addressbook"
|
||||
onload="OnLoadAddressBook()">
|
||||
|
||||
<html:script language="JavaScript" src="chrome://addressbook/content/addressbook.js"/>
|
||||
<html:script language="JavaScript" src="chrome://addressbook/content/abCommon.js"/>
|
||||
<!--html:script language="JavaScript" src="resource:/res/samples/DumpDOM.js"/-->
|
||||
|
||||
<commands id="commands">
|
||||
<commandset id="CommandUpdate_AddressBook"
|
||||
commandupdater="true"
|
||||
events="focus,blur,select"
|
||||
oncommandupdate="CommandUpdate_AddressBook()"/>
|
||||
|
||||
<commandset id="globalEditMenuItems"/>
|
||||
</commands>
|
||||
|
||||
<broadcasterset id="broadcasterset">
|
||||
<!-- File Menu -->
|
||||
<broadcaster id="cmd_newNavigator"/>
|
||||
<broadcaster id="cmd_newMessage"/>
|
||||
<broadcaster id="cmd_PrintCard" oncommand="AbPrintCard()" disabled="true"/>
|
||||
<broadcaster id="cmd_close" oncommand="AbClose()"/>
|
||||
<broadcaster id="cmd_quit"/>
|
||||
<!-- Edit Menu -->
|
||||
<broadcaster id="cmd_undo"/>
|
||||
<broadcaster id="cmd_redo"/>
|
||||
<broadcaster id="cmd_cut"/>
|
||||
<broadcaster id="cmd_copy"/>
|
||||
<broadcaster id="cmd_paste"/>
|
||||
<broadcaster id="cmd_delete"
|
||||
valueAddressBook="&deleteAbCmd.label;"
|
||||
valueCard="&deleteCardCmd.label;"
|
||||
valueCards="&deleteCardsCmd.label;"/>
|
||||
<broadcaster id='cmd_selectAll'/>
|
||||
<broadcaster id="cmd_preferences"/>
|
||||
</broadcasterset>
|
||||
|
||||
<keyset id="keyset">
|
||||
<!-- File Menu -->
|
||||
<key id="key_newNavigator"/>
|
||||
<key id="key_newMessage"/>
|
||||
<key id="key_PrintCard" command="true" key="&printCardViewCmd.key;" observes="cmd_PrintCard" />
|
||||
<key id="key_close"/>
|
||||
<key id="key_quit"/>
|
||||
<!-- Edit Menu -->
|
||||
<key id="key_undo"/>
|
||||
<key id="key_redo"/>
|
||||
<key id="key_cut"/>
|
||||
<key id="key_copy"/>
|
||||
<key id="key_paste"/>
|
||||
<key id="key_delete"/>
|
||||
<key id="key_selectAll"/>
|
||||
<key id="key_preferences"/>
|
||||
</keyset>
|
||||
|
||||
|
||||
<toolbox>
|
||||
<menubar>
|
||||
<menu id="menu_File">
|
||||
<menupopup id="menu_FilePopup">
|
||||
<menuitem value="&newCard.label;" accesskey="&newCard.accesskey;" oncommand="AbNewCard()"/>
|
||||
<menu id="menu_New">
|
||||
<menupopup>
|
||||
<menuitem value="&newListCmd.label;" accesskey="&newListCmd.accesskey;" oncommand="AbNewList()"/>
|
||||
<menuitem value="&newAddressBookCmd.label;" accesskey="&newAddressBookCmd.accesskey;" oncommand="AbNewAddressBook()"/>
|
||||
<menuitem value="&newDirectoryCmd.label;" accesskey="&newDirectoryCmd.accesskey;" oncommand="AbNewDirectoryt()"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_newNavigator"/>
|
||||
<menuitem id="menu_newMessage"/>
|
||||
<menuitem id="cmd_newCard"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_close"/>
|
||||
<menuseparator/>
|
||||
<menuitem value="&importCmd.label;" oncommand="AbImport()"/>
|
||||
<menuitem value="&exportCmd.label;" oncommand="AbExport()"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_pageSetup"/>
|
||||
<menuitem value="&printPreviewCmd.label;" oncommand="AbPrintPreview()"/>
|
||||
<menuitem value="&printCardViewCmd.label;" key="key_PrintCard" observes="cmd_PrintCard"/>
|
||||
<menuitem value="&printAddressBook.label;" oncommand="AbPrintAddressBook()"/>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
<menu id="menu_Edit">
|
||||
<menupopup>
|
||||
<menuitem id="menu_undo"/>
|
||||
<menuitem id="menu_redo"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_cut"/>
|
||||
<menuitem id="menu_copy"/>
|
||||
<menuitem id="menu_paste"/>
|
||||
<menuitem id="menu_delete"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_selectAll"/>
|
||||
<menuseparator/>
|
||||
<menuitem value="&editCardCmd.label;"
|
||||
accesskey="&editCardCmd.accesskey;"
|
||||
oncommand="AbEditCard();"/>
|
||||
<menuitem value="&htmlDomainCmd.label;"
|
||||
accesskey="&htmlDomainCmd.accesskey;"
|
||||
oncommand="AbHTMLDomain();"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_preferences" oncommand="goPreferences('addressbook.xul', 'chrome://addressbook/content/pref-addressing.xul')"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
<menu id="menu_View">
|
||||
<menupopup>
|
||||
<menu id="menu_Toolbars">
|
||||
<menupopup>
|
||||
<menuitem id="menu_showAbToolbar"
|
||||
value="&showAbToolbarCmd.label;"
|
||||
accesskey="&showAbToolbarCmd.accesskey;"
|
||||
oncommand="goToggleToolbar('abToolbar', 'menu_showAbToolbar')"
|
||||
checked="true"/>
|
||||
<menuitem id="menu_showTaskbar"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuitem value="&showCardPane.label;" oncommand="AbShowCardPane()"/>
|
||||
<menu value="&sortMenu.label;">
|
||||
<menupopup>
|
||||
<menuitem value="&sortByNameCmd.label;"
|
||||
id="cmd_SortByName"
|
||||
disabled="true"
|
||||
oncommand="top.SortResultPane('NameColumn', 'http://home.netscape.com/NC-rdf#DisplayName')"/>
|
||||
<menuitem value="&sortByEmailCmd.label;"
|
||||
id="cmd_SortByEmail"
|
||||
disabled="true"
|
||||
oncommand="top.SortResultPane('EmailColumn', 'http://home.netscape.com/NC-rdf#PrimaryEmail')"/>
|
||||
<menuitem value="&sortByOrganizationCmd.label;" oncommand="AbSortByOrganization()"/>
|
||||
<menuitem value="&sortByNicknameCmd.label;" oncommand="AbSortByNickname()"/>
|
||||
<menuitem value="&sortByPhoneCmd.label;"
|
||||
id="cmd_SortByPhone"
|
||||
disabled="true"
|
||||
oncommand="top.SortResultPane('WorkPhoneColumn', 'http://home.netscape.com/NC-rdf#WorkPhone')"/>
|
||||
<menuitem value="&sortByCityCmd.label;" oncommand="AbSortByCity()"/>
|
||||
<menuseparator/>
|
||||
<menuitem value="&sortAscendingCmd.label;" oncommand="AbSortAscending()"/>
|
||||
<menuitem value="&sortDescendingCmd.label;" oncommand="AbSortDescending()"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
<menu id="tasksMenu"/>
|
||||
<menu id="menu_Help"/>
|
||||
<spring flex="100%"/>
|
||||
</menubar>
|
||||
<toolbar id="abToolbar" persist="collapsed">
|
||||
<titledbutton src="&newcardButton.img;" align="top" value="&newcardButton.label;" onclick="AbNewCard()"/>
|
||||
<titledbutton src="&newlistButton.img;" align="top" value="&newlistButton.label;" onclick="AbNewList()"/>
|
||||
<titledbutton src="&editButton.img;" align="top" value="&editButton.label;" onclick="AbEditCard()"/>
|
||||
<titledbutton src="&newmsgButton.img;" align="top" value="&newmsgButton.label;" onclick="AbNewMessage()"/>
|
||||
<titledbutton id="button_delete" disabled="true" src="&deleteButton.img;" align="top" value="&deleteButton.label;" onclick="AbDelete()"/>
|
||||
|
||||
<html:div class="separator" align="vertical"/>
|
||||
|
||||
<box align="vertical">
|
||||
<spring flex="100%"/>
|
||||
<html:div style="padding-left:5px; padding-bottom:2px">&showNames.label;</html:div>
|
||||
<html:input id="searchtext" type="text" align="bottom" style="min-width:100px; min-height:25px; padding-bottom:0px"/>
|
||||
</box>
|
||||
|
||||
<titledbutton src="&stopButton.img;" align="top" value="&stopButton.label;" onclick="AbStop()"/>
|
||||
<titledbutton src="&searchButton.img;" align="top" value="&searchButton.label;" onclick="AbSearch()"/>
|
||||
<spring flex="100%"/>
|
||||
|
||||
<titledbutton id="Throbber" align="right" onclick="MsgHome('http://www.mozilla.org/')"/>
|
||||
</toolbar>
|
||||
</toolbox>
|
||||
|
||||
<!-- The main address book three pane -->
|
||||
<box align="horizontal" flex="100%">
|
||||
<!-- dir tree -->
|
||||
<box align="horizontal"
|
||||
style="width:200px; height:100%; background-color:white; border-right:solid black 1px">
|
||||
<!-- FIX ME - div is hack to make tree scroll properly -->
|
||||
<html:div style="width:100px;height:100px" flex="1">
|
||||
<tree id="dirTree"/>
|
||||
</html:div>
|
||||
</box>
|
||||
|
||||
<splitter collapse="before"/>
|
||||
|
||||
<box align="vertical" flex="100%" style="border-left:solid black 1px">
|
||||
<!-- results tree -->
|
||||
<box flex="50%" align="vertical"
|
||||
style="background-color:white; border-bottom:solid black 1px">
|
||||
<!-- FIX ME - div is hack to make tree scroll properly -->
|
||||
<html:div style="width:100px;height:100px" flex="1">
|
||||
<tree id="resultsTree"/>
|
||||
</html:div>
|
||||
</box>
|
||||
|
||||
<splitter collapse="after"/>
|
||||
|
||||
<!-- card view -->
|
||||
<box style="height:170px; border-top:solid black 1px">
|
||||
<box id="CardViewBox"/>
|
||||
</box>
|
||||
</box>
|
||||
</box>
|
||||
|
||||
<toolbox id="taskbox"/>
|
||||
|
||||
</window>
|
||||
|
||||
58
mozilla/mailnews/addrbook/resources/content/makefile.win
Normal file
@@ -0,0 +1,58 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=..\..\..\..
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install::
|
||||
$(MAKE_INSTALL) abAddressBookNameDialog.js $(DIST)\bin\chrome\addressbook\content\default
|
||||
$(MAKE_INSTALL) abAddressBookNameDialog.xul $(DIST)\bin\chrome\addressbook\content\default
|
||||
$(MAKE_INSTALL) abCardOverlay.js $(DIST)\bin\chrome\addressbook\content\default
|
||||
$(MAKE_INSTALL) abCardOverlay.xul $(DIST)\bin\chrome\addressbook\content\default
|
||||
$(MAKE_INSTALL) abCardViewOverlay.js $(DIST)\bin\chrome\addressbook\content\default
|
||||
$(MAKE_INSTALL) abCardViewOverlay.xul $(DIST)\bin\chrome\addressbook\content\default
|
||||
$(MAKE_INSTALL) abCommon.js $(DIST)\bin\chrome\addressbook\content\default
|
||||
$(MAKE_INSTALL) abDirTreeOverlay.xul $(DIST)\bin\chrome\addressbook\content\default
|
||||
$(MAKE_INSTALL) abEditCardDialog.xul $(DIST)\bin\chrome\addressbook\content\default
|
||||
$(MAKE_INSTALL) abNewCardDialog.xul $(DIST)\bin\chrome\addressbook\content\default
|
||||
$(MAKE_INSTALL) abResultsTreeOverlay.xul $(DIST)\bin\chrome\addressbook\content\default
|
||||
$(MAKE_INSTALL) abSelectAddressesDialog.js $(DIST)\bin\chrome\addressbook\content\default
|
||||
$(MAKE_INSTALL) abSelectAddressesDialog.xul $(DIST)\bin\chrome\addressbook\content\default
|
||||
$(MAKE_INSTALL) addressbook.js $(DIST)\bin\chrome\addressbook\content\default
|
||||
$(MAKE_INSTALL) addressbook.xul $(DIST)\bin\chrome\addressbook\content\default
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\chrome\addressbook\content\default\abAddressBookNameDialog.js
|
||||
rm -f $(DIST)\chrome\addressbook\content\default\abAddressBookNameDialog.xul
|
||||
rm -f $(DIST)\chrome\addressbook\content\default\abCardOverlay.js
|
||||
rm -f $(DIST)\chrome\addressbook\content\default\abCardOverlay.xul
|
||||
rm -f $(DIST)\chrome\addressbook\content\default\abCardViewOverlay.js
|
||||
rm -f $(DIST)\chrome\addressbook\content\default\abCardViewOverlay.xul
|
||||
rm -f $(DIST)\chrome\addressbook\content\default\abCommon.js
|
||||
rm -f $(DIST)\chrome\addressbook\content\default\abDirTreeOverlay.xul
|
||||
rm -f $(DIST)\chrome\addressbook\content\default\abEditCardDialog.xul
|
||||
rm -f $(DIST)\chrome\addressbook\content\default\abNewCardDialog.xul
|
||||
rm -f $(DIST)\chrome\addressbook\content\default\abResultsTreeOverlay.xul
|
||||
rm -f $(DIST)\chrome\addressbook\content\default\abSelectAddressesDialog.js
|
||||
rm -f $(DIST)\chrome\addressbook\content\default\abSelectAddressesDialog.xul
|
||||
rm -f $(DIST)\chrome\addressbook\content\default\addressbook.js
|
||||
rm -f $(DIST)\chrome\addressbook\content\default\addressbook.xul
|
||||
|
||||
|
||||
|
||||
|
||||
28
mozilla/mailnews/addrbook/resources/locale/Makefile.in
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = en-US
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
abAddressBookNameDialog.dtd
|
||||
abCardOverlay.dtd
|
||||
abCardViewOverlay.dtd
|
||||
abDirTreeOverlay.dtd
|
||||
abMainWindow.dtd
|
||||
abNewCardDialog.dtd
|
||||
abResultsTreeOverlay.dtd
|
||||
abSelectAddressesDialog.dtd
|
||||
40
mozilla/mailnews/addrbook/resources/locale/en-US/Makefile.in
Normal file
@@ -0,0 +1,40 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
EXPORT_RESOURCE_CONTENT = \
|
||||
$(srcdir)/abAddressBookNameDialog.dtd \
|
||||
$(srcdir)/abCardOverlay.dtd \
|
||||
$(srcdir)/abCardViewOverlay.dtd \
|
||||
$(srcdir)/abDirTreeOverlay.dtd \
|
||||
$(srcdir)/abMainWindow.dtd \
|
||||
$(srcdir)/abNewCardDialog.dtd \
|
||||
$(srcdir)/abResultsTreeOverlay.dtd \
|
||||
$(srcdir)/abSelectAddressesDialog.dtd \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
install::
|
||||
$(INSTALL) $(EXPORT_RESOURCE_CONTENT) $(DIST)/bin/chrome/addressbook/locale/en-US
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!-- Labels -->
|
||||
<!ENTITY name.label "Address Book Name">
|
||||
@@ -0,0 +1,65 @@
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!-- Labels -->
|
||||
<!ENTITY Name.tab "Name">
|
||||
<!ENTITY Name.box "Name">
|
||||
<!ENTITY FirstName.label "First:">
|
||||
<!ENTITY LastName.label "Last:">
|
||||
<!ENTITY DisplayName.label "Display:">
|
||||
<!ENTITY NickName.label "Nickname:">
|
||||
<!ENTITY Internet.box "Internet">
|
||||
<!ENTITY PrimaryEmail.label "* Email:">
|
||||
<!ENTITY SecondEmail.label "Additional Email:">
|
||||
<!ENTITY SendPlainText.label "Send email as plain text (no html)">
|
||||
<!ENTITY Phones.box "Phones">
|
||||
<!ENTITY WorkPhone.label "Work:">
|
||||
<!ENTITY HomePhone.label "Home:">
|
||||
<!ENTITY FaxNumber.label "Fax:">
|
||||
<!ENTITY PagerNumber.label "Pager:">
|
||||
<!ENTITY CellularNumber.label "Cellular:">
|
||||
|
||||
<!ENTITY Address.tab "Address">
|
||||
<!ENTITY Home.box "Home">
|
||||
<!ENTITY HomeAddress.label "Address:">
|
||||
<!ENTITY HomeAddress2.label "">
|
||||
<!ENTITY HomeCity.label "City:">
|
||||
<!ENTITY HomeState.label "State:">
|
||||
<!ENTITY HomeZipCode.label "Zip:">
|
||||
<!ENTITY HomeCountry.label "Country:">
|
||||
<!ENTITY Work.box "Work">
|
||||
<!ENTITY JobTitle.label "Title:">
|
||||
<!ENTITY Department.label "Department:">
|
||||
<!ENTITY Company.label "Organization:">
|
||||
<!ENTITY WorkAddress.label "Address:">
|
||||
<!ENTITY WorkAddress2.label "">
|
||||
<!ENTITY WorkCity.label "City:">
|
||||
<!ENTITY WorkState.label "State:">
|
||||
<!ENTITY WorkZipCode.label "Zip:">
|
||||
<!ENTITY WorkCountry.label "Country:">
|
||||
<!--ENTITY Web.box "Web"-->
|
||||
<!ENTITY WebPage1.label "Web Page:">
|
||||
|
||||
<!ENTITY Other.tab "Other">
|
||||
<!ENTITY Custom1.label "Custom 1:">
|
||||
<!ENTITY Custom2.label "Custom 2:">
|
||||
<!ENTITY Custom3.label "Custom 3:">
|
||||
<!ENTITY Custom4.label "Custom 4:">
|
||||
<!ENTITY Notes.box "Notes">
|
||||
@@ -0,0 +1,25 @@
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!-- Box Headings -->
|
||||
<!ENTITY home.heading "Home">
|
||||
<!ENTITY other.heading "Other">
|
||||
<!ENTITY phone.heading "Phone">
|
||||
<!ENTITY work.heading "Work">
|
||||
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!-- Column Heading -->
|
||||
<!ENTITY directoryColumn.label "Directory">
|
||||
@@ -0,0 +1,83 @@
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!-- Title -->
|
||||
<!ENTITY addressbookWindow.title "Address Book">
|
||||
|
||||
<!-- Menus: the . means that the menu item isn't implemented yet -->
|
||||
|
||||
<!-- File Menu -->
|
||||
<!ENTITY newCard.label "New Address Book Card">
|
||||
<!ENTITY newCard.accesskey "n">
|
||||
<!ENTITY newListCmd.label ".Mailing List">
|
||||
<!ENTITY newListCmd.accesskey "l">
|
||||
<!ENTITY newAddressBookCmd.label "Address Book">
|
||||
<!ENTITY newAddressBookCmd.accesskey "b">
|
||||
<!ENTITY newDirectoryCmd.label ".Directory">
|
||||
<!ENTITY newDirectoryCmd.accesskey "d">
|
||||
<!ENTITY importCmd.label "Import...">
|
||||
<!ENTITY exportCmd.label ".Export...">
|
||||
<!ENTITY printPreviewCmd.label ".Print Preview">
|
||||
<!ENTITY printCardViewCmd.label ".Print Card View...">
|
||||
<!ENTITY printCardViewCmd.key "P">
|
||||
<!ENTITY printAddressBook.label ".Print Address Book...">
|
||||
|
||||
<!-- Edit Menu -->
|
||||
<!ENTITY deleteAbCmd.label "Delete Address Book">
|
||||
<!ENTITY deleteCardCmd.label "Delete Card">
|
||||
<!ENTITY deleteCardsCmd.label "Delete Selected Cards">
|
||||
<!ENTITY editCardCmd.label "Edit Card...">
|
||||
<!ENTITY editCardCmd.accesskey "e">
|
||||
<!ENTITY htmlDomainCmd.label ".HTML Domains...">
|
||||
<!ENTITY htmlDomainCmd.accesskey "h">
|
||||
|
||||
<!-- View Menu -->
|
||||
<!ENTITY showAbToolbarCmd.label "Show Address Book Toolbar">
|
||||
<!ENTITY showAbToolbarCmd.accesskey "a">
|
||||
<!ENTITY showCardPane.label ".Card Pane">
|
||||
<!ENTITY sortMenu.label "Sort">
|
||||
<!ENTITY sortByNameCmd.label "by Name">
|
||||
<!ENTITY sortByEmailCmd.label "by Email">
|
||||
<!ENTITY sortByOrganizationCmd.label ".by Organization">
|
||||
<!ENTITY sortByNicknameCmd.label ".by Nickname">
|
||||
<!ENTITY sortByPhoneCmd.label "by Phone Number">
|
||||
<!ENTITY sortByCityCmd.label ".by City">
|
||||
<!ENTITY sortAscendingCmd.label ".Ascending">
|
||||
<!ENTITY sortDescendingCmd.label ".Descending">
|
||||
<!ENTITY stopSearchingCmd.label ".Stop Searching">
|
||||
|
||||
<!-- Toolbar items -->
|
||||
<!ENTITY newcardButton.img "chrome://addressbook/skin/newcard.gif">
|
||||
<!ENTITY newcardButton.label "New Card">
|
||||
<!ENTITY newlistButton.img "chrome://addressbook/skin/newlist.gif">
|
||||
<!ENTITY newlistButton.label ".New List">
|
||||
<!ENTITY editButton.img "chrome://addressbook/skin/property.gif">
|
||||
<!ENTITY editButton.label "Edit">
|
||||
<!ENTITY newmsgButton.img "chrome://addressbook/skin/abnewmsg.gif">
|
||||
<!ENTITY newmsgButton.label "New Msg">
|
||||
<!ENTITY deleteButton.img "chrome://messenger/skin/trash.gif">
|
||||
<!ENTITY deleteButton.label "Delete">
|
||||
<!ENTITY stopButton.img "resource:/res/toolbar/TB_Stop.gif">
|
||||
<!ENTITY stopButton.label ".Stop">
|
||||
<!ENTITY searchButton.img "resource:/res/toolbar/TB_Search.gif">
|
||||
<!ENTITY searchButton.label ".Search">
|
||||
<!ENTITY showNames.label "Show names containing:">
|
||||
<!ENTITY throbber.img "resource:/res/throbber/anims00.gif">
|
||||
<!ENTITY throbber.url "http://www.mozilla.org/">
|
||||
@@ -0,0 +1,24 @@
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!-- Title -->
|
||||
<!ENTITY editcardWindow.title "New Card">
|
||||
<!-- Labels -->
|
||||
<!ENTITY chooseAddressBook.label "Add to: ">
|
||||
@@ -0,0 +1,25 @@
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
<!-- Column Headings -->
|
||||
<!ENTITY nameColumn.label "Name">
|
||||
<!ENTITY emailColumn.label "Email">
|
||||
<!-- LOCALIZATION NOTE (phoneColumn.label): "#" means "number" -->
|
||||
<!ENTITY phoneColumn.label "Phone#">
|
||||
@@ -0,0 +1,40 @@
|
||||
<!--
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
-->
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<!ENTITY selectAddressWindow.title "Select Addresses">
|
||||
|
||||
<!-- Buttons -->
|
||||
<!ENTITY toButton.label "To:">
|
||||
<!ENTITY ccButton.label "Cc:">
|
||||
<!ENTITY bccButton.label "Bcc:">
|
||||
<!ENTITY stopButton.label ".Stop">
|
||||
<!ENTITY searchButton.label ".Search...">
|
||||
<!ENTITY newButton.label "New...">
|
||||
<!ENTITY editButton.label "Edit...">
|
||||
<!ENTITY viewButton.label ".View">
|
||||
<!ENTITY removeButton.label "Remove">
|
||||
<!ENTITY okButton.label "OK">
|
||||
<!ENTITY cancelButton.label "Cancel">
|
||||
<!ENTITY helpButton.label ".Help">
|
||||
|
||||
<!-- Toolbar items -->
|
||||
<!ENTITY search.label "Show names containing:">
|
||||
@@ -0,0 +1,43 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=..\..\..\..\..
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
DISTBROWSER=$(DIST)\bin\chrome\addressbook\locale\en-US
|
||||
|
||||
|
||||
install::
|
||||
$(MAKE_INSTALL) abAddressBookNameDialog.dtd $(DISTBROWSER)
|
||||
$(MAKE_INSTALL) abCardOverlay.dtd $(DISTBROWSER)
|
||||
$(MAKE_INSTALL) abCardViewOverlay.dtd $(DISTBROWSER)
|
||||
$(MAKE_INSTALL) abDirTreeOverlay.dtd $(DISTBROWSER)
|
||||
$(MAKE_INSTALL) abMainWindow.dtd $(DISTBROWSER)
|
||||
$(MAKE_INSTALL) abNewCardDialog.dtd $(DISTBROWSER)
|
||||
$(MAKE_INSTALL) abResultsTreeOverlay.dtd $(DISTBROWSER)
|
||||
$(MAKE_INSTALL) abSelectAddressesDialog.dtd $(DISTBROWSER)
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\abAddressBookNameDialog.dtd
|
||||
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\abCardOverlay.dtd
|
||||
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\abCardViewOverlay.dtd
|
||||
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\abDirTreeOverlay.dtd
|
||||
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\abMainWindow.dtd
|
||||
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\abNewCardDialog.dtd
|
||||
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\abResultsTreeOverlay.dtd
|
||||
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\abSelectAddressesDialog.dtd
|
||||
22
mozilla/mailnews/addrbook/resources/locale/makefile.win
Normal file
@@ -0,0 +1,22 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=..\..\..\..
|
||||
|
||||
DIRS= en-US
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
22
mozilla/mailnews/addrbook/resources/makefile.win
Normal file
@@ -0,0 +1,22 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=..\..\..
|
||||
|
||||
DIRS= content locale skin
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
27
mozilla/mailnews/addrbook/resources/skin/MANIFEST
Normal file
@@ -0,0 +1,27 @@
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
# This is a list of local files which get copied to the res\mailnews\messenger directory
|
||||
#
|
||||
|
||||
addressbook.css
|
||||
newcard.gif
|
||||
newlist.gif
|
||||
property.gif
|
||||
abnewmsg.gif
|
||||
person.gif
|
||||
list.gif
|
||||
myaddrbk.gif
|
||||
|
||||
44
mozilla/mailnews/addrbook/resources/skin/Makefile.in
Normal file
@@ -0,0 +1,44 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
SAMPLES_DIR = $(DIST)/bin/chrome/addressbook/skin/default
|
||||
|
||||
EXPORT_RESOURCE_SAMPLES = \
|
||||
addressbook.css \
|
||||
newcard.gif \
|
||||
newlist.gif \
|
||||
property.gif \
|
||||
abnewmsg.gif \
|
||||
person.gif \
|
||||
list.gif \
|
||||
myaddrbk.gif \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
GARBAGE += $(addprefix $(SAMPLES_DIR)/, $(EXPORT_RESOURCE_SAMPLES))
|
||||
|
||||
install::
|
||||
$(INSTALL) $(addprefix $(srcdir)/, $(EXPORT_RESOURCE_SAMPLES)) $(SAMPLES_DIR)
|
||||
|
||||
BIN
mozilla/mailnews/addrbook/resources/skin/abnewmsg.gif
Normal file
|
After Width: | Height: | Size: 285 B |
78
mozilla/mailnews/addrbook/resources/skin/addressbook.css
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
The contents of this file are subject to the Netscape Public
|
||||
License Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/NPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS
|
||||
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is Netscape
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
Rights Reserved.
|
||||
*/
|
||||
|
||||
/* CardEdit styles - used in the Card Edit Dialog */
|
||||
|
||||
box[class="CardEditWidth"] {
|
||||
width : 24.4em;
|
||||
margin-left : 0px;
|
||||
margin-right : 8px;
|
||||
}
|
||||
|
||||
input[class="CardEdit"] {
|
||||
width : 25em;
|
||||
height : 1.5em;
|
||||
margin : 0px;
|
||||
padding : 0px;
|
||||
padding-right : 0px;
|
||||
min-height : 1.5em;
|
||||
}
|
||||
|
||||
|
||||
/* CardView styles - used in the Card View Pane*/
|
||||
|
||||
div[class="CardViewHeading"] {
|
||||
padding: 1px;
|
||||
padding-left: 5px;
|
||||
color: white;
|
||||
background-color: #5050ff;
|
||||
font-weight: bold;
|
||||
margin-top: 8px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
div[class="CardViewText"] {
|
||||
padding-left: 20px;
|
||||
padding-right: 2px;
|
||||
color:inherit;
|
||||
}
|
||||
|
||||
|
||||
/* Custom Trees */
|
||||
|
||||
tree[class="abDirectory"] treeitem > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://addressbook/skin/myaddrbk.gif");
|
||||
}
|
||||
|
||||
tree[class="abResults"] treeitem > treerow > treecell > .tree-icon {
|
||||
list-style-image: url("chrome://addressbook/skin/person.gif");
|
||||
}
|
||||
|
||||
|
||||
/* Address Book specific style */
|
||||
|
||||
[hide] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
titledbutton#Throbber
|
||||
{
|
||||
list-style-image:url(chrome://navigator/skin/animthrob_single.gif);
|
||||
}
|
||||
BIN
mozilla/mailnews/addrbook/resources/skin/directory.gif
Normal file
|
After Width: | Height: | Size: 165 B |
BIN
mozilla/mailnews/addrbook/resources/skin/list.gif
Normal file
|
After Width: | Height: | Size: 143 B |
43
mozilla/mailnews/addrbook/resources/skin/makefile.win
Normal file
@@ -0,0 +1,43 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=..\..\..\..
|
||||
MODULE=addrbook
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
install::
|
||||
$(MAKE_INSTALL) addressbook.css $(DIST)\bin\chrome\addressbook\skin\default
|
||||
$(MAKE_INSTALL) newcard.gif $(DIST)\bin\chrome\addressbook\skin\default
|
||||
$(MAKE_INSTALL) newlist.gif $(DIST)\bin\chrome\addressbook\skin\default
|
||||
$(MAKE_INSTALL) property.gif $(DIST)\bin\chrome\addressbook\skin\default
|
||||
$(MAKE_INSTALL) abnewmsg.gif $(DIST)\bin\chrome\addressbook\skin\default
|
||||
$(MAKE_INSTALL) person.gif $(DIST)\bin\chrome\addressbook\skin\default
|
||||
$(MAKE_INSTALL) list.gif $(DIST)\bin\chrome\addressbook\skin\default
|
||||
$(MAKE_INSTALL) myaddrbk.gif $(DIST)\bin\chrome\addressbook\skin\default
|
||||
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\chrome\addressbook\skin\default\addressbook.css
|
||||
rm -f $(DIST)\chrome\addressbook\skin\default\newcard.gif
|
||||
rm -f $(DIST)\chrome\addressbook\skin\default\newlist.gif
|
||||
rm -f $(DIST)\chrome\addressbook\skin\default\property.gif
|
||||
rm -f $(DIST)\chrome\addressbook\skin\default\abnewmsg.gif
|
||||
rm -f $(DIST)\chrome\addressbook\skin\default\person.gif
|
||||
rm -f $(DIST)\chrome\addressbook\skin\default\list.gif
|
||||
rm -f $(DIST)\chrome\addressbook\skin\default\myaddrbk.gif
|
||||
|
||||
BIN
mozilla/mailnews/addrbook/resources/skin/myaddrbk.gif
Normal file
|
After Width: | Height: | Size: 148 B |
BIN
mozilla/mailnews/addrbook/resources/skin/newcard.gif
Normal file
|
After Width: | Height: | Size: 265 B |
BIN
mozilla/mailnews/addrbook/resources/skin/newlist.gif
Normal file
|
After Width: | Height: | Size: 273 B |
BIN
mozilla/mailnews/addrbook/resources/skin/person.gif
Normal file
|
After Width: | Height: | Size: 135 B |
BIN
mozilla/mailnews/addrbook/resources/skin/property.gif
Normal file
|
After Width: | Height: | Size: 259 B |
20
mozilla/mailnews/addrbook/src/MANIFEST
Normal file
@@ -0,0 +1,20 @@
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist:mailnews directory
|
||||
#
|
||||
|
||||
nsDirPrefs.h
|
||||
|
||||
67
mozilla/mailnews/addrbook/src/Makefile.in
Normal file
@@ -0,0 +1,67 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = addrbook
|
||||
LIBRARY_NAME = addrbook_s
|
||||
|
||||
CPPSRCS = \
|
||||
nsAddressBook.cpp \
|
||||
nsAddrBookSession.cpp \
|
||||
nsAbRDFDataSource.cpp \
|
||||
nsAbRDFResource.cpp \
|
||||
nsCardDataSource.cpp \
|
||||
nsDirectoryDataSource.cpp \
|
||||
nsAbCard.cpp \
|
||||
nsAbDirectory.cpp \
|
||||
nsAbCardProperty.cpp \
|
||||
nsDirPrefs.cpp \
|
||||
nsAddrDatabase.cpp \
|
||||
nsAbDirProperty.cpp \
|
||||
nsAbAutoCompleteSession.cpp \
|
||||
nsAbAddressCollecter.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
nsAddressBook.h \
|
||||
nsAddrBookSession.h \
|
||||
nsAbRDFDataSource.h \
|
||||
nsAbRDFResource.h \
|
||||
nsCardDataSource.h \
|
||||
nsDirectoryDataSource.h \
|
||||
nsAbCard.h \
|
||||
nsAbDirectory.h \
|
||||
nsAbCardProperty.h \
|
||||
nsDirPrefs.h \
|
||||
nsAddrDatabase.h \
|
||||
nsAbDirProperty.h \
|
||||
nsAbAutoCompleteSession.h \
|
||||
nsAbAddressCollecter.h \
|
||||
$(NULL)
|
||||
|
||||
# we don't want the shared lib, but we want to force the creation of a static lib.
|
||||
override NO_SHARED_LIB=1
|
||||
override NO_STATIC_LIB=
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||