A temporary custody order will control who has custody until a permanent custody order is made. The permanent decision may be made at the next hearing or it may require further hearings to gather evidence. All of that depends on your particular circumstances.
Best of luck to you.
This response is intended to be a general statement of law, should not be relied upon as legal advice, does not create an attorney/client relationship and does not create a right to continuing email exchanges.
First of all, congratulations on your progess in the case thus far. Custody issues are never easy to deal with, it sounds like your daughter's best interests are being served, even with the emergency orders.
From your description, the best I can tell is that you filed an ex parte (emergency) request for temporary orders and that your case is now set for a hearing in front of a judge, probably in the next few weeks. As to what can or cannot happen during that hearing, that depends primarily on whether or not you and the mother have attended mediation. Given the current state of the Contra Costa mediation program, it's highly unlikely that you'll be able to receive an appointment before November unless they give you one of the very few open slots they reserve for the most dire custody situations.
The Court cannot really make any long lasting orders without you attending mediation. He or she can maintain the status quo or order a very temporary visitation schedule, but it all depends on the factual circumstances of your case. If you haven't contacted Family Court Services yet to schedule mediation orientation, please do so immediately.
Given your daughter's age and the distance between you and the mother, you should expect a good number of hearings to resolve the custody/visitation dispute.
Sign up to receive a 3-part series of useful information and advice about child custody law.