CouchCocoa
An Objective-C API for CouchDB
Couch/CouchAttachment.h
00001 //
00002 //  CouchAttachment.h
00003 //  CouchCocoa
00004 //
00005 //  Created by Jens Alfke on 5/26/11.
00006 //  Copyright 2011 Couchbase, Inc.
00007 //
00008 //  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
00009 //  except in compliance with the License. You may obtain a copy of the License at
00010 //    http://www.apache.org/licenses/LICENSE-2.0
00011 //  Unless required by applicable law or agreed to in writing, software distributed under the
00012 //  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
00013 //  either express or implied. See the License for the specific language governing permissions
00014 //  and limitations under the License.
00015 
00016 #import "CouchResource.h"
00017 @class CouchDocument, CouchRevision;
00018 
00019 
00022 @interface CouchAttachment : CouchResource
00023 {
00024     @private
00025     NSDictionary* _metadata;
00026 }
00027 
00029 @property (readonly) CouchRevision* revision;
00030 
00032 @property (readonly) CouchDocument* document;
00033 
00035 @property (readonly) NSString* name;
00036 
00038 @property (readonly) NSString* contentType;
00039 
00041 @property (readonly) UInt64 length;
00042 
00044 @property (readonly) NSDictionary* metadata;
00045 
00048 @property (copy) NSData* body;
00049 
00052 @property (readonly) NSURL* unversionedURL;
00053 
00055 - (RESTOperation*) PUT: (NSData*)body contentType: (NSString*)contentType;
00056 
00058 - (RESTOperation*) PUT: (NSData*)body;
00059 
00060 @end
 All Classes Functions Properties