All pastes #147136 Raw Edit

Mine

public cpp v1 · immutable
#147136 ·published 2006-08-24 04:24 UTC
rendered paste body
		  case Moo::M_ROOM_STATE:               {		RoomList roomlist;		guint numRooms = Moo::IO::unpack_uint (read_data, offset); 		for (guint n = 0; n < numRooms; ++n) {			std::string room  = Moo::IO::unpack_string (read_data, offset);			unsigned int numUsers = Moo::IO::unpack_uint (read_data, offset);			roomlist[room] = numUsers;		}		RoomsLists roomslists;		TickersList tickers;		guint numJoined = Moo::IO::unpack_uint (read_data, offset); 		for (guint n = 0; n < numJoined; ++n) {			RoomData joinedrooms;			std::string room  = Moo::IO::unpack_string (read_data, offset);			unsigned int numUsers = Moo::IO::unpack_uint (read_data, offset);			std::vector<UserData> _d;			for (guint n = 0; n < numUsers; ++n) {				UserData _data;				std::string user  = Moo::IO::unpack_string (read_data, offset);				_data.status = Moo::IO::unpack_uint (read_data, offset);				_data.avgspeed = Moo::IO::unpack_uint (read_data, offset);				_data.downloadnum = Moo::IO::unpack_uint (read_data, offset);				_data.files = Moo::IO::unpack_uint (read_data, offset);				_data.dirs = Moo::IO::unpack_uint (read_data, offset);				_data.slotsfull = Moo::IO::unpack_bool (read_data, offset);				joinedrooms[user] = _data;			}			unsigned int numTickers = Moo::IO::unpack_uint (read_data, offset);			for (guint n = 0; n < numTickers; ++n) {				std::string user  = Moo::IO::unpack_string (read_data, offset);				std::string ticker = Moo::IO::unpack_string (read_data, offset);			}			roomslists[room] = joinedrooms;		} 		  driver->s_room_state_.emit (roomlist, roomslists, tickers);		  break;              }