/*
 *     Generated by class-dump 3.1.2.
 *
 *     class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2007 by Steve Nygard.
 */

struct _NSRange {
    unsigned int _field1;
    unsigned int _field2;
};

struct __CFData;

struct __CFDictionary;

struct __CFHTTPMessage;

struct __CFString;

struct vmdh;

typedef struct {
    int _field1;
    int _field2;
} CDAnonymousStruct1;

typedef struct {
    id _field1;
    id _field2;
    struct __CFString *_field3;
    id _field4;
} CDAnonymousStruct2;

/*
 * File: System/Library/Frameworks/VisualVoicemail.framework/ACDS.vvservice/ACDS
 */

@interface ACDSService : VVService
{
    ACDSTaskQueue *_queue;
    ACDSTask *_activeTask;
    int _activeTaskType;
    struct {
        ACDSService *;
        ACDSTask *;
        struct __CFString *;
        NSError *;
    } *_performContext;
    int _flagPushAttempts;
    NSMutableSet *_flagChangedRecords;
    NSString *_encryptedPassword;
    struct vmdh *_securityHandle;
    unsigned char _serverPublicKey[64];
    int _serverPublicKeyLength;
    double _lastParamFetchTime;
    struct {
        unsigned int initialSetupRequired:1;
        unsigned int outstandingListFetch:1;
        unsigned int outstandingListFetchBeforeFetch:1;
        unsigned int suppressPasswordError:1;
        unsigned int endingTask:1;
        unsigned int suspendChangeTracking:2;
    } _acdsServiceFlags;
}

- (id)init;
- (void)dealloc;
- (void)setSubscribed:(BOOL)fp8;
- (void)_storeChangedExternally:(id)fp8;
- (void)removeAllRecords;
- (void)setOnline:(BOOL)fp8;
- (long)dataContextIdentifier;
- (id)mailboxName;
- (void)setMailboxRequiresSetup:(BOOL)fp8;
- (void)_setServerURL:(id)fp8;
- (void)_setPassword:(id)fp8 isInitial:(BOOL)fp12;
- (void)setPassword:(id)fp8;
- (id)_encryptedPassword;
- (void)setSecurityHandle:(struct vmdh *)fp8;
- (void)setServerPublicKey:(char *)fp8 length:(int)fp12;
- (struct __CFString *)createEncryptedPasswordForString:(id)fp8;
- (BOOL)isInSync;
- (void)handleNotification:(id)fp8 isMWI:(BOOL)fp12;
- (void)_setOutstandingListFetch:(BOOL)fp8;
- (void)storeMailboxParametersFromDictionary:(id)fp8;
- (int)_valueForParameter:(struct __CFString *)fp8 defaultValue:(int)fp12;
- (int)maximumGreetingDuration;
- (int)maximumRecordedNameDuration;
- (int)minimumPasswordLength;
- (int)maximumPasswordLength;
- (int)mailboxGreetingType;
- (void)_flagsChanged:(id)fp8;
- (void)setChangedRecords:(id)fp8 merging:(BOOL)fp12;
- (void)setChangeTrackingSuspended:(BOOL)fp8;
- (id)copyChangedRecords;
- (void)pushFlagsForChangedRecords:(id)fp8;
- (void)_recordsAllRemoved:(id)fp8;
- (void)_recordsRemoved:(id)fp8;
- (id)_nonTrivialActiveTask;
- (BOOL)taskOfTypeExists:(int)fp8;
- (BOOL)headerChangesPending;
- (id)_taskForMessageFetch:(void *)fp8;
- (BOOL)dataForRecordPending:(void *)fp8 progressiveLoadInProgress:(char *)fp12;
- (void)progressiveDataLengthsForRecord:(void *)fp8 expected:(unsigned int *)fp12 current:(unsigned int *)fp16;
- (BOOL)greetingFetchExistsProgressiveLoadInProgress:(char *)fp8;
- (void)_setActiveTask:(id)fp8 error:(id)fp12;
- (void)precacheDataForRecords:(id)fp8;
- (void)retrieveMessageList;
- (void)retrieveDataForRecord:(void *)fp8;
- (void)retrieveParametersNow:(BOOL)fp8;
- (void)changePassword:(id)fp8 fromPassword:(id)fp12;
- (void)retrieveGreeting;
- (void)setGreetingType:(int)fp8 withData:(id)fp12 duration:(unsigned int)fp16;
- (void)synchronize:(BOOL)fp8;
- (void)_performTask:(id)fp8;
- (void)enqueueTask:(id)fp8;
- (id)_dequeueFetchTask;
- (void)_rescheduleQueueTimer;
- (void)_reprocessQueue;
- (void)_completedTaskSuccessfully:(id)fp8;
- (void)_scheduleRetryForFetchTask:(id)fp8 givenError:(id)fp12;
- (void)displayPasswordRequestIfNecessary;
- (void)handlePasswordRequestCancellation;
- (void)reportError:(id)fp8;
- (void)_reportError:(id)fp8 forTask:(id)fp12;
- (BOOL)_handleResponse:(struct __CFHTTPMessage *)fp8 body:(struct __CFData *)fp12 isComplete:(BOOL)fp16 isFirstData:(BOOL)fp20 streamError:(CDAnonymousStruct1 *)fp24 task:(id)fp28;

@end

@interface NSError (ACDSError)
+ (id)errorWithACDSResponseStatus:(int)fp8 localizedDescription:(id)fp12;
@end

@interface ACDSTaskQueue : NSObject
{
    NSMutableArray *_pendedTasks;
}

- (id)init;
- (void)dealloc;
- (void)enqueueTask:(id)fp8;
- (void)_removeTask:(id)fp8 atIndex:(int)fp12;
- (id)dequeueNextReadyTask;
- (id)nextTask;
- (id)nextNonKeyExchangeTask;
- (BOOL)isEmpty;
- (id)_taskOfType:(int)fp8 serviceType:(BOOL)fp12;
- (id)taskOfType:(int)fp8;
- (id)taskOfServiceTaskType:(int)fp8;
- (id)nextTaskOfType:(id)fp8;
- (void)removeTask:(id)fp8;
- (void)drainWithError:(id)fp8 forService:(id)fp12;

@end

@interface ACDSTask : NSObject
{
    double _lastAttemptTime;
    double _timeBetweenAttempts;
    int _retryCount;
    int _lastErrorCode;
    NSString *_lastErrorDomain;
}

+ (void)initialize;
+ (BOOL)isFastStartEnabled;
+ (unsigned int)initialFastStartDataChunkSize;
- (int)type;
- (int)serviceTaskType;
- (void)dealloc;
- (id)name;
- (int)priority;
- (long)compareEquivalentPriorities:(id)fp8;
- (BOOL)requiresPassword;
- (BOOL)shouldDisplayError:(id)fp8;
- (BOOL)shouldSuppressPasswordError:(id)fp8;
- (id)taskByCoalescingWithTask:(id)fp8;
- (BOOL)shouldCancelForTask:(id)fp8;
- (void)cancel;
- (void)willBeCancelledForError:(id)fp8;
- (BOOL)shouldRescheduleWhenCancelled;
- (id)createNotificationUserInfoDictionaryWithError:(id)fp8;
- (void)perform:(CDAnonymousStruct2 *)fp8;
- (void)_handleResponse:(struct __CFHTTPMessage *)fp8 status:(int)fp12 error:(id *)fp16;
- (void)handleResponse:(struct __CFHTTPMessage *)fp8 body:(struct __CFData *)fp12 status:(int)fp16 service:(id)fp20 error:(id *)fp24;
- (void)handleInitialResponse:(struct __CFHTTPMessage *)fp8 body:(struct __CFData *)fp12 status:(int)fp16 service:(id)fp20 error:(id *)fp24;
- (void)handleProgressiveBodyLoad:(struct __CFData *)fp8 finished:(BOOL)fp12 service:(id)fp16 error:(id *)fp20;
- (BOOL)isReadyToPerform;
- (BOOL)isProgressive;
- (BOOL)hasBegunProgressiveLoad;
- (unsigned int)currentProgressiveDataLength;
- (unsigned int)expectedProgressiveDataLength;
- (int)retryCount;
- (double)nextAttemptTime;
- (void)attemptCompletedWithError:(id)fp8;

@end

@interface ACDSKeyExchangeTask : ACDSTask
{
}

- (int)type;
- (int)serviceTaskType;
- (id)name;
- (int)priority;
- (BOOL)requiresPassword;
- (id)taskByCoalescingWithTask:(id)fp8;
- (void)perform:(CDAnonymousStruct2 *)fp8;
- (void)handleResponse:(struct __CFHTTPMessage *)fp8 body:(struct __CFData *)fp12 status:(int)fp16 service:(id)fp20 error:(id *)fp24;

@end

@interface ACDSListFetchTask : ACDSTask
{
}

- (id)init;
- (void)dealloc;
- (int)type;
- (int)serviceTaskType;
- (id)name;
- (int)priority;
- (id)taskByCoalescingWithTask:(id)fp8;
- (void)perform:(CDAnonymousStruct2 *)fp8;
- (void)handleResponse:(struct __CFHTTPMessage *)fp8 body:(struct __CFData *)fp12 status:(int)fp16 service:(id)fp20 error:(id *)fp24;

@end

@interface MimePart (Voicemail)
- (int)voicemailFlags;
@end

@interface ACDSFlagPushTask : ACDSTask
{
    NSSet *_changedRecords;
    NSMutableArray *_messagesToCompact;
    double _timeOfLastFlagChange;
    unsigned int _shouldPerformRightAway:1;
}

- (id)init;
- (id)initWithChangedRecords:(id)fp8;
- (void)dealloc;
- (int)type;
- (int)serviceTaskType;
- (id)name;
- (int)priority;
- (id)taskByCoalescingWithTask:(id)fp8;
- (void)noteFlagChangeOccurred;
- (BOOL)isReadyToPerform;
- (double)nextAttemptTime;
- (void)perform:(CDAnonymousStruct2 *)fp8;
- (void)handleResponse:(struct __CFHTTPMessage *)fp8 body:(struct __CFData *)fp12 status:(int)fp16 service:(id)fp20 error:(id *)fp24;

@end

@interface ACDSCachingMessageFetchTask : ACDSMessageFetchTask
{
}

- (BOOL)shouldDisplayError:(id)fp8;
- (id)name;
- (int)priority;
- (long)compareEquivalentPriorities:(id)fp8;
- (id)taskByCoalescingWithTask:(id)fp8;
- (BOOL)shouldCancelForTask:(id)fp8;
- (BOOL)shouldRescheduleWhenCancelled;

@end

@interface ACDSMessageFetchTask : ACDSTask
{
    void *_record;
    ProgressiveMimeParser *_progressiveParser;
    int _fd;
    NSError *_parseError;
    NSMutableDictionary *_noteUserInfo;
    unsigned int _lastWrittenOffset;
    VVService *_service;
}

- (id)initForRecord:(void *)fp8;
- (void)dealloc;
- (int)type;
- (int)serviceTaskType;
- (id)name;
- (id)description;
- (int)priority;
- (BOOL)isProgressive;
- (void *)record;
- (id)taskByCoalescingWithTask:(id)fp8;
- (BOOL)shouldCancelForTask:(id)fp8;
- (void)_clearPartialDataFile;
- (void)attemptCompletedWithError:(id)fp8;
- (void)perform:(CDAnonymousStruct2 *)fp8;
- (id)_headersToPreserve;
- (void)handleResponse:(struct __CFHTTPMessage *)fp8 body:(struct __CFData *)fp12 status:(int)fp16 service:(id)fp20 error:(id *)fp24;
- (BOOL)hasBegunProgressiveLoad;
- (unsigned int)currentProgressiveDataLength;
- (unsigned int)expectedProgressiveDataLength;
- (void)handleInitialResponse:(struct __CFHTTPMessage *)fp8 body:(struct __CFData *)fp12 status:(int)fp16 service:(id)fp20 error:(id *)fp24;
- (void)_writeUpdatedDataFromParser;
- (void)_postProgressiveDataNotification:(id)fp8;
- (void)handleProgressiveBodyLoad:(struct __CFData *)fp8 finished:(BOOL)fp12 service:(id)fp16 error:(id *)fp20;
- (void)progressiveMimeParser:(id)fp8 beganDataForMimePart:(id)fp12;
- (void)progressiveMimeParser:(id)fp8 finishedMimePart:(id)fp12;
- (void)progressiveMimeParser:(id)fp8 failedWithError:(id)fp12;

@end

@interface ACDSParamsFetchTask : ACDSTask
{
}

- (int)type;
- (int)serviceTaskType;
- (id)name;
- (int)priority;
- (void)perform:(CDAnonymousStruct2 *)fp8;
- (void)handleResponse:(struct __CFHTTPMessage *)fp8 body:(struct __CFData *)fp12 status:(int)fp16 service:(id)fp20 error:(id *)fp24;

@end

@interface ACDSChangePasswordTask : ACDSTask
{
    NSString *_newPassword;
    NSString *_oldPassword;
    unsigned int _suppressOldPasswordErrors:1;
    unsigned int _isInitialSetup:1;
}

- (id)initWithNewPassword:(id)fp8 oldPassword:(id)fp12 forInitialSetup:(BOOL)fp16;
- (void)dealloc;
- (int)type;
- (int)serviceTaskType;
- (id)name;
- (int)priority;
- (void)setDisplaysOldPasswordErrors:(BOOL)fp8;
- (BOOL)shouldSuppressPasswordError:(id)fp8;
- (id)taskByCoalescingWithTask:(id)fp8;
- (void)perform:(CDAnonymousStruct2 *)fp8;
- (void)handleResponse:(struct __CFHTTPMessage *)fp8 body:(struct __CFData *)fp12 status:(int)fp16 service:(id)fp20 error:(id *)fp24;

@end

@interface ACDSGreetingFetchTask : ACDSTask
{
    unsigned int _lastWrittenOffset;
    unsigned int _totalLength;
    NSMutableDictionary *_noteUserInfo;
    int _fd;
    VVService *_service;
}

- (void)dealloc;
- (int)type;
- (int)serviceTaskType;
- (id)name;
- (int)priority;
- (BOOL)isProgressive;
- (void)_clearPartialDataFile;
- (void)attemptCompletedWithError:(id)fp8;
- (void)perform:(CDAnonymousStruct2 *)fp8;
- (void)handleResponse:(struct __CFHTTPMessage *)fp8 body:(struct __CFData *)fp12 status:(int)fp16 service:(id)fp20 error:(id *)fp24;
- (BOOL)hasBegunProgressiveLoad;
- (unsigned int)currentProgressiveDataLength;
- (unsigned int)expectedProgressiveDataLength;
- (void)handleInitialResponse:(struct __CFHTTPMessage *)fp8 body:(struct __CFData *)fp12 status:(int)fp16 service:(id)fp20 error:(id *)fp24;
- (void)handleProgressiveBodyLoad:(struct __CFData *)fp8 finished:(BOOL)fp12 service:(id)fp16 error:(id *)fp20;
- (void)_postProgressiveDataNotification:(id)fp8;
- (id)_writeUpdatedData:(struct __CFData *)fp8;

@end

@interface ACDSSetGreetingTask : ACDSTask
{
    NSData *_greetingData;
}

- (id)initWithGreetingData:(id)fp8;
- (void)dealloc;
- (int)type;
- (int)serviceTaskType;
- (id)name;
- (int)priority;
- (id)taskByCoalescingWithTask:(id)fp8;
- (void)perform:(CDAnonymousStruct2 *)fp8;
- (void)handleResponse:(struct __CFHTTPMessage *)fp8 body:(struct __CFData *)fp12 status:(int)fp16 service:(id)fp20 error:(id *)fp24;

@end

@interface ACDSSetParamsTask : ACDSTask
{
    NSDictionary *_paramsDict;
}

- (id)initWithParameterValues:(id)fp8;
- (id)initForGreetingReset;
- (id)initForPersonalGreeting;
- (void)dealloc;
- (int)type;
- (int)serviceTaskType;
- (id)name;
- (int)priority;
- (id)taskByCoalescingWithTask:(id)fp8;
- (void)perform:(CDAnonymousStruct2 *)fp8;
- (void)handleResponse:(struct __CFHTTPMessage *)fp8 body:(struct __CFData *)fp12 status:(int)fp16 service:(id)fp20 error:(id *)fp24;

@end

@interface ACDSResponseMessage : Message
{
    NSMutableData *_bodyData;
    NSData *_headerData;
    unsigned int _uidValidity;
}

- (id)initWithHTTPResponse:(struct __CFHTTPMessage *)fp8 bodyData:(id)fp12 hasPartDataToPreserve:(BOOL)fp16;
- (void)dealloc;
- (id)bodyDataIsComplete:(char *)fp8;
- (id)bodyData;
- (id)dataForMimePart:(id)fp8 inRange:(struct _NSRange)fp12 isComplete:(char *)fp20 downloadIfNecessary:(BOOL)fp24;
- (id)headerData;
- (id)headers;
- (id)copyMimeBody;
- (unsigned int)uidValidity;

@end

@interface MimePart (VoicemailExpiration)
- (double)expirationTimeIntervalSince1970;
@end

@interface ACDSNotificationInterpreter : VVNotificationInterpreter
{
}

+ (id)interpretedDictionaryForNotificationUserInfo:(struct __CFDictionary *)fp8;

@end

