예제 #1
0
파일: testdb.c 프로젝트: zeroch/catfuse
int main(int argc,char* argv[]){
    

    char objID[255]={};
    unsigned char hashPath1[2000]={};
    char output[2000]={};
    unsigned char hashPath2[2000]={};

    strcpy(objID,"host");
    strcpy(hashPath1,"hash");
    int version = 1;

    postContent(objID,version,hashPath1,output);
    printf("%s\n",output);

    getContent(objID, hashPath2);
    printf("%s\n",hashPath2);

    // Testing delContent
    char objID1[255]={};
    strcpy(objID1,"A");
    unsigned char del_reply[2000]={};
    delContent(objID1,del_reply);
    printf("%s\n",del_reply);

    // Testing listContent
    unsigned char list_reply[2000]={};
    listContent(list_reply);
    printf("%s\n",list_reply);


/*    message = "1,1";
    if(send(sockfd,message,strlen(message),0)<0){
        puts("Send failed");
        return 1;
    }
    if(recv(sockfd,server_reply1,2000,0)<0){
        puts("Receive Failed");
        return 1;
    }
    puts(server_reply1);
*/

    return 0;
}
예제 #2
0
nsAccessible *
nsXULListitemAccessible::GetListAccessible()
{
  if (IsDefunct())
    return nsnull;
  
  nsCOMPtr<nsIDOMXULSelectControlItemElement> listItem =
    do_QueryInterface(mContent);
  if (!listItem)
    return nsnull;

  nsCOMPtr<nsIDOMXULSelectControlElement> list;
  listItem->GetControl(getter_AddRefs(list));

  nsCOMPtr<nsIContent> listContent(do_QueryInterface(list));
  if (!listContent)
    return nsnull;

  return GetAccService()->GetAccessibleInWeakShell(listContent, mWeakShell);
}