blob: 6006a74347922e6c882c01590882b009573aa9f6 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
*Licensed to the Apache Software Foundation (ASF) under one
*or more contributor license agreements. See the NOTICE file
*distributed with this work for additional information
*regarding copyright ownership. The ASF licenses this file
*to you under the Apache License, Version 2.0 (the
*"License"); you may not use this file except in compliance
*with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*Unless required by applicable law or agreed to in writing,
*software distributed under the License is distributed on an
*"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
*specific language governing permissions and limitations
*under the License.
-->
<scr:component enabled="true" name="example.activator" xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
<implementation class="{componentName}_{createName}">
<!--
class points to the constructor function of the component.
It's signature has to be: celix_status_t {compontenName_create}(void **instance);
In this function {instance} is a return pointer to some data object representing the instance of the component.
This pointer will be supplied as first argument to all calls made to the component.
-->
</implementation>
<property name="{propName}">{textValue}</property>
<service>
<provide interface="{ServiceName1}" getter="{componentName}_{serviceGetter}"/>
<provide interface="{ServiceName2}" getter="{componentName}_{serviceGetter}"/>
<provide interface="{ServiceName3}" getter="{componentName}_{serviceGetter}"/>
<provide interface="{ServiceName4}" getter="{componentName}_{serviceGetter}"/>
<!--
This is where we have a problem. Within Celix a service isn't simply an interface that can be registered.
The user has to create a struct instance with function pointers.
A possible solution is to let the user implement a function which return this struct instance.
-->
</service>
<reference
name="{ReferenceName}"
interface="{ServiceName1}"
target="{someFilter}"
bind="{componentName}_{bindName}"
unbind="myComponent_{unbindName}"/>
<reference
name="{ReferenceName}"
interface="{ServiceName2}"
target="{someFilter}"
bind="{componentName}_{bindName}"
unbind="myComponent_{unbindName}"/>
<reference
name="{ReferenceName}"
interface="{ServiceName3}"
target="{someFilter}"
bind="{componentName}_{bindName}"
unbind="myComponent_{unbindName}"/>
</scr:component>