sysperfana/memspyext/com.nokia.s60tools.swmtanalyser/src/com/nokia/s60tools/swmtanalyser/data/DiskOverview.java
changeset 7 8e12a575a9b5
equal deleted inserted replaced
6:f65f740e69f9 7:8e12a575a9b5
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 package com.nokia.s60tools.swmtanalyser.data;
       
    19 
       
    20 public class DiskOverview { 
       
    21 
       
    22 	private long freeSize;
       
    23 	private long size;
       
    24 	private int status;
       
    25 	
       
    26 	public DiskOverview(DiskOverview target)
       
    27 	{
       
    28 		this.freeSize = target.freeSize;
       
    29 		this.size = target.size;
       
    30 		this.status = target.status;
       
    31 	}
       
    32 	
       
    33 	public DiskOverview()
       
    34 	{
       
    35 		this.freeSize = -1;
       
    36 		this.size = -1;
       
    37 	}
       
    38 	
       
    39 	public long getFreeSize()
       
    40 	{
       
    41 		return freeSize;
       
    42 	}
       
    43 	
       
    44 	public long getSize()
       
    45 	{
       
    46 		return size;
       
    47 	}
       
    48 	
       
    49 	public long getUsedSize()
       
    50 	{
       
    51 		if(freeSize == -1 || size == -1)
       
    52 			return -1;
       
    53 		else
       
    54 			return size - freeSize;
       
    55 	}
       
    56 	
       
    57 	public void setFreeSize(long freeSize)
       
    58 	{
       
    59 		this.freeSize = freeSize;
       
    60 	}
       
    61 	
       
    62 	public void setSize(long size)
       
    63 	{
       
    64 		this.size = size;
       
    65 	}
       
    66 
       
    67 	public int getStatus() {
       
    68 		return status;
       
    69 	}
       
    70 
       
    71 	public void setStatus(int status) {
       
    72 		this.status = status;
       
    73 	}
       
    74 	
       
    75 }