<?php
/*
Officity - Web application platform - Version 6.0 - 2011-07-05

François Dispaux, Boris Verdeyen, Thomas Hermant,
Jérémie Roy, Grégory Meurice, Abdelila Harbi, 
Marc Mignonsin, Jonathan Sanchez, Julien Gonzalez, Pierre Fouchez

Sushee and Officity is © Copyright 2011 Nectil SA.

`/sushee-source/sushee/common/logdev.class.php` is part of Officity.

Sushee is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Officity and Sushee are distributed in the hope that they will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Sushee. If not, see <http://www.gnu.org/licenses/>.
*/
require_once(dirname(__FILE__)."/../common/nectil_object.class.php");
require_once(dirname(__FILE__)."/../common/nectil_user.class.php");
require_once(dirname(__FILE__)."/../common/file.class.php");
require_once(dirname(__FILE__).'/../common/nqlOperation.class.php');
require_once(dirname(__FILE__).'/../common/nql.class.php');
require_once(dirname(__FILE__)."/../common/file.class.php");
require_once(dirname(__FILE__)."/../common/date.class.php");


// objects allowing to manipulate and consult a logdev (log for developers, in Files/logdevs/)
class Logdev extends SusheeObject{

	var $path;
	var $offset;
	var $date;
	var $id;
	var $info;
	var $prev;
	var $next;


	function Logdev($path,$offset,$date,$id,$info,$prev,$next){
		$this->path = $path;
		$this->offset = $offset;
		$this->date = $date;
		$this->id = $id;
		$this->prev = $prev;
		$this->next = $next;
		$this->info = $info;
		
	}


	function getPath(){
		return $this->path;
	}


	function getOffset(){
		return $this->offset;
	}

	function getDate(){
		return $this->date;
	}

	function getId(){
		return $this->id;
	}

	function getInfo(){
		return $this->info;
	}

	function getPrev(){
		return $this->prev;
	}

	function getNext(){
		return $this->next;
	}


	function setPath($path){
		$this->path = $path;
	}

	
	function setDate($date){
		$this->date = $date;
	}

	function setId($id){
		$this->id = $id;
	}

	function setInfo($info){
		$this->info = $info;
	}

	function setPrev($prev){
		$this->prev = $prev;
	}

	 function setNext ($next){
		$this->next = $next;
	}
	
	
	function getXML(){
		$xml .= '<LOGDEV>'.$this->newline.'<INFO>'.$this->newline;
		$xml .= '<USERID>'.$this->getId().'</USERID>'.$this->newline;
		$xml .= '<DATE>'.$this->getDate().'</DATE>'.$this->newline;
		$xml .= '<PATH>'.$this->getPath().'</PATH>'.$this->newline;
		$xml .= '<CONTENT>'.$this->getInfo().'</CONTENT>'.$this->newline;
		$xml .= '</INFO>'.$this->newline.'</LOGDEV>'.$this->newline;
		return $xml;
	}
}

?>	