source: trunk/zpush/backend/zarafa/mapi/mapicode.php @ 7589

Revision 7589, 11.5 KB checked in by douglas, 11 years ago (diff)

Ticket #3209 - Integrar módulo de sincronização Z-push ao Expresso

Line 
1<?php
2/*
3 * Copyright 2005 - 2012  Zarafa B.V.
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Affero General Public License, version 3,
7 * as published by the Free Software Foundation with the following additional
8 * term according to sec. 7:
9 *
10 * According to sec. 7 of the GNU Affero General Public License, version
11 * 3, the terms of the AGPL are supplemented with the following terms:
12 *
13 * "Zarafa" is a registered trademark of Zarafa B.V. The licensing of
14 * the Program under the AGPL does not imply a trademark license.
15 * Therefore any rights, title and interest in our trademarks remain
16 * entirely with us.
17 *
18 * However, if you propagate an unmodified version of the Program you are
19 * allowed to use the term "Zarafa" to indicate that you distribute the
20 * Program. Furthermore you may use our trademarks where it is necessary
21 * to indicate the intended purpose of a product or service provided you
22 * use it in accordance with honest practices in industrial or commercial
23 * matters.  If you want to propagate modified versions of the Program
24 * under the name "Zarafa" or "Zarafa Server", you may only do so if you
25 * have a written permission by Zarafa B.V. (to acquire a permission
26 * please contact Zarafa at trademark@zarafa.com).
27 *
28 * The interactive user interface of the software displays an attribution
29 * notice containing the term "Zarafa" and/or the logo of Zarafa.
30 * Interactive user interfaces of unmodified and modified versions must
31 * display Appropriate Legal Notices according to sec. 5 of the GNU
32 * Affero General Public License, version 3, when you propagate
33 * unmodified or modified versions of the Program. In accordance with
34 * sec. 7 b) of the GNU Affero General Public License, version 3, these
35 * Appropriate Legal Notices must retain the logo of Zarafa or display
36 * the words "Initial Development by Zarafa" if the display of the logo
37 * is not reasonably feasible for technical reasons. The use of the logo
38 * of Zarafa in Legal Notices is allowed for unmodified and modified
39 * versions of the software.
40 *
41 * This program is distributed in the hope that it will be useful,
42 * but WITHOUT ANY WARRANTY; without even the implied warranty of
43 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44 * GNU Affero General Public License for more details.
45 *
46 * You should have received a copy of the GNU Affero General Public License
47 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
48 *
49 */
50
51
52/**
53* Status codes returned by MAPI functions
54*
55*
56*/
57
58/* From winerror.h */
59//
60// Success codes
61//
62define('S_OK',               0x00000000);
63define('S_FALSE',            0x00000001);
64define('SEVERITY_ERROR',     1);
65
66/* from winerror.h */
67
68/**
69* Function to make a error
70*/
71function make_mapi_e($code)
72{
73    return (int) mapi_make_scode(1, $code);
74}
75
76
77/**
78* Function to make an warning
79*/
80function make_mapi_s($code)
81{
82    return (int) mapi_make_scode(0, $code);
83}
84
85/* From mapicode.h */
86/*
87 *  On Windows NT 3.5 and Windows 95, scodes are 32-bit values
88 *  laid out as follows:
89 *
90 *    3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
91 *    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
92 *   +-+-+-+-+-+---------------------+-------------------------------+
93 *   |S|R|C|N|r|    Facility         |               Code            |
94 *   +-+-+-+-+-+---------------------+-------------------------------+
95 *
96 *   where
97 *
98 *      S - Severity - indicates success/fail
99 *
100 *          0 - Success
101 *          1 - Fail (COERROR)
102 *
103 *      R - reserved portion of the facility code, corresponds to NT's
104 *          second severity bit.
105 *
106 *      C - reserved portion of the facility code, corresponds to NT's
107 *          C field.
108 *
109 *      N - reserved portion of the facility code. Used to indicate a
110 *          mapped NT status value.
111 *
112 *      r - reserved portion of the facility code. Reserved for internal
113 *          use. Used to indicate HRESULT values that are not status
114 *          values, but are instead message ids for display strings.
115 *
116 *      Facility - is the facility code
117 *          FACILITY_NULL                    0x0
118 *          FACILITY_RPC                     0x1
119 *          FACILITY_DISPATCH                0x2
120 *          FACILITY_STORAGE                 0x3
121 *          FACILITY_ITF                     0x4
122 *          FACILITY_WIN32                   0x7
123 *          FACILITY_WINDOWS                 0x8
124 *
125 *      Code - is the facility's status code
126 *
127 */
128define('NOERROR'                                         ,0);
129
130define('MAPI_E_CALL_FAILED'                              ,(int) 0x80004005);
131define('MAPI_E_NOT_ENOUGH_MEMORY'                        ,(int) 0x8007000E);
132define('MAPI_E_INVALID_PARAMETER'                        ,(int) 0x80070057);
133define('MAPI_E_INTERFACE_NOT_SUPPORTED'                  ,(int) 0x80004002);
134define('MAPI_E_NO_ACCESS'                                ,(int) 0x80070005);
135
136define('MAPI_E_NO_SUPPORT'                               ,make_mapi_e(0x102));
137define('MAPI_E_BAD_CHARWIDTH'                            ,make_mapi_e(0x103));
138define('MAPI_E_STRING_TOO_LONG'                          ,make_mapi_e(0x105));
139define('MAPI_E_UNKNOWN_FLAGS'                            ,make_mapi_e(0x106));
140define('MAPI_E_INVALID_ENTRYID'                          ,make_mapi_e(0x107));
141define('MAPI_E_INVALID_OBJECT'                           ,make_mapi_e(0x108));
142define('MAPI_E_OBJECT_CHANGED'                           ,make_mapi_e(0x109));
143define('MAPI_E_OBJECT_DELETED'                           ,make_mapi_e(0x10A));
144define('MAPI_E_BUSY'                                     ,make_mapi_e(0x10B));
145define('MAPI_E_NOT_ENOUGH_DISK'                          ,make_mapi_e(0x10D));
146define('MAPI_E_NOT_ENOUGH_RESOURCES'                     ,make_mapi_e(0x10E));
147define('MAPI_E_NOT_FOUND'                                ,make_mapi_e(0x10F));
148define('MAPI_E_VERSION'                                  ,make_mapi_e(0x110));
149define('MAPI_E_LOGON_FAILED'                             ,make_mapi_e(0x111));
150define('MAPI_E_SESSION_LIMIT'                            ,make_mapi_e(0x112));
151define('MAPI_E_USER_CANCEL'                              ,make_mapi_e(0x113));
152define('MAPI_E_UNABLE_TO_ABORT'                          ,make_mapi_e(0x114));
153define('MAPI_E_NETWORK_ERROR'                            ,make_mapi_e(0x115));
154define('MAPI_E_DISK_ERROR'                               ,make_mapi_e(0x116));
155define('MAPI_E_TOO_COMPLEX'                              ,make_mapi_e(0x117));
156define('MAPI_E_BAD_COLUMN'                               ,make_mapi_e(0x118));
157define('MAPI_E_EXTENDED_ERROR'                           ,make_mapi_e(0x119));
158define('MAPI_E_COMPUTED'                                 ,make_mapi_e(0x11A));
159define('MAPI_E_CORRUPT_DATA'                             ,make_mapi_e(0x11B));
160define('MAPI_E_UNCONFIGURED'                             ,make_mapi_e(0x11C));
161define('MAPI_E_FAILONEPROVIDER'                          ,make_mapi_e(0x11D));
162define('MAPI_E_UNKNOWN_CPID'                             ,make_mapi_e(0x11E));
163define('MAPI_E_UNKNOWN_LCID'                             ,make_mapi_e(0x11F));
164
165/* Flavors of E_ACCESSDENIED, used at logon */
166
167define('MAPI_E_PASSWORD_CHANGE_REQUIRED'                 ,make_mapi_e(0x120));
168define('MAPI_E_PASSWORD_EXPIRED'                         ,make_mapi_e(0x121));
169define('MAPI_E_INVALID_WORKSTATION_ACCOUNT'              ,make_mapi_e(0x122));
170define('MAPI_E_INVALID_ACCESS_TIME'                      ,make_mapi_e(0x123));
171define('MAPI_E_ACCOUNT_DISABLED'                         ,make_mapi_e(0x124));
172
173/* MAPI base function and status object specific errors and warnings */
174
175define('MAPI_E_END_OF_SESSION'                           ,make_mapi_e(0x200));
176define('MAPI_E_UNKNOWN_ENTRYID'                          ,make_mapi_e(0x201));
177define('MAPI_E_MISSING_REQUIRED_COLUMN'                  ,make_mapi_e(0x202));
178define('MAPI_W_NO_SERVICE'                               ,make_mapi_s(0x203));
179
180/* Property specific errors and warnings */
181
182define('MAPI_E_BAD_VALUE'                                ,make_mapi_e(0x301));
183define('MAPI_E_INVALID_TYPE'                             ,make_mapi_e(0x302));
184define('MAPI_E_TYPE_NO_SUPPORT'                          ,make_mapi_e(0x303));
185define('MAPI_E_UNEXPECTED_TYPE'                          ,make_mapi_e(0x304));
186define('MAPI_E_TOO_BIG'                                  ,make_mapi_e(0x305));
187define('MAPI_E_DECLINE_COPY'                             ,make_mapi_e(0x306));
188define('MAPI_E_UNEXPECTED_ID'                            ,make_mapi_e(0x307));
189
190define('MAPI_W_ERRORS_RETURNED'                          ,make_mapi_s(0x380));
191
192/* Table specific errors and warnings */
193
194define('MAPI_E_UNABLE_TO_COMPLETE'                       ,make_mapi_e(0x400));
195define('MAPI_E_TIMEOUT'                                  ,make_mapi_e(0x401));
196define('MAPI_E_TABLE_EMPTY'                              ,make_mapi_e(0x402));
197define('MAPI_E_TABLE_TOO_BIG'                            ,make_mapi_e(0x403));
198
199define('MAPI_E_INVALID_BOOKMARK'                         ,make_mapi_e(0x405));
200
201define('MAPI_W_POSITION_CHANGED'                         ,make_mapi_s(0x481));
202define('MAPI_W_APPROX_COUNT'                             ,make_mapi_s(0x482));
203
204/* Transport specific errors and warnings */
205
206define('MAPI_E_WAIT'                                     ,make_mapi_e(0x500));
207define('MAPI_E_CANCEL'                                   ,make_mapi_e(0x501));
208define('MAPI_E_NOT_ME'                                   ,make_mapi_e(0x502));
209
210define('MAPI_W_CANCEL_MESSAGE'                           ,make_mapi_s(0x580));
211
212/* Message Store, Folder, and Message specific errors and warnings */
213
214define('MAPI_E_CORRUPT_STORE'                            ,make_mapi_e(0x600));
215define('MAPI_E_NOT_IN_QUEUE'                             ,make_mapi_e(0x601));
216define('MAPI_E_NO_SUPPRESS'                              ,make_mapi_e(0x602));
217define('MAPI_E_COLLISION'                                ,make_mapi_e(0x604));
218define('MAPI_E_NOT_INITIALIZED'                          ,make_mapi_e(0x605));
219define('MAPI_E_NON_STANDARD'                             ,make_mapi_e(0x606));
220define('MAPI_E_NO_RECIPIENTS'                            ,make_mapi_e(0x607));
221define('MAPI_E_SUBMITTED'                                ,make_mapi_e(0x608));
222define('MAPI_E_HAS_FOLDERS'                              ,make_mapi_e(0x609));
223define('MAPI_E_HAS_MESSAGES'                             ,make_mapi_e(0x60A));
224define('MAPI_E_FOLDER_CYCLE'                             ,make_mapi_e(0x60B));
225define('MAPI_E_STORE_FULL'                               ,make_mapi_e(0x60C));
226
227define('MAPI_W_PARTIAL_COMPLETION'                       ,make_mapi_s(0x680));
228
229/* Address Book specific errors and warnings */
230
231define('MAPI_E_AMBIGUOUS_RECIP'                          ,make_mapi_e(0x700));
232
233/* ICS errors and warnings */
234
235define('SYNC_E_UNKNOWN_FLAGS',                            MAPI_E_UNKNOWN_FLAGS);
236define('SYNC_E_INVALID_PARAMETER',                        MAPI_E_INVALID_PARAMETER);
237define('SYNC_E_ERROR',                                    MAPI_E_CALL_FAILED);
238define('SYNC_E_OBJECT_DELETED',                           make_mapi_e(0x800));
239define('SYNC_E_IGNORE',                                   make_mapi_e(0x801));
240define('SYNC_E_CONFLICT',                                 make_mapi_e(0x802));
241define('SYNC_E_NO_PARENT',                                make_mapi_e(0x803));
242define('SYNC_E_INCEST',                                   make_mapi_e(0x804));
243define('SYNC_E_UNSYNCHRONIZED',                           make_mapi_e(0x805));
244
245define('SYNC_W_PROGRESS',                                 make_mapi_s(0x820));
246define('SYNC_W_CLIENT_CHANGE_NEWER',                      make_mapi_s(0x821));
247
248
249
250?>
Note: See TracBrowser for help on using the repository browser.