Bibletime – a bible study tool
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.

bibletimeinterface_skel.cpp 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. /****************************************************************************
  2. **
  3. ** DCOP Skeleton generated by dcopidl2cpp from bibletimeinterface.kidl
  4. **
  5. ** WARNING! All changes made in this file will be lost!
  6. **
  7. *****************************************************************************/
  8. #include "./bibletimeinterface.h"
  9. #include <kdatastream.h>
  10. #include <tqasciidict.h>
  11. static const int BibleTimeInterface_fhash = 17;
  12. static const char* const BibleTimeInterface_ftable[14][3] = {
  13. { "void", "syncAllBibles(TQString)", "syncAllBibles(TQString key)" },
  14. { "void", "syncAllCommentaries(TQString)", "syncAllCommentaries(TQString key)" },
  15. { "void", "syncAllLexicons(TQString)", "syncAllLexicons(TQString key)" },
  16. { "void", "syncAllVerseBasedModules(TQString)", "syncAllVerseBasedModules(TQString key)" },
  17. { "void", "reloadModules()", "reloadModules()" },
  18. { "void", "openWindow(TQString,TQString)", "openWindow(TQString moduleName,TQString key)" },
  19. { "void", "openDefaultBible(TQString)", "openDefaultBible(TQString key)" },
  20. { "void", "closeAllModuleWindows()", "closeAllModuleWindows()" },
  21. { TQSTRING_OBJECT_NAME_STRING, "getCurrentReference()", "getCurrentReference()" },
  22. { TQSTRINGLIST_OBJECT_NAME_STRING, "searchInModule(TQString,TQString)", "searchInModule(TQString moduleName,TQString searchText)" },
  23. { TQSTRINGLIST_OBJECT_NAME_STRING, "searchInOpenModules(TQString)", "searchInOpenModules(TQString searchText)" },
  24. { TQSTRINGLIST_OBJECT_NAME_STRING, "searchInDefaultBible(TQString)", "searchInDefaultBible(TQString searchText)" },
  25. { TQSTRINGLIST_OBJECT_NAME_STRING, "getModulesOfType(TQString)", "getModulesOfType(TQString type)" },
  26. { 0, 0, 0 }
  27. };
  28. static const int BibleTimeInterface_ftable_hiddens[13] = {
  29. 0,
  30. 0,
  31. 0,
  32. 0,
  33. 0,
  34. 0,
  35. 0,
  36. 0,
  37. 0,
  38. 0,
  39. 0,
  40. 0,
  41. 0,
  42. };
  43. bool BibleTimeInterface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
  44. {
  45. static TQAsciiDict<int>* fdict = 0;
  46. if ( !fdict ) {
  47. fdict = new TQAsciiDict<int>( BibleTimeInterface_fhash, true, false );
  48. for ( int i = 0; BibleTimeInterface_ftable[i][1]; i++ )
  49. fdict->insert( BibleTimeInterface_ftable[i][1], new int( i ) );
  50. }
  51. int* fp = fdict->find( fun );
  52. switch ( fp?*fp:-1) {
  53. case 0: { // void syncAllBibles(TQString)
  54. TQString arg0;
  55. TQDataStream arg( data, IO_ReadOnly );
  56. if (arg.atEnd()) return false;
  57. arg >> arg0;
  58. replyType = BibleTimeInterface_ftable[0][0];
  59. syncAllBibles(arg0 );
  60. } break;
  61. case 1: { // void syncAllCommentaries(TQString)
  62. TQString arg0;
  63. TQDataStream arg( data, IO_ReadOnly );
  64. if (arg.atEnd()) return false;
  65. arg >> arg0;
  66. replyType = BibleTimeInterface_ftable[1][0];
  67. syncAllCommentaries(arg0 );
  68. } break;
  69. case 2: { // void syncAllLexicons(TQString)
  70. TQString arg0;
  71. TQDataStream arg( data, IO_ReadOnly );
  72. if (arg.atEnd()) return false;
  73. arg >> arg0;
  74. replyType = BibleTimeInterface_ftable[2][0];
  75. syncAllLexicons(arg0 );
  76. } break;
  77. case 3: { // void syncAllVerseBasedModules(TQString)
  78. TQString arg0;
  79. TQDataStream arg( data, IO_ReadOnly );
  80. if (arg.atEnd()) return false;
  81. arg >> arg0;
  82. replyType = BibleTimeInterface_ftable[3][0];
  83. syncAllVerseBasedModules(arg0 );
  84. } break;
  85. case 4: { // void reloadModules()
  86. replyType = BibleTimeInterface_ftable[4][0];
  87. reloadModules( );
  88. } break;
  89. case 5: { // void openWindow(TQString,TQString)
  90. TQString arg0;
  91. TQString arg1;
  92. TQDataStream arg( data, IO_ReadOnly );
  93. if (arg.atEnd()) return false;
  94. arg >> arg0;
  95. if (arg.atEnd()) return false;
  96. arg >> arg1;
  97. replyType = BibleTimeInterface_ftable[5][0];
  98. openWindow(arg0, arg1 );
  99. } break;
  100. case 6: { // void openDefaultBible(TQString)
  101. TQString arg0;
  102. TQDataStream arg( data, IO_ReadOnly );
  103. if (arg.atEnd()) return false;
  104. arg >> arg0;
  105. replyType = BibleTimeInterface_ftable[6][0];
  106. openDefaultBible(arg0 );
  107. } break;
  108. case 7: { // void closeAllModuleWindows()
  109. replyType = BibleTimeInterface_ftable[7][0];
  110. closeAllModuleWindows( );
  111. } break;
  112. case 8: { // TQString getCurrentReference()
  113. replyType = BibleTimeInterface_ftable[8][0];
  114. TQDataStream _replyStream( replyData, IO_WriteOnly );
  115. _replyStream << getCurrentReference( );
  116. } break;
  117. case 9: { // TQStringList searchInModule(TQString,TQString)
  118. TQString arg0;
  119. TQString arg1;
  120. TQDataStream arg( data, IO_ReadOnly );
  121. if (arg.atEnd()) return false;
  122. arg >> arg0;
  123. if (arg.atEnd()) return false;
  124. arg >> arg1;
  125. replyType = BibleTimeInterface_ftable[9][0];
  126. TQDataStream _replyStream( replyData, IO_WriteOnly );
  127. _replyStream << searchInModule(arg0, arg1 );
  128. } break;
  129. case 10: { // TQStringList searchInOpenModules(TQString)
  130. TQString arg0;
  131. TQDataStream arg( data, IO_ReadOnly );
  132. if (arg.atEnd()) return false;
  133. arg >> arg0;
  134. replyType = BibleTimeInterface_ftable[10][0];
  135. TQDataStream _replyStream( replyData, IO_WriteOnly );
  136. _replyStream << searchInOpenModules(arg0 );
  137. } break;
  138. case 11: { // TQStringList searchInDefaultBible(TQString)
  139. TQString arg0;
  140. TQDataStream arg( data, IO_ReadOnly );
  141. if (arg.atEnd()) return false;
  142. arg >> arg0;
  143. replyType = BibleTimeInterface_ftable[11][0];
  144. TQDataStream _replyStream( replyData, IO_WriteOnly );
  145. _replyStream << searchInDefaultBible(arg0 );
  146. } break;
  147. case 12: { // TQStringList getModulesOfType(TQString)
  148. TQString arg0;
  149. TQDataStream arg( data, IO_ReadOnly );
  150. if (arg.atEnd()) return false;
  151. arg >> arg0;
  152. replyType = BibleTimeInterface_ftable[12][0];
  153. TQDataStream _replyStream( replyData, IO_WriteOnly );
  154. _replyStream << getModulesOfType(arg0 );
  155. } break;
  156. default:
  157. return DCOPObject::process( fun, data, replyType, replyData );
  158. }
  159. return true;
  160. }
  161. QCStringList BibleTimeInterface::interfaces()
  162. {
  163. QCStringList ifaces = DCOPObject::interfaces();
  164. ifaces += "BibleTimeInterface";
  165. return ifaces;
  166. }
  167. QCStringList BibleTimeInterface::functions()
  168. {
  169. QCStringList funcs = DCOPObject::functions();
  170. for ( int i = 0; BibleTimeInterface_ftable[i][2]; i++ ) {
  171. if (BibleTimeInterface_ftable_hiddens[i])
  172. continue;
  173. TQCString func = BibleTimeInterface_ftable[i][0];
  174. func += ' ';
  175. func += BibleTimeInterface_ftable[i][2];
  176. funcs << func;
  177. }
  178. return funcs;
  179. }