Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

961 lines
18 KiB

  1. #include "precomp.h"
  2. #include "fsdiag.h"
  3. DEBUG_FILEZONE(ZONE_T120_GCCNC);
  4. /*
  5. * translat.cpp
  6. *
  7. * Copyright (c) 1994 by DataBeam Corporation, Lexington, KY
  8. *
  9. * Abstract:
  10. * This is the implementation file for the Reason and Result Translator
  11. * Class.
  12. *
  13. * Caveats:
  14. * None.
  15. *
  16. * Author:
  17. * jbo
  18. */
  19. #include "pdutypes.h"
  20. #include "translat.h"
  21. /*
  22. * TranslateGCCResultToCreateResult ()
  23. *
  24. * Public Function Description:
  25. */
  26. ConferenceCreateResult
  27. TranslateGCCResultToCreateResult ( GCCResult gcc_result )
  28. {
  29. ConferenceCreateResult create_result;
  30. switch (gcc_result)
  31. {
  32. case GCC_RESULT_SUCCESSFUL:
  33. create_result = CCRS_RESULT_SUCCESS;
  34. break;
  35. case GCC_RESULT_USER_REJECTED:
  36. create_result = CCRS_USER_REJECTED;
  37. break;
  38. case GCC_RESULT_RESOURCES_UNAVAILABLE:
  39. create_result = RESOURCES_NOT_AVAILABLE;
  40. break;
  41. case GCC_RESULT_SYMMETRY_BROKEN:
  42. create_result = REJECTED_FOR_SYMMETRY_BREAKING;
  43. break;
  44. case GCC_RESULT_LOCKED_NOT_SUPPORTED:
  45. create_result = LOCKED_CONFERENCE_NOT_SUPPORTED;
  46. break;
  47. default:
  48. create_result = RESOURCES_NOT_AVAILABLE;
  49. break;
  50. }
  51. return (create_result);
  52. }
  53. /*
  54. * TranslateGCCResultToQueryResult ()
  55. *
  56. * Public Function Description:
  57. */
  58. ConferenceQueryResult
  59. TranslateGCCResultToQueryResult ( GCCResult gcc_result )
  60. {
  61. ConferenceQueryResult query_result;
  62. switch (gcc_result)
  63. {
  64. case GCC_RESULT_SUCCESSFUL:
  65. query_result = CQRS_RESULT_SUCCESS;
  66. break;
  67. case GCC_RESULT_USER_REJECTED:
  68. query_result = CQRS_USER_REJECTED;
  69. break;
  70. default:
  71. query_result = CQRS_USER_REJECTED;
  72. break;
  73. }
  74. return (query_result);
  75. }
  76. /*
  77. * TranslateGCCResultToJoinResult ()
  78. *
  79. * Public Function Description:
  80. */
  81. ConferenceJoinResult
  82. TranslateGCCResultToJoinResult ( GCCResult gcc_result )
  83. {
  84. ConferenceJoinResult join_result;
  85. switch (gcc_result)
  86. {
  87. case GCC_RESULT_SUCCESSFUL:
  88. join_result = CJRS_RESULT_SUCCESS;
  89. break;
  90. case GCC_RESULT_USER_REJECTED:
  91. join_result = CJRS_USER_REJECTED;
  92. break;
  93. case GCC_RESULT_INVALID_CONFERENCE:
  94. join_result = INVALID_CONFERENCE;
  95. break;
  96. case GCC_RESULT_INVALID_PASSWORD:
  97. join_result = INVALID_PASSWORD;
  98. break;
  99. case GCC_RESULT_INVALID_CONVENER_PASSWORD:
  100. join_result = INVALID_CONVENER_PASSWORD;
  101. break;
  102. case GCC_RESULT_CHALLENGE_RESPONSE_REQUIRED:
  103. join_result = CHALLENGE_RESPONSE_REQUIRED;
  104. break;
  105. case GCC_RESULT_INVALID_CHALLENGE_RESPONSE:
  106. join_result = INVALID_CHALLENGE_RESPONSE;
  107. break;
  108. default:
  109. join_result = INVALID_CONFERENCE;
  110. break;
  111. }
  112. return (join_result);
  113. }
  114. /*
  115. * TranslateGCCResultToInviteResult ()
  116. *
  117. * Public Function Description:
  118. */
  119. ConferenceInviteResult
  120. TranslateGCCResultToInviteResult ( GCCResult gcc_result )
  121. {
  122. ConferenceInviteResult invite_result;
  123. switch (gcc_result)
  124. {
  125. case GCC_RESULT_SUCCESSFUL:
  126. invite_result = CIRS_RESULT_SUCCESS;
  127. break;
  128. case GCC_RESULT_USER_REJECTED:
  129. invite_result = CIRS_USER_REJECTED;
  130. break;
  131. default:
  132. invite_result = CIRS_USER_REJECTED;
  133. break;
  134. }
  135. return (invite_result);
  136. }
  137. /*
  138. * TranslateGCCResultToRegistryResp ()
  139. *
  140. * Public Function Description:
  141. */
  142. RegistryResponseResult
  143. TranslateGCCResultToRegistryResp ( GCCResult gcc_result )
  144. {
  145. RegistryResponseResult registry_response_result;
  146. switch (gcc_result)
  147. {
  148. case GCC_RESULT_SUCCESSFUL:
  149. registry_response_result = RRRS_RESULT_SUCCESSFUL;
  150. break;
  151. case GCC_RESULT_INDEX_ALREADY_OWNED:
  152. registry_response_result = BELONGS_TO_OTHER;
  153. break;
  154. case GCC_RESULT_REGISTRY_FULL:
  155. registry_response_result = TOO_MANY_ENTRIES;
  156. break;
  157. case GCC_RESULT_INCONSISTENT_TYPE:
  158. registry_response_result = INCONSISTENT_TYPE;
  159. break;
  160. case GCC_RESULT_ENTRY_DOES_NOT_EXIST:
  161. registry_response_result = ENTRY_NOT_FOUND;
  162. break;
  163. case GCC_RESULT_ENTRY_ALREADY_EXISTS:
  164. registry_response_result = ENTRY_ALREADY_EXISTS;
  165. break;
  166. case GCC_RESULT_INVALID_REQUESTER:
  167. registry_response_result = RRRS_INVALID_REQUESTER;
  168. break;
  169. default:
  170. registry_response_result = RRRS_INVALID_REQUESTER;//jbo default???????
  171. break;
  172. }
  173. return (registry_response_result);
  174. }
  175. /*
  176. * TranslateCreateResultToGCCResult ()
  177. *
  178. * Public Function Description:
  179. */
  180. GCCResult
  181. TranslateCreateResultToGCCResult ( ConferenceCreateResult create_result )
  182. {
  183. GCCResult gcc_result;
  184. switch (create_result)
  185. {
  186. case CCRS_RESULT_SUCCESS:
  187. gcc_result = GCC_RESULT_SUCCESSFUL;
  188. break;
  189. case CCRS_USER_REJECTED:
  190. gcc_result = GCC_RESULT_USER_REJECTED;
  191. break;
  192. case RESOURCES_NOT_AVAILABLE:
  193. gcc_result = GCC_RESULT_RESOURCES_UNAVAILABLE;
  194. break;
  195. case REJECTED_FOR_SYMMETRY_BREAKING:
  196. gcc_result = GCC_RESULT_SYMMETRY_BROKEN;
  197. break;
  198. case LOCKED_CONFERENCE_NOT_SUPPORTED:
  199. gcc_result = GCC_RESULT_LOCKED_NOT_SUPPORTED;
  200. break;
  201. default:
  202. gcc_result = GCC_RESULT_USER_REJECTED;
  203. break;
  204. }
  205. return (gcc_result);
  206. }
  207. /*
  208. * TranslateQueryResultToGCCResult ()
  209. *
  210. * Public Function Description:
  211. */
  212. GCCResult
  213. TranslateQueryResultToGCCResult ( ConferenceQueryResult query_result )
  214. {
  215. GCCResult gcc_result;
  216. switch (query_result)
  217. {
  218. case CQRS_RESULT_SUCCESS:
  219. gcc_result = GCC_RESULT_SUCCESSFUL;
  220. break;
  221. case CQRS_USER_REJECTED:
  222. gcc_result = GCC_RESULT_USER_REJECTED;
  223. break;
  224. default:
  225. gcc_result = GCC_RESULT_USER_REJECTED;
  226. break;
  227. }
  228. return (gcc_result);
  229. }
  230. /*
  231. * TranslateJoinResultToGCCResult ()
  232. *
  233. * Public Function Description:
  234. */
  235. GCCResult
  236. TranslateJoinResultToGCCResult ( ConferenceJoinResult join_result )
  237. {
  238. GCCResult gcc_result;
  239. switch (join_result)
  240. {
  241. case CJRS_RESULT_SUCCESS:
  242. gcc_result = GCC_RESULT_SUCCESSFUL;
  243. break;
  244. case CJRS_USER_REJECTED:
  245. gcc_result = GCC_RESULT_USER_REJECTED;
  246. break;
  247. case INVALID_CONFERENCE:
  248. gcc_result = GCC_RESULT_INVALID_CONFERENCE;
  249. break;
  250. case INVALID_PASSWORD:
  251. gcc_result = GCC_RESULT_INVALID_PASSWORD;
  252. break;
  253. case INVALID_CONVENER_PASSWORD:
  254. gcc_result = GCC_RESULT_INVALID_CONVENER_PASSWORD;
  255. break;
  256. case CHALLENGE_RESPONSE_REQUIRED:
  257. gcc_result = GCC_RESULT_CHALLENGE_RESPONSE_REQUIRED;
  258. break;
  259. case INVALID_CHALLENGE_RESPONSE:
  260. gcc_result = GCC_RESULT_INVALID_CHALLENGE_RESPONSE;
  261. break;
  262. default:
  263. gcc_result = GCC_RESULT_UNSPECIFIED_FAILURE;
  264. break;
  265. }
  266. return (gcc_result);
  267. }
  268. /*
  269. * TranslateInviteResultToGCCResult ()
  270. *
  271. * Public Function Description:
  272. */
  273. GCCResult
  274. TranslateInviteResultToGCCResult ( ConferenceInviteResult invite_result )
  275. {
  276. GCCResult gcc_result;
  277. switch (invite_result)
  278. {
  279. case CIRS_RESULT_SUCCESS:
  280. gcc_result = GCC_RESULT_SUCCESSFUL;
  281. break;
  282. case CIRS_USER_REJECTED:
  283. gcc_result = GCC_RESULT_USER_REJECTED;
  284. break;
  285. default:
  286. gcc_result = GCC_RESULT_USER_REJECTED;
  287. break;
  288. }
  289. return (gcc_result);
  290. }
  291. /*
  292. * TranslateRegistryRespToGCCResult ()
  293. *
  294. * Public Function Description:
  295. */
  296. GCCResult
  297. TranslateRegistryRespToGCCResult ( RegistryResponseResult response_result )
  298. {
  299. GCCResult gcc_result;
  300. switch (response_result)
  301. {
  302. case RRRS_RESULT_SUCCESSFUL:
  303. gcc_result = GCC_RESULT_SUCCESSFUL;
  304. break;
  305. case BELONGS_TO_OTHER:
  306. gcc_result = GCC_RESULT_INDEX_ALREADY_OWNED;
  307. break;
  308. case TOO_MANY_ENTRIES:
  309. gcc_result = GCC_RESULT_REGISTRY_FULL;
  310. break;
  311. case INCONSISTENT_TYPE:
  312. gcc_result = GCC_RESULT_INCONSISTENT_TYPE;
  313. break;
  314. case ENTRY_NOT_FOUND:
  315. gcc_result = GCC_RESULT_ENTRY_DOES_NOT_EXIST;
  316. break;
  317. case ENTRY_ALREADY_EXISTS:
  318. gcc_result = GCC_RESULT_ENTRY_ALREADY_EXISTS;
  319. break;
  320. case RRRS_INVALID_REQUESTER:
  321. gcc_result = GCC_RESULT_INVALID_REQUESTER;
  322. break;
  323. default:
  324. gcc_result = GCC_RESULT_UNSPECIFIED_FAILURE;//jbo default ???????
  325. break;
  326. }
  327. return (gcc_result);
  328. }
  329. /*
  330. * TranslateTerminateRqReasonToGCCReason ()
  331. *
  332. * Public Function Description:
  333. */
  334. GCCReason
  335. TranslateTerminateRqReasonToGCCReason ( ConferenceTerminateRequestReason reason )
  336. {
  337. GCCReason gcc_reason;
  338. switch (reason)
  339. {
  340. case CTRQ_REASON_USER_INITIATED:
  341. gcc_reason = GCC_REASON_USER_INITIATED;
  342. break;
  343. case CTRQ_TIMED_CONFERENCE_TERMINATE:
  344. gcc_reason = GCC_REASON_TIMED_TERMINATION;
  345. break;
  346. default:
  347. gcc_reason = GCC_REASON_ERROR_TERMINATION;
  348. break;
  349. }
  350. return (gcc_reason);
  351. }
  352. /*
  353. * TranslateGCCReasonToTerminateRqReason ()
  354. *
  355. * Public Function Description:
  356. */
  357. ConferenceTerminateRequestReason
  358. TranslateGCCReasonToTerminateRqReason ( GCCReason gcc_reason )
  359. {
  360. ConferenceTerminateRequestReason reason;
  361. switch (gcc_reason)
  362. {
  363. case GCC_REASON_USER_INITIATED:
  364. reason = CTRQ_REASON_USER_INITIATED;
  365. break;
  366. case GCC_REASON_TIMED_TERMINATION:
  367. reason = CTRQ_TIMED_CONFERENCE_TERMINATE;
  368. break;
  369. default:
  370. reason = CTRQ_REASON_USER_INITIATED;
  371. break;
  372. }
  373. return (reason);
  374. }
  375. /*
  376. * TranslateEjectIndReasonToGCCReason ()
  377. *
  378. * Public Function Description:
  379. */
  380. GCCReason
  381. TranslateEjectIndReasonToGCCReason ( ConferenceEjectIndicationReason eject_reason )
  382. {
  383. GCCReason gcc_reason;
  384. switch (eject_reason)
  385. {
  386. case CEIN_USER_INITIATED:
  387. gcc_reason = GCC_REASON_USER_INITIATED;
  388. break;
  389. case HIGHER_NODE_DISCONNECTED:
  390. gcc_reason = GCC_REASON_HIGHER_NODE_DISCONNECTED;
  391. break;
  392. case HIGHER_NODE_EJECTED:
  393. gcc_reason = GCC_REASON_HIGHER_NODE_EJECTED;
  394. break;
  395. default:
  396. gcc_reason = GCC_REASON_USER_INITIATED;
  397. break;
  398. }
  399. return (gcc_reason);
  400. }
  401. /*
  402. * TranslateGCCReasonToEjectInd ()
  403. *
  404. * Public Function Description:
  405. */
  406. ConferenceEjectIndicationReason
  407. TranslateGCCReasonToEjectInd ( GCCReason gcc_reason )
  408. {
  409. ConferenceEjectIndicationReason eject_reason;
  410. switch (gcc_reason)
  411. {
  412. case GCC_REASON_USER_INITIATED:
  413. eject_reason = CEIN_USER_INITIATED;
  414. break;
  415. case GCC_REASON_HIGHER_NODE_DISCONNECTED:
  416. eject_reason = HIGHER_NODE_DISCONNECTED;
  417. break;
  418. case GCC_REASON_HIGHER_NODE_EJECTED:
  419. eject_reason = HIGHER_NODE_EJECTED;
  420. break;
  421. default:
  422. eject_reason = CEIN_USER_INITIATED;
  423. break;
  424. }
  425. return (eject_reason);
  426. }
  427. /*
  428. * TranslateGCCReasonToEjectInd ()
  429. *
  430. * Public Function Description:
  431. */
  432. GCCResult
  433. TranslateEjectResultToGCCResult ( ConferenceEjectResult eject_result )
  434. {
  435. GCCResult gcc_result;
  436. switch (eject_result)
  437. {
  438. case CERS_RESULT_SUCCESS:
  439. gcc_result = GCC_RESULT_SUCCESSFUL;
  440. break;
  441. case CERS_INVALID_REQUESTER:
  442. gcc_result = GCC_RESULT_INVALID_REQUESTER;
  443. break;
  444. case CERS_INVALID_NODE:
  445. gcc_result = GCC_RESULT_INVALID_NODE;
  446. break;
  447. default:
  448. gcc_result = GCC_RESULT_UNSPECIFIED_FAILURE;
  449. break;
  450. }
  451. return (gcc_result);
  452. }
  453. /*
  454. * TranslateGCCReasonToEjectInd ()
  455. *
  456. * Public Function Description:
  457. */
  458. ConferenceEjectResult
  459. TranslateGCCResultToEjectResult ( GCCResult gcc_result )
  460. {
  461. ConferenceEjectResult eject_result;
  462. switch (gcc_result)
  463. {
  464. case GCC_RESULT_SUCCESSFUL:
  465. eject_result = CERS_RESULT_SUCCESS;
  466. break;
  467. case GCC_RESULT_INVALID_REQUESTER:
  468. eject_result = CERS_INVALID_REQUESTER;
  469. break;
  470. case GCC_RESULT_INVALID_NODE:
  471. eject_result = CERS_INVALID_NODE;
  472. break;
  473. default:
  474. eject_result = CERS_INVALID_NODE;
  475. break;
  476. }
  477. return (eject_result);
  478. }
  479. /*
  480. * TranslateTerminateInReasonToGCCReason ()
  481. *
  482. * Public Function Description:
  483. */
  484. GCCReason
  485. TranslateTerminateInReasonToGCCReason ( ConferenceTerminateIndicationReason reason )
  486. {
  487. GCCReason gcc_reason;
  488. switch (reason)
  489. {
  490. case CTIN_REASON_USER_INITIATED:
  491. gcc_reason = GCC_REASON_USER_INITIATED;
  492. break;
  493. case CTIN_TIMED_CONFERENCE_TERMINATE:
  494. gcc_reason = GCC_REASON_TIMED_TERMINATION;
  495. break;
  496. default:
  497. gcc_reason = GCC_REASON_USER_INITIATED;
  498. break;
  499. }
  500. return (gcc_reason);
  501. }
  502. /*
  503. * TranslateGCCReasonToEjectInd ()
  504. *
  505. * Public Function Description:
  506. */
  507. ConferenceTerminateIndicationReason
  508. TranslateGCCReasonToTerminateInReason ( GCCReason gcc_reason )
  509. {
  510. ConferenceTerminateIndicationReason reason;
  511. switch (gcc_reason)
  512. {
  513. case GCC_REASON_USER_INITIATED:
  514. reason = CTIN_REASON_USER_INITIATED;
  515. break;
  516. case GCC_REASON_TIMED_TERMINATION:
  517. reason = CTIN_TIMED_CONFERENCE_TERMINATE;
  518. break;
  519. default:
  520. reason = CTIN_REASON_USER_INITIATED;
  521. break;
  522. }
  523. return (reason);
  524. }
  525. /*
  526. * TranslateGCCResultToTerminateResult ()
  527. *
  528. * Public Function Description:
  529. */
  530. ConferenceTerminateResult
  531. TranslateGCCResultToTerminateResult ( GCCResult gcc_result )
  532. {
  533. ConferenceTerminateResult result;
  534. switch (gcc_result)
  535. {
  536. case GCC_RESULT_SUCCESSFUL:
  537. result = CTRS_RESULT_SUCCESS;
  538. break;
  539. case GCC_RESULT_INVALID_REQUESTER:
  540. result = CTRS_INVALID_REQUESTER;
  541. break;
  542. default:
  543. result = CTRS_INVALID_REQUESTER;
  544. break;
  545. }
  546. return (result);
  547. }
  548. /*
  549. * TranslateTerminateResultToGCCResult ()
  550. *
  551. * Public Function Description:
  552. */
  553. GCCResult
  554. TranslateTerminateResultToGCCResult ( ConferenceTerminateResult result )
  555. {
  556. GCCResult gcc_result;
  557. switch (result)
  558. {
  559. case CTRS_RESULT_SUCCESS:
  560. gcc_result = GCC_RESULT_SUCCESSFUL;
  561. break;
  562. case CTRS_INVALID_REQUESTER:
  563. gcc_result = GCC_RESULT_INVALID_REQUESTER;
  564. break;
  565. default:
  566. gcc_result = GCC_RESULT_INVALID_REQUESTER;
  567. break;
  568. }
  569. return (gcc_result);
  570. }
  571. /*
  572. * TranslateGCCResultToLockResult ()
  573. *
  574. * Public Function Description:
  575. */
  576. ConferenceLockResult
  577. TranslateGCCResultToLockResult ( GCCResult gcc_result )
  578. {
  579. ConferenceLockResult return_value;
  580. switch (gcc_result)
  581. {
  582. case GCC_RESULT_SUCCESSFUL:
  583. return_value = CLRS_SUCCESS;
  584. break;
  585. case GCC_RESULT_CONFERENCE_ALREADY_LOCKED:
  586. return_value = CLRS_ALREADY_LOCKED;
  587. break;
  588. case GCC_RESULT_INVALID_REQUESTER:
  589. return_value = CLRS_INVALID_REQUESTER;
  590. break;
  591. default:
  592. return_value = CLRS_INVALID_REQUESTER;
  593. break;
  594. }
  595. return return_value;
  596. }
  597. /*
  598. * TranslateLockResultToGCCResult ()
  599. *
  600. * Public Function Description:
  601. */
  602. GCCResult
  603. TranslateLockResultToGCCResult ( ConferenceLockResult result )
  604. {
  605. GCCResult return_value;
  606. switch (result)
  607. {
  608. case CLRS_SUCCESS:
  609. return_value = GCC_RESULT_SUCCESSFUL;
  610. break;
  611. case CLRS_ALREADY_LOCKED:
  612. return_value = GCC_RESULT_CONFERENCE_ALREADY_LOCKED;
  613. break;
  614. case CLRS_INVALID_REQUESTER:
  615. return_value = GCC_RESULT_INVALID_REQUESTER;
  616. break;
  617. default:
  618. return_value = GCC_RESULT_INVALID_REQUESTER;
  619. break;
  620. }
  621. return return_value;
  622. }
  623. /*
  624. * TranslateGCCResultToUnlockResult ()
  625. *
  626. * Public Function Description:
  627. */
  628. ConferenceUnlockResult
  629. TranslateGCCResultToUnlockResult ( GCCResult gcc_result )
  630. {
  631. ConferenceUnlockResult return_value;
  632. switch (gcc_result)
  633. {
  634. case GCC_RESULT_SUCCESSFUL:
  635. return_value = CURS_SUCCESS;
  636. break;
  637. case GCC_RESULT_CONFERENCE_ALREADY_UNLOCKED:
  638. return_value = CURS_ALREADY_UNLOCKED;
  639. break;
  640. case GCC_RESULT_INVALID_REQUESTER:
  641. return_value = CURS_INVALID_REQUESTER;
  642. break;
  643. default:
  644. return_value = CURS_INVALID_REQUESTER;
  645. break;
  646. }
  647. return return_value;
  648. }
  649. /*
  650. * TranslateUnlockResultToGCCResult ()
  651. *
  652. * Public Function Description:
  653. */
  654. GCCResult
  655. TranslateUnlockResultToGCCResult ( ConferenceUnlockResult result )
  656. {
  657. GCCResult return_value;
  658. switch (result)
  659. {
  660. case CURS_SUCCESS:
  661. return_value = GCC_RESULT_SUCCESSFUL;
  662. break;
  663. case CURS_ALREADY_UNLOCKED:
  664. return_value = GCC_RESULT_CONFERENCE_ALREADY_UNLOCKED;
  665. break;
  666. case CURS_INVALID_REQUESTER:
  667. return_value = GCC_RESULT_INVALID_REQUESTER;
  668. break;
  669. default:
  670. return_value = GCC_RESULT_INVALID_REQUESTER;
  671. break;
  672. }
  673. return return_value;
  674. }
  675. /*
  676. * TranslateGCCResultToAddResult ()
  677. *
  678. * Public Function Description:
  679. */
  680. ConferenceAddResult
  681. TranslateGCCResultToAddResult ( GCCResult gcc_result )
  682. {
  683. ConferenceAddResult add_result;
  684. switch (gcc_result)
  685. {
  686. case GCC_RESULT_SUCCESSFUL:
  687. add_result = CARS_SUCCESS;
  688. break;
  689. case GCC_RESULT_INVALID_REQUESTER:
  690. add_result = CARS_INVALID_REQUESTER;
  691. break;
  692. case GCC_RESULT_INVALID_NETWORK_TYPE:
  693. add_result = INVALID_NETWORK_TYPE;
  694. break;
  695. case GCC_RESULT_INVALID_NETWORK_ADDRESS:
  696. add_result = INVALID_NETWORK_ADDRESS;
  697. break;
  698. case GCC_RESULT_ADDED_NODE_BUSY:
  699. add_result = ADDED_NODE_BUSY;
  700. break;
  701. case GCC_RESULT_NETWORK_BUSY:
  702. add_result = NETWORK_BUSY;
  703. break;
  704. case GCC_RESULT_NO_PORTS_AVAILABLE:
  705. add_result = NO_PORTS_AVAILABLE;
  706. break;
  707. case GCC_RESULT_CONNECTION_UNSUCCESSFUL:
  708. add_result = CONNECTION_UNSUCCESSFUL;
  709. break;
  710. default:
  711. add_result = CARS_INVALID_REQUESTER;
  712. break;
  713. }
  714. return (add_result);
  715. }
  716. /*
  717. * TranslateAddResultToGCCResult ()
  718. *
  719. * Public Function Description:
  720. */
  721. GCCResult
  722. TranslateAddResultToGCCResult ( ConferenceAddResult add_result )
  723. {
  724. GCCResult gcc_result;
  725. switch (add_result)
  726. {
  727. case CARS_SUCCESS:
  728. gcc_result = GCC_RESULT_SUCCESSFUL;
  729. break;
  730. case CARS_INVALID_REQUESTER:
  731. gcc_result = GCC_RESULT_INVALID_REQUESTER;
  732. break;
  733. case INVALID_NETWORK_TYPE:
  734. gcc_result = GCC_RESULT_INVALID_NETWORK_TYPE;
  735. break;
  736. case INVALID_NETWORK_ADDRESS:
  737. gcc_result = GCC_RESULT_INVALID_NETWORK_ADDRESS;
  738. break;
  739. case ADDED_NODE_BUSY:
  740. gcc_result = GCC_RESULT_ADDED_NODE_BUSY;
  741. break;
  742. case NETWORK_BUSY:
  743. gcc_result = GCC_RESULT_NETWORK_BUSY;
  744. break;
  745. case NO_PORTS_AVAILABLE:
  746. gcc_result = GCC_RESULT_NO_PORTS_AVAILABLE;
  747. break;
  748. case CONNECTION_UNSUCCESSFUL:
  749. gcc_result = GCC_RESULT_CONNECTION_UNSUCCESSFUL;
  750. break;
  751. default:
  752. gcc_result = GCC_RESULT_INVALID_REQUESTER;
  753. break;
  754. }
  755. return (gcc_result);
  756. }