//
//  FBDatabases.h
//  iPhoneFrontBase
//
//  Created by Svend Bodilsen on 29/11/10.
//  Copyright 2010 Frontline Software. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FBMetaData.h"


@interface FBDatabases : NSObject 

// When an embedded server needs a pin code, the selector is send to the target.
// 
//  - (NSString*)pinSelector:(NSNumber*)attempt;
//  If attempt is [attemp intValue] is 0 any code will be accepted, otherwise attempt is
//  the number of time a pincode returned.
// 
// Return nil if the pin is not available, which will case the database start will fail.

+ (void)setPinAction:(SEL)action;
+ (SEL)pinAction;
+ (void)setPinTarget:(id)target;
+ (id)pinTarget;

+ (FBMetaData*) createURL:(NSString*)url options:(NSString*)options;
+ (FBMetaData*) startURL:(NSString*)url options:(NSString*)options;
+ (FBMetaData*) stopURL:(NSString*)url;
+ (FBMetaData*) deleteURL:(NSString*)url;

+ (BOOL) isStarted:(NSString*)url ;
+ (BOOL) isCreated:(NSString*)url ;

@end
