Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (29 sloc) 842 Bytes
//
// TD_Attachment.h
// TouchDB
//
// Created by Jens Alfke on 4/3/12.
// Copyright (c) 2012 Couchbase, Inc. All rights reserved.
//
#import "TD_Database+Attachments.h"
#import "TDBlobStore.h"
/** A simple container for attachment metadata. */
@interface TD_Attachment : NSObject
{
@private
NSString* _name;
NSString* _contentType;
@public
// Yes, these are public. They're simple scalar values so it's not really worth
// creating accessor methods for them all.
TDBlobKey blobKey;
UInt64 length;
UInt64 encodedLength;
TDAttachmentEncoding encoding;
unsigned revpos;
}
- (id) initWithName: (NSString*)name contentType: (NSString*)contentType;
@property (readonly, nonatomic) NSString* name;
@property (readonly, nonatomic) NSString* contentType;
@property (readonly) bool isValid;
@end