Your code is sort-of on track. As Azaral mentions, your collision engine should evaluate the player's speed and direction against any other objects. The collision engine then resolves the collisions and repositions objects appropriately. In a sense, objects "know" about the collision engine, but only to tell the collision engine how to represent them - bounded planes for a wall, a cylinder or capsule for a player, etc. Objects also know to ask the collision engine for their location, speed and direction.
A sample implementation could be for each object to have 2 representations: a renderable one, and a collision one. Set the position, speed and direction of the collision player. Call the collision engine to determine where that object ends up in the next delta time. Orient the renderable player in accordance with the results for the collision player. Render the renderable player. That's very simplistic and doesn't take into account the player's renderable action when he hits the wall (throw his arms up, moan, etc.)
As you surmise, the collision engine may have to evaluate collisions between various type objects: sphere-with-plane, cylinder-with-plane, cylinder-with-cylinder, etc. EDIT: But the collision engine does not know that one object is a "player" and another a "wall." It has in its list of objects a cylinder and bounded plane. The cylinder object has a location, speed and direction when it's (the collision engine) called; the collision engine evaluates whether the cylinder collides with the bounded plane, and sets the cylinder's location, speed and direction accordingly. The player object accesses that the cylinder information later.
EDIT: You may want to look at docs for various collision engines available: ODE, Bullet.. I'm sure others have favorites to recommend. But many of them are free and provide libraries for various platforms.