2010-12-13 17:54:32 +01:00
|
|
|
/* MAPIStoreMapping.h - this file is part of SOGo
|
2010-10-01 20:54:30 +02:00
|
|
|
*
|
2012-08-17 21:04:57 +02:00
|
|
|
* Copyright (C) 2010-2012 Inverse inc.
|
2010-10-01 20:54:30 +02:00
|
|
|
*
|
|
|
|
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
|
|
|
*
|
|
|
|
* This file is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
2010-10-18 14:57:31 +02:00
|
|
|
* the Free Software Foundation; either version 3, or (at your option)
|
2010-10-01 20:54:30 +02:00
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This file is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MAPISTOREMAPPING_H
|
|
|
|
#define MAPISTOREMAPPING_H
|
|
|
|
|
|
|
|
#import <Foundation/NSObject.h>
|
|
|
|
|
|
|
|
@class NSMutableDictionary;
|
|
|
|
@class NSString;
|
|
|
|
|
|
|
|
@interface MAPIStoreMapping : NSObject
|
|
|
|
{
|
2011-10-17 17:29:14 +02:00
|
|
|
void *memCtx;
|
2011-08-10 20:32:53 +02:00
|
|
|
NSString *username;
|
2013-11-08 17:02:50 +01:00
|
|
|
struct indexing_context *indexing;
|
2011-08-10 20:32:53 +02:00
|
|
|
NSUInteger useCount;
|
2010-10-01 20:54:30 +02:00
|
|
|
}
|
|
|
|
|
2011-08-10 20:32:53 +02:00
|
|
|
+ (id) mappingForUsername: (NSString *) username
|
2013-11-08 17:02:50 +01:00
|
|
|
withIndexing: (struct indexing_context *) indexing;
|
2011-08-10 20:32:53 +02:00
|
|
|
|
|
|
|
- (id) initForUsername: (NSString *) username
|
2013-11-08 17:02:50 +01:00
|
|
|
withIndexing: (struct indexing_context *) indexing;
|
2011-08-10 20:32:53 +02:00
|
|
|
|
2011-06-04 01:53:30 +02:00
|
|
|
|
2011-08-10 20:32:53 +02:00
|
|
|
- (void) increaseUseCount;
|
|
|
|
- (void) decreaseUseCount;
|
2010-10-15 19:18:34 +02:00
|
|
|
|
2010-10-01 20:54:30 +02:00
|
|
|
- (NSString *) urlFromID: (uint64_t) idKey;
|
|
|
|
|
|
|
|
- (uint64_t) idFromURL: (NSString *) url;
|
2014-10-15 00:35:17 +02:00
|
|
|
- (uint64_t) idFromURL: (NSString *) url
|
|
|
|
isSoftDeleted: (bool *) softDeleted;
|
2010-10-01 20:54:30 +02:00
|
|
|
- (BOOL) registerURL: (NSString *) urlString
|
|
|
|
withID: (uint64_t) idNbr;
|
2012-10-12 23:44:26 +02:00
|
|
|
- (void) registerURLs: (NSArray *) urlString
|
2012-10-13 05:27:05 +02:00
|
|
|
withIDs: (NSArray *) idNbrs;
|
2011-02-03 23:09:41 +01:00
|
|
|
- (void) unregisterURLWithID: (uint64_t) idNbr;
|
2014-10-14 23:48:36 +02:00
|
|
|
- (void) unregisterURLWithID: (uint64_t) idNbr
|
|
|
|
andFlags: (uint8_t) flags;
|
2012-08-13 05:55:48 +02:00
|
|
|
- (void) updateID: (uint64_t) idNbr
|
|
|
|
withURL: (NSString *) urlString;
|
2015-04-13 11:48:42 +02:00
|
|
|
- (BOOL) updateURL: (NSString *) urlString
|
|
|
|
withID: (uint64_t) idNbr;
|
2010-10-01 20:54:30 +02:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* MAPISTOREMAPPING_H */
|