Principles of General Thermodynamics