htiextension/com.nokia.s60tools.hticonnection/src/com/nokia/s60tools/hticonnection/services/DriveInfo.java
author dpodwall
Tue, 12 Jan 2010 13:17:53 -0600
changeset 0 61163b28edca
permissions -rw-r--r--
initial EPL conversion
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     1
/*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     3
* All rights reserved.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     4
* This component and the accompanying materials are made available
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     6
* which accompanies this distribution, and is available
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     8
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     9
* Initial Contributors:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    11
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    12
* Contributors:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    13
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    14
* Description:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    15
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    16
*/
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    17
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    18
package com.nokia.s60tools.hticonnection.services;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    19
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    20
/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    21
 * Contains information of disk drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    22
 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    23
public class DriveInfo {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    24
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    25
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    26
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    27
	 * The root path of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    28
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    29
	private String rootPath;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    30
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    31
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    32
	 * The name of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    33
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    34
	private String name;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    35
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    36
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    37
	 * The type of media
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    38
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    39
	private MediaType type;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    40
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    41
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    42
	 * Unique identifier number of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    43
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    44
	private long uid;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    45
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    46
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    47
	 * The total size of the drive in bytes
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    48
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    49
	private long size;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    50
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    51
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    52
	 * Free space on the drive in bytes
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    53
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    54
	private long freeSpace;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    55
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    56
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    57
	 * Media type of drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    58
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    59
	public enum MediaType {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    60
		NOT_PRESET,
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    61
		UNKNOWN,
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    62
		FLOPPY,
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    63
		HARD_DISK,
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    64
		CDROM,
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    65
		RAM,
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    66
		FLASH,
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    67
		ROM,
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    68
		REMOTE,
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    69
		NAND_FLASH,
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    70
		ROTATING_MEDIA
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    71
	};
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    72
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    73
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    74
	 * Constructor
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    75
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    76
	public DriveInfo() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    77
		
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    78
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    79
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    80
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    81
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    82
	 * Constructor
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    83
	 * @param rootPath The root path of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    84
	 * @param name The name of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    85
	 * @param type The type of media
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    86
	 * @param uid Unique identifier number of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    87
	 * @param size The total size of the drive in bytes
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    88
	 * @param freeSpace Free space on the drive in bytes
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    89
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    90
	public DriveInfo(String rootPath, String name, MediaType type, long uid, long size, long freeSpace) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    91
		this.rootPath = rootPath; 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    92
		this.name = name; 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    93
		this.type = type; 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    94
		this.uid = uid; 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    95
		this.size = size; 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    96
		this.freeSpace = freeSpace;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    97
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    98
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    99
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   100
	 * Get root path of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   101
	 * @return The root path of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   102
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   103
	public String getRootPath() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   104
		return rootPath;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   105
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   106
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   107
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   108
	 * Set root path of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   109
	 * @param rootPath The root path of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   110
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   111
	public void setRootPath(String rootPath) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   112
		this.rootPath = rootPath;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   113
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   114
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   115
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   116
	 * Get the name of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   117
	 * @return The name of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   118
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   119
	public String getName() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   120
		return name;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   121
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   122
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   123
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   124
	 * Set the name of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   125
	 * @param name The name of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   126
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   127
	public void setName(String name) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   128
		this.name = name;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   129
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   130
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   131
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   132
	 * Get the type of media
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   133
	 * @return The type of media
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   134
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   135
	public MediaType getType() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   136
		return type;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   137
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   138
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   139
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   140
	 * Set the type of media
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   141
	 * @param type The type of media
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   142
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   143
	public void setType(MediaType type) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   144
		this.type = type;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   145
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   146
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   147
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   148
	 * Get unique identifier number of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   149
	 * @return Unique identifier number of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   150
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   151
	public long getUid() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   152
		return uid;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   153
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   154
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   155
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   156
	 * Set unique identifier number of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   157
	 * @param uid Unique identifier number of the drive
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   158
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   159
	public void setUid(long uid) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   160
		this.uid = uid;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   161
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   162
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   163
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   164
	 * Get the total size of the drive in bytes
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   165
	 * @return The total size of the drive in bytes
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   166
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   167
	public long getSize() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   168
		return size;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   169
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   170
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   171
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   172
	 * Set the total size of the drive in bytes
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   173
	 * @param size The total size of the drive in bytes
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   174
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   175
	public void setSize(long size) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   176
		this.size = size;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   177
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   178
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   179
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   180
	 * Get free space on the drive in bytes
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   181
	 * @return Free space on the drive in bytes
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   182
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   183
	public long getFreeSpace() {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   184
		return freeSpace;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   185
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   186
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   187
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   188
	 * Set free space on the drive in bytes
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   189
	 * @param freeSpace Free space on the drive in bytes
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   190
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   191
	public void setFreeSpace(long freeSpace) {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   192
		this.freeSpace = freeSpace;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   193
	}
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   194
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   195
}