//
//  Export.h
//  DrivoMeter
//
//  Created by Triin Uudam on 4/17/12.
//  Copyright (c) 2012 Mobi Solutions OÜ. All rights reserved.
//

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

@class Database;
@protocol ExportDelegate <NSObject>

- (void)emailSent;
- (void)emailSendFail;

@end
@interface Export : NSObject <SKPSMTPMessageDelegate> {
  NSDate *beginningDate_;
  NSDate *endDate_;
  Database *database_;
  id<ExportDelegate> delegate_;
  BOOL emailIsSent_;
}

@property (nonatomic, strong) NSDate *beginningDate;
@property (nonatomic, strong) NSDate *endDate;
@property (nonatomic, strong) Database *database;
@property (nonatomic) id<ExportDelegate> delegate;
@property (nonatomic) BOOL emailIsSent;

- (id)initFrom:(NSDate *)begin to:(NSDate *)end;
- (void)exportData;

@end
