Back to index

lightning-sunbird  0.9+nobinonly
nsComposeTxtSrvFilter.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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-1999
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 #ifndef nsComposeTxtSrvFilter_h__
00039 #define nsComposeTxtSrvFilter_h__
00040 
00041 #include "nsITextServicesFilter.h"
00042 #include "nsIAtom.h"
00043 
00051 class nsComposeTxtSrvFilter : public nsITextServicesFilter
00052 {
00053 public:
00054   nsComposeTxtSrvFilter();
00055   virtual ~nsComposeTxtSrvFilter() {};
00056 
00057   // nsISupports interface...
00058   NS_DECL_ISUPPORTS
00059 
00060   // nsITextServicesFilter 
00061   NS_DECL_NSITEXTSERVICESFILTER
00062 
00063   // Helper - Intializer
00064   void Init(PRBool aIsForMail) { mIsForMail = aIsForMail; }
00065 
00066 protected:
00067   PRBool            mIsForMail;
00068   nsCOMPtr<nsIAtom> mBlockQuoteAtom;
00069   nsCOMPtr<nsIAtom> mPreAtom;          // mail plain text quotes are wrapped in pre tags
00070   nsCOMPtr<nsIAtom> mSpanAtom;         //or they may be wrapped in span tags (editor.quotesPreformatted). 
00071   nsCOMPtr<nsIAtom> mMozQuoteAtom;     // _moz_quote_
00072   nsCOMPtr<nsIAtom> mTableAtom;
00073   nsCOMPtr<nsIAtom> mClassAtom;
00074   nsCOMPtr<nsIAtom> mTypeAtom;
00075   nsCOMPtr<nsIAtom> mScriptAtom;
00076   nsCOMPtr<nsIAtom> mTextAreaAtom;
00077   nsCOMPtr<nsIAtom> mSelectAreaAtom;
00078   nsCOMPtr<nsIAtom> mMapAtom;
00079 
00080 };
00081 
00082 #define NS_COMPOSERTXTSRVFILTER_CID \
00083 {/* {171E72DB-0F8A-412a-8461-E4C927A3A2AC}*/ \
00084 0x171e72db, 0xf8a, 0x412a, \
00085 { 0x84, 0x61, 0xe4, 0xc9, 0x27, 0xa3, 0xa2, 0xac} } 
00086 
00087 #define NS_COMPOSERTXTSRVFILTERMAIL_CID \
00088 {/* {7FBD2146-5FF4-4674-B069-A7BBCE66E773}*/ \
00089 0x7fbd2146, 0x5ff4, 0x4674, \
00090 { 0xb0, 0x69, 0xa7, 0xbb, 0xce, 0x66, 0xe7, 0x73} } 
00091 
00092 // Generic for the editor
00093 #define COMPOSER_TXTSRVFILTER_CONTRACTID     "@mozilla.org/editor/txtsrvfilter;1"
00094 
00095 // This is the same but includes "cite" typed blocked quotes
00096 #define COMPOSER_TXTSRVFILTERMAIL_CONTRACTID "@mozilla.org/editor/txtsrvfiltermail;1"
00097 
00098 #endif