/*
 * group.h
 *
 *  Created on: Nov 28, 2010
 *      Author: blackpanther
 */

#ifndef GROUP_H_
#define GROUP_H_

#include "configuration.h"

typedef struct _group Group;

struct _group {
	/* database id*/
	PersistentItem *_db_item;
	/* group's name */
	char _name[MAX_STRING_INPUT];

	/* responsable */
	int _respo;
	/* users */
	IdentityArray _users;
	/* problems */
	IdentityArray _problems;

	//method

	/* add user to group*/
	void (*addUser)(Group*, int);
	/* add problem to group*/
	void (*addProblem)(Group*, int);
	/* setter for db_id */
	void (*setId)(Group*, unsigned int);
	/* getter for db_id */
	unsigned int (*getId)(Group*);
	/* toString */
	char* (*display)(struct _group*);

};

Group* createGroupSkeleton();

void destroyGroup(Group* group);

#endif /* GROUP_H_ */
