PageRenderTime 12ms CodeModel.GetById 6ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/update-engine/Core/KSMemoryTicketStore.h

http://macfuse.googlecode.com/
C++ Header | 42 lines | 7 code | 5 blank | 30 comment | 0 complexity | 4626fc14d31efda9ad4628981fe527a3 MD5 | raw file
 1// Copyright 2008 Google Inc.
 2//
 3// Licensed under the Apache License, Version 2.0 (the "License");
 4// you may not use this file except in compliance with the License.
 5// You may obtain a copy of the License at
 6//
 7//     http://www.apache.org/licenses/LICENSE-2.0
 8//
 9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#import <Foundation/Foundation.h>
16#import "KSTicketStore.h"
17
18
19// KSMemoryTicketStore
20//
21// This KSTicketStore subclass represents an in-memory, temporary ticket store
22// that does not persist across invocations of the application. The tickets
23// stored in this store are only stored as long as the KSMemoryTicketStore
24// instance exists. This is simply a KSTicketStore that is backed by an
25// in-memory NSDictionary rather than disk. The arg passed to -initWithPath:
26// MUST be nil.
27//
28// Sample usage:
29//
30//   KSTicket *t = ...
31//   KSTicketStore *ts = [[KSMemoryTicketStore alloc] init];
32//   [ts storeTicket:t];        // [ts ticketCount] == 1
33//   [ts storeDeleteTicket:t];  // [ts ticketCount] == 0
34//   
35@interface KSMemoryTicketStore : KSTicketStore {
36 @private
37  NSMutableDictionary *tickets_;
38}
39
40// No new methods added. See KSTicketStore.h for API.
41
42@end