1643ca7872b450ea4efacab6188849e5aac2ba161Steve Block/* 2643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * Copyright (C) 2009 Apple Inc. All rights reserved. 3643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * 4643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * Redistribution and use in source and binary forms, with or without 5643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * modification, are permitted provided that the following conditions 6643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * are met: 7643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * 1. Redistributions of source code must retain the above copyright 8643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * notice, this list of conditions and the following disclaimer. 9643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * 2. Redistributions in binary form must reproduce the above copyright 10643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * notice, this list of conditions and the following disclaimer in the 11643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * documentation and/or other materials provided with the distribution. 12643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * 13643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY 14643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY 17643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 20643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 22643ca7872b450ea4efacab6188849e5aac2ba161Steve Block * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23643ca7872b450ea4efacab6188849e5aac2ba161Steve Block */ 24643ca7872b450ea4efacab6188849e5aac2ba161Steve Block 25643ca7872b450ea4efacab6188849e5aac2ba161Steve Block@class WebSerializedJSValuePrivate; 26643ca7872b450ea4efacab6188849e5aac2ba161Steve Block 27643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef const struct OpaqueJSContext* JSContextRef; 28643ca7872b450ea4efacab6188849e5aac2ba161Steve Blocktypedef const struct OpaqueJSValue* JSValueRef; 29643ca7872b450ea4efacab6188849e5aac2ba161Steve Block 30643ca7872b450ea4efacab6188849e5aac2ba161Steve Block@interface WebSerializedJSValue : NSObject { 31643ca7872b450ea4efacab6188849e5aac2ba161Steve Block@private 32643ca7872b450ea4efacab6188849e5aac2ba161Steve Block WebSerializedJSValuePrivate *_private; 33643ca7872b450ea4efacab6188849e5aac2ba161Steve Block} 34643ca7872b450ea4efacab6188849e5aac2ba161Steve Block 35643ca7872b450ea4efacab6188849e5aac2ba161Steve Block- (id)initWithValue:(JSValueRef)object context:(JSContextRef)sourceContext exception:(JSValueRef*)exception; 36643ca7872b450ea4efacab6188849e5aac2ba161Steve Block- (JSValueRef)deserialize:(JSContextRef)destinationContext; 37643ca7872b450ea4efacab6188849e5aac2ba161Steve Block 38643ca7872b450ea4efacab6188849e5aac2ba161Steve Block@end 39