//
//  ApexMobileNetwork.h
//  Apex Mobile
//
//  Created by Ray on 14-2-28.
//  Copyright (c) 2014年 United Software Applications, Inc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
#import "ApexMobileAppDelegate.h"
#import "ApexMobileDB.h"
#import "Constant.h"
#import "Reachability.h"
#import "PageData.h"
#import "DetailContent.h"
#import <MessageUI/MessageUI.h>
#import <MessageUI/MFMailComposeViewController.h>
//#define TEST
@interface ApexMobileNetwork : NSObject
+(void)Logout ;
+(int)Authorize : (NSString*) user password:(NSString*) password ;
+(int)parse_authinfo : (NSData *) json user:(NSString*) user password:(NSString*) password;
+(NSData*)get_json : (NSString*) url parameters:(NSMutableDictionary *) params;// delegate:(id < NSURLConnectionDelegate >)delegate;
//+(int) get_announcements: (NSString*)lastid limit:int limit ;//delegate:(id < NSURLConnectionDelegate >)delegate;
+(NSData*)pull_message : (int) offset;
+(NSData*)get_MessageDetail: (int) offset limit:(int) limit from:(NSString*) sid to:(NSString*) eid;
+(NSData*)get_announcements : (NSString*) id limit: (int) limit ;
+(NSData*)get_marketnews : (NSString*) id limit: (int) limit ;
+(void)post_without_return : (NSString*) url parameters:(NSMutableDictionary *) params;
+(int) get_recordcount: (NSMutableDictionary *) params ;//delegate:(id < NSURLConnectionDelegate >)delegate;
+(PageData*) get_pagedata: (NSMutableDictionary *) params;
+(DetailContent*) get_detailcontent: (NSMutableDictionary *) params;
+(bool) IsNetworkAvailable;
+(int) delAllMessage:(NSString*) before;
//+(bool) IsHostAvailable : (NSString*) url;
+(int) RetrievePassword : (NSString*) user  email:(NSString*) email;
+(int) ChangePassword : (NSString*) newpass user:(NSString*) user oldpass:(NSString*) oldpass;
+(bool) UpdateServiceLocation;

//+(void) testmail;
//+(void) testmail1 :(UIViewController*) caller;
@end


