Back to index

lightning-sunbird  0.9+nobinonly
nsIAddrBookSession.idl
Go to the documentation of this file.
00001 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either of the GNU General Public License Version 2 or later (the "GPL"),
00026  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #include "nsISupports.idl"
00039 
00040 /*
00041  * The mail session is a replacement for the old 4.x MSG_Master object. It
00042  * contains mail session generic information such as the account manager, etc
00043  * I'm starting this off as an empty interface and as people feel they need to
00044  * add more information to it, they can. I think this is a better approach
00045  * than trying to port over the old MSG_Master in its entirety as that had a
00046  * lot of cruft in it....
00047  */
00048 
00049 #include "nsISupports.idl"
00050 #include "nsIAbListener.idl"
00051 #include "nsIAbDirectory.idl"
00052 #include "nsIAbCard.idl"
00053 
00054 interface nsILocalFile;
00055 
00056 [scriptable, uuid(90533607-7205-473f-b688-ffb50eeb5d57)]
00057 interface nsIAddrBookSession : nsISupports {
00068   void addAddressBookListener(in nsIAbListener listener, in abListenerNotifyFlagValue notifyFlags);
00069 
00078   const abListenerNotifyFlagValue added = 0x1;
00082   const abListenerNotifyFlagValue directoryItemRemoved = 0x2;
00086   const abListenerNotifyFlagValue directoryRemoved = 0x4;
00090   const abListenerNotifyFlagValue changed = 0x8;
00094   const abListenerNotifyFlagValue all = 0xFFFFFFFF;
00095 
00103   void removeAddressBookListener(in nsIAbListener listener);
00104   void notifyItemPropertyChanged(in nsISupports item,
00105                                  in string property,
00106                                  in wstring oldValue,
00107                                  in wstring newValue);
00108   void notifyDirectoryItemAdded(in nsIAbDirectory directory, in nsISupports item);
00109   
00113   void notifyDirectoryItemDeleted(in nsIAbDirectory directory, in nsISupports item);
00114   
00118   void notifyDirectoryDeleted(in nsIAbDirectory directory, in nsISupports item);
00119 
00120   readonly attribute nsILocalFile userProfileDirectory;
00121 
00133   wstring generateNameFromCard(in nsIAbCard card, in long generateFormat);
00134 
00139   wstring generatePhoneticNameFromCard(in nsIAbCard aCard, in boolean aLastNameFirst);
00140 };
00141