Esempio n. 1
0
gapi_boolean
gapi_publisherQos_free (
    void *object)
{
    gapi_publisherQos *o = (gapi_publisherQos *)object;

    gapi_free (o->partition.name._buffer);
    gapi_free (o->group_data.value._buffer);
    return TRUE;
}
Esempio n. 2
0
gapi_boolean
gapi_dataReaderQos_free (
    void *object)
{
    gapi_dataReaderQos *o = (gapi_dataReaderQos *)object;

    gapi_free (o->user_data.value._buffer);
    gapi_free (o->subscription_keys.key_list._buffer);
    gapi_free (o->share.name);
    return TRUE;
}
Esempio n. 3
0
gapi_boolean
gapi_subscriberQos_free (
    void *object)
{
    gapi_subscriberQos *o = (gapi_subscriberQos *)object;

    gapi_free (o->partition.name._buffer);
    gapi_free (o->group_data.value._buffer);
    gapi_free (o->share.name);
    return TRUE;
}
Esempio n. 4
0
gapi_boolean
gapi_topicBuiltinTopicData_free (
    void *object)
{
    gapi_topicBuiltinTopicData *o = (gapi_topicBuiltinTopicData *)object;

    gapi_free (o->name);
    gapi_free (o->type_name);
    gapi_free (o->topic_data.value._buffer);
    return TRUE;
}
void
_TopicDescriptionDispose (
    _TopicDescription topicDescription)
{
    gapi_free (topicDescription->topic_name);
    gapi_free (topicDescription->type_name);
    q_dispose(topicDescription->expr);
    topicDescription->topic_name   = NULL;
    topicDescription->type_name    = NULL;
    topicDescription->expr         = NULL;

    _EntityDispose(_Entity(topicDescription));
}
Esempio n. 6
0
/*     ReturnCode_t
 *     update( );
 */
gapi_returnCode_t
gapi_errorInfo_update (
    gapi_errorInfo _this)
{
    gapi_returnCode_t result;
    _ErrorInfo    info;
    os_reportInfo *osInfo;

    info = gapi_errorInfoClaim(_this, &result);
    if ( info != NULL ) {
        osInfo = os_reportGetApiInfo();
        if (osInfo != NULL) {
            if (info->source_line != NULL) {
                gapi_free(info->source_line);
                info->source_line = NULL;
            }
            if (osInfo->sourceLine != NULL) {
                info->source_line = gapi_string_dup(osInfo->sourceLine);
            }
            if (info->stack_trace != NULL) {
                gapi_free(info->stack_trace);
                info->stack_trace = NULL;
            }
            if (osInfo->callStack != NULL) {
                info->stack_trace = gapi_string_dup(osInfo->callStack);
            }
            if (info->message != NULL) {
                gapi_free(info->message);
                info->message = NULL;
            }
            if (osInfo->description != NULL) {
                info->message = gapi_string_dup(osInfo->description);
            }
            if (info->location != NULL) {
                gapi_free(info->location);
                info->location = NULL;
            }
            if (osInfo->reportContext != NULL) {
                info->location = gapi_string_dup(osInfo->reportContext);
            }
            info->code = MapUserErrorInfoCode(osInfo->reportCode);
            info->valid = TRUE;
        } else {
            info->valid = FALSE;
            result = GAPI_RETCODE_NO_DATA;
        }
        _EntityRelease(info);
    }
    return result;
}
Esempio n. 7
0
/**
 * Class:     org_opensplice_dds_dcps_DataWriterImpl
 * Method:    jniGetOfferedIncompatibleQosStatus
 * Signature: ()LDDS/OfferedIncompatibleQosStatus;
 */
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniGetOfferedIncompatibleQosStatus)(
    JNIEnv *env,
    jobject jdataWriter,
    jobject jstatusHolder)
{
    gapi_dataWriter dataWriter;
    jobject jstatus;
    gapi_offeredIncompatibleQosStatus* status;
    saj_returnCode rc;
    gapi_returnCode_t result;

    if(jstatusHolder){
        dataWriter = (gapi_dataWriter) saj_read_gapi_address(env, jdataWriter);
        status = gapi_offeredIncompatibleQosStatus_alloc();
        result = gapi_dataWriter_get_offered_incompatible_qos_status(dataWriter, status);

        if(result == GAPI_RETCODE_OK){
            rc = saj_statusCopyOutOfferedIncompatibleQosStatus(env, status, &jstatus);

            if(rc == SAJ_RETCODE_OK){
                (*env)->SetObjectField(env, jstatusHolder,
                            GET_CACHED(offeredIncompatibleQosStatusHolder_value_fid), jstatus);
                (*env)->DeleteLocalRef(env, jstatus);
            } else {
                result = GAPI_RETCODE_ERROR;
            }
        }
        gapi_free(status);
    } else {
        result = GAPI_RETCODE_BAD_PARAMETER;
    }
    return (jint)result;
}
Esempio n. 8
0
/**
 * Class:     org_opensplice_dds_dcps_MultiTopicImpl
 * Method:    jniSetExpressionParameters
 * Signature: ([Ljava/lang/String;)I
 */
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniSetExpressionParameters)(
    JNIEnv *env,
    jobject jmultiTopic,
    jobjectArray jexprArray)
{
    gapi_multiTopic multiTopic;
    gapi_stringSeq *seq;
    saj_returnCode rc;
    jint jresult;
    
    multiTopic = (gapi_multiTopic) saj_read_gapi_address(env, jmultiTopic);
    jresult = (jint)GAPI_RETCODE_BAD_PARAMETER;
    
    rc = SAJ_RETCODE_OK;
    seq = gapi_stringSeq__alloc();

    if(jexprArray != NULL){
        rc = saj_stringSequenceCopyIn(env, jexprArray, seq);
    }
        
    if(rc == SAJ_RETCODE_OK){
        jresult = (jint)gapi_multiTopic_set_expression_parameters(
                                                            multiTopic, seq);
        
    }
    gapi_free(seq);
    
    return jresult;
}
Esempio n. 9
0
/**
 * Class:     org_opensplice_dds_dcps_PublisherImpl
 * Method:    jniGetDefaultDatawriterQos
 * Signature: (LDDS/DataWriterQosHolder;)V
 */
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniGetDefaultDatawriterQos)(
    JNIEnv *env,
    jobject jpublisher,
    jobject jqosHolder)
{
    saj_returnCode rc;
    gapi_returnCode_t result;
    jobject jqos;
    gapi_publisher publisher;
    gapi_dataWriterQos *qos;
    
    jqos = NULL;
    
    if(jqosHolder != NULL){
        qos = gapi_dataWriterQos__alloc();
        publisher = (gapi_publisher)saj_read_gapi_address(env, jpublisher);
        result = gapi_publisher_get_default_datawriter_qos(publisher, qos); 
        
        if(result == GAPI_RETCODE_OK){
            rc = saj_DataWriterQosCopyOut(env, qos, &jqos);
            gapi_free(qos);
        
            if (rc == SAJ_RETCODE_OK){
                (*env)->SetObjectField(env, jqosHolder, 
                                       GET_CACHED(dataWriterQosHolder_value_fid), jqos);
            } else {
                result = GAPI_RETCODE_ERROR;
            }
        }
    } else {
        result = GAPI_RETCODE_BAD_PARAMETER;
    }
    return (jint)result;
}
Esempio n. 10
0
/*     ReturnCode_t
 *     set_query_parameters(
 *         in StringSeq query_parameters);
 */
gapi_returnCode_t
gapi_queryCondition_set_query_parameters(
    gapi_queryCondition _this,
    const gapi_stringSeq *query_parameters)
{
    gapi_returnCode_t   result         = GAPI_RETCODE_OK;
    _QueryCondition     querycondition = (_QueryCondition)_this;

    querycondition = gapi_queryConditionClaim(_this, &result);

    if (querycondition != NULL && gapi_sequence_is_valid(query_parameters)) {
         u_query uQuery = ((_ReadCondition)querycondition)->uQuery;

         result = gapi_expressionSetQueryArgs(querycondition->expression,
                                              uQuery,
                                              query_parameters);

        if (result == GAPI_RETCODE_OK) {
            /* Store new params for later retrieval */
            gapi_free(querycondition->query_parameters);
            querycondition->query_parameters = gapi_stringSeq_dup(query_parameters);
        }
    } else {
        result = GAPI_RETCODE_BAD_PARAMETER;
    }

    _EntityRelease(querycondition);

    return result;
}
Esempio n. 11
0
/*
 * Class:     org_opensplice_dds_dcps_PublisherImpl
 * Method:    jniWaitForAcknowledgments
 * Signature: (LDDS/Duration_t;)I
 */
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniWaitForAcknowledgments)(
    JNIEnv *env, 
    jobject jpublisher, 
    jobject jduration)
{
    gapi_publisher publisher;
    gapi_duration_t* duration;
    saj_returnCode rc;
    gapi_returnCode_t result;
    
    publisher = (gapi_publisher)saj_read_gapi_address(env, jpublisher);    
    
    if(jduration != NULL){
        duration = gapi_duration_t__alloc();
        rc = saj_durationCopyIn(env, jduration, duration);
    
        if(rc == SAJ_RETCODE_OK){
            result = gapi_publisher_wait_for_acknowledgments(publisher, duration);
        } else {
            result = GAPI_RETCODE_ERROR;
        }
        gapi_free(duration);
    } else {
        result = GAPI_RETCODE_BAD_PARAMETER;
    }    
    return (jint)result;
}
Esempio n. 12
0
void
DDS_free (
    void *a
)
{
    gapi_free(a);
}
Esempio n. 13
0
/**
 * Class:     org_opensplice_dds_dcps_DataReaderViewImpl
 * Method:    jniGetQos
 * Signature: (LDDS/DataReaderViewQosHolder;)V
 */
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniGetQos)(
    JNIEnv *env,
    jobject jdataReaderView,
    jobject jqosHolder)
{
    gapi_dataReaderViewQos* qos;
    gapi_returnCode_t result;
    saj_returnCode rc;
    jobject jqos;
    gapi_dataReaderView dataReaderView;

    if(jqosHolder != NULL){
        dataReaderView = (gapi_dataReaderView)saj_read_gapi_address(env, jdataReaderView);
        jqos = NULL;
        qos = gapi_dataReaderViewQos__alloc();
        result = gapi_dataReaderView_get_qos(dataReaderView, qos);

        if(result == GAPI_RETCODE_OK){
            rc = saj_DataReaderViewQosCopyOut(env, qos, &jqos);
            gapi_free(qos);

            if(rc == SAJ_RETCODE_OK){
                (*env)->SetObjectField(env, jqosHolder,
                        GET_CACHED(dataReaderViewQosHolder_value_fid), jqos);
                (*env)->DeleteLocalRef(env, jqos);
            } else {
                result = GAPI_RETCODE_ERROR;
            }
        }
    } else {
        result = GAPI_RETCODE_BAD_PARAMETER;
    }
    return (jint)result;
}
Esempio n. 14
0
/*     ReturnCode_t
 *     get_message(
 *         out String message);
 */
gapi_returnCode_t
gapi_errorInfo_get_message(
    gapi_errorInfo _this,
    gapi_string *message)
{
    gapi_returnCode_t result = GAPI_RETCODE_OK;
    _ErrorInfo errorinfo;

    errorinfo = gapi_errorInfoClaim(_this, &result);

    if (errorinfo->valid) {
        if (*message != NULL) {
            gapi_free(*message);
        }
        if (errorinfo->message != NULL) {
            (*message) = gapi_string_dup(errorinfo->message);
        } else {
            (*message) = NULL;
        }
    } else {
        result = GAPI_RETCODE_NO_DATA;;
    }

    _EntityRelease(errorinfo);

    return result;
}
Esempio n. 15
0
static void
userDataQosPolicyCopyout (
    const struct v_userDataPolicy *src,
    gapi_userDataQosPolicy        *dst)
{
    unsigned long len = c_arraySize(src->value);

    if ( dst->value._maximum > 0 ) {
        if ( len != dst->value._maximum ) {
            if ( dst->value._release ) {
                gapi_free(dst->value._buffer);
            }
            dst->value._maximum = 0;
            dst->value._length  = 0;
            dst->value._buffer  = NULL;
        }
    }

    if ( len > 0 ) {
        if ( dst->value._length == 0 ) {
            if ( dst->value._maximum == 0 ) {
                dst->value._buffer  = gapi_octetSeq_allocbuf(len) ;
                dst->value._maximum = len;
                dst->value._length  = 0;
                dst->value._release = TRUE;
            }

            if ( dst->value._maximum >= len ) {
                memcpy(dst->value._buffer, src->value, len);
            }
        }
    }

    dst->value._length = len;
}
Esempio n. 16
0
gapi_returnCode_t
_QueryConditionFree(
    _QueryCondition querycondition)
{
    gapi_returnCode_t result = GAPI_RETCODE_OK;

    gapi_free(querycondition->query_expression);
    gapi_free(querycondition->query_parameters);

    if (querycondition->expression) {
        gapi_expressionFree(querycondition->expression);
    }

    _ReadConditionDispose(_ReadCondition(querycondition));

    return result;
}
Esempio n. 17
0
gapi_boolean
gapi_topicQos_free (
    void *object)
{
    gapi_topicQos *o = (gapi_topicQos *)object;

    gapi_free (o->topic_data.value._buffer);
    return TRUE;
}
Esempio n. 18
0
void
gapi_string_clean (
    gapi_char **string)
{
    if ((string != NULL) && (*string != NULL)) {
        gapi_free (*string);
        *string = NULL;
    }
}
Esempio n. 19
0
gapi_boolean
gapi_participantBuiltinTopicData_free (
    void *object)
{
    gapi_participantBuiltinTopicData *o = (gapi_participantBuiltinTopicData *)object;

    gapi_free (o->user_data.value._buffer);
    return TRUE;
}
Esempio n. 20
0
gapi_boolean
gapi_dataReaderViewQos_free (
    void *object)
{
    gapi_dataReaderViewQos *o = (gapi_dataReaderViewQos *)object;

    gapi_free (o->view_keys.key_list._buffer);
    return TRUE;
}
Esempio n. 21
0
gapi_boolean
gapi_domainParticipantQos_free (
    void *object)
{
    gapi_domainParticipantQos *o = (gapi_domainParticipantQos *)object;

    gapi_free (o->user_data.value._buffer);
    return TRUE;
}
Esempio n. 22
0
gapi_boolean
gapi_dataWriterQos_free (
    void *object)
{
    gapi_dataWriterQos *o = (gapi_dataWriterQos *)object;

    gapi_free (o->user_data.value._buffer);
    return TRUE;
}
Esempio n. 23
0
gapi_returnCode_t
gapi_publisher_set_qos (
    gapi_publisher _this,
    const gapi_publisherQos *qos)
{
    gapi_returnCode_t result = GAPI_RETCODE_OK;
    u_result uResult;
    _Publisher publisher;
    v_publisherQos publisherQos;
    gapi_context context;
    gapi_publisherQos *existing_qos;

    GAPI_CONTEXT_SET(context, _this, GAPI_METHOD_SET_QOS);

    publisher = gapi_publisherClaim(_this, &result);

    if ( publisher && qos ) {
        result = gapi_publisherQosIsConsistent(qos, &context);
    } else {
        result = GAPI_RETCODE_BAD_PARAMETER;
    }

    if ((result == GAPI_RETCODE_OK ) && (_EntityEnabled(publisher))) {
        existing_qos = gapi_publisherQos__alloc();
        uResult = _PublisherGetQos(publisher, existing_qos);
        result = kernelResultToApiResult(uResult);
        if(result == GAPI_RETCODE_OK)
        {
            result = gapi_publisherQosCheckMutability(
                     qos,
                     existing_qos,
                     &context);
        }
        gapi_free(existing_qos);
    }

    if ( result == GAPI_RETCODE_OK ) {
        publisherQos = u_publisherQosNew(NULL);
        if (publisherQos) {
            if ( copyPublisherQosIn(qos, publisherQos) ) {
                uResult = u_entitySetQoS(_EntityUEntity(publisher),
                                         (v_qos)(publisherQos) );
                result = kernelResultToApiResult(uResult);
                u_publisherQosFree(publisherQos);
            } else {
                result = GAPI_RETCODE_OUT_OF_RESOURCES;
            }
        } else {
            result = GAPI_RETCODE_OUT_OF_RESOURCES;
        }
    }

    _EntityRelease(publisher);

    return result;
}
Esempio n. 24
0
/*
 * Class:     org_opensplice_dds_dcps_FooTypeSupportImpl
 * Method:    jniFree
 * Signature: (Ljava/lang/Object;)I
 */
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniFree) (
    JNIEnv *env,
    jclass object,
    jobject TypeSupport)
{
    gapi_free ((gapi_fooTypeSupport)saj_read_gapi_address (env, TypeSupport));

    return GAPI_RETCODE_OK;
}
Esempio n. 25
0
/**
 * Class:     DDS_WaitSet
 * Method:    jniWait
 * Signature: (LDDS/ConditionSeqHolder;LDDS/Duration_t;)I
 */
JNIEXPORT jint JNICALL
SAJ_FUNCTION(jniWait)(
    JNIEnv *env,
    jobject jwaitSet,
    jobject jseqHolder,
    jobject jduration)
{
    gapi_waitSet waitSet;
    gapi_conditionSeq *conditionSeq;
    gapi_duration_t duration;
    jobjectArray jConditionSeq;
    saj_returnCode rc;
    gapi_returnCode_t result;
    
    if(jseqHolder != NULL){
        jConditionSeq = NULL;
        waitSet = (gapi_waitSet) saj_read_gapi_address(env, jwaitSet);
        rc = saj_durationCopyIn(env, jduration, &duration);
        
        if(rc == SAJ_RETCODE_OK){
            conditionSeq = gapi_conditionSeq__alloc();
            
            if(conditionSeq){
                conditionSeq->_maximum = 0;
                conditionSeq->_length = 0;
                conditionSeq->_release = 0;
                conditionSeq->_buffer = NULL;
            
                result = gapi_waitSet_wait(waitSet, conditionSeq, &duration);

                if((result == GAPI_RETCODE_OK) || (result == GAPI_RETCODE_TIMEOUT)){
                    rc = saj_LookupExistingConditionSeq(env, conditionSeq, &jConditionSeq);
                
                    if ( rc == SAJ_RETCODE_OK){
                        (*env)->SetObjectField(
                            env, 
                            jseqHolder,
                            GET_CACHED(conditionSeqHolder_value_fid),
                            jConditionSeq);
                    } else {
                        result = GAPI_RETCODE_ERROR;
                    }
                }
                gapi_free(conditionSeq);
            } else {
                result = GAPI_RETCODE_OUT_OF_RESOURCES;
            }
        } else {
            result = GAPI_RETCODE_ERROR;
        }
    } else {
        result = GAPI_RETCODE_BAD_PARAMETER;
    }
    return (jint)result;
}
Esempio n. 26
0
static gapi_boolean
gapi_offeredIncompatibleQosStatus_free (
    void *object)
{
    gapi_offeredIncompatibleQosStatus *o;

    o = (gapi_offeredIncompatibleQosStatus *) object;

    gapi_free(o->policies._buffer);
    return TRUE;
}
Esempio n. 27
0
/**
 * Class:     org_opensplice_dds_dcps_DataReaderViewImpl
 * Method:    jniCreateQuerycondition
 * Signature: (IIILjava/lang/String;[Ljava/lang/String;)LDDS/QueryCondition;
 */
JNIEXPORT jobject JNICALL
SAJ_FUNCTION(jniCreateQuerycondition)(
    JNIEnv *env,
    jobject jdataReaderView,
    jint jsampleStates,
    jint jviewStates,
    jint jinstanceStates,
    jstring jexpression,
    jobjectArray jparams)
{
    jobject jcondition;
    gapi_dataReaderView dataReaderView;
    gapi_queryCondition condition;
    gapi_stringSeq* params;
    saj_returnCode rc;
    gapi_char* expression;

    jcondition = NULL;
    condition = GAPI_OBJECT_NIL;
    expression = NULL;

    dataReaderView = (gapi_dataReaderView) saj_read_gapi_address(env, jdataReaderView);
    rc = SAJ_RETCODE_OK;
    params = gapi_stringSeq__alloc();

    if(jparams != NULL){
        rc = saj_stringSequenceCopyIn(env, jparams, params);
    }

    if(rc == SAJ_RETCODE_OK){
        if(jexpression != NULL){
            expression = (gapi_char*)(*env)->GetStringUTFChars(env, jexpression, 0);
        }
        condition = gapi_dataReaderView_create_querycondition(
                                dataReaderView,
                                (const gapi_sampleStateMask)jsampleStates,
                                (const gapi_viewStateMask)jviewStates,
                                (const gapi_instanceStateMask)jinstanceStates,
                                expression,
                                params);

        if(jexpression != NULL){
            (*env)->ReleaseStringUTFChars(env, jexpression, expression);
        }
        if (condition != GAPI_OBJECT_NIL){
            rc = saj_construct_java_object(env,
                                        PACKAGENAME "QueryConditionImpl",
                                        (PA_ADDRCAST)condition, &jcondition);
        }
    }
    gapi_free(params);

    return jcondition;
}
Esempio n. 28
0
static gapi_boolean
copySubscriberQosOut (
    const v_subscriberQos  srcQos,
    gapi_subscriberQos *dstQos)
{
    assert(srcQos);
    assert(dstQos);

    if ( dstQos->group_data.value._maximum > 0 ) {
        if ( dstQos->group_data.value._release ) {
            gapi_free(dstQos->group_data.value._buffer);
        }
    }

    if ( (srcQos->groupData.size > 0) && srcQos->groupData.value ) {
        dstQos->group_data.value._buffer = gapi_octetSeq_allocbuf(srcQos->groupData.size);
        if ( dstQos->group_data.value._buffer ) {
            dstQos->group_data.value._maximum = srcQos->groupData.size;
            dstQos->group_data.value._length  = srcQos->groupData.size;
            dstQos->group_data.value._release = TRUE;
            memcpy(dstQos->group_data.value._buffer,
                   srcQos->groupData.value,
                   srcQos->groupData.size);
        }
    } else {
            dstQos->group_data.value._maximum = 0;
            dstQos->group_data.value._length  = 0;
            dstQos->group_data.value._release = FALSE;
            dstQos->group_data.value._buffer = NULL;
    }


    gapi_string_to_StringSeq(srcQos->partition,",",&dstQos->partition.name);

    dstQos->presentation.access_scope    =
            srcQos->presentation.access_scope;
    dstQos->presentation.coherent_access =
            srcQos->presentation.coherent_access;
    dstQos->presentation.ordered_access  =
            srcQos->presentation.ordered_access;
    dstQos->entity_factory.autoenable_created_entities =
            srcQos->entityFactory.autoenable_created_entities;

    if ( srcQos->share.enable ) {
        dstQos->share.enable = TRUE;
        dstQos->share.name = gapi_strdup(srcQos->share.name);
    } else {
        dstQos->share.enable = FALSE;
        dstQos->share.name   = NULL;
    }

    return TRUE;
}
Esempio n. 29
0
void
gapi_string_replace (
    gapi_char *src,
    gapi_char **dst)
{
    gapi_free (*dst);
    if (src) {
        *dst = gapi_string_dup (src);
    } else {
        *dst = NULL;
    }
}
Esempio n. 30
0
gapi_returnCode_t
gapi_dataReader_set_qos (
    gapi_dataReader _this,
    const gapi_dataReaderQos *qos)
{
    gapi_returnCode_t result = GAPI_RETCODE_OK;
    u_result uResult;
    _DataReader dataReader;
    v_readerQos dataReaderQos;
    gapi_context context;

    GAPI_CONTEXT_SET(context, _this, GAPI_METHOD_SET_QOS);

    dataReader = gapi_dataReaderClaim(_this, &result);

    if ( dataReader ) {
        if ( qos ) {
            result = gapi_dataReaderQosIsConsistent(qos, &context);
        } else {
            result = GAPI_RETCODE_BAD_PARAMETER;
        }
    }

    if (( result == GAPI_RETCODE_OK )  && (_EntityEnabled(dataReader))){
        gapi_dataReaderQos * existing_qos = gapi_dataReaderQos__alloc();

        result = gapi_dataReaderQosCheckMutability(qos,
                                                   _DataReaderGetQos(dataReader,
                                                                     existing_qos),
                                                   &context);
        gapi_free(existing_qos);
    }

    if ( result == GAPI_RETCODE_OK ) {
        dataReaderQos = u_readerQosNew(NULL);
        if (dataReaderQos) {
            if ( gapi_kernelReaderQosCopyIn(qos, dataReaderQos) ) {
                uResult = u_entitySetQoS(_EntityUEntity(dataReader),
                                         (v_qos)(dataReaderQos) );
                result = kernelResultToApiResult(uResult);
                u_readerQosFree(dataReaderQos);
            } else {
                result = GAPI_RETCODE_OUT_OF_RESOURCES;
            }
        } else {
            result = GAPI_RETCODE_OUT_OF_RESOURCES;
        }
    }

    _EntityRelease(dataReader);

    return result;
}