
21 Cal.App.4th 1770 (1993)
27 Cal. Rptr.2d 32
THERESA ADLER, Plaintiff and Appellant,
v.
DION VAICIUS, Defendant and Respondent.
Docket No. B071879.
Court of Appeals of California, Second District, Division Six.
December 28, 1993.
*1772 COUNSEL
Ilan Funke-Bilu for Plaintiff and Appellant.
Jencks & Hunt, Michael R. Jencks and Lisa M. Pontius for Defendant and Respondent.
OPINION
STONE (S.J.), P.J.
Theresa Adler appeals from an order awarding attorney fees pursuant to Code of Civil Procedure section 527.6, subdivision (h).[1] She asserts that the court cannot award a defendant attorney fees where she has been deprived of the opportunity to proceed to a full, due process *1773 hearing under section 527.6 through no fault of her own and that where the plaintiff has a temporary restraining order, the court should award attorney fees in her favor if the circumstances so warrant.
We hold that appellant was not deprived of a "full, due process hearing" since she voluntarily dismissed her petition with prejudice and that the trial court did not err in awarding attorney's fees to respondent.

FACTS
Appellant filed a petition for injunction prohibiting harassment September 15, 1992, in which she alleged that she had made a report with the San Luis Obispo Sheriff's Department against respondent, a police officer, for sexual battery and that an administrative inquiry was being conducted by his department. She further alleged that respondent stopped her as she was walking home from work September 3, 1992, and accused her of taking down a street sign. Earlier in the evening she had encountered a friend of respondent who had harassed her about not waiting on him in the restaurant where she worked. She had this person thrown out and believed he was harassing her for respondent.
September 16, 1992, the court issued an order to show cause (OSC) and temporary restraining order (TRO) ex parte returnable for hearing September 30, 1992, and restraining respondent from coming within 150 yards of appellant and her family. The TRO was served on respondent September 17, 1992. Respondent obtained a modification of the TRO, pending hearing, that he stay only 25 yards from appellant. He filed a response to the petition for injunction on September 30, 1992, denying appellant's allegations and stating that his actions on September 4, 1992, stemmed from observing a group of persons attempting to remove a sign at 1 a.m. while he was on duty. He did not recognize appellant immediately and told the group to stop as they began to walk away from him. After stopping the group and speaking to appellant, he allowed them to go.
Respondent had no further contact with appellant after September 4. He knew she dated several officers in the San Luis Obispo Police Department and that she was a waitress at McClintock's. On the morning he stopped her, she was loud, argumentative, and appeared to have been drinking. He had seen her several times when either he or she had been accompanied by other persons. He had no knowledge of any complaint filed against him by her although he learned that appellant filed a criminal report the morning of September 4 but did not name him in it.
On September 30, 1992, no judge was available and appellant's attorney refused to stipulate to a temporary judge. Respondent refused to stipulate *1774 that the TRO be continued. The court continued the matter to October 1, the first available date for hearing before a judge. October 1, 1992, respondent's attorney served on appellant a notice of deposition and for production of documents pertaining to complaints she had filed against various police officers. October 1, the judge disqualified himself, having learned from counsel's correspondence that the hearing would take more than two hours. The matter was reset on the short cause calendar for October 8, 1992.
October 1, 1992, appellant's attorney filed a request for dismissal with prejudice. Respondent filed a motion for an award of attorney fees and costs as prevailing party pursuant to sections 527.6, subdivision (h), 128.5, and 1032, subdivision (a). Appellant opposed the motion on grounds that it was she, rather than respondent, who was entitled to fees under section 128.5 and as a prevailing party because the TRO was "completely successful." She asserted that respondent failed to timely file his response to her petition for injunction and that since he refused to stipulate to continue the TRO pending a new hearing date, the court was powerless to hold a new hearing. The court granted respondent's motion and awarded him $975 in attorney fees and $201 in costs.[2]

DISCUSSION

1. Jurisdiction to Conduct Further Proceedings

(1a) Appellant asserts that the court lost jurisdiction when the TRO expired September 30, 1992, and that all subsequent orders made, including the order of dismissal based on her request therefor, were void for lack of jurisdiction. She bases this assertion on section 527.6, subdivisions (c) and (d) which state that "[a] temporary restraining order granted under this section shall remain in effect, at the court's discretion, for a period not to exceed 15 days, unless otherwise modified or terminated by the court. [¶] (d) Within 15 days of the filing of the petition, a hearing shall be held on the petition for the injunction...." According to appellant, when respondent failed to stipulate to continuation of the TRO when no judge was available on September 30, 1992, she had only two viable options. She could do nothing or file another application and petition. Thus, she decided to file a request for dismissal and let the departmental investigation proceed on her complaint. Moreover, she states that she achieved what she wanted by obtaining the TRO since it was unlikely respondent would bother her after she filed her complaint with the police department.
*1775 Appellant incorrectly equates the continued validity of the TRO with the court's jurisdiction to hold a hearing on the underlying petition for injunction or on a motion for attorney fees. (2) Although the purpose of section 527.6 is to provide expedited injunctive relief to victims of harassment, the party to be enjoined has certain important due process safeguards, i.e., "a full opportunity to present his or her case, with the judge required to receive relevant testimony and to find the existence of harassment by `clear and convincing' proof of a `course of conduct' that actually and reasonably caused substantial emotional distress, had `no legitimate purpose,' and was not a `constitutionally protected activity.'" (Schraer v. Berkeley Property Owners' Assn. (1989) 207 Cal. App.3d 719, 730-731 [255 Cal. Rptr. 453], italics in original.)
(1b) Appellant would turn these safeguards on their head if a person could obtain a TRO ex parte and then, prior to hearing on the injunction, dismiss the proceedings and claim attorney fees as prevailing party before the restrained party had the opportunity for a hearing on the merits. Section 527.6 sets out that a plaintiff may first obtain a TRO in accordance with section 527, subdivision (a), which may remain in effect for no more than 15 days unless otherwise modified or terminated by the court. The TRO may be granted "with or without notice upon an affidavit which, to the satisfaction of the court, shows reasonable proof of harassment of the plaintiff by the defendant, and that great or irreparable harm would result to the plaintiff." (§ 527.6, subd. (c).)
Section 527, subdivision (a) provides that in the case of a TRO granted without notice, when the matter first comes up for hearing, the party who obtained the TRO must be ready to proceed and that the defendant "shall be entitled, as of course, to one continuance for a reasonable period, if he or she desires it, to enable him or her to meet the application for the preliminary injunction...." We cannot believe that a defendant, under 527.6, would have less right to due process procedural safeguard than under 527 since the hearing under 527.6 "provides the only forum the defendant in a harassment proceeding will have to present his or her case" and since section 527.6, subdivision (c) specifically provides that "the plaintiff may obtain a temporary restraining order in accordance with subdivision (a) of Section 527." (Schraer v. Berkeley Property Owners' Assn., supra, 207 Cal. App.3d at pp. 732-733; see also Kobey v. Morton (1991) 228 Cal. App.3d 1055, 1059-1060 [278 Cal. Rptr. 530].)
(3) Cases interpreting section 527, subdivision (a), do not support appellant's theory of lost jurisdiction. The hearing may be lawfully continued beyond the statutory time at the request of the defendant, when the necessary *1776 business of the court prevents it from hearing the matter within that time, and when defendant's counteraffidavits are not served as provided in that code section. (McDonald v. Superior Court (1937) 18 Cal. App.2d 652, 657 [64 P.2d 738]; River Farms Co. v. Superior Court (1933) 131 Cal. App. 365, 369 [21 P.2d 643]; compare Agricultural P. Com. v. Superior Court (1938) 30 Cal. App.2d 154, 155 [85 P.2d 898], in which the defendants objected to continuance of the restraining order and the court found the order void.) The requirements of section 527 are for the defendant's benefit and may be waived by him. (West Coast Constr. Co. v. Oceano Sanitary Dist. (1971) 17 Cal. App.3d 693, 699 [95 Cal. Rptr. 169].)
(1c) Here appellant was ready to proceed, as was respondent, but the court did not have a judge available to hear the matter. Contrary to appellant's assertion, respondent did not have to file written opposition (although he did so at some time on that date). Whether respondent's counteraffidavits were served before the court called the matter or afterward did not affect the court's jurisdiction. Neither did respondent's possible failure to present written opposition to appellant prior to the time set for hearing constitute a concession that appellant's position was meritorious. The court is required to receive relevant testimony at the hearing, whether oral or written. (Schraer v. Berkeley Property Owners' Assn., supra, 207 Cal. App.3d at pp. 730-733; § 527.6, subd. (d).) The court did not lose jurisdiction by continuing the hearing where the business of the court prevented a hearing when set due to unavailability of a judge.

2. Appellant Not the Prevailing Party

(4) Appellant asserts that the court could not award attorney fees to a defendant where the plaintiff "has been awarded a temporary restraining order without suffering a subsequent demurrer, cross-complaint, or response, and is deprived of the opportunity to proceed to a full, due process hearing pursuant to Code of Civil Procedure Section 527.6 through no fault of her own." Given the facts here, this argument is specious. As explained, ante, respondent did file a response and appellant was not deprived of a "full, due process hearing ... through no fault of her own." She voluntarily dismissed her petition with prejudice before the continued hearing date. A voluntary dismissal with prejudice is a final determination on the merits. (Roybal v. University Ford (1989) 207 Cal. App.3d 1080, 1085 [255 Cal. Rptr. 469].)
A defendant has the right to seek costs after dismissal of the complaint, and attorney fees recoverable under statutory authorization are deemed an element of costs. (West Coast Development v. Reed (1992) 2 Cal. App.4th 693, 706 [3 Cal. Rptr.2d 790]; Catello v. I.T.T. General Controls (1984) 152 *1777 Cal. App.3d 1009, 1013 [200 Cal. Rptr. 4].) International Industries, Inc. v. Olen (1978) 21 Cal.3d 218, 225 [145 Cal. Rptr. 691, 577 P.2d 1031], relied upon by appellant, does not aid her since Olen held that, in pretrial dismissal cases, the parties are left to bear their own attorney fees "whether claim is asserted on the basis of the contract or [Civil Code] section 1717's reciprocal right." Respondent is entitled to costs and attorney fees here because section 527.6, subdivision (h), specifically provides for them, in the court's discretion, to a prevailing party. (See also § 1033.5, subd. (a)(10)(B).)
Since section 527.6 does not define "prevailing party," the general definition of "prevailing party" in section 1032 may be used. (Elster v. Friedman (1989) 211 Cal. App.3d 1439, 1443 [260 Cal. Rptr. 148].) Section 1032, subdivision (a)(4), provides that "`Prevailing party' includes ... a defendant in whose favor a dismissal is entered...." Appellant believes that she falls within another provision of section 1032, subdivision (a)(4), i.e., "When any party recovers other than monetary relief and in situations other than as specified, the `prevailing party' shall be as determined by the court...." She claims she obtained all the relief she sought  the TRO. She disregards the plain wording of section 1032. That section applies "... in situations other than as specified...." Respondent is "a defendant in whose favor a dismissal is entered...." (§ 1032, subd. (a)(4).) Thus, the court did not abuse its discretion in awarding respondent attorney fees under section 527.6, subdivision (h). (See Leydon v. Alexander (1989) 212 Cal. App.3d 1, 5 [260 Cal. Rptr. 253].)[3]
The order is affirmed. Costs to respondent.
Gilbert, J., and Yegan, J., concurred.
NOTES
[1]  All statutory references are to the Code of Civil Procedure unless otherwise indicated.
[2]  Although appellant appealed from the minute order of November 20, 1992, we deem the appeal to be from the after-filed judgment of January 6, 1993. (Cal. Rules of Court, rule 2(a); American Motorists Ins. Co. v. Cowan (1982) 127 Cal. App.3d 875, 883 [179 Cal. Rptr. 747].)
[3]  Appellant has not challenged the award of costs to respondent.
