/******************************************************************************
 * Copyright AllSeen Alliance. All rights reserved.
 *
 *    Permission to use, copy, modify, and/or distribute this software for any
 *    purpose with or without fee is hereby granted, provided that the above
 *    copyright notice and this permission notice appear in all copies.
 *
 *    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 *    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 *    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 *    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 *    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 *    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 *    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 ******************************************************************************/

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

@protocol AJTMTimeServiceServerTimer <NSObject>

/**
 * Returns TimeServiceSchedule of this Timer
 *
 * @return interval
 */
-(AJTMTimeServicePeriod*)interval;

/**
 * Set interval of this Timer object
 *
 * @param schedule TimeServiceSchedule
 * @return Status ER_OK If succeeded to set the Schedule, otherwise, if this Timer does not support
 * one of the interval values, return an appropriate failure status.
 */
-(QStatus)setInterval:(AJTMTimeServicePeriod*) interval;

/**
 * Returns time left for this Timer
 *
 * @return time left
 */
-(AJTMTimeServicePeriod*)timeLeft;

/**
 * Returns Timer title.
 *
 * @return Optional textual description of what this Timer is
 */
-(NSString*)title;

/**
 * Set title of this Timer.
 *
 * @param title Timer title.
 * Title is an optional textual description of what this Timer is set for.
 */
-(void)setTitle:(NSString*) title;

/**
 * Returns whether or not this Timer is running
 *
 * @return Is Timer running
 */
-(bool)isRunning;

/**
 * Returns number of repeats for this Timer
 *
 * @return repeats
 */
-(uint16_t)repeat;

/**
 * Sets number of repeats for this Timer
 *
 * @return time left
 */
-(void)setRepeat:(uint16_t) repeat;

/**
 * Start Timer
 */
-(void)start;

/**
 * Reset Timer
 */
-(void)reset;

/**
 * Pause
 */
-(void)pause;

/**
 * Releases object resources
 */
-(void)releaseObject;


@end
