Back to index

lightning-sunbird  0.9+nobinonly
nsMsgComposeStringBundle.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
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 _nsMsgComposeStringBundle_H_
00039 #define _nsMsgComposeStringBundle_H_
00040 
00041 #include "nsIMsgStringService.h"
00042 #include "nsIStringBundle.h"
00043 #include "nsCOMPtr.h"
00044 
00045 class nsComposeStringService : public nsIMsgStringService
00046 {
00047 public:
00048   nsComposeStringService();
00049   virtual ~nsComposeStringService();
00050 
00051   NS_DECL_ISUPPORTS
00052   NS_DECL_NSIMSGSTRINGSERVICE
00053 
00054 private:
00055   nsCOMPtr<nsIStringBundle> mComposeStringBundle;
00056   nsresult InitializeStringBundle();
00057 };
00058 
00059 //
00060 // The defines needed for error conditions and status. The corresponding strings
00061 // are defined in composeMsgs.properties
00062 // 
00063 
00064 #define NS_MSG_UNABLE_TO_OPEN_FILE                  NS_MSG_GENERATE_FAILURE(12500)
00065 #define NS_MSG_UNABLE_TO_OPEN_TMP_FILE              NS_MSG_GENERATE_FAILURE(12501)
00066 #define NS_MSG_UNABLE_TO_SAVE_TEMPLATE              NS_MSG_GENERATE_FAILURE(12502)
00067 #define NS_MSG_UNABLE_TO_SAVE_DRAFT                 NS_MSG_GENERATE_FAILURE(12503)
00068 #define NS_MSG_LOAD_ATTACHMNTS                      NS_MSG_GENERATE_SUCCESS(12504)
00069 #define NS_MSG_LOAD_ATTACHMNT                       NS_MSG_GENERATE_SUCCESS(12505)
00070 #define NS_MSG_COULDNT_OPEN_FCC_FOLDER              NS_MSG_GENERATE_FAILURE(12506)
00071 #define NS_MSG_CANT_POST_TO_MULTIPLE_NEWS_HOSTS     NS_MSG_GENERATE_FAILURE(12507)
00072 #define NS_MSG_ASSEMB_DONE_MSG                      NS_MSG_GENERATE_SUCCESS(12508)
00073 #define NS_MSG_ASSEMBLING_MSG                       NS_MSG_GENERATE_SUCCESS(12509)
00074 #define NS_MSG_NO_SENDER                            NS_MSG_GENERATE_FAILURE(12510)
00075 #define NS_MSG_NO_RECIPIENTS                        NS_MSG_GENERATE_FAILURE(12511)
00076 #define NS_MSG_ERROR_WRITING_FILE                   NS_MSG_GENERATE_FAILURE(12512)
00077 #define NS_ERROR_COULD_NOT_LOGIN_TO_SMTP_SERVER     NS_MSG_GENERATE_FAILURE(12513)
00078 #define NS_ERROR_SENDING_FROM_COMMAND               NS_MSG_GENERATE_FAILURE(12514)
00079 #define NS_ERROR_SENDING_RCPT_COMMAND               NS_MSG_GENERATE_FAILURE(12515)
00080 #define NS_ERROR_SENDING_DATA_COMMAND               NS_MSG_GENERATE_FAILURE(12516)
00081 #define NS_ERROR_SENDING_MESSAGE                    NS_MSG_GENERATE_FAILURE(12517)
00082 #define NS_ERROR_POST_FAILED                        NS_MSG_GENERATE_FAILURE(12518)
00083 #define NS_ERROR_QUEUED_DELIVERY_FAILED             NS_MSG_GENERATE_FAILURE(12519)
00084 #define NS_ERROR_SEND_FAILED                        NS_MSG_GENERATE_FAILURE(12520)
00085 #define SMTP_DELIV_MAIL                             NS_MSG_GENERATE_SUCCESS(12521)
00086 #define SMTP_MESSAGE_SENT_WAITING_MAIL_REPLY        NS_MSG_GENERATE_SUCCESS(12522)
00087 #define SMTP_PROGRESS_MAILSENT                      NS_MSG_GENERATE_SUCCESS(12523)
00088 #define NS_ERROR_SMTP_SERVER_ERROR                  NS_MSG_GENERATE_FAILURE(12524)
00089 #define NS_MSG_UNABLE_TO_SEND_LATER                 NS_MSG_GENERATE_FAILURE(12525)
00090 #define NS_ERROR_COMMUNICATIONS_ERROR               NS_MSG_GENERATE_FAILURE(12526)
00091 #define NS_ERROR_BUT_DONT_SHOW_ALERT                NS_MSG_GENERATE_FAILURE(12527)
00092 #define NS_ERROR_TCP_READ_ERROR                     NS_MSG_GENERATE_FAILURE(12528)
00093 #define NS_ERROR_COULD_NOT_GET_USERS_MAIL_ADDRESS   NS_MSG_GENERATE_FAILURE(12529)
00094 #define NS_ERROR_SMTP_PASSWORD_UNDEFINED            NS_MSG_GENERATE_FAILURE(12530)
00095 #define NS_ERROR_MIME_MPART_ATTACHMENT_ERROR        NS_MSG_GENERATE_FAILURE(12531)
00096 #define NS_MSG_FAILED_COPY_OPERATION                NS_MSG_GENERATE_FAILURE(12532)
00097 // For message sending operations...
00098 #define NS_MSG_FAILURE_ON_OBJ_EMBED_WHILE_SAVING    NS_MSG_GENERATE_SUCCESS(12533)
00099 #define NS_MSG_ASSEMBLING_MESSAGE                   NS_MSG_GENERATE_SUCCESS(12534)
00100 #define NS_MSG_GATHERING_ATTACHMENT                 NS_MSG_GENERATE_SUCCESS(12535)
00101 #define NS_MSG_CREATING_MESSAGE                     NS_MSG_GENERATE_SUCCESS(12536)
00102 #define NS_MSG_FAILURE_ON_OBJ_EMBED_WHILE_SENDING   NS_MSG_GENERATE_FAILURE(12537)
00103 #define NS_MSG_START_COPY_MESSAGE                   NS_MSG_GENERATE_SUCCESS(12538)
00104 #define NS_MSG_START_COPY_MESSAGE_COMPLETE          NS_MSG_GENERATE_SUCCESS(12539)
00105 #define NS_MSG_START_COPY_MESSAGE_FAILED            NS_MSG_GENERATE_FAILURE(12540)
00106 #define NS_MSG_LARGE_MESSAGE_WARNING                NS_MSG_GENERATE_FAILURE(12541)
00107 
00108 #define NS_SMTP_PASSWORD_PROMPT_TITLE               12542
00109 #define NS_SMTP_PASSWORD_PROMPT1                    12543
00110 #define NS_SMTP_PASSWORD_PROMPT2                    12544
00111 #define NS_SMTP_CONNECTING_TO_SERVER                NS_MSG_GENERATE_SUCCESS(12545)
00112 
00113 #define NS_MSG_SENDING_MESSAGE                      NS_MSG_GENERATE_SUCCESS(12550)
00114 #define NS_MSG_POSTING_MESSAGE                      NS_MSG_GENERATE_SUCCESS(12551)
00115 
00116 #define NS_ERROR_MSG_MULTILINGUAL_SEND              NS_MSG_GENERATE_FAILURE(12553)
00117 
00118 /* 12554 is taken by NS_ERROR_NNTP_NO_CROSS_POSTING.  use 12555 as the next one */
00119 
00120 #define NS_MSG_CANCELLING                           NS_MSG_GENERATE_SUCCESS(12555)
00121 
00122 // For message sending report...
00123 #define NS_MSG_SEND_ERROR_TITLE                     NS_MSG_GENERATE_SUCCESS(12556)
00124 #define NS_MSG_SENDLATER_ERROR_TITLE                NS_MSG_GENERATE_SUCCESS(12557)
00125 #define NS_MSG_SAVE_DRAFT_TITLE                     NS_MSG_GENERATE_SUCCESS(12558)
00126 #define NS_MSG_SAVE_TEMPLATE_TITLE                  NS_MSG_GENERATE_SUCCESS(12559)
00127 #define NS_ERROR_SEND_FAILED_BUT_NNTP_OK            NS_MSG_GENERATE_FAILURE(12560)
00128 #define NS_MSG_ASK_TO_COMEBACK_TO_COMPOSE           NS_MSG_GENERATE_SUCCESS(12561)
00129 #define NS_MSG_GENERIC_FAILURE_EXPLANATION          NS_MSG_GENERATE_SUCCESS(12562)
00130 #define NS_MSG_ERROR_READING_FILE                   NS_MSG_GENERATE_FAILURE(12563)
00131 #define NS_MSG_FOLLOWUPTO_ALERT                     NS_MSG_GENERATE_SUCCESS(12564)
00132 
00133 #define NS_ERROR_SMTP_SEND_FAILED                   NS_MSG_GENERATE_FAILURE(12565)
00134 
00135 #define NS_MSG_UNDISCLOSED_RECIPIENTS               12566
00136 
00137 #define NS_ERROR_SMTP_TEMP_SIZE_EXCEEDED            NS_MSG_GENERATE_FAILURE(12567)
00138 #define NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_1          NS_MSG_GENERATE_FAILURE(12568)
00139 #define NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_2          NS_MSG_GENERATE_FAILURE(12569)
00140 
00141 #define NS_MSG_ERROR_ATTACHING_FILE                 NS_MSG_GENERATE_FAILURE(12570)
00142 #define NS_MSG_ERROR_DOING_FCC                      NS_MSG_GENERATE_FAILURE(12571)
00143 
00144 #define NS_ERROR_SMTP_GREETING                      NS_MSG_GENERATE_FAILURE(12572)
00145 
00146 #define NS_ERROR_COULD_NOT_LOGIN_TO_SMTP_SERVER_WITH_STARTTLS1    NS_MSG_GENERATE_FAILURE(12573)
00147 #define NS_ERROR_COULD_NOT_LOGIN_TO_SMTP_SERVER_WITH_STARTTLS2    NS_MSG_GENERATE_FAILURE(12574)
00148 #endif /* _nsMsgComposeStringBundle_H_ */