Back to index

d-push  2.0
mapicode.php
Go to the documentation of this file.
00001 <?php
00002 /*
00003  * Copyright 2005 - 2012  Zarafa B.V.
00004  *
00005  * This program is free software: you can redistribute it and/or modify
00006  * it under the terms of the GNU Affero General Public License, version 3,
00007  * as published by the Free Software Foundation with the following additional
00008  * term according to sec. 7:
00009  *
00010  * According to sec. 7 of the GNU Affero General Public License, version
00011  * 3, the terms of the AGPL are supplemented with the following terms:
00012  *
00013  * "Zarafa" is a registered trademark of Zarafa B.V. The licensing of
00014  * the Program under the AGPL does not imply a trademark license.
00015  * Therefore any rights, title and interest in our trademarks remain
00016  * entirely with us.
00017  *
00018  * However, if you propagate an unmodified version of the Program you are
00019  * allowed to use the term "Zarafa" to indicate that you distribute the
00020  * Program. Furthermore you may use our trademarks where it is necessary
00021  * to indicate the intended purpose of a product or service provided you
00022  * use it in accordance with honest practices in industrial or commercial
00023  * matters.  If you want to propagate modified versions of the Program
00024  * under the name "Zarafa" or "Zarafa Server", you may only do so if you
00025  * have a written permission by Zarafa B.V. (to acquire a permission
00026  * please contact Zarafa at trademark@zarafa.com).
00027  *
00028  * The interactive user interface of the software displays an attribution
00029  * notice containing the term "Zarafa" and/or the logo of Zarafa.
00030  * Interactive user interfaces of unmodified and modified versions must
00031  * display Appropriate Legal Notices according to sec. 5 of the GNU
00032  * Affero General Public License, version 3, when you propagate
00033  * unmodified or modified versions of the Program. In accordance with
00034  * sec. 7 b) of the GNU Affero General Public License, version 3, these
00035  * Appropriate Legal Notices must retain the logo of Zarafa or display
00036  * the words "Initial Development by Zarafa" if the display of the logo
00037  * is not reasonably feasible for technical reasons. The use of the logo
00038  * of Zarafa in Legal Notices is allowed for unmodified and modified
00039  * versions of the software.
00040  *
00041  * This program is distributed in the hope that it will be useful,
00042  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00043  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00044  * GNU Affero General Public License for more details.
00045  *
00046  * You should have received a copy of the GNU Affero General Public License
00047  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00048  *
00049  */
00050 
00051 
00058 /* From winerror.h */
00059 //
00060 // Success codes
00061 //
00062 define('S_OK',               0x00000000);
00063 define('S_FALSE',            0x00000001);
00064 define('SEVERITY_ERROR',     1);
00065 
00066 /* from winerror.h */
00067 
00071 function make_mapi_e($code)
00072 {
00073     return (int) mapi_make_scode(1, $code);
00074 }
00075 
00076 
00080 function make_mapi_s($code)
00081 {
00082     return (int) mapi_make_scode(0, $code);
00083 }
00084 
00085 /* From mapicode.h */
00086 /*
00087  *  On Windows NT 3.5 and Windows 95, scodes are 32-bit values
00088  *  laid out as follows:
00089  *
00090  *    3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
00091  *    1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
00092  *   +-+-+-+-+-+---------------------+-------------------------------+
00093  *   |S|R|C|N|r|    Facility         |               Code            |
00094  *   +-+-+-+-+-+---------------------+-------------------------------+
00095  *
00096  *   where
00097  *
00098  *      S - Severity - indicates success/fail
00099  *
00100  *          0 - Success
00101  *          1 - Fail (COERROR)
00102  *
00103  *      R - reserved portion of the facility code, corresponds to NT's
00104  *          second severity bit.
00105  *
00106  *      C - reserved portion of the facility code, corresponds to NT's
00107  *          C field.
00108  *
00109  *      N - reserved portion of the facility code. Used to indicate a
00110  *          mapped NT status value.
00111  *
00112  *      r - reserved portion of the facility code. Reserved for internal
00113  *          use. Used to indicate HRESULT values that are not status
00114  *          values, but are instead message ids for display strings.
00115  *
00116  *      Facility - is the facility code
00117  *          FACILITY_NULL                    0x0
00118  *          FACILITY_RPC                     0x1
00119  *          FACILITY_DISPATCH                0x2
00120  *          FACILITY_STORAGE                 0x3
00121  *          FACILITY_ITF                     0x4
00122  *          FACILITY_WIN32                   0x7
00123  *          FACILITY_WINDOWS                 0x8
00124  *
00125  *      Code - is the facility's status code
00126  *
00127  */
00128 define('NOERROR'                                         ,0);
00129 
00130 define('MAPI_E_CALL_FAILED'                              ,(int) 0x80004005);
00131 define('MAPI_E_NOT_ENOUGH_MEMORY'                        ,(int) 0x8007000E);
00132 define('MAPI_E_INVALID_PARAMETER'                        ,(int) 0x80070057);
00133 define('MAPI_E_INTERFACE_NOT_SUPPORTED'                  ,(int) 0x80004002);
00134 define('MAPI_E_NO_ACCESS'                                ,(int) 0x80070005);
00135 
00136 define('MAPI_E_NO_SUPPORT'                               ,make_mapi_e(0x102));
00137 define('MAPI_E_BAD_CHARWIDTH'                            ,make_mapi_e(0x103));
00138 define('MAPI_E_STRING_TOO_LONG'                          ,make_mapi_e(0x105));
00139 define('MAPI_E_UNKNOWN_FLAGS'                            ,make_mapi_e(0x106));
00140 define('MAPI_E_INVALID_ENTRYID'                          ,make_mapi_e(0x107));
00141 define('MAPI_E_INVALID_OBJECT'                           ,make_mapi_e(0x108));
00142 define('MAPI_E_OBJECT_CHANGED'                           ,make_mapi_e(0x109));
00143 define('MAPI_E_OBJECT_DELETED'                           ,make_mapi_e(0x10A));
00144 define('MAPI_E_BUSY'                                     ,make_mapi_e(0x10B));
00145 define('MAPI_E_NOT_ENOUGH_DISK'                          ,make_mapi_e(0x10D));
00146 define('MAPI_E_NOT_ENOUGH_RESOURCES'                     ,make_mapi_e(0x10E));
00147 define('MAPI_E_NOT_FOUND'                                ,make_mapi_e(0x10F));
00148 define('MAPI_E_VERSION'                                  ,make_mapi_e(0x110));
00149 define('MAPI_E_LOGON_FAILED'                             ,make_mapi_e(0x111));
00150 define('MAPI_E_SESSION_LIMIT'                            ,make_mapi_e(0x112));
00151 define('MAPI_E_USER_CANCEL'                              ,make_mapi_e(0x113));
00152 define('MAPI_E_UNABLE_TO_ABORT'                          ,make_mapi_e(0x114));
00153 define('MAPI_E_NETWORK_ERROR'                            ,make_mapi_e(0x115));
00154 define('MAPI_E_DISK_ERROR'                               ,make_mapi_e(0x116));
00155 define('MAPI_E_TOO_COMPLEX'                              ,make_mapi_e(0x117));
00156 define('MAPI_E_BAD_COLUMN'                               ,make_mapi_e(0x118));
00157 define('MAPI_E_EXTENDED_ERROR'                           ,make_mapi_e(0x119));
00158 define('MAPI_E_COMPUTED'                                 ,make_mapi_e(0x11A));
00159 define('MAPI_E_CORRUPT_DATA'                             ,make_mapi_e(0x11B));
00160 define('MAPI_E_UNCONFIGURED'                             ,make_mapi_e(0x11C));
00161 define('MAPI_E_FAILONEPROVIDER'                          ,make_mapi_e(0x11D));
00162 define('MAPI_E_UNKNOWN_CPID'                             ,make_mapi_e(0x11E));
00163 define('MAPI_E_UNKNOWN_LCID'                             ,make_mapi_e(0x11F));
00164 
00165 /* Flavors of E_ACCESSDENIED, used at logon */
00166 
00167 define('MAPI_E_PASSWORD_CHANGE_REQUIRED'                 ,make_mapi_e(0x120));
00168 define('MAPI_E_PASSWORD_EXPIRED'                         ,make_mapi_e(0x121));
00169 define('MAPI_E_INVALID_WORKSTATION_ACCOUNT'              ,make_mapi_e(0x122));
00170 define('MAPI_E_INVALID_ACCESS_TIME'                      ,make_mapi_e(0x123));
00171 define('MAPI_E_ACCOUNT_DISABLED'                         ,make_mapi_e(0x124));
00172 
00173 /* MAPI base function and status object specific errors and warnings */
00174 
00175 define('MAPI_E_END_OF_SESSION'                           ,make_mapi_e(0x200));
00176 define('MAPI_E_UNKNOWN_ENTRYID'                          ,make_mapi_e(0x201));
00177 define('MAPI_E_MISSING_REQUIRED_COLUMN'                  ,make_mapi_e(0x202));
00178 define('MAPI_W_NO_SERVICE'                               ,make_mapi_s(0x203));
00179 
00180 /* Property specific errors and warnings */
00181 
00182 define('MAPI_E_BAD_VALUE'                                ,make_mapi_e(0x301));
00183 define('MAPI_E_INVALID_TYPE'                             ,make_mapi_e(0x302));
00184 define('MAPI_E_TYPE_NO_SUPPORT'                          ,make_mapi_e(0x303));
00185 define('MAPI_E_UNEXPECTED_TYPE'                          ,make_mapi_e(0x304));
00186 define('MAPI_E_TOO_BIG'                                  ,make_mapi_e(0x305));
00187 define('MAPI_E_DECLINE_COPY'                             ,make_mapi_e(0x306));
00188 define('MAPI_E_UNEXPECTED_ID'                            ,make_mapi_e(0x307));
00189 
00190 define('MAPI_W_ERRORS_RETURNED'                          ,make_mapi_s(0x380));
00191 
00192 /* Table specific errors and warnings */
00193 
00194 define('MAPI_E_UNABLE_TO_COMPLETE'                       ,make_mapi_e(0x400));
00195 define('MAPI_E_TIMEOUT'                                  ,make_mapi_e(0x401));
00196 define('MAPI_E_TABLE_EMPTY'                              ,make_mapi_e(0x402));
00197 define('MAPI_E_TABLE_TOO_BIG'                            ,make_mapi_e(0x403));
00198 
00199 define('MAPI_E_INVALID_BOOKMARK'                         ,make_mapi_e(0x405));
00200 
00201 define('MAPI_W_POSITION_CHANGED'                         ,make_mapi_s(0x481));
00202 define('MAPI_W_APPROX_COUNT'                             ,make_mapi_s(0x482));
00203 
00204 /* Transport specific errors and warnings */
00205 
00206 define('MAPI_E_WAIT'                                     ,make_mapi_e(0x500));
00207 define('MAPI_E_CANCEL'                                   ,make_mapi_e(0x501));
00208 define('MAPI_E_NOT_ME'                                   ,make_mapi_e(0x502));
00209 
00210 define('MAPI_W_CANCEL_MESSAGE'                           ,make_mapi_s(0x580));
00211 
00212 /* Message Store, Folder, and Message specific errors and warnings */
00213 
00214 define('MAPI_E_CORRUPT_STORE'                            ,make_mapi_e(0x600));
00215 define('MAPI_E_NOT_IN_QUEUE'                             ,make_mapi_e(0x601));
00216 define('MAPI_E_NO_SUPPRESS'                              ,make_mapi_e(0x602));
00217 define('MAPI_E_COLLISION'                                ,make_mapi_e(0x604));
00218 define('MAPI_E_NOT_INITIALIZED'                          ,make_mapi_e(0x605));
00219 define('MAPI_E_NON_STANDARD'                             ,make_mapi_e(0x606));
00220 define('MAPI_E_NO_RECIPIENTS'                            ,make_mapi_e(0x607));
00221 define('MAPI_E_SUBMITTED'                                ,make_mapi_e(0x608));
00222 define('MAPI_E_HAS_FOLDERS'                              ,make_mapi_e(0x609));
00223 define('MAPI_E_HAS_MESSAGES'                             ,make_mapi_e(0x60A));
00224 define('MAPI_E_FOLDER_CYCLE'                             ,make_mapi_e(0x60B));
00225 define('MAPI_E_STORE_FULL'                               ,make_mapi_e(0x60C));
00226 
00227 define('MAPI_W_PARTIAL_COMPLETION'                       ,make_mapi_s(0x680));
00228 
00229 /* Address Book specific errors and warnings */
00230 
00231 define('MAPI_E_AMBIGUOUS_RECIP'                          ,make_mapi_e(0x700));
00232 
00233 /* ICS errors and warnings */
00234 
00235 define('SYNC_E_UNKNOWN_FLAGS',                            MAPI_E_UNKNOWN_FLAGS);
00236 define('SYNC_E_INVALID_PARAMETER',                        MAPI_E_INVALID_PARAMETER);
00237 define('SYNC_E_ERROR',                                    MAPI_E_CALL_FAILED);
00238 define('SYNC_E_OBJECT_DELETED',                           make_mapi_e(0x800));
00239 define('SYNC_E_IGNORE',                                   make_mapi_e(0x801));
00240 define('SYNC_E_CONFLICT',                                 make_mapi_e(0x802));
00241 define('SYNC_E_NO_PARENT',                                make_mapi_e(0x803));
00242 define('SYNC_E_INCEST',                                   make_mapi_e(0x804));
00243 define('SYNC_E_UNSYNCHRONIZED',                           make_mapi_e(0x805));
00244 
00245 define('SYNC_W_PROGRESS',                                 make_mapi_s(0x820));
00246 define('SYNC_W_CLIENT_CHANGE_NEWER',                      make_mapi_s(0x821));
00247 
00248 
00249 
00250 ?>