function _fnSaveState(settings) {
		if (settings._bLoadingState) {
			return;
		}

		/* Store the interesting variables */
		var state = {
			time: +new Date(),
			start: settings._iDisplayStart,
			length: settings._iDisplayLength,
			order: $.extend(true, [], settings.aaSorting),
			search: $.extend({}, settings.oPreviousSearch),
			columns: settings.aoColumns.map(function (col, i) {
				return {
					visible: col.bVisible,
					search: $.extend({}, settings.aoPreSearchCols[i])
				};
			})
		};

		settings.oSavedState = state;
		_fnCallbackFire(settings, "aoStateSaveParams", 'stateSaveParams', [settings, state]);

		if (settings.oFeatures.bStateSave && !settings.bDestroying) {
			settings.fnStateSaveCallback.call(settings.oInstance, settings, state);
		}
	}
State information for a table

@param {*} settings
@returns State object