예제 #1
0
Transaction MixClient::replaceGas(Transaction const& _t, Secret const& _secret, u256 const& _gas)
{
	if (_t.isCreation())
		return Transaction(_t.value(), _t.gasPrice(), _gas, _t.data(), _t.nonce(), _secret);
	else
		return Transaction(_t.value(), _t.gasPrice(), _gas, _t.receiveAddress(), _t.data(), _t.nonce(), _secret);
}
void CWspCOTransaction::AbortInvoke()
	{
	// Check the state - no need to send S-MethodAbort primitive if the method
	// is still in the null state.
	if( iMethodState == ENullMethod )
		{
		// Inform the client that the tranaction has failed.
		TRAPD(err, Transaction().SendEventL(THTTPEvent::EFailed,
											THTTPEvent::EIncoming,
											THTTPFilterHandle::EProtocolHandler));

		// Get the protocol handler to deal with the method abort.
		iObserver.HandleMethodAbort(*this);				

		// If the event could not be sent, we must take more drastic action.  Note that
		// this _must_ follow the observer's handling of method abort, since the use
		// of RHTTPTransaction::Fail() is drastic, and could result in the whole
		// transaction having been deleted by the time we get back here.
		if (err != KErrNone)
			Transaction().Fail(THTTPFilterHandle::EProtocolHandler);
		}
	else
		{
		__ASSERT_DEBUG( iMethodState == ERequesting, Panic(KWspPanicBadMethodState) );

		// Send MethodAbort.req primitive - defer sending as could be in 
		// callstack from either MethodInvokeCnf() or MethodInvokeDataCnf().
		iPrimitiveSender->InitiateSend(ESMethodAbort);
		}
	}
예제 #3
0
void CDbTableDatabase::DoCreateTableL(const TDesC& aName,const CDbColSet& aColSet,const CDbKey* aPrimaryKey)
	{
	if (SchemaL().Find(aName))
		__LEAVE(KErrAlreadyExists);
// validate the colset set passed in
	Validate::NameL(aName);
	Validate::ColSetL(aColSet);
	Transaction().DDLBeginLC();
	iSchema.Add(CreateTableL(aName,aColSet,aPrimaryKey));
	Transaction().DDLCommitL();
	CleanupStack::Pop();		// rollback not required
	}
예제 #4
0
void
IDBCursor::Advance(uint32_t aCount, ErrorResult &aRv)
{
  AssertIsOnOwningThread();

  if (!mTransaction->IsOpen()) {
    aRv.Throw(NS_ERROR_DOM_INDEXEDDB_TRANSACTION_INACTIVE_ERR);
    return;
  }

  if (!mHaveValue || mContinueCalled) {
    aRv.Throw(NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR);
    return;
  }

  if (!aCount) {
    aRv.ThrowTypeError(MSG_INVALID_ADVANCE_COUNT);
    return;
  }

  mBackgroundActor->SendContinueInternal(AdvanceParams(aCount));

  mContinueCalled = true;

#ifdef IDB_PROFILER_USE_MARKS
  {
    if (mType == Type_ObjectStore || mType == Type_ObjectStoreKey) {
      IDB_PROFILER_MARK("IndexedDB Request %llu: "
                        "database(%s).transaction(%s).objectStore(%s)."
                        "cursor(%s).advance(%ld)",
                        "IDBRequest[%llu] MT IDBCursor.advance()",
                        Request()->GetSerialNumber(),
                        IDB_PROFILER_STRING(Transaction()->Database()),
                        IDB_PROFILER_STRING(Transaction()),
                        IDB_PROFILER_STRING(mSourceObjectStore),
                        IDB_PROFILER_STRING(mDirection), aCount);
    } else {
      IDB_PROFILER_MARK("IndexedDB Request %llu: "
                        "database(%s).transaction(%s).objectStore(%s)."
                        "index(%s).cursor(%s).advance(%ld)",
                        "IDBRequest[%llu] MT IDBCursor.advance()",
                        Request()->GetSerialNumber(),
                        IDB_PROFILER_STRING(Transaction()->Database()),
                        IDB_PROFILER_STRING(Transaction()),
                        IDB_PROFILER_STRING(mSourceIndex->ObjectStore()),
                        IDB_PROFILER_STRING(mSourceIndex),
                        IDB_PROFILER_STRING(mDirection), aCount);
    }
  }
#endif
}
예제 #5
0
/**
 * Media control, for spindle motor and media tray or door.
 * This includes CDROM, TAPE and anything with a media loader.
 *
 * @param lun Logical Unit Number
 * @param ctl 0x00 Stop Motor, 0x01 Start Motor, 0x02 Eject Media, 0x03 Load Media
 * @return 0 on success
 */
uint8_t BulkOnly::MediaCTL(uint8_t lun, uint8_t ctl) {
        Notify(PSTR("\r\nMediaCTL\r\n"), 0x80);
        Notify(PSTR("-----------------\r\n"), 0x80);
        SetCurLUN(lun);
        uint8_t rcode = MASS_ERR_UNIT_NOT_READY;
        if (bAddress) {
                CommandBlockWrapper cbw;

                cbw.dCBWSignature = MASS_CBW_SIGNATURE;
                cbw.dCBWTag = ++dCBWTag;
                cbw.dCBWDataTransferLength = 0;
                cbw.bmCBWFlags = MASS_CMD_DIR_OUT;
                cbw.bmCBWLUN = lun;
                cbw.bmCBWCBLength = 6;

                for (uint8_t i = 0; i < 16; i++)
                        cbw.CBWCB[i] = 0;

                cbw.CBWCB[0] = SCSI_CMD_START_STOP_UNIT;
                cbw.CBWCB[1] = lun << 5;
                cbw.CBWCB[4] = ctl & 0x03;

                rcode = HandleSCSIError(Transaction(&cbw, 0, NULL, 0));
        }
        return rcode;
}
void UK2Node_CommutativeAssociativeBinaryOperator::RemoveInputPin(UEdGraphPin* Pin)
{
	if(CanRemovePin(Pin))
	{
		FScopedTransaction Transaction( LOCTEXT("RemovePinTx", "RemovePin") );
		Modify();

		if (RemovePin(Pin))
		{
			--NumAdditionalInputs;

			int32 NameIndex = 0;
			const UEdGraphPin* OutPin = FindOutPin();
			const UEdGraphPin* SelfPin = FindSelfPin();
			for (int32 PinIndex = 0; PinIndex < Pins.Num(); ++PinIndex)
			{
				UEdGraphPin* LocalPin = Pins[PinIndex];
				if(LocalPin && (LocalPin != OutPin) && (LocalPin != SelfPin))
				{
					const FString PinName = GetNameForPin(NameIndex);
					if(PinName != LocalPin->PinName)
					{
						LocalPin->Modify();
						LocalPin->PinName = PinName;
					}
					NameIndex++;
				}
			}
			FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(GetBlueprint());
		}
	}
}
void UAnimGraphNode_BlendListByEnum::RemovePinFromBlendList(UEdGraphPin* Pin)
{
	int32 RawArrayIndex = 0;
	bool bIsPosePin = false;
	bool bIsTimePin = false;
	GetPinInformation(Pin->PinName, /*out*/ RawArrayIndex, /*out*/ bIsPosePin, /*out*/ bIsTimePin);

	const int32 ExposedEnumIndex = (bIsPosePin || bIsTimePin) ? (RawArrayIndex - 1) : INDEX_NONE;

	if (ExposedEnumIndex != INDEX_NONE)
	{
		FScopedTransaction Transaction( LOCTEXT("RemovePin", "RemovePin") );
		Modify();

		// Record it as no longer exposed
		VisibleEnumEntries.RemoveAt(ExposedEnumIndex);

		// Remove the pose from the node
		UProperty* AssociatedProperty;
		int32 ArrayIndex;
		GetPinAssociatedProperty(GetFNodeType(), Pin, /*out*/ AssociatedProperty, /*out*/ ArrayIndex);

		ensure(ArrayIndex == (ExposedEnumIndex + 1));

		// setting up removed pins info 
		RemovedPinArrayIndex = ArrayIndex;
		Node.RemovePose(ArrayIndex);
		ReconstructNode();
		//@TODO: Just want to invalidate the visual representation currently
		FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(GetBlueprint());
	}
}
void CWspCOTransaction::MethodInvokeData()
	{
	__ASSERT_DEBUG( iNegotiatedCapInfo.GetProtocolOptions() & ELargeDataTransfer, Panic(KWspPanicLDTNotSuppoted) );
	__ASSERT_DEBUG( iMethodState == ERequesting, Panic(KWspPanicNotExpectingMoreRequestData) );

	__LOG1(_L("Trans %d - Sending S-MethodInvokeData.req"), Transaction().Id());

	// Down-cast to derived CTxData object
	CWspCOTxData* txData = STATIC_CAST(CWspCOTxData*, iTxData);

	// Get the request body data supplier
	MHTTPDataSupplier& dataSupplier = txData->RequestBodyData();
	TPtrC8 bodyData;
	iMoreRequestData = !dataSupplier.GetNextDataPart(bodyData);

	// Send the S-MethodInvoke.req primitive
	iMethodInvoker.MethodInvokeDataReq(
									  *this, 
									  bodyData,
									  txData->RequestHeadersData(),
									  iMoreRequestData
									  );

	__LOG(_L("---Method in Requesting state"));

	// WSP method transaction remains in requesting state - do nothing.
	// Release request body data
	dataSupplier.ReleaseData();
	}
void CWspCOTransaction::MethodInvoke()
	{
	__ASSERT_DEBUG( iMethodState == ENullMethod, Panic(KWspPanicMethodAlreadyActive) );

	__LOG1(_L("Trans %d - Sending S-MethodInvoke.req"), Transaction().Id());
	
	// Down-cast to derived CTxData object
	CWspCOTxData* txData = STATIC_CAST(CWspCOTxData*, iTxData);

	// Get the request body data supplier
	MHTTPDataSupplier& dataSupplier = txData->RequestBodyData();
	TPtrC8 bodyData;
	iMoreRequestData = !dataSupplier.GetNextDataPart(bodyData);

	// Send the S-MethodInvoke.req primitive
	RHTTPRequest request = iTrans.Request();
	iMethodInvoker.MethodInvokeReq(
								  *this, 
								  request.Method(), 
								  request.URI(), 
								  txData->RequestHeadersData(),
								  bodyData,
								  iMoreRequestData
								  );
	// WSP method transaction is requesting - update state
	iMethodState = ERequesting;

	__LOG(_L("---Method in Requesting state"));

	// Release request body data
	dataSupplier.ReleaseData();
	}
예제 #10
0
already_AddRefed<IDBTransaction>
IDBDatabase::Transaction(JSContext* aCx,
                         const StringOrStringSequence& aStoreNames,
                         IDBTransactionMode aMode,
                         ErrorResult& aRv)
{
  AssertIsOnOwningThread();

  if ((aMode == IDBTransactionMode::Readwriteflush ||
       aMode == IDBTransactionMode::Cleanup) &&
      !IndexedDatabaseManager::ExperimentalFeaturesEnabled()) {
    // Pretend that this mode doesn't exist. We don't have a way to annotate
    // certain enum values as depending on preferences so we just duplicate the
    // normal exception generation here.
    aRv.ThrowTypeError<MSG_INVALID_ENUM_VALUE>(
      NS_LITERAL_STRING("Argument 2 of IDBDatabase.transaction"),
      NS_LITERAL_STRING("readwriteflush"),
      NS_LITERAL_STRING("IDBTransactionMode"));
    return nullptr;
  }

  RefPtr<IDBTransaction> transaction;
  aRv = Transaction(aCx, aStoreNames, aMode, getter_AddRefs(transaction));
  if (NS_WARN_IF(aRv.Failed())) {
    return nullptr;
  }

  return transaction.forget();
}
예제 #11
0
//
// Create an incremental table altering object
//
CDbTableDatabase::CIncremental* CDbTableDatabase::OpenAlterTableL(const TDesC& aTable,const CDbColSet& aNewDef,TInt& aStep)
	{
	CDbTableDef& tDef=SchemaL().FindL(aTable);
	Validate::ColSetL(aNewDef);
	Release(tDef);				// release the tables using the old schema
	return CAlterTable::NewL(Transaction(),tDef,aNewDef,aStep);
	}
FReply FEditorUtilityInstanceDetails::OnExecuteAction(TWeakObjectPtr<UFunction> WeakFunctionPtr)
{
    if (UFunction* Function = WeakFunctionPtr.Get())
    {
        FScopedTransaction Transaction( NSLOCTEXT("UnrealEd", "BlutilityAction", "Blutility Action") );
        FEditorScriptExecutionGuard ScriptGuard;

        UClass* MinRequiredClass = Function->GetOuterUClass();

        // Execute this function on any objects that support it
        for (auto SelectedObjectIt = SelectedObjectsList.CreateConstIterator(); SelectedObjectIt; ++SelectedObjectIt)
        {
            UObject* Object = (*SelectedObjectIt).Get();

            if ((Object != NULL) && (Object->IsA(MinRequiredClass)))
            {
                Object->ProcessEvent(Function, NULL);

                if (UGlobalEditorUtilityBase* BlutilityInstance = Cast<UGlobalEditorUtilityBase>(Object))
                {
                    BlutilityInstance->PostExecutionCleanup();
                }
            }
        }
    }

    return FReply::Handled();
}
예제 #13
0
void CWspCOTransaction::MethodInvokeDataCnf()
	{
	__ASSERT_DEBUG( iMethodState == ERequesting, Panic(KWspPanicBadMethodState) );

	__LOG1(_L("Trans %d - Received S-MethodInvokeData.cnf"), Transaction().Id());
	__LOG1(_L("---More Data flag : %d."), iMoreRequestData);

	// Inform the Tx data object that cnf has been received.
	STATIC_CAST(CWspCOTxData*, iTxData)->ReceivedCnf();

	// Is the requst complete? Stay in requesting if not.
	if( !iMoreRequestData )
		{
		// The request is complete - all the request body data has been received
		// and, as iMoreRequestData is cleared, all the headers and body data 
		// have been sent. Can delete the Tx data object.
		ResetTxData();

		// WSP method transaction is waiting - update state
		iMethodState = EWaiting;

		__LOG(_L("---Method in Waiting state"));
		}
#if defined (_DEBUG) && defined (_LOGGING)
	else
		__LOG(_L("---Method in Requesting state"));
#endif
	}
예제 #14
0
/**
 * For driver use only. Used during Driver Init
 *
 * @param lun Logical Unit Number
 * @param bsize
 * @param buf
 * @return
 */
uint8_t BulkOnly::Inquiry(uint8_t lun, uint16_t bsize, uint8_t *buf) {
        Notify(PSTR("\r\nInquiry\r\n"), 0x80);
        Notify(PSTR("---------\r\n"), 0x80);

        CommandBlockWrapper cbw;
        SetCurLUN(lun);
        cbw.dCBWSignature = MASS_CBW_SIGNATURE;
        cbw.dCBWTag = ++dCBWTag;
        cbw.dCBWDataTransferLength = bsize;
        cbw.bmCBWFlags = MASS_CMD_DIR_IN;
        cbw.bmCBWLUN = lun;
        cbw.bmCBWCBLength = 6;

        for (uint8_t i = 0; i < 16; i++)
                cbw.CBWCB[i] = 0;

        cbw.CBWCB[0] = SCSI_CMD_INQUIRY;
        cbw.CBWCB[1] = lun << 5;
        cbw.CBWCB[4] = bsize;

        uint8_t rc = HandleSCSIError(Transaction(&cbw, bsize, buf, 0));
#if 0
        if (!rc) {
                printf("LUN %i `", lun);
                for (int i = 8; i < 36; i++) printf("%c", buf[i]);
                printf("'\r\nQualifier %1.1X ", (buf[0]&0xE0) >> 5);
                printf("Device type %2.2X ", buf[0]&0x1f);
                printf("RMB %1.1X ", buf[1]&0x80 >> 7);
                printf("SSCS% 1.1X ", buf[5]&0x80 >> 7);
                uint8_t sv = buf[2];
                printf("SCSI version %2.2X\r\nDevice conforms to ", sv);
                switch (sv) {
                        case 0:
                                printf("No specific");
                                break;
                                /*
                                case 1:
                                        printf("");
                                        break;
                                 */
                        case 2:
                                printf("ANSI 2");
                                break;
                        case 3:
                                printf("ANSI INCITS 301-1997 (SPC)");
                                break;
                        case 4:
                                printf("ANSI INCITS 351-2001 (SPC-2)");
                                break;
                        case 5:
                                printf("ANSI INCITS 408-2005 (SPC-4)");
                                break;
                        case 6:
                                printf("T10/1731-D (SPC-4)");
                                break;
                        default:
                                printf("unknown");
                }
                printf(" standards.\r\n");
        }
예제 #15
0
void FJavascriptEditorModule::StartupModule()
{
#if WITH_EDITOR	
	auto Isolate = NewObject<UJavascriptIsolate>();
	auto Context = Isolate->CreateContext();
	
	JavascriptContext = Context;
	JavascriptContext->AddToRoot();

	JavascriptContext->SetContextId(TEXT("Editor"));

	Tick = NewObject<UJavascriptEditorTick>(JavascriptContext);
	JavascriptContext->Expose(TEXT("Root"), Tick);
	Tick->AddToRoot();

	if (!IsRunningCommandlet())
	{
		FScopedTransaction Transaction(NSLOCTEXT("UnrealEd", "UnrealJS", "Javascript action"));
		FEditorScriptExecutionGuard ScriptGuard;

		Context->RunFile("editor.js");
	}

	bRegistered = true;
	
	FCoreDelegates::OnPreExit.AddRaw(this, &FJavascriptEditorModule::Unregister);
#endif
}
예제 #16
0
void UK2Node_MakeArray::RemoveInputPin(UEdGraphPin* Pin)
{
	FScopedTransaction Transaction( LOCTEXT("RemovePinTx", "RemovePin") );
	Modify();

	check(Pin->Direction == EGPD_Input);

	int32 PinRemovalIndex = INDEX_NONE;
	if (Pins.Find(Pin, /*out*/ PinRemovalIndex))
	{
		for (int32 PinIndex = PinRemovalIndex + 1; PinIndex < Pins.Num(); ++PinIndex)
		{
			Pins[PinIndex]->Modify();
			Pins[PinIndex]->PinName = FString::Printf(TEXT("[%d]"), PinIndex - 2); // -1 to shift back one, -1 to account for the output pin at the 0th position
		}

		Pins.RemoveAt(PinRemovalIndex);
		Pin->Modify();
		Pin->BreakAllPinLinks();

		--NumInputs;

		ClearPinTypeToWildcard();

		FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(GetBlueprint());
	}
}
예제 #17
0
	virtual void Tick(float DeltaTime) override
	{
		FScopedTransaction Transaction(NSLOCTEXT("UnrealEd", "UnrealJS", "Javascript action"));
		FEditorScriptExecutionGuard ScriptGuard;

		Object->OnTick.ExecuteIfBound(DeltaTime);
	}
예제 #18
0
/* We won't be needing this... */
uint8_t BulkOnly::Read(uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t blocks, USBReadParser * prs) {
#if MS_WANT_PARSER
        if(!LUNOk[lun]) return MASS_ERR_NO_MEDIA;
        Notify(PSTR("\r\nRead (With parser)\r\n"), 0x80);
        Notify(PSTR("---------\r\n"), 0x80);

        CommandBlockWrapper cbw = CommandBlockWrapper();

        cbw.dCBWSignature = MASS_CBW_SIGNATURE;
        cbw.dCBWTag = ++dCBWTag;
        cbw.dCBWDataTransferLength = ((uint32_t)bsize * blocks);
        cbw.bmCBWFlags = MASS_CMD_DIR_IN,
                cbw.bmCBWLUN = lun;
        cbw.bmCBWCBLength = 10;

        cbw.CBWCB[0] = SCSI_CMD_READ_10;
        cbw.CBWCB[8] = blocks;
        cbw.CBWCB[2] = ((addr >> 24) & 0xff);
        cbw.CBWCB[3] = ((addr >> 16) & 0xff);
        cbw.CBWCB[4] = ((addr >> 8) & 0xff);
        cbw.CBWCB[5] = (addr & 0xff);

        return HandleSCSIError(Transaction(&cbw, bsize, prs, 1));
#else
        return MASS_ERR_NOT_IMPLEMENTED;
#endif
}
예제 #19
0
void CWspCOTransaction::MethodResultInd(
										TInt					aStatus, 
										const TDesC8&			aResponseHeaders, 
										MHTTPDataSupplier&		aResponseBody,
										TBool					aMoreData
										)
	{
	__ASSERT_DEBUG( iMethodState == EWaiting, Panic(KWspPanicBadMethodState) );

	__LOG1(_L("Trans %d - Received S-MethodResult.ind"), Transaction().Id());
	__LOG1(_L("---More Data flag : %d."), aMoreData);

	// Are there more S-MethodResultData primitives to follow?
	if( aMoreData )
		{
		// WSP method transaction is in Waiting2 state - update state
		iMethodState = EWaiting2;

		__LOG(_L("---Method in Waiting2 state"));
		}
	else
		{
		// WSP method transaction is in Completing state - update state
		iMethodState = ECompleting;

		__LOG(_L("---Method in Completing state"));
		}

	// Decode response status code from WSP binary representation
	TInt httpStatus = 0;
	if ((aStatus >= 0x10) && (aStatus <= 0x65))
		{
		// Calculate this status code in decimal
		httpStatus = 100*(aStatus/0x10);
		if (httpStatus == 500)
			httpStatus = 416;
		if (httpStatus == 600)
			httpStatus = 500;
		httpStatus += aStatus & 0xf;
		}

	// Set the response status
	iTrans.Response().SetStatusCode(httpStatus);

	// Process the response header and body data.
	TRAPD(error, ProcessResponseDataL(aResponseHeaders, aResponseBody, aMoreData));

	// Check everything went ok
	if( error != KErrNone )
		{
		// Ok the S-MethodResult primitive was not dealt with correctly - abort
		// the method
		iPrimitiveSender->InitiateSend(ESMethodAbort);

		__LOG1(_L("---Could not deal with S-MethodResult.ind primitive. Error : %d"), error);
		__LOG( _L("---Aborting the method."));
		}
	}
예제 #20
0
/**
 * For driver use only.
 *
 * @param lun Logical Unit Number
 * @param size
 * @param buf
 * @return
 */
uint8_t BulkOnly::RequestSense(uint8_t lun, uint16_t size, uint8_t *buf) {
        Notify(PSTR("\r\nRequestSense\r\n"), 0x80);
        Notify(PSTR("----------------\r\n"), 0x80);

        CDB6_t cdb = CDB6_t(SCSI_CMD_REQUEST_SENSE, lun, 0LU, (uint8_t)size, 0);
        CommandBlockWrapper cbw = CommandBlockWrapper(++dCBWTag, (uint32_t)size, &cdb, (uint8_t)MASS_CMD_DIR_IN);
        //SetCurLUN(lun);
        return Transaction(&cbw, size, buf);
}
예제 #21
0
//
// Prepare the data pipeline
//
CDbCursor* CDbTableDatabase::PrepareTableL(const TDesC& aTable,RDbRowSet::TAccess aAccess)
	{
	Transaction().DMLCheckL();	// ensure we can open a cursor
	RDbAccessPlan plan;
	plan.BuildLC(*this,aTable,aAccess);
	CDbTableCursor* cursor=CDbTableCursor::NewL(plan,aAccess);
	CleanupStack::Pop();			// the plan
	return cursor;
	}
예제 #22
0
Transaction Transaction::create(Connection connection)
{
    ib_tx_t* ib_tx;
    throw_if_error(
        ib_tx_create(&ib_tx, connection.ib(), NULL)
    );

    return Transaction(ib_tx);
}
예제 #23
0
CDbTableDatabase::CIncremental* CDbTableDatabase::OpenDropTableL(const TDesC& aTable,TInt& aStep)
	{
	CDbTableDef& tDef=SchemaL().FindL(aTable);
//
	Release(tDef);				// release the tables using the old schema
	CDropTable* drop=CDropTable::NewL(Transaction(),&tDef,aStep);
	iSchema.Remove(&tDef);
	return drop;
	}
void UAnimGraphNode_LayeredBoneBlend::AddPinToBlendByFilter()
{
	FScopedTransaction Transaction( NSLOCTEXT("A3Nodes", "AddPinToBlend", "AddPinToBlendByFilter") );
	Modify();

	Node.AddPose();
	ReconstructNode();
	FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(GetBlueprint());
}
예제 #25
0
uint16_t CanonPS::EventCheck(PTPReadParser *parser)
{
	uint16_t	ptp_error	= PTP_RC_GeneralError;
	OperFlags	flags		= { 0, 0, 0, 1, 1, 0 };

	if ( (ptp_error = Transaction(PTP_OC_PS_CheckEvent, &flags, NULL, parser)) != PTP_RC_OK)
		Message(PSTR("EOSEventCheck: Error."), ptp_error);

	return ptp_error;
}
예제 #26
0
파일: canoneos.cpp 프로젝트: felis/PTP_2.0
uint16_t CanonEOS::GetDeviceInfoEx(PTPReadParser *parser)
{
	uint16_t	ptp_error	= PTP_RC_GeneralError;
	OperFlags	flags		= { 0, 0, 0, 1, 1, 0 };

	if ( (ptp_error = Transaction(EOS_OC_GetDeviceInfoEx, &flags, NULL, (void*)parser)) != PTP_RC_OK)
		PTPTRACE2("GetDeviceInfo error:", ptp_error);

	return ptp_error;
}
예제 #27
0
//
// Remove index from schema first, then remove index data
//
CDbTableDatabase::CIncremental* CDbTableDatabase::OpenDropIndexL(const TDesC& aName,const TDesC& aTable,TInt& aStep)
	{
	CDbTableDef& tDef=SchemaL().FindL(aTable);
	CDbTableIndexDef& xDef=tDef.Indexes().FindL(aName);
//
	Release(tDef);				// release any table using the old schema
	CDropIndex* drop=CDropIndex::NewL(Transaction(),tDef,&xDef,aStep);
	tDef.Indexes().Remove(&xDef);
	return drop;
	}
예제 #28
0
TransactionPool::TransactionPool(MovingAverageStats avg) {
	this->prev_avg = avg.prev_avg;
	this->avg_max = avg.avg_max;
	for (int i = 0; i < POOL_SIZE; i++) {
		pool.push_back(Transaction());
	}
	this->logger = Logger::instance();
	this->open_orders = new vector<int>();
	this->update_open_orders();
}
void UAnimGraphNode_BlendListByInt::AddPinToBlendList()
{
	FScopedTransaction Transaction( NSLOCTEXT("A3Nodes", "AddBlendListPin", "AddBlendListPin") );
	Modify();

	Node.AddPose();
	ReconstructNode();

	FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(GetBlueprint());
}
예제 #30
0
uint16_t CanonPS::EventCheck(PTPReadParser *parser)
{
  uint16_t        ptp_error       = PTP_RC_GeneralError;
  OperFlags       flags           = { 0, 0, 0, 1, 1, 0 };
  
  if ( (ptp_error = Transaction(PS_OC_CheckEvent, &flags, NULL, parser)) != PTP_RC_OK)
            PTPTRACE2("EventCheck error: ", ptp_error);
  
  return ptp_error;
}