}elseif(($method=='get') and ($ex[$paracount-6] == 'v1.php') and ($ex[$paracount-5]=='cloud') and ($ex[$paracount-4] == 'user') and ($ex[$paracount-2] == 'privatekey')){
$user=$ex[$paracount-3];
OC_OCS::privateKeyGet($format,$user);
//keysetprivate
}elseif(($method=='post') and ($ex[$paracount-6] == 'v1.php') and ($ex[$paracount-5]=='cloud') and ($ex[$paracount-4] == 'user') and ($ex[$paracount-2] == 'privatekey')){
$user=$ex[$paracount-3];
$key = self::readData('post', 'key', 'string');
OC_OCS::privateKeySet($format,$user, $key);
// keygetfiles
}elseif(($method=='get') and ($ex[$paracount-6] == 'v1.php') and ($ex[$paracount-5]=='cloud') and ($ex[$paracount-4] == 'user') and ($ex[$paracount-2] == 'filekey')){
$user=$ex[$paracount-3];
OC_OCS::fileKeyGet($format,$user);
//keysetfiles
}elseif(($method=='post') and ($ex[$paracount-6] == 'v1.php') and ($ex[$paracount-5]=='cloud') and ($ex[$paracount-4] == 'user') and ($ex[$paracount-2] == 'filekey')){
$user=$ex[$paracount-3];
$key = self::readData('post', 'key', 'string');
$file = self::readData('post', 'file', 'string');
OC_OCS::fileKeySet($format,$user, $file, $key);
// add more calls here
// please document all the call in the draft spec
@ -766,7 +779,7 @@ class OC_OCS {
$login=OC_OCS::checkpassword();
if(OC_Group::inGroup($login, 'admin') or ($login==$user)) {
if(OC_User::userExists($user)){
//TODO: GET file key
//TODO: GET file key, check needed if it is a shared file or not