Example #1
0
void OcsShareJob::deleteShare(const QString &shareId)
{
    appendPath(shareId);
    setVerb("DELETE");

    start();
}
Example #2
0
void OcsShareJob::deleteShare(int shareId)
{
    appendPath(shareId);
    setVerb("DELETE");

    start();
}
Example #3
0
void AGOSEngine_Feeble::resetVerbs() {
	_verbHitArea = 300;
	int cursor = 0;
	int animMax = 16;

	if (getBitFlag(203)) {
		cursor = 14;
		animMax = 9;
	} else if (getBitFlag(204)) {
		cursor = 15;
		animMax = 9;
	} else if (getBitFlag(207)) {
		cursor = 26;
		animMax = 2;
	}

	_mouseCursor = cursor;
	_mouseAnimMax = animMax;
	_mouseAnim = 1;
	_needHitAreaRecalc++;

	if (getBitFlag(99)) {
		setVerb(NULL);
	}
}
Example #4
0
void AGOSEngine::resetVerbs() {
	if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2)
		return;

	uint id;
	HitArea *ha;

	if (getGameType() == GType_SIMON2) {
		id = 2;
		if (!getBitFlag(79))
		id = (_mouse.y >= 136) ? 102 : 101;
	} else {
		id = (_mouse.y >= 136) ? 102 : 101;
	}

	_defaultVerb = id;

	ha = findBox(id);
	if (ha == NULL)
		return;

	if (ha->flags & kBFBoxDead) {
		_defaultVerb = 999;
		_currentVerbBox = NULL;
	} else {
		_verbHitArea = ha->verb;
		setVerb(ha);
	}
}
Example #5
0
void OcsShareJob::getShares(const QString &path)
{
    setVerb("GET");

    addParam(QString::fromLatin1("path"), path);
    addPassStatusCode(404);

    start();
}
Example #6
0
void OcsShareJob::setName(const QString &shareId, const QString &name)
{
    appendPath(shareId);
    setVerb("PUT");
    addParam(QString::fromLatin1("name"), name);
    _value = name;

    start();
}
Example #7
0
Request::Request(const Request &other)
    :QNetworkRequest(other)
{

    setVerb(other.verb());
    setParams(other.params());
    setName(other.name());

}
Example #8
0
void OcsShareJob::setPassword(int shareId, const QString &password)
{
    appendPath(shareId);
    setVerb("PUT");

    addParam(QString::fromLatin1("password"), password);

    start();
}
Example #9
0
void OcsShareJob::setPublicUpload(int shareId, bool publicUpload)
{
    appendPath(shareId);
    setVerb("PUT");

    const QString value = QString::fromLatin1(publicUpload ? "true" : "false");
    addParam(QString::fromLatin1("publicUpload"), value);

    start();
}
Example #10
0
void OcsShareJob::setPermissions(const QString &shareId,
    const Share::Permissions permissions)
{
    appendPath(shareId);
    setVerb("PUT");

    addParam(QString::fromLatin1("permissions"), QString::number(permissions));
    _value = (int)permissions;

    start();
}
Example #11
0
void OcsShareJob::setExpireDate(int shareId, const QDate &date)
{
    appendPath(shareId);
    setVerb("PUT");

    if (date.isValid()) {
        addParam(QString::fromLatin1("expireDate"), date.toString("yyyy-MM-dd"));
    } else {
        addParam(QString::fromLatin1("expireDate"), QString());
    }

    start();
}
Example #12
0
void OcsShareJob::createShare(const QString& path, 
                              const Share::ShareType shareType,
                              const QString& shareWith,
                              const Share::Permissions permissions)
{
    setVerb("POST");

    addParam(QString::fromLatin1("path"), path);
    addParam(QString::fromLatin1("shareType"), QString::number(shareType));
    addParam(QString::fromLatin1("shareWith"), shareWith);
    addParam(QString::fromLatin1("permissions"), QString::number(permissions));

    start();
}
Example #13
0
void OcsShareeJob::getSharees(const QString &search,
                              const QString &itemType,
                              int page,
                              int perPage)
{
    setVerb("GET");

    addParam(QString::fromLatin1("search"), search);
    addParam(QString::fromLatin1("itemType"), itemType);
    addParam(QString::fromLatin1("page"), QString::number(page));
    addParam(QString::fromLatin1("perPage"), QString::number(perPage));

    start();
}
Example #14
0
void OcsShareJob::createLinkShare(const QString &path, 
                                  const QString &password)
{
    setVerb("POST");

    addParam(QString::fromLatin1("path"), path);
    addParam(QString::fromLatin1("shareType"), QString::number(Share::TypeLink));

    if (!password.isEmpty()) {
        addParam(QString::fromLatin1("password"), password);
    }

    addPassStatusCode(403);

    start();
}
Example #15
0
bool Object::parse(DATFile &dat) {
	assert(_variables);

	ObjectVerb curVerb = kObjectVerbNone;

	const Common::String *cmd, *args;
	while (dat.nextLine(cmd, args)) {
		if (cmd->equalsIgnoreCase("ObjDesc")) {
			// Object description / name

			if (!_name.empty()) {
				// Already got a name, so this is already the next object
				dat.previous();
				break;
			}

			if (!setName(*args))
				return false;

			debugC(-1, kDebugObjects, "Parsing object \"%s\"", _name.c_str());

		} else if (cmd->equalsIgnoreCase("ObjXY")) {
			// Object coordinates

			if (!setDimensions(*args))
				return false;

		} else if (cmd->matchString("*Start")) {
			// Start of a verb section

			if (!setVerb(*cmd, curVerb))
				return false;

		} else if (cmd->matchString("*End", true)) {
		} else {
			// Script chunk

			if (!addScriptChunk(*cmd, dat, curVerb))
				return false;

		}
	}

	return true;
}
Example #16
0
void OcsShareJob::createShare(const QString &path, ShareType shareType, const QString &password, const QDate &date)
{
    setVerb("POST");

    addParam(QString::fromLatin1("path"), path);
    addParam(QString::fromLatin1("shareType"), QString::number(static_cast<int>(shareType)));

    if (!password.isEmpty()) {
        addParam(QString::fromLatin1("shareType"), password);
    }

    if (date.isValid()) {
        addParam(QString::fromLatin1("expireDate"), date.toString("yyyy-MM-dd"));
    }

    addPassStatusCode(403);

    start();
}
Example #17
0
Link::Link(const std::string& n_verb):
    m_type(NodeContent::LINK)
{
    setVerb(n_verb);
}
Example #18
0
void AGOSEngine_Simon1::handleMouseMoved() {
	uint x;

	if (_mouseHideCount) {
		CursorMan.showMouse(false);
		return;
	}

	CursorMan.showMouse(true);
	_mouse = _eventMan->getMousePos();

	if (_defaultVerb) {
		uint id = 101;
		if (_mouse.y >= 136)
			id = 102;
		if (_defaultVerb != id)
			resetVerbs();
	}

	if (getGameType() == GType_FF) {
		if (getBitFlag(99)) { // Oracle
			if (_mouse.x >= 10 && _mouse.x <= 635 && _mouse.y >= 5 && _mouse.y <= 475) {
				setBitFlag(98, true);
			} else {
				if (getBitFlag(98)) {
					_variableArray[254] = 63;
				}
			}
		} else if (getBitFlag(88)) { // Close Up
			if (_mouse.x >= 10 && _mouse.x <= 635 && _mouse.y >= 5 && _mouse.y <= 475) {
				setBitFlag(87, true);
			} else {
				if (getBitFlag(87)) {
					_variableArray[254] = 75;
				}
			}
		}

		if (_rightButtonDown) {
			_rightButtonDown = false;
			setVerb(NULL);
		}
	} else if (getGameType() == GType_SIMON2) {
		if (getBitFlag(79)) {
			if (!_vgaVar9) {
				if (_mouse.x >= 315 || _mouse.x < 9)
					goto get_out2;
				_vgaVar9 = 1;
			}
			if (_scrollCount == 0) {
				if (_mouse.x >= 315) {
					if (_scrollX != _scrollXMax)
						_scrollFlag = 1;
				} else if (_mouse.x < 8) {
					if (_scrollX != 0)
						_scrollFlag = -1;
				}
			}
		} else {
		get_out2:;
			_vgaVar9 = 0;
		}
	}

	if (_mouse != _mouseOld)
		_needHitAreaRecalc++;

	if (_leftButtonOld == 0 && _leftButtonCount != 0) {
		boxController(_mouse.x, _mouse.y, 3);
	}
	_leftButtonOld = _leftButton;

	x = 0;
	if (_lastHitArea3 == 0 && _leftButtonDown) {
		_leftButtonDown = false;
		x = 1;
	} else {
		if (!_litBoxFlag && _needHitAreaRecalc == 0)
			goto get_out;
	}

	boxController(_mouse.x, _mouse.y, x);
	_lastHitArea3 = _lastHitArea;
	if (x == 1 && _lastHitArea == NULL)
		_lastHitArea3 = (HitArea *) -1;

get_out:
	_mouseOld = _mouse;
	drawMousePointer();

	_needHitAreaRecalc = 0;
	_litBoxFlag = false;
}
Example #19
0
void OcsShareJob::getSharedWithMe()
{
    setVerb("GET");
    addParam(QLatin1String("shared_with_me"), QLatin1String("true"));
    start();
}