Commits

Christian Krebs committed 9aca5ca

Incorporated more review feedback

Comments (0)

Files changed (4)

templates/js/get_message_maps.js

 window.cls || (window.cls = {});
-window.cls.GetMessageMaps = function (){};
+window.cls.ScopeInterfaceGenerator = function (){};
 
 /* static interface */
-window.cls.GetMessageMaps.pretty_print_map = function(map){};
+window.cls.ScopeInterfaceGenerator.pretty_print_interface = function(map){};
 
-window.cls.GetMessageMaps = function ()
+window.cls.ScopeInterfaceGenerator = function ()
 {
 
   /* interface */
-  this.get_maps = function(service_descriptions, onsuccess, onerror, should_get_messages){};
+  this.get_interface = function(service_descriptions, onsuccess, onerror, should_get_messages){};
   
   /* constants */
   const 
 
   /* implementation */
   
-  this.get_maps = function(service_descriptions, onsuccess, onerror, should_get_messages)
+  this.get_interface = function(service_descriptions, onsuccess, onerror, should_get_messages)
   {
     /**
       * service_descriptions must be a dictonary of services. 
 // pretty print message maps
 // =========================
   
-window.cls.GetMessageMaps.pretty_print_map = function(map)
+window.cls.ScopeInterfaceGenerator.pretty_print_interface = function(map)
 {
   var pp_map = this._pretty_print_object('', map, 0, ['message map =']);
   window.open("data:text/plain," + encodeURIComponent(pp_map.join('\n')));
 };
 
-window.cls.GetMessageMaps._pretty_print_object = 
+window.cls.ScopeInterfaceGenerator._pretty_print_object = 
 function(name, obj, indent, print_list, circular_check_list)
 {
   circular_check_list = circular_check_list && circular_check_list.slice(0) || [];
   return print_list;
 };
 
-window.cls.GetMessageMaps._get_indent_string = function(level, indent)
+window.cls.ScopeInterfaceGenerator._get_indent_string = function(level, indent)
 {
   return new Array(level).join(indent || '  ');
 };
 
-window.cls.GetMessageMaps._quote = function(value, token)
+window.cls.ScopeInterfaceGenerator._quote = function(value, token)
 {
   return value ? (/^\d+$/.test(value) ?  value : '"' + value + '"') + (token || '') : '';
 }

templates/js/js-build_application.mako

   var on_host_info_callback = function(service_descriptions)
   {
     % if create_test_framework:
-    new window.cls.GetMessageMaps().get_maps(service_descriptions, 
+    new window.cls.ScopeInterfaceGenerator().get_interface(service_descriptions, 
       function(map)
       {
         window.message_maps = map;

templates/js/js-client-html.mako

     <input 
       type="button" 
       value="Show message map" 
-      onclick="window.cls.GetMessageMaps.pretty_print_map(window.message_maps)"
+      onclick="window.cls.ScopeInterfaceGenerator.pretty_print_interface(window.message_maps)"
     >
     </div>
   </div>

templates/js/js-service-base.mako

   * @constructor 
   */
 
-window.cls.ServiceBase = function ServiceBase()
+window.cls.ServiceBase = function ()
 {
   // singleton
-  if(ServiceBase.instance)
+  if(cls.ServiceBase.instance)
   {
-    return ServiceBase.instance;
+    return cls.ServiceBase.instance;
   }
-  ServiceBase.instance = this;
+  cls.ServiceBase.instance = this;
 
   window.cls.MessageMixin.apply(this); // mix in message handler behaviour.
 
       }
     };
 
-  }).apply(ServiceBase);
+  }).apply(cls.ServiceBase);
 
 };