sdbus++: skip emitting readonly set-property callback

Properties with the 'readonly' and 'const' flag already skip
registering the callback with sdbus, but were still emitting
the function.  Skip emitting the function (and associated forward
declaration) to avoid the wasted space.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I0afd921a0bb0b7647ef1ca189f46cd4489547cd0
diff --git a/tools/sdbusplus/templates/interface.server.hpp.mako b/tools/sdbusplus/templates/interface.server.hpp.mako
index f8817df..aa30ebb 100644
--- a/tools/sdbusplus/templates/interface.server.hpp.mako
+++ b/tools/sdbusplus/templates/interface.server.hpp.mako
@@ -155,10 +155,12 @@
         static int _callback_get_${p.name}(
             sd_bus*, const char*, const char*, const char*,
             sd_bus_message*, void*, sd_bus_error*);
+        % if 'const' not in p.flags and 'readonly' not in p.flags:
         /** @brief sd-bus callback for set-property '${p.name}' */
         static int _callback_set_${p.name}(
             sd_bus*, const char*, const char*, const char*,
             sd_bus_message*, void*, sd_bus_error*);
+        % endif
 
     % endfor
 
diff --git a/tools/sdbusplus/templates/property.prototype.hpp.mako b/tools/sdbusplus/templates/property.prototype.hpp.mako
index 7780d6e..c1aa4ac 100644
--- a/tools/sdbusplus/templates/property.prototype.hpp.mako
+++ b/tools/sdbusplus/templates/property.prototype.hpp.mako
@@ -82,6 +82,8 @@
 {
     return ${property.camelCase}(val, false);
 }
+
+% if 'const' not in property.flags and 'readonly' not in property.flags:
 int ${classname}::_callback_set_${property.name}(
         sd_bus* /*bus*/, const char* /*path*/, const char* /*interface*/,
         const char* /*property*/, sd_bus_message* value, void* context,
@@ -116,6 +118,7 @@
 
     return true;
 }
+% endif
 
 namespace details
 {