Browse files

- Deleted Android project (Created on new branch)

- Fixes PM
- Fixes Linkkai Protocol
  • Loading branch information...
1 parent a49307a commit 08440287a75f255ac80ce5d9801cc510ca990bb7 @netonjm netonjm committed Oct 11, 2012
Showing with 2,810 additions and 11,527 deletions.
  1. +5 −0 .gitignore
  2. +2,598 −2,598 SharpPcap/docs/Api/SharpPcap.xml
  3. +0 −27 XBSlink.Android/AboutActivity.cs
  4. +0 −19 XBSlink.Android/Assets/AboutAssets.txt
  5. +0 −31 XBSlink.Android/BroadcastService.cs
  6. +0 −20 XBSlink.Android/Libs/ActivityManager.cs
  7. +0 −18 XBSlink.Android/Libs/AlertMessage.cs
  8. +0 −228 XBSlink.Android/Libs/AndroidClientEngine.cs
  9. +0 −91 XBSlink.Android/Libs/AndroidClientEngineProcess.cs
  10. +0 −81 XBSlink.Android/Libs/AudioManagement.cs
  11. +0 −26 XBSlink.Android/Libs/ChatItem.cs
  12. +0 −112 XBSlink.Android/Libs/DB/DBCommandsConfiguration.cs
  13. +0 −30 XBSlink.Android/Libs/DB/DBHelper.cs
  14. +0 −167 XBSlink.Android/Libs/EnvironmentEx.cs
  15. +0 −74 XBSlink.Android/Libs/Grid/CloudsItem.cs
  16. +0 −60 XBSlink.Android/Libs/Grid/CloudsListAdapter.cs
  17. +0 −29 XBSlink.Android/Libs/Grid/PMItem.cs
  18. +0 −59 XBSlink.Android/Libs/Grid/PMListAdapter.cs
  19. +0 −81 XBSlink.Android/Libs/Grid/UsersItem.cs
  20. +0 −59 XBSlink.Android/Libs/Grid/UsersListAdapter.cs
  21. +0 −51 XBSlink.Android/Libs/LogManager.cs
  22. +0 −131 XBSlink.Android/Libs/NetworkCardManager.cs
  23. +0 −91 XBSlink.Android/LogActivity.cs
  24. +0 −296 XBSlink.Android/MainActivity.cs
  25. +0 −216 XBSlink.Android/MainChatActivity.cs
  26. +0 −239 XBSlink.Android/MainCloudsActivity.cs
  27. +0 −74 XBSlink.Android/MainPMActivity.cs
  28. +0 −140 XBSlink.Android/MainSettingsActivity.cs
  29. +0 −106 XBSlink.Android/MainUsersActivity.cs
  30. +0 −49 XBSlink.Android/Pages/MasterActivity.cs
  31. +0 −48 XBSlink.Android/Pages/MasterTab.cs
  32. +0 −217 XBSlink.Android/Pages/MasterTabContainer.cs
  33. +0 −19 XBSlink.Android/Properties/AndroidManifest.xml
  34. +0 −41 XBSlink.Android/Properties/AssemblyInfo.cs
  35. +0 −18 XBSlink.Android/Resources/Drawable/CustomSelector.xml
  36. BIN XBSlink.Android/Resources/Drawable/Icon.png
  37. BIN XBSlink.Android/Resources/Drawable/Icon2.png
  38. BIN XBSlink.Android/Resources/Drawable/email.png
  39. BIN XBSlink.Android/Resources/Drawable/email_go.png
  40. BIN XBSlink.Android/Resources/Drawable/email_open.png
  41. BIN XBSlink.Android/Resources/Drawable/ic_tab_artists_grey.png
  42. BIN XBSlink.Android/Resources/Drawable/ic_tab_artists_white.png
  43. BIN XBSlink.Android/Resources/Drawable/icon_key.png
  44. +0 −25 XBSlink.Android/Resources/Layout/About.axml
  45. +0 −35 XBSlink.Android/Resources/Layout/CloudView.axml
  46. +0 −32 XBSlink.Android/Resources/Layout/CustomListItem.axml
  47. +0 −20 XBSlink.Android/Resources/Layout/Log.axml
  48. +0 −21 XBSlink.Android/Resources/Layout/MainTab.axml
  49. +0 −37 XBSlink.Android/Resources/Layout/MainTabChat.axml
  50. +0 −82 XBSlink.Android/Resources/Layout/MainTabClouds.axml
  51. +0 −18 XBSlink.Android/Resources/Layout/MainTabPM.axml
  52. +0 −84 XBSlink.Android/Resources/Layout/MainTabSettings.axml
  53. +0 −18 XBSlink.Android/Resources/Layout/MainTabUsers.axml
  54. +0 −35 XBSlink.Android/Resources/Layout/PMView.axml
  55. +0 −38 XBSlink.Android/Resources/Layout/Test1.axml
  56. +0 −56 XBSlink.Android/Resources/Layout/TestButtons.axml
  57. +0 −35 XBSlink.Android/Resources/Layout/UsersView.axml
  58. BIN XBSlink.Android/Resources/Raw/incoming_chat_msg.mp3
  59. BIN XBSlink.Android/Resources/Raw/new_node.mp3
  60. BIN XBSlink.Android/Resources/Raw/node_left.mp3
  61. +0 −356 XBSlink.Android/Resources/Resource.Designer.cs
  62. +0 −6 XBSlink.Android/Resources/Values/Colors.xml
  63. +0 −5 XBSlink.Android/Resources/Values/Strings.xml
  64. +0 −160 XBSlink.Android/Test2Activity.cs
  65. +0 −93 XBSlink.Android/TestActivity.cs
  66. +0 −201 XBSlink.Android/XBSlink.Android.csproj
  67. BIN XBSlink.Android/bin/Debug/XBSLink.Client.Android-Signed.apk
  68. BIN XBSlink.Android/bin/Debug/XBSLink.Client.Android.apk
  69. BIN XBSlink.Android/bin/Debug/XBSLink.Client.Android.dll
  70. BIN XBSlink.Android/bin/Debug/XBSLink.Client.Android.dll.mdb
  71. BIN XBSlink.Android/bin/Debug/XBSLink.Client.Android.pdb
  72. BIN XBSlink.Android/bin/Debug/XBSlink.Android.dll
  73. BIN XBSlink.Android/bin/Debug/XBSlink.Android.dll.mdb
  74. BIN XBSlink.Android/bin/Debug/XBSlink.Android.pdb
  75. BIN XBSlink.Android/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  76. BIN XBSlink.Android/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  77. +0 −37 XBSlink.Android/obj/Debug/XBSLink.Client.Android.csproj.FileListAbsolute.txt
  78. BIN XBSlink.Android/obj/Debug/XBSLink.Client.Android.dll
  79. BIN XBSlink.Android/obj/Debug/XBSLink.Client.Android.pdb
  80. +0 −37 XBSlink.Android/obj/Debug/XBSlink.Android.csproj.FileListAbsolute.txt
  81. BIN XBSlink.Android/obj/Debug/XBSlink.Android.dll
  82. BIN XBSlink.Android/obj/Debug/XBSlink.Android.pdb
  83. +0 −22 XBSlink.Android/obj/Debug/acw-map.txt
  84. +0 −42 XBSlink.Android/obj/Debug/android/AndroidManifest.xml
  85. BIN XBSlink.Android/obj/Debug/android/assets/Mono.Android.dll
  86. BIN XBSlink.Android/obj/Debug/android/assets/Mono.Android.dll.mdb
  87. BIN XBSlink.Android/obj/Debug/android/assets/Mono.Security.dll
  88. BIN XBSlink.Android/obj/Debug/android/assets/Mono.Security.dll.mdb
  89. BIN XBSlink.Android/obj/Debug/android/assets/System.Core.dll
  90. BIN XBSlink.Android/obj/Debug/android/assets/System.Core.dll.mdb
  91. BIN XBSlink.Android/obj/Debug/android/assets/System.Xml.dll
  92. BIN XBSlink.Android/obj/Debug/android/assets/System.Xml.dll.mdb
  93. BIN XBSlink.Android/obj/Debug/android/assets/System.dll
  94. BIN XBSlink.Android/obj/Debug/android/assets/System.dll.mdb
  95. BIN XBSlink.Android/obj/Debug/android/assets/XBSLink.Client.Android.dll
  96. BIN XBSlink.Android/obj/Debug/android/assets/XBSLink.Client.Android.dll.mdb
  97. BIN XBSlink.Android/obj/Debug/android/assets/XBSlink.Android.dll
  98. BIN XBSlink.Android/obj/Debug/android/assets/XBSlink.Android.dll.mdb
  99. +0 −273 XBSlink.Android/obj/Debug/android/assets/machine.config
  100. BIN XBSlink.Android/obj/Debug/android/assets/mscorlib.dll
  101. BIN XBSlink.Android/obj/Debug/android/assets/mscorlib.dll.mdb
  102. BIN XBSlink.Android/obj/Debug/android/bin/XBSLink.Client.Android.apk
  103. BIN XBSlink.Android/obj/Debug/android/bin/classes.dex
  104. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/AboutActivity.class
  105. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/BroadcastService.class
  106. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/LogActivity.class
  107. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/LogActivity_MyRunnable.class
  108. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/MainActivity.class
  109. BIN ...ndroid/obj/Debug/android/bin/classes/xbslink/android/MainActivity_ActivityBroadcastReceiver.class
  110. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/MainChatActivity.class
  111. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/MainChatActivity_MyRunnable.class
  112. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/MainChatActivity_UpdateUI.class
  113. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/MainCloudsActivity.class
  114. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/MainPMActivity.class
  115. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/MainSettingsActivity.class
  116. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/MainUsersActivity.class
  117. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/MasterTab.class
  118. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/MasterTabContainer.class
  119. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/MyService.class
  120. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/R$color.class
  121. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/R$drawable.class
  122. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/R$id.class
  123. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/R$layout.class
  124. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/R$raw.class
  125. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/R$string.class
  126. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/R.class
  127. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/Test2Activity.class
  128. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/TestActivity.class
  129. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/grid/CloudsListAdapter.class
  130. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/grid/PMListAdapter.class
  131. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/android/grid/UsersListAdapter.class
  132. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/AboutActivity.class
  133. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/LogActivity.class
  134. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/LogActivity_MyRunnable.class
  135. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/MainActivity.class
  136. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/MainChatActivity.class
  137. BIN ...nk.Android/obj/Debug/android/bin/classes/xbslink/client/android/MainChatActivity_MyRunnable.class
  138. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/MainChatActivity_UpdateUI.class
  139. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/MainCloudsActivity.class
  140. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/MainPMActivity.class
  141. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/MainSettingsActivity.class
  142. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/MainUsersActivity.class
  143. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/MasterTab.class
  144. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/MasterTabContainer.class
  145. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/MyService.class
  146. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/R$attr.class
  147. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/R$color.class
  148. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/R$drawable.class
  149. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/R$id.class
  150. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/R$layout.class
  151. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/R$raw.class
  152. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/R$string.class
  153. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/R.class
  154. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/Test2Activity.class
  155. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/TestActivity.class
  156. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/libs/db/DBHelper.class
  157. BIN ...nk.Android/obj/Debug/android/bin/classes/xbslink/client/android/libs/grid/CloudsListAdapter.class
  158. BIN XBSlink.Android/obj/Debug/android/bin/classes/xbslink/client/android/libs/grid/PMListAdapter.class
  159. BIN ...ink.Android/obj/Debug/android/bin/classes/xbslink/client/android/libs/grid/UsersListAdapter.class
  160. BIN XBSlink.Android/obj/Debug/android/bin/packaged_resources
  161. BIN XBSlink.Android/obj/Debug/android/bin/resources_and_assemblies
  162. +0 −68 XBSlink.Android/obj/Debug/android/src/mono/MonoRuntimeProvider.java
  163. +0 −19 XBSlink.Android/obj/Debug/android/src/mono/android/Seppuku.java
  164. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/android/AboutActivity.java
  165. +0 −54 XBSlink.Android/obj/Debug/android/src/xbslink/android/BroadcastService.java
  166. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/android/LogActivity.java
  167. +0 −54 XBSlink.Android/obj/Debug/android/src/xbslink/android/LogActivity_MyRunnable.java
  168. +0 −64 XBSlink.Android/obj/Debug/android/src/xbslink/android/MainActivity.java
  169. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/android/MainActivity_ActivityBroadcastReceiver.java
  170. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/android/MainChatActivity.java
  171. +0 −54 XBSlink.Android/obj/Debug/android/src/xbslink/android/MainChatActivity_MyRunnable.java
  172. +0 −109 XBSlink.Android/obj/Debug/android/src/xbslink/android/MainChatActivity_UpdateUI.java
  173. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/android/MainCloudsActivity.java
  174. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/android/MainPMActivity.java
  175. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/android/MainSettingsActivity.java
  176. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/android/MainUsersActivity.java
  177. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/android/MasterTab.java
  178. +0 −73 XBSlink.Android/obj/Debug/android/src/xbslink/android/MasterTabContainer.java
  179. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/android/MyService.java
  180. +0 −119 XBSlink.Android/obj/Debug/android/src/xbslink/android/R.java
  181. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/android/Test2Activity.java
  182. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/android/TestActivity.java
  183. +0 −73 XBSlink.Android/obj/Debug/android/src/xbslink/android/grid/CloudsListAdapter.java
  184. +0 −73 XBSlink.Android/obj/Debug/android/src/xbslink/android/grid/PMListAdapter.java
  185. +0 −73 XBSlink.Android/obj/Debug/android/src/xbslink/android/grid/UsersListAdapter.java
  186. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/AboutActivity.java
  187. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/LogActivity.java
  188. +0 −54 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/LogActivity_MyRunnable.java
  189. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/MainActivity.java
  190. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/MainChatActivity.java
  191. +0 −54 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/MainChatActivity_MyRunnable.java
  192. +0 −109 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/MainChatActivity_UpdateUI.java
  193. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/MainCloudsActivity.java
  194. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/MainPMActivity.java
  195. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/MainSettingsActivity.java
  196. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/MainUsersActivity.java
  197. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/MasterTab.java
  198. +0 −73 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/MasterTabContainer.java
  199. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/MyService.java
  200. +0 −119 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/R.java
  201. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/Test2Activity.java
  202. +0 −46 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/TestActivity.java
  203. +0 −55 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/libs/db/DBHelper.java
  204. +0 −73 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/libs/grid/CloudsListAdapter.java
  205. +0 −73 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/libs/grid/PMListAdapter.java
  206. +0 −73 XBSlink.Android/obj/Debug/android/src/xbslink/client/android/libs/grid/UsersListAdapter.java
  207. +0 −119 XBSlink.Android/obj/Debug/android/xbslink/android/R.java
  208. +0 −119 XBSlink.Android/obj/Debug/android/xbslink/client/android/R.java
  209. BIN XBSlink.Android/obj/Debug/assemblies/Mono.Android.dll
  210. BIN XBSlink.Android/obj/Debug/assemblies/Mono.Android.dll.mdb
  211. BIN XBSlink.Android/obj/Debug/assemblies/Mono.Security.dll
  212. BIN XBSlink.Android/obj/Debug/assemblies/Mono.Security.dll.mdb
  213. BIN XBSlink.Android/obj/Debug/assemblies/System.Core.dll
  214. BIN XBSlink.Android/obj/Debug/assemblies/System.Core.dll.mdb
  215. BIN XBSlink.Android/obj/Debug/assemblies/System.Xml.dll
  216. BIN XBSlink.Android/obj/Debug/assemblies/System.Xml.dll.mdb
  217. BIN XBSlink.Android/obj/Debug/assemblies/System.dll
  218. BIN XBSlink.Android/obj/Debug/assemblies/System.dll.mdb
  219. BIN XBSlink.Android/obj/Debug/assemblies/XBSLink.Client.Android.dll
  220. BIN XBSlink.Android/obj/Debug/assemblies/XBSLink.Client.Android.dll.mdb
  221. BIN XBSlink.Android/obj/Debug/assemblies/XBSlink.Android.dll
  222. BIN XBSlink.Android/obj/Debug/assemblies/XBSlink.Android.dll.mdb
  223. BIN XBSlink.Android/obj/Debug/assemblies/mscorlib.dll
  224. BIN XBSlink.Android/obj/Debug/assemblies/mscorlib.dll.mdb
  225. 0 XBSlink.Android/obj/Debug/link.flag
  226. +0 −1 XBSlink.Android/obj/Debug/res/drawable/customselector.xml
  227. BIN XBSlink.Android/obj/Debug/res/drawable/email.png
  228. BIN XBSlink.Android/obj/Debug/res/drawable/email_go.png
  229. BIN XBSlink.Android/obj/Debug/res/drawable/email_open.png
  230. BIN XBSlink.Android/obj/Debug/res/drawable/ic_tab_artists_grey.png
  231. BIN XBSlink.Android/obj/Debug/res/drawable/ic_tab_artists_white.png
  232. BIN XBSlink.Android/obj/Debug/res/drawable/icon.png
  233. BIN XBSlink.Android/obj/Debug/res/drawable/icon2.png
  234. BIN XBSlink.Android/obj/Debug/res/drawable/icon_key.png
  235. +0 −1 XBSlink.Android/obj/Debug/res/layout/about.axml
  236. +0 −1 XBSlink.Android/obj/Debug/res/layout/cloudview.axml
  237. +0 −1 XBSlink.Android/obj/Debug/res/layout/log.axml
  238. +0 −1 XBSlink.Android/obj/Debug/res/layout/maintab.axml
  239. +0 −1 XBSlink.Android/obj/Debug/res/layout/maintabchat.axml
  240. +0 −1 XBSlink.Android/obj/Debug/res/layout/maintabclouds.axml
  241. +0 −1 XBSlink.Android/obj/Debug/res/layout/maintabpm.axml
  242. +0 −1 XBSlink.Android/obj/Debug/res/layout/maintabsettings.axml
  243. +0 −1 XBSlink.Android/obj/Debug/res/layout/maintabusers.axml
  244. +0 −1 XBSlink.Android/obj/Debug/res/layout/pmview.axml
  245. +0 −1 XBSlink.Android/obj/Debug/res/layout/test1.axml
  246. +0 −1 XBSlink.Android/obj/Debug/res/layout/testbuttons.axml
  247. +0 −1 XBSlink.Android/obj/Debug/res/layout/usersview.axml
  248. BIN XBSlink.Android/obj/Debug/res/raw/incoming_chat_msg.mp3
  249. BIN XBSlink.Android/obj/Debug/res/raw/new_node.mp3
  250. BIN XBSlink.Android/obj/Debug/res/raw/node_left.mp3
  251. +0 −6 XBSlink.Android/obj/Debug/res/values/colors.xml
  252. +0 −5 XBSlink.Android/obj/Debug/res/values/strings.xml
  253. +0 −1 XBSlink.Android/obj/Debug/resolved_assemblies.txt
  254. +0 −15 XBSlink.Android/obj/Debug/uploadflags.txt
  255. +11 −1 XBSlink.sln
  256. +17 −3 XBSlink/DebugWindow.Designer.cs
  257. +6 −2 XBSlink/DebugWindow.cs
  258. +7 −7 XBSlink/Form1.Designer.cs
  259. +45 −181 XBSlink/Form1.cs
  260. +1 −12 XBSlink/XBSlink.csproj
  261. +19 −11 XBSlink/xbs_node_list.cs
  262. +22 −6 XBSlink/xbs_udp_listener.cs
  263. +0 −44 XBSlink/xlink/msg/xlink_client_send_chat_message.cs
  264. +0 −50 XBSlink/xlink/msg/xlink_create_cloud_create_join_message.cs
  265. +0 −45 XBSlink/xlink/msg/xlink_get_clouds_message.cs
  266. +0 −50 XBSlink/xlink/msg/xlink_server_create_cloud_message.cs
  267. +0 −63 XBSlink/xlink/msg/xlink_server_info_message.cs
  268. +0 −44 XBSlink/xlink/msg/xlink_server_my_chat_message.cs
  269. +0 −45 XBSlink/xlink/msg/xlink_server_my_pm_message.cs
  270. +0 −48 XBSlink/xlink/msg/xlink_server_user_chat_message.cs
  271. +0 −45 XBSlink/xlink/msg/xlink_server_user_offline_message.cs
  272. +0 −48 XBSlink/xlink/msg/xlink_server_user_online_message.cs
  273. +0 −45 XBSlink/xlink/msg/xlink_server_user_pm_message.cs
  274. +1 −176 XBSlink/xlink/xlink_client_messages_helper.cs
  275. +1 −1 XBSlink/xlink/xlink_delegates.cs
  276. +24 −246 XBSlink/xlink/{msg → }/xlink_msg.cs
  277. +46 −118 XBSlink/xlink/xlink_server.cs
  278. +7 −23 XBSlink/xlink/xlink_server_console_process.cs
View
5 .gitignore
@@ -1,2 +1,7 @@
/XBSlink.suo
/XBSlink.userprefs
+XBSlink/obj
+XBSlink.Android/
+XBSlink/bin
+/*.suo
+/*.userprefs
View
5,196 SharpPcap/docs/Api/SharpPcap.xml
2,598 additions, 2,598 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
27 XBSlink.Android/AboutActivity.cs
@@ -1,27 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-using Android.App;
-using Android.Content;
-using Android.OS;
-using Android.Runtime;
-using Android.Views;
-using Android.Widget;
-
-namespace XBSlink.Android
-{
- [Activity(Label = "About XBSLink for Android")]
- public class AboutActivity : Activity
- {
- protected override void OnCreate(Bundle bundle)
- {
- base.OnCreate(bundle);
-
- // Create your application here
-
- SetContentView(Resource.Layout.About);
- }
- }
-}
View
19 XBSlink.Android/Assets/AboutAssets.txt
@@ -1,19 +0,0 @@
-Any raw assets you want to be deployed with your application can be placed in
-this directory (and child directories) and given a Build Action of "AndroidAsset".
-
-These files will be deployed with you package and will be accessible using Android's
-AssetManager, like this:
-
-public class ReadAsset : Activity
-{
- protected override void OnCreate (Bundle bundle)
- {
- base.OnCreate (bundle);
-
- InputStream input = Assets.Open ("my_asset.txt");
- }
-}
-
-Additionally, some Android functions will automatically load asset files:
-
-Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
View
31 XBSlink.Android/BroadcastService.cs
@@ -1,31 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Android.App;
-using Android.Content;
-
-namespace XBSlink.Android
-{
- [Service]
- public class BroadcastService : IntentService
- {
- public const string ACTION_NEW_TWEETS = "action.NEW_TWEETS";
- public long LastSinceId { get; set; }
- public BroadcastService() : base()
- {
- this.LastSinceId = 0;
- }
- protected override void OnHandleIntent(Intent intent)
- {
- var lastSinceId = this.LastSinceId;
- //var tweets = Search.SearchTweets(lastSinceId, “#MonoDroid”);
- //this.LastSinceId = tweets.Max(t => t.Id);
- //if (tweets.Exists(t => t.Id > lastSinceId))
- //{
- // var newTweetsIntent = new Intent(ACTION_NEW_TWEETS);
- // newTweetsIntent.PutExtra("oldSinceId", lastSinceId);
- // SendBroadcast(newTweetsIntent);
- //}
- }
- }
-}
View
20 XBSlink.Android/Libs/ActivityManager.cs
@@ -1,20 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Android.App;
-
-namespace XBSlink.Android.Managers
-{
- public class ActivityManager
- {
-
- public LogActivity GetLogActivity(Activity activity)
- {
- return null;
- //activity.
- //return (LogActivity)LocalActivityManager.GetActivity("log");
- }
-
-
- }
-}
View
18 XBSlink.Android/Libs/AlertMessage.cs
@@ -1,18 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Android.Content;
-using Android.Widget;
-
-namespace XBSlink.Android
-{
- class AlertMessage
- {
-
- public static void ShowAlert(Context context, string message)
- {
- Toast.MakeText(context, message, ToastLength.Short).Show();
- }
-
- }
-}
View
228 XBSlink.Android/Libs/AndroidClientEngine.cs
@@ -1,228 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Net;
-using System.Text;
-using System.Threading;
-using Java.Net;
-using XBSlink.XlinkKai;
-
-namespace XBSlink.Android
-{
- public class AndroidClientEngine
- {
-
- public const int standard_port = 31415;
- public const int standard_kay_port = 34522;
- public const int standard_kay_client_port = 34523;
-
- public int udp_kay_socket_port;
- public EndPoint _local_endpoint;
-
-
- public string KAI_CLIENT_LOCAL_DEVICE = "00242BECE7A0";
- public string KAI_CLIENT_LOCAL_NAME = "magurin";
-
- public bool is_exiting;
- public IPAddress _xbs_link_ip;
-
- private Thread sender_thread = null;
-
-
- //public delegate void XlinkDebugMessageHandler(string message_debug, xlink_msg.xbs_message_sender sender);
- //public event XlinkDebugMessageHandler XlinkDebugMessage;
-
- public delegate void ProcessReceivedMessageHandler(xlink_msg msg);
- public event ProcessReceivedMessageHandler ProcessReceivedMessage;
-
-
- List<xlink_msg> sender_msg = new List<xlink_msg>();
-
- public AndroidClientEngine()
- {
- ChangeIPAddresPort( standard_kay_port);
- // InitializeSocket();
- }
-
- public DatagramSocket s;
-
- Thread receive_thread;
-
-
- public void Start()
- {
- is_exiting = false;
- sender_thread = new Thread(new ThreadStart(while_sender));
- sender_thread.IsBackground = true;
- sender_thread.Priority = ThreadPriority.Normal;
- sender_thread.Start();
-
- try
- {
- s = new DatagramSocket(standard_kay_client_port);
- }
- catch (Exception)
- {
- }
-
- System.Console.WriteLine(" * initialized CONSOLE udp listener on port " + udp_kay_socket_port);
- //ProcessDebugMessage(" * initialized CONSOLE udp listener on port " + udp_kay_socket_port, xlink_msg.xbs_message_sender.UDP_LISTENER);
-
- receive_thread = new Thread(new ThreadStart(Receive));
- receive_thread.IsBackground = true;
- receive_thread.Priority = ThreadPriority.Normal;
- receive_thread.Start();
-
-
- }
-
-
- void while_sender()
- {
- while (!is_exiting)
- {
- udp_sender();
- Thread.Sleep(400);
- }
-
- }
-
- void udp_sender()
- {
- if (sender_msg.Count > 0)
- {
- SendMessage(sender_msg[0]);
- sender_msg.Remove(sender_msg[0]);
- }
- }
-
- public void SendMessage(xlink_msg msg)
- {
- if (msg.src_ip != null)
- {
- SendMessage(s, msg.src_ip, msg.src_port, msg.Data);
- }
-
- }
-
-
-
- public static void SendMessage(DatagramSocket s, IPAddress Ip, int port, string msgText)
- {
- var Data = xlink_msg.getUTF8BytesFromString(msgText);
- SendMessage(s, Ip, port, Data);
- }
-
-
- public static void SendMessage(DatagramSocket s, string Ip, int port, string msgText)
- {
- SendMessage(s, IPAddress.Parse(Ip), port, msgText);
- }
-
- public static void SendMessage(DatagramSocket s, IPAddress Ip, int port, byte[] message)
- {
- InetAddress local = InetAddress.GetByName(Ip.ToString());
- //int msg_length = message.Length;
- //byte[] message = StrToByteArray(messageStr);
- DatagramPacket p = new DatagramPacket(message, message.Length, local, port);
- s.Send(p);
- }
-
-
- public static void SendMessage(DatagramSocket s, InetAddress Ip, int port, byte[] message)
- {
- DatagramPacket p = new DatagramPacket(message, message.Length, Ip, port);
- s.Send(p);
- }
-
- int ByteArray = 4096;
-
-
- void Receive()
- {
-
- is_exiting = false;
-
- string text;
-
- byte[] message;
- int Port=-1;
- string HostAddress = "";
-
- DatagramPacket p;
-
- while (!is_exiting)
- {
- message = new byte[ByteArray];
- p = new DatagramPacket(message, message.Length);
-
- try
- {
- s.Receive(p);
- text = ByteArrayToStr(p.GetData()).Replace("\0", "").Replace("\0", string.Empty); //new String().Trim().ToCharArray(), 0, p.Length);
- message = StrToByteArray(text);
- HostAddress = p.Address.HostAddress;
- Port = p.Port;
- //s.Close();
- }
- catch (Exception)
- {
- }
-
- if (message.Length > 0)
- PacketReceived(HostAddress, Port, message);
-
- }
- //Log.d("Udp tutorial", "message:" + text);
- //s.Close();
-
- }
-
-
- public void PacketReceived(string IpAdress, int Port, byte[] message)
- {
- xlink_msg msg = new xlink_msg(message);
- if (msg != null)
- {
- //remote_endpoint = (IPEndPoint)ep;
- msg.src_ip = IPAddress.Parse(IpAdress);
- msg.src_port = Port;
-
- //ProcesamosMSG
- if (ProcessReceivedMessage != null)
- ProcessReceivedMessage(msg);
- }
- }
-
-
- public void Close()
- {
-
- }
-
- public void ChangeIPAddresPort( int console_port)
- {
- // _xbs_link_ip = IPAddress.Parse(xbs_link_ip);
- udp_kay_socket_port = console_port;
- }
-
- public void Listen(int port)
- {
-
- }
-
- public static string ByteArrayToStr(byte[] str)
- {
- //var buf = Encoding.Convert(Encoding.GetEncoding("iso-8859-1"), Encoding.UTF8, str);
- return Encoding.UTF8.GetString(str);
- }
-
- public static byte[] StrToByteArray(string str)
- {
- System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
- return encoding.GetBytes(str);
- }
-
-
-
- }
-}
View
91 XBSlink.Android/Libs/AndroidClientEngineProcess.cs
@@ -1,91 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Java.Net;
-using XBSlink.XlinkKai;
-
-namespace XBSlink.Android
-{
- public class AndroidClientEngineProcess
- {
-
- string server_ip = "10.67.2.1";
- public int REMOTE_SERVER_PORT = 34522;
- public int LOCAL_CLIENT_PORT = 34523;
-
-
- public DatagramSocket s;
-
- public AndroidClientEngineProcess(AndroidClientEngine ClientEngine)
- {
- s = ClientEngine.s;
- }
-
- public AndroidClientEngineProcess(DatagramSocket socket, string ServerIp, int ServerPort)
- {
- s = socket;
- server_ip = ServerIp;
- REMOTE_SERVER_PORT = ServerPort;
- }
-
-
- public void SendMessage( string message)
- {
- AndroidClientEngine.SendMessage(s, server_ip, REMOTE_SERVER_PORT, message);
- }
-
- public void ClientCloudCreateJoin(string Cloud, int MaxUsers, string Password)
- {
- SendMessage(xlink_client_messages_helper.ClientCloudCreateJoin(Cloud, MaxUsers, Password));
- }
-
- public void ClientCloudJoin( string Cloud)
- {
- SendMessage(xlink_client_messages_helper.ClientCloudJoin(Cloud));
- }
-
- public void ClientCloudGet() {
- SendMessage(xlink_client_messages_helper.ClientCloudGet());
- }
-
- public void ClientCloudLeave() {
- SendMessage(xlink_client_messages_helper.ClientCloudLeave());
- }
-
- public void ClientSendChatMessage( string Message)
- {
- SendMessage(xlink_client_messages_helper.ClientSendChatMessage(Message));
-
- }
-
- public void ClientConnect()
- {
- SendMessage(xlink_client_messages_helper.ClientConnect());
- }
-
- public void ClientDisconnect()
- {
- SendMessage(xlink_client_messages_helper.ClientDisconnect());
- }
-
- public void ClientDiscover()
- {
- SendMessage(xlink_client_messages_helper.ClientDiscover());
- }
-
- public void ClientSendPM( string UserName, string Message)
- {
- SendMessage( xlink_client_messages_helper.ClientSendPM(UserName, Message));
- }
-
- public void ClientStart() {
- SendMessage( xlink_client_messages_helper.ClientStart());
- }
-
- public void ClientStop() {
- SendMessage( xlink_client_messages_helper.ClientStop());
- }
-
-
- }
-}
View
81 XBSlink.Android/Libs/AudioManagement.cs
@@ -1,81 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Android.App;
-using Android.Media;
-
-namespace XBSlink.Android.Managers
-{
- public class AudioManager
- {
-
- MediaPlayer _player;
- Activity _actualActivity;
-
- MediaRecorder _recorder;
- string path = "/sdcard/test.3gpp";
-
- void Record()
- {
- _recorder.SetAudioSource(AudioSource.Mic);
- _recorder.SetOutputFormat(OutputFormat.ThreeGpp);
- _recorder.SetAudioEncoder(AudioEncoder.AmrNb);
- _recorder.SetOutputFile(path);
- _recorder.Prepare();
- _recorder.Start();
- }
-
- void RecordStop()
- {
- _recorder.Stop();
- _recorder.Reset();
- }
-
- void RecordPlay()
- {
- _player.SetDataSource(path);
- _player.Prepare();
- _player.Start();
- }
-
- public AudioManager(Activity actualActivity)
- {
- _actualActivity = actualActivity;
- }
-
- //public void PlaySound( int ResourceId) {
-
- // PlaySound(_actualActivity, ResourceId);
- //}
-
- public void PlaySound(Activity ThisActivity, int ResourceId)
- {
-
- if (_player != null)
- {
- if (_player.IsPlaying)
- _player.Stop();
-
- }
- _player = MediaPlayer.Create(ThisActivity, ResourceId);
- _player.Start();
- }
-
- public void PlayLeftNode(Activity ThisActivity)
- {
- PlaySound(ThisActivity,Resource.Raw.new_node);
- }
-
- public void PlayNewNode(Activity ThisActivity)
- {
- PlaySound(ThisActivity, Resource.Raw.node_left);
- }
-
- public void PlayIncommingChatMsg(Activity ThisActivity)
- {
- PlaySound(ThisActivity, Resource.Raw.incoming_chat_msg);
- }
-
-
- }
-}
View
26 XBSlink.Android/Libs/ChatItem.cs
@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace XBSlink.Android
-{
- public class ChatItem
- {
- public string _message { get; set; }
- public string _username { get; set; }
- public bool _is_my_message { get; set; }
-
- //public ChatItem(xlink_server_user_chat_message msg)
- //{
- // _message = msg._message;
- // _username = msg._username;
- // _is_my_message = false;
- //}
-
- //public ChatItem(xlink_server_my_chat_message msg)
- //{
- // _message = msg._message;
- // _is_my_message = true;
- //}
- }
-}
View
112 XBSlink.Android/Libs/DB/DBCommandsConfiguration.cs
@@ -1,112 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Android.Content;
-using Android.Database;
-
-namespace XBSLink.Client.Android.Libs.DB
-{
-
- public class configuration
- {
- public string parameter { get; set; }
- public string value { get; set; }
- }
-
- class DBCommandsConfiguration
-{
-
- //string server_ip = "10.67.2.1";
- //int server_port = 34522;
-
- public static string table_name = "configuration";
-
- private DBHelper dbHelp;
- public DBCommandsConfiguration(Context context)
- {
- dbHelp = new DBHelper(context);
- dbHelp.OnCreate(dbHelp.WritableDatabase);
- }
-
- public IList<configuration> GetAllParameters()
- {
-
- ICursor golfCursor = dbHelp.ReadableDatabase.Query(table_name, null, null, null, null, null, null, null);
- var scores = new List<configuration>();
- while (golfCursor.MoveToNext())
- {
- configuration scr = MapCursorToEntity(golfCursor);
- scores.Add(scr);
- }
- return scores;
- }
-
- public configuration GetByParameter(string Parameter)
- {
- ICursor finded = dbHelp.ReadableDatabase.Query(table_name, new string[] { "parameter","value" }, "parameter='" + Parameter + "'", null, null, null, null, null);
- var scores = new List<configuration>();
- while (finded.MoveToNext())
- {
- return MapCursorToEntity(finded);
- }
- return null;
- }
-
- public int Update(string Parameter, string Value)
- {
- if (Parameter != "")
- {
- var values = new ContentValues();
- values.Put("value", Value);
- return dbHelp.WritableDatabase.Update(table_name, values, "parameter='" + Parameter + "'", null);
- }
- return -1;
- }
-
- public long Insert(string Parameter, string Value)
- {
- if (Parameter != "")
- {
- var encontrada = GetByParameter(Parameter);
- if (encontrada == null)
- {
- var values = new ContentValues();
- values.Put("parameter", Parameter);
- values.Put("value", Value);
- return dbHelp.WritableDatabase.Insert(table_name, null, values);
- }
- else
- return (long)Update(Parameter, Value);
- }
- return -1;
- }
- public int Delete(string Parameter)
- {
- if (Parameter != "")
- return dbHelp.WritableDatabase.Delete(table_name, "parameter=?", new string[] { Parameter.ToString() });
- return -1;
- }
-
- public void DeleteAll()
- {
- dbHelp.WritableDatabase.Delete(table_name, "", null);
- }
-
- private configuration MapCursorToEntity(ICursor cursor)
- {
- configuration scr = new configuration();
- scr.parameter = cursor.GetString(0);
- scr.value = cursor.GetString(1);
- return (scr);
- }
-
-
- public void SetConfiguration(string xbslink_internal_ip, bool play_sound_new_message, bool play_sound_join_leave)
- {
- Insert("play_sound_new_message", play_sound_new_message.ToString());
- Insert("play_sound_join_leave", play_sound_join_leave.ToString());
- Insert("xbslink_internal_ip", xbslink_internal_ip);
- }
-
-}
-}
View
30 XBSlink.Android/Libs/DB/DBHelper.cs
@@ -1,30 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Android.Content;
-using Android.Database.Sqlite;
-
-namespace XBSLink.Client.Android.Libs.DB
-{
- class DBHelper : SQLiteOpenHelper
-{
- private const string DbName = "XBSLink";
- private const int DbVersion = 1;
-
- public DBHelper(Context context) : base(context, DbName, null, DbVersion)
- {
- }
-
- public override void OnCreate(SQLiteDatabase db)
- {
- db.ExecSQL(@"CREATE TABLE IF NOT EXISTS configuration (parameter TEXT, value TEXT)");
- }
-
- public override void OnUpgrade(SQLiteDatabase db,
- int oldVersion, int newVersion)
- {
- db.ExecSQL("DROP TABLE IF EXISTS configuration");
- OnCreate(db);
- }
-}
-}
View
167 XBSlink.Android/Libs/EnvironmentEx.cs
@@ -1,167 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using XBSlink.Android.Grid;
-using XBSlink.XlinkKai;
-
-namespace XBSlink.Android
-{
- public class EnvironmentEx
- {
-
- public static string XBSLINK_SERVER_NAME = "NOT CONNECTED";
- public static string XBSLINK_SERVER_VERSION = "";
- public static string CLOUD_SERVER_IP = "";
- public static string CLOUD_SERVER_PORT = "";
- public static string NICKNAME ="";
-
- public static bool SHUTDOWN = false;
-
- public static ConnectionState APP_ACTUALSTATE { get; set; }
-
- public static bool IsConnected()
- {
- return (APP_ACTUALSTATE != ConnectionState.Disconnected);
- }
-
- public enum ConnectionState
- {
- Disconnected = 0,
- CloudDisconnected = 1,
- CloudConnected = 2
-
- }
-
- public static List<CloudsItem> _clouds = new List<CloudsItem>();
- public static List<PMItem> _pms = new List<PMItem>();
- public static List<UsersItem> _users = new List<UsersItem>();
- public static List<string> _log_cache = new List<string>();
- public static List<ChatItem> _chats_cache = new List<ChatItem>();
-
-
- public static void InsertLog(string message)
- {
- _log_cache.Add(message);
- }
-
- public static void InsertChat(ChatItem chat)
- {
- _chats_cache.Add(chat);
- }
-
-
- public static CloudsItem CloudFind(string cloudname)
- {
- lock (_clouds)
- {
- foreach (var item in _clouds)
- {
- if (cloudname == item.Name)
- return item;
- }
- return null;
- }
- }
-
-
- public static void CloudAdd(CloudsItem cloud_added)
- {
- lock (_clouds)
- {
- var encontrado = CloudFind(cloud_added.Name);
- if (encontrado != null)
- cloud_added.SetData(encontrado);
- else
- _clouds.Add(cloud_added);
- }
- }
-
-
- public static void CloudDelete(CloudsItem item)
- {
- lock (_clouds)
- {
- var encontrada = CloudFind(item.Name);
- if (encontrada != null)
- _clouds.Remove(item);
- }
-
- }
-
- public static UsersItem UserFind(string nickname)
- {
- lock (_users)
- {
- foreach (var item in _users)
- {
- if (nickname == item._nickname)
- return item;
- }
- return null;
- }
- }
-
- public static void UserAdd(xlink_server_user_online_message nickname)
- {
- lock (_users)
- {
- var encontrado = UserFind(nickname._username);
- if (encontrado != null)
- encontrado.SetData(nickname);
- else
- _users.Add(new UsersItem(nickname));
- }
- }
-
- public static void UserDelete(string nickname)
- {
- lock (_users)
- {
- var encontrado = UserFind(nickname);
- if (encontrado != null)
- _users.Remove(encontrado);
- }
- }
-
- public static PMItem PMFind(string nickname)
- {
-
- lock (_pms)
- {
-
- foreach (var item in EnvironmentEx._pms)
- {
- if (nickname == item.Nombre)
- return item;
- }
- return null;
- }
- }
-
- public static void PMAdd(string nickname)
- {
- lock (_pms)
- {
- if (PMFind(nickname) == null)
- EnvironmentEx._pms.Add(new PMItem()
- {
- Nombre = nickname,
- Asunto = "",
- Image = Resource.Drawable.Icon
- });
- }
- }
-
- public static void PMDelete(string nickname)
- {
- lock (_pms)
- {
- var encontrado = PMFind(nickname);
- if (encontrado != null)
- EnvironmentEx._pms.Remove(encontrado);
- }
- }
-
-
- }
-}
View
74 XBSlink.Android/Libs/Grid/CloudsItem.cs
@@ -1,74 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace XBSlink.Android.Grid
-{
-
- public class CloudsItem
- {
-
- public CloudsItem(xbs_cloud tmp_cloud)
- : this(tmp_cloud.name, tmp_cloud.node_count.ToString(), tmp_cloud.max_nodes.ToString(), tmp_cloud.isPrivate)
- {
-
- }
-
- public CloudsItem(string name, string node_count,string max_nodes, bool is_private)
- {
- SetData(name, node_count, max_nodes, is_private);
- }
-
- public void SetData(xbs_cloud cloud)
- {
- SetData(cloud.name, cloud.node_count.ToString(), cloud.max_nodes.ToString(), cloud.isPrivate);
- }
-
- public void SetData(CloudsItem cloud)
- {
- SetData(cloud.Name, cloud.NodeCount , cloud.MaxNodes, cloud.IsPrivate);
- }
-
-
- public void SetData(string name, string node_count,string max_nodes, bool is_private) {
- Name = name; NodeCount = node_count; MaxNodes = max_nodes; IsPrivate = is_private;
- Image = (is_private) ? Resource.Drawable.icon_key : Resource.Drawable.Icon;
- SetDescription();
- }
-
- public void SetDescription() {
- Description = String.Format("({0}/{1}) PASSWORD:{2}", NodeCount, MaxNodes, IsPrivate.ToString());
- }
-
- public int Image { get; set; }
-
-
- public string Name
- {
- get;
- set;
- }
-
- public string NodeCount
- {
- get;
- set;
- }
-
- public string MaxNodes
- {
- get;
- set;
- }
-
- public bool IsPrivate
- {
- get;
- set;
- }
-
- public string Description { get; set; }
-
- }
- }
-
View
60 XBSlink.Android/Libs/Grid/CloudsListAdapter.cs
@@ -1,60 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Android.App;
-using Android.Views;
-using Android.Widget;
-
-namespace XBSlink.Android.Grid
-{
- public class CloudsListAdapter : BaseAdapter
- {
- Activity context;
-
- public List<CloudsItem> items;
-
- public CloudsListAdapter(Activity context, List<CloudsItem> elements) //We need a context to inflate our row view from
- : base()
- {
- this.context = context;
- items = elements;
- }
-
- public override int Count
- {
- get { return items.Count; }
- }
-
- public override Java.Lang.Object GetItem(int position)
- {
- return position;
- }
-
- public override long GetItemId(int position)
- {
- return position;
- }
-
- public override View GetView(int position, View convertView, ViewGroup parent)
- {
-
- var item = items[position];
-
- View view = convertView;
- if (view == null) // no view to re-use, create new
- view = context.LayoutInflater.Inflate(Resource.Layout.CloudView, null);
-
- view.FindViewById<TextView>(Resource.Id.CCloudViewTittle).Text = item.Name;
- view.FindViewById<TextView>(Resource.Id.CCloudViewDescription).Text = item.Description;
- view.FindViewById<ImageView>(Resource.Id.CCloudViewImage).SetImageResource(item.Image);
-
- //Finally return the view
- return view;
- }
-
- public CloudsItem GetItemAtPosition(int position)
- {
- return items[position];
- }
- }
-}
View
29 XBSlink.Android/Libs/Grid/PMItem.cs
@@ -1,29 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace XBSlink.Android.Grid
-{
-
- public class PMItem
- {
- public string Nombre
- {
- get;
- set;
- }
-
- public string Asunto
- {
- get;
- set;
- }
-
- public int Image
- {
- get;
- set;
- }
- }
- }
-
View
59 XBSlink.Android/Libs/Grid/PMListAdapter.cs
@@ -1,59 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Android.App;
-using Android.Views;
-using Android.Widget;
-
-namespace XBSlink.Android.Grid
-{
- public class PMListAdapter : BaseAdapter
- {
- Activity context;
-
- public List<PMItem> items;
-
- public PMListAdapter(Activity context, List<PMItem> elements) //We need a context to inflate our row view from
- : base()
- {
- this.context = context;
- items = elements;
- }
-
- public override int Count
- {
- get { return items.Count; }
- }
-
- public override Java.Lang.Object GetItem(int position)
- {
- return position;
- }
-
- public override long GetItemId(int position)
- {
- return position;
- }
-
- public override View GetView(int position, View convertView, ViewGroup parent)
- {
-
- var item = items[position];
-
- View view = convertView;
- if (view == null) // no view to re-use, create new
- view = context.LayoutInflater.Inflate(Resource.Layout.PMView, null);
- view.FindViewById<TextView>(Resource.Id.PMViewTittle).Text = item.Nombre;
- view.FindViewById<TextView>(Resource.Id.PMViewDescription).Text = item.Asunto;
- view.FindViewById<ImageView>(Resource.Id.PMViewImage).SetImageResource(item.Image);
-
- //Finally return the view
- return view;
- }
-
- public PMItem GetItemAtPosition(int position)
- {
- return items[position];
- }
- }
-}
View
81 XBSlink.Android/Libs/Grid/UsersItem.cs
@@ -1,81 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using XBSlink.XlinkKai;
-
-namespace XBSlink.Android.Grid
-{
-
- public class UsersItem
- {
-
- public string _ip_announced { get; set; }
- public int _port_announced { get; set; }
- public string _ip_sendfrom { get; set; }
- public int _port_sendfrom { get; set; }
-
-
-
- public DateTime _addedTime { get; set; }
- public DateTime _lastChangeTime { get; set; }
-
- public string _nickname { get; set; }
- public string _client_version { get; set; }
- private string _last_ping_delay_ms { get; set; }
-
-
- public string _description
- {
- get;
- set;
- }
-
- public int _image
- {
- get;
- set;
- }
-
- public bool _is_friend { get; set; }
-
-
- public UsersItem(xlink_server_user_online_message message)
- : this(message._username, message._client_version, message._last_ping_delay_ms, false)
- {
-
- }
-
- public UsersItem(string nickname, string client_version, string last_ping_delay_ms, bool is_friend)
- {
- _nickname = nickname;
- SetData(client_version,last_ping_delay_ms,is_friend);
- }
-
- public void SetData(UsersItem item)
- {
- SetData(item._client_version,item._last_ping_delay_ms,item._is_friend);
-
- }
-
- public void SetData(xlink_server_user_online_message user)
- {
- SetData(user._client_version, user._last_ping_delay_ms, _is_friend);
- }
-
-
- public void SetData(string client_version, string last_ping_delay_ms, bool is_friend)
- {
-
- _client_version = client_version; _last_ping_delay_ms = last_ping_delay_ms; _is_friend = is_friend;
-
- _image = (is_friend) ? Resource.Drawable.icon_key : Resource.Drawable.Icon;
- SetDescription();
- }
-
- public void SetDescription() {
- _description = String.Format("{0} ({1})", _client_version , _last_ping_delay_ms, _is_friend );
- }
-
- }
- }
-
View
59 XBSlink.Android/Libs/Grid/UsersListAdapter.cs
@@ -1,59 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Android.App;
-using Android.Views;
-using Android.Widget;
-
-namespace XBSlink.Android.Grid
-{
- public class UsersListAdapter : BaseAdapter
- {
- Activity context;
-
- public List<UsersItem> items;
-
- public UsersListAdapter(Activity context, List<UsersItem> elements) //We need a context to inflate our row view from
- : base()
- {
- this.context = context;
- items = elements;
- }
-
- public override int Count
- {
- get { return items.Count; }
- }
-
- public override Java.Lang.Object GetItem(int position)
- {
- return position;
- }
-
- public override long GetItemId(int position)
- {
- return position;
- }
-
- public override View GetView(int position, View convertView, ViewGroup parent)
- {
-
- var item = items[position];
-
- View view = convertView;
- if (view == null) // no view to re-use, create new
- view = context.LayoutInflater.Inflate(Resource.Layout.UsersView, null);
- view.FindViewById<TextView>(Resource.Id.UsersViewTittle).Text = item._nickname;
- view.FindViewById<TextView>(Resource.Id.UsersViewDescription).Text = item._description;
- view.FindViewById<ImageView>(Resource.Id.UsersViewImage).SetImageResource(item._image);
-
- //Finally return the view
- return view;
- }
-
- public UsersItem GetItemAtPosition(int position)
- {
- return items[position];
- }
- }
-}
View
51 XBSlink.Android/Libs/LogManager.cs
@@ -1,51 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace XBSlink.Android.Managers
-{
- public class LogManager
- {
-
- LogActivity actualActivity;
-
- public LogManager()
- {
-
-
-
- //log_tmp = new List<string>();
- }
-
- public void SetLogActitivty(LogActivity logAct)
- {
- actualActivity = logAct;
- }
-
- public void WriteLine(string message)
- {
- if (actualActivity != null)
- actualActivity.AppendLog(message);
- }
-
- public void CheckWriteLine(string message)
- {
- if (actualActivity != null)
- {
- if ( EnvironmentEx._log_cache.Count > 0)
- {
- lock (EnvironmentEx._log_cache)
- {
- foreach (var item in EnvironmentEx._log_cache)
- WriteLine(item);
- }
-
- }
- }
- else
- WriteLine(message);
- }
-
-
- }
-}
View
131 XBSlink.Android/Libs/NetworkCardManager.cs
@@ -1,131 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Android.Content;
-using Android.Net;
-using Android.Net.Wifi;
-using Java.Net;
-
-namespace XBSlink.Android.Managers
-{
- public class NetworkCardManager
- {
-
- WifiInfo GetWifiInfo(Context actualContext)
- {
- WifiManager wifiManager = (WifiManager)actualContext.GetSystemService(Context.WifiService);
- return wifiManager.ConnectionInfo;
- }
-
- public static bool IsWifi(Context actualContext)
- {
- ConnectivityManager connectivityManager = (ConnectivityManager)actualContext.GetSystemService(Context.ConnectivityService);
- var mobileState = connectivityManager.GetNetworkInfo(ConnectivityType.Wifi).GetState();
- return (mobileState == NetworkInfo.State.Connected);
- }
-
- public static bool Is3g(Context actualContext)
- {
- ConnectivityManager connectivityManager = (ConnectivityManager)actualContext.GetSystemService(Context.ConnectivityService);
- var activeConnection = connectivityManager.ActiveNetworkInfo;
- return ((activeConnection != null) && activeConnection.IsConnected);
- }
-
- public string GetExternalIpUsingTcpClient()
- {
- var ipBytes = Get3GIPEndPoint().Address.GetAddressBytes();
- return GetIpFromIpArray(ipBytes);
- }
-
- public string GetExternalIpUsingSocketClient()
- {
- try
- {
- //create a new client socket ...
- System.Net.Sockets.Socket vb_Socket = new System.Net.Sockets.Socket(System.Net.Sockets.AddressFamily.InterNetwork,
- System.Net.Sockets.SocketType.Stream, System.Net.Sockets.ProtocolType.Tcp);
- System.Net.IPAddress remoteIPAddress = System.Net.Dns.GetHostAddresses("www.google.com")[0];
- System.Net.IPEndPoint remoteEndPoint = new System.Net.IPEndPoint(remoteIPAddress, 80);
- vb_Socket.Connect(remoteEndPoint);
- var ipBytes = ((System.Net.IPEndPoint)vb_Socket.LocalEndPoint).Address.GetAddressBytes();
- return GetIpFromIpArray(ipBytes);
- }
- catch (System.Net.Sockets.SocketException)
- {
- }
- return "";
- }
-
- public bool Ping(string Ip)
- {
- try
- {
- InetAddress element = InetAddress.GetByName(Ip);
-
- if (element != null)
- return (element.IsReachable(5000));
- }
- catch (Exception)
- {
- }
-
- return false;
- }
-
- #region IpAddress Operations
-
- public static string ConvertToIpAddress(int ip)
- {
- return string.Format("{0:D}.{1:D}.{2:D}.{3:D}", (ip & 0xff), ((ip >> 8) & 0xff), ((ip >> 16) & 0xff), ((ip >> 24) & 0xff));
- }
-
- string ConvertToIpAddress(long ip)
- {
- return ConvertToIpAddress(Convert.ToInt32(ip));
- }
-
- public System.Net.IPEndPoint Get3GIPEndPoint()
- {
- System.Net.Sockets.TcpClient sock = new System.Net.Sockets.TcpClient();
- sock.Connect(System.Net.Dns.GetHostAddresses("www.google.com"), 80);
- System.Net.IPEndPoint dev = ((System.Net.IPEndPoint)sock.Client.LocalEndPoint);
- sock.Close();
- return dev;
- }
-
- public string GetIpFromIpArray(byte[] ipBytes)
- {
- var ip = (uint)ipBytes[3] << 24;
- ip += (uint)ipBytes[2] << 16;
- ip += (uint)ipBytes[1] << 8;
- ip += (uint)ipBytes[0];
- return ConvertToIpAddress((int)ip);
- }
-
-
-
- #endregion
-
- /*
- * public void Select()
- {
- if (IsWifi())
- {
- var info = GetWifiInfo();
- string ip = ConvertToIpAddress(info.IpAddress);
- txt.Text = String.Format("WIFI: {0} SSID: {1} IP:{2}", info.MacAddress, info.SSID, ip);
- }
- else if (Is3g())
- {
- System.Net.IPEndPoint ip = Get3GIPEndPoint();
- txt.Text = String.Format("3G: External IP:{0}", GetIpFromIpArray(ip.Address.GetAddressBytes()));
- }
- else
- {
- txt.Text = "No dispone de conexión a la red";
- }
- }
- * */
-
- }
-}
View
91 XBSlink.Android/LogActivity.cs
@@ -1,91 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading;
-using Android.App;
-using Android.Content;
-using Android.OS;
-using Android.Runtime;
-using Android.Views;
-using Android.Widget;
-
-namespace XBSlink.Android
-{
- [Activity(Label = "Log : XBSLink for Android")]
- public class LogActivity : MasterTab
- {
- TextView txtLogGeneral1;
- ScrollView chat_ScrollView;
-
- public void AppendLog(string texto)
- {
-
- txtLogGeneral1.Append(texto + System.Environment.NewLine);
- chat_ScrollView.Post(new MyRunnable(chat_ScrollView));
- }
-
- Thread LogThread;
-
- protected override void OnCreate(Bundle bundle)
- {
- base.OnCreate(bundle);
-
- // Create your application here
- SetContentView(Resource.Layout.Log);
-
- _mainActivity.LogActivity = this;
-
- chat_ScrollView = (ScrollView)FindViewById(Resource.Id.scrollLogGeneral);
- txtLogGeneral1 = (TextView)chat_ScrollView.FindViewById(Resource.Id.txtLogGeneral);
-
- LogThread = new Thread(() =>
- {
- while (!EnvironmentEx.SHUTDOWN)
- {
- if (EnvironmentEx._log_cache.Count > 0)
- {
- lock (EnvironmentEx._log_cache)
- {
-
- List<string> tmp = new List<string>();
- foreach (var item in EnvironmentEx._log_cache)
- tmp.Add(item);
-
- RunOnUiThread(delegate
- {
- foreach (var item in tmp)
- {
- AppendLog(item);
- }
- });
-
- EnvironmentEx._log_cache.Clear();
-
- }
- }
- }
- });
- LogThread.Priority = System.Threading.ThreadPriority.Normal;
- LogThread.Start();
-
- }
-
- class MyRunnable : Java.Lang.Object, Java.Lang.IRunnable
- {
-
- ScrollView tmp_ScrollView;
-
- public MyRunnable(ScrollView ChatScrollView)
- {
- tmp_ScrollView = ChatScrollView;
- }
-
- public void Run()
- {
- tmp_ScrollView.FullScroll(FocusSearchDirection.Down);
- }
- }
-
- }
-}
View
296 XBSlink.Android/MainActivity.cs
@@ -1,296 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading;
-using Android.App;
-using Android.Content;
-using Android.OS;
-using Android.Runtime;
-using Android.Util;
-using Android.Views;
-using Android.Widget;
-using Java.Net;
-using XBSLink.Client.Android.Libs;
-using XBSLink.Client.Android.Libs.DB;
-using XBSlink.XlinkKai;
-using XBSlink.Android.Grid;
-
-
-namespace XBSlink.Android
-{
- [Activity(Label = "XBSLink for Android", MainLauncher = true, Icon = "@drawable/icon")]
- public class MainActivity : MasterTabContainer
- {
-
- public AndroidClientEngineProcess ClientEngineProcessManager { get; set; }
- public AndroidClientEngine ClientEngineManager { get; set; }
-
- public static bool Finished = false;
- //int server_port = 34522;
-
- ActivityBroadcastReceiver broadcastReceiver;
-
- public EnvironmentEx.ConnectionState GetAppActualState()
- {
- return EnvironmentEx.APP_ACTUALSTATE;
- }
-
- protected override void OnCreate(Bundle bundle)
- {
- base.OnCreate(bundle);
-
- // Create your application here
- SetContentView(Resource.Layout.MainTab);
-
- InitializeTabs();
- InitializeClientEngine();
-
- RefrescandoServidores();
- }
-
- void InitializeTabs()
- {
- tab_clouds = AddTab("clouds", "Clouds", Resource.Drawable.ic_tab_artists_grey, typeof(MainCloudsActivity));
- tab_chat = AddTab("chat", "Chat", Resource.Drawable.ic_tab_artists_grey, typeof(MainChatActivity));
- tab_pm = AddTab("pm", "PM", Resource.Drawable.ic_tab_artists_grey, typeof(MainPMActivity));
- tab_users = AddTab("users", "Users", Resource.Drawable.ic_tab_artists_grey, typeof(MainUsersActivity));
- tab_log = AddTab("log", "Log", Resource.Drawable.ic_tab_artists_grey, typeof(LogActivity));
- tab_settings = AddTab("settings", "Settings", Resource.Drawable.ic_tab_artists_grey, typeof(MainSettingsActivity));
-
- TabHost.CurrentTab = 1;
- TabHost.TabChanged += TabHost_TabChanged;
- //TabWidget
- }
-
- public void InitializeClientEngine()
- {
- ClientEngineManager = new AndroidClientEngine();
- ClientEngineManager.ProcessReceivedMessage += ClientEngine_ProcessReceivedMessage;
- //ClientEngine.XlinkDebugMessage += ClientEngine_XlinkDebugMessage;
- ClientEngineManager.Start();
-
- //Lanzamos los canales
- ClientEngineProcessManager = new AndroidClientEngineProcess(ClientEngineManager);
- ClientEngineProcessManager.ClientDiscover();
-
- }
-
- void TabHost_TabChanged(object sender, TabHost.TabChangeEventArgs e)
- {
- if (e.TabId == "clouds")
- if (CloudsActivity != null)
- CloudsActivity.RefreshCount();
- else if (e.TabId == "users")
- {
- if (UsersActivity != null)
- UsersActivity.Refresh();
- }
- else if (e.TabId == "log")
- {
- //if (LogActivity != null)
- // LogActivity.ExecuteLogCache();
- }
- //AlertMessage.ShowAlert(this,e.TabId);
- }
-
- #region ClientEngine
-
- public AndroidClientEngine GetClientEngine()
- {
- return ClientEngineManager;
- }
-
- public AndroidClientEngineProcess GetClientEngineProcess()
- {
- return ClientEngineProcessManager;
- }
-
-
-
- void ClientEngine_ProcessReceivedMessage(xlink_msg msg)
- {
- if (msg != null)
- {
-
- switch (msg.msg_type)
- {
-
- case xlink_msg.xbs_xlink_message_type.SERVER_ACCEPT:
-
- SetMasterState(EnvironmentEx.ConnectionState.CloudDisconnected);
-
- EnvironmentEx.InsertLog("xlink_msg.xbs_xlink_message_type.SERVER_ACCEPT");
-
- break;
- case xlink_msg.xbs_xlink_message_type.SERVER_CHAT_MY_MESSAGE:
-
- //xlink_server_my_chat_message chat_my_message = new xlink_server_my_chat_message(msg);
- // ChatActivity.AppendMyText(chat_my_message._message);
- // EnvironmentEx.InsertChat(new ChatItem(chat_my_message));
-
-
- break;
- case xlink_msg.xbs_xlink_message_type.SERVER_CHAT_USER_MESSAGE:
-
- //xlink_server_user_chat_message chat_message = new xlink_server_user_chat_message(msg);
- //ChatActivity.AppendLineUsers(chat_message._username, chat_message._message);
-
- //EnvironmentEx.InsertChat(new ChatItem(chat_message));
-
- //EnvironmentEx.InsertLog(chat_message.data_msg);
-
- break;
-
- case xlink_msg.xbs_xlink_message_type.SERVER_CLOUD_CONNECT:
-
- break;
- case xlink_msg.xbs_xlink_message_type.SERVER_CLOUD_REFRESH:
- //Refrescamos la lista de servidores
-
- break;
- case xlink_msg.xbs_xlink_message_type.SERVER_DENIED:
- SetMasterState(EnvironmentEx.ConnectionState.Disconnected);
- break;
- case xlink_msg.xbs_xlink_message_type.SERVER_GET_FAVORITES:
- break;
- case xlink_msg.xbs_xlink_message_type.SERVER_INFO:
-
- xlink_server_info_message server_info_message = new xlink_server_info_message(msg);
- EnvironmentEx.XBSLINK_SERVER_NAME = server_info_message._server_version;
- EnvironmentEx.CLOUD_SERVER_IP = server_info_message._cloud_server_ip;
- EnvironmentEx.CLOUD_SERVER_PORT = server_info_message._cloud_server_port;
- EnvironmentEx.NICKNAME = server_info_message._nickname;
- EnvironmentEx.XBSLINK_SERVER_VERSION = server_info_message._server_version;
-
- if (SettingsActivity!=null)
- SettingsActivity.RefreshServerInfoConfiguration();
-
- EnvironmentEx.InsertLog(server_info_message.data_msg);
-
- break;
- case xlink_msg.xbs_xlink_message_type.SERVER_VOICE_CHAT_CREATE:
- break;
- case xlink_msg.xbs_xlink_message_type.SERVER_VOICE_CHAT_JOIN:
- break;
- case xlink_msg.xbs_xlink_message_type.SERVER_START:
-
- SetMasterState(EnvironmentEx.ConnectionState.CloudConnected);
-
- EnvironmentEx.InsertLog("SERVER_START");
-
- break;
- case xlink_msg.xbs_xlink_message_type.SERVER_STOP:
-
- SetMasterState(EnvironmentEx.ConnectionState.Disconnected);
-
- EnvironmentEx.InsertLog("SERVER_STOP");
-
- break;
-
- case xlink_msg.xbs_xlink_message_type.SERVER_ADD_CLOUD:
-
- xlink_server_create_cloud_message cloud_added = new xlink_server_create_cloud_message(msg);
- EnvironmentEx.CloudAdd(new CloudsItem(cloud_added._name,
- cloud_added._node_count,
- cloud_added._max_nodes,
- cloud_added._isPrivate));
-
- if (CloudsActivity != null)
- CloudsActivity.RefreshCount();
-
- EnvironmentEx.InsertLog(cloud_added.data_msg);
-
- //SetMasterState(EnvironmentEx.ConnectionState.Disconnected);
-
- break;
- case xlink_msg.xbs_xlink_message_type.SERVER_PM_MY:
- xlink_server_my_pm_message my_pm = new xlink_server_my_pm_message(msg);
- EnvironmentEx.PMAdd(my_pm._tousername);
-
- EnvironmentEx.InsertLog(my_pm.data_msg);
-
- break;
- case xlink_msg.xbs_xlink_message_type.SERVER_PM_USER:
- xlink_server_my_pm_message user_pm = new xlink_server_my_pm_message(msg);
- EnvironmentEx.PMAdd(user_pm._tousername);
- EnvironmentEx.InsertLog(user_pm.data_msg);
-
- break;
-
- case xlink_msg.xbs_xlink_message_type.SERVER_USER_ONLINE:
- xlink_server_user_online_message user_online = new xlink_server_user_online_message(msg);
-
- EnvironmentEx.UserAdd (user_online);
-
- if (UsersActivity != null)
- UsersActivity.Refresh();
-
- EnvironmentEx.InsertLog(user_online.data_msg);
-
- break;
-
- case xlink_msg.xbs_xlink_message_type.SERVER_USER_OFFLINE:
-
- xlink_server_user_offline_message user_offline = new xlink_server_user_offline_message(msg);
- EnvironmentEx.UserDelete(user_offline._username);
-
- if (UsersActivity != null)
- UsersActivity.Refresh();
-
- EnvironmentEx.InsertLog(user_offline.data_msg);
-
- break;
-
- default:
- break;
- }
-
- }
- }
-
- #endregion
-
- #region ClientEngineActions
-
- void CloudListViewFill(xbs_cloud[] data)
- {
- if (data.Length > 0)
- {
- SetDefaultTab(0);
- MainCloudsActivity mn = (MainCloudsActivity) GetActivityByTabTag ("clouds");
- mn.ClearGrid();
- foreach (var item in data)
- EnvironmentEx.CloudAdd(new CloudsItem(item));
- }
-
- }
-
- #endregion
-
- protected override void OnResume()
- {
- base.OnResume();
- //RegisterReceiver(broadcastReceiver,
- // new IntentFilter(ACTION_NEW_TWEETS));
- }
- protected override void OnPause()
- {
- UnregisterReceiver(broadcastReceiver);
- base.OnPause();
- }
-
-
- public class ActivityBroadcastReceiver : BroadcastReceiver
- {
- public event Action<Context, Intent> Receive;
- public override void OnReceive(Context context, Intent intent)
- {
- if (this.Receive != null)
- this.Receive(context, intent);
- }
- }
-
-
- }
-}
View
216 XBSlink.Android/MainChatActivity.cs
@@ -1,216 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Android.App;
-using Android.Content;
-using Android.Graphics;
-using Android.OS;
-using Android.Runtime;
-using Android.Text;
-using Android.Text.Method;
-using Android.Text.Style;
-using Android.Views;
-using Android.Widget;
-using Java.Lang;
-
-namespace XBSlink.Android
-{
- [Activity(Label = "Chat : XBSLink")]
- public class MainChatActivity : MasterTab
- {
-
- TextView txtChatGeneral;
- EditText txtChatMessage;
- ScrollView chat_ScrollView;
-
- string chatText ="";
-
- public bool isTime = false;
-
- System.Threading.Thread LogThread;
-
- public void AppendLineSystem(string text)
- {
- AppendLine(text, true, Color.Green);
- }
-
- public void AppendLineUsers(string UserName, string text)
- {
- AppendLine(System.String.Format("[{0}] >> {1}", UserName, text), Color.Red);
- }
-
- public void AppendMyText(string text)
- {
- AppendLine(text,true, Color.Black);
- }
-
-
- protected override void OnCreate(Bundle bundle)
- {
- base.OnCreate(bundle);
- SetContentView(Resource.Layout.MainTabChat);
-
- _mainActivity.ChatActivity = this;
-
- chatText = "";
- chat_ScrollView = (ScrollView)FindViewById(Resource.Id.chat_ScrollView);
- txtChatGeneral = (TextView)chat_ScrollView.FindViewById(Resource.Id.txtChatGeneral);
- txtChatMessage = (EditText)FindViewById(Resource.Id.txtChatMessage);
-
- AppendLineSystem(System.String.Format("Welcome to XBSLink chat.{0}=================={0}{0}{0}", System.Environment.NewLine));
- //AppendLineUsers("magurin", "Pues el otro dia me fui de guarrillas!");
-
- Button btnChatSend = FindViewById<Button>(Resource.Id.btnChatSend);
- btnChatSend.Click += delegate
- {
- AppendMyText(txtChatMessage.Text);
- chat_ScrollView.Post(new MyRunnable(chat_ScrollView));
-
- _mainActivity.ClientEngineProcessManager.ClientSendChatMessage(txtChatMessage.Text);
-
- txtChatMessage.Text = "";
- };
-